mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
drm/hisilicon: Delete the entire file hibmc_ttm.c
Delete the entire file hibmc_ttm.c. drmm_vram_helper_init() can be called directly from hibmc_load(). hibmc_dumb_create() and hibmc_mode_funcs can go to hibmc_drm_drv.c v2: change Deletted to Delete Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/1607044999-47666-13-git-send-email-tiantao6@hisilicon.com
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
hibmc-drm-y := hibmc_drm_drv.o hibmc_drm_de.o hibmc_drm_vdac.o hibmc_ttm.o hibmc_drm_i2c.o
|
hibmc-drm-y := hibmc_drm_drv.o hibmc_drm_de.o hibmc_drm_vdac.o hibmc_drm_i2c.o
|
||||||
|
|
||||||
obj-$(CONFIG_DRM_HISI_HIBMC) += hibmc-drm.o
|
obj-$(CONFIG_DRM_HISI_HIBMC) += hibmc-drm.o
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <drm/drm_atomic_helper.h>
|
#include <drm/drm_atomic_helper.h>
|
||||||
#include <drm/drm_drv.h>
|
#include <drm/drm_drv.h>
|
||||||
|
#include <drm/drm_gem_framebuffer_helper.h>
|
||||||
#include <drm/drm_gem_vram_helper.h>
|
#include <drm/drm_gem_vram_helper.h>
|
||||||
#include <drm/drm_irq.h>
|
#include <drm/drm_irq.h>
|
||||||
#include <drm/drm_managed.h>
|
#include <drm/drm_managed.h>
|
||||||
@@ -43,6 +44,12 @@ static irqreturn_t hibmc_drm_interrupt(int irq, void *arg)
|
|||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int hibmc_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||||
|
struct drm_mode_create_dumb *args)
|
||||||
|
{
|
||||||
|
return drm_gem_vram_fill_create_dumb(file, dev, 0, 128, args);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct drm_driver hibmc_driver = {
|
static const struct drm_driver hibmc_driver = {
|
||||||
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
|
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
|
||||||
.fops = &hibmc_fops,
|
.fops = &hibmc_fops,
|
||||||
@@ -77,6 +84,13 @@ static const struct dev_pm_ops hibmc_pm_ops = {
|
|||||||
hibmc_pm_resume)
|
hibmc_pm_resume)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct drm_mode_config_funcs hibmc_mode_funcs = {
|
||||||
|
.mode_valid = drm_vram_helper_mode_valid,
|
||||||
|
.atomic_check = drm_atomic_helper_check,
|
||||||
|
.atomic_commit = drm_atomic_helper_commit,
|
||||||
|
.fb_create = drm_gem_fb_create,
|
||||||
|
};
|
||||||
|
|
||||||
static int hibmc_kms_init(struct hibmc_drm_private *priv)
|
static int hibmc_kms_init(struct hibmc_drm_private *priv)
|
||||||
{
|
{
|
||||||
struct drm_device *dev = &priv->dev;
|
struct drm_device *dev = &priv->dev;
|
||||||
@@ -262,9 +276,12 @@ static int hibmc_load(struct drm_device *dev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
ret = hibmc_mm_init(priv);
|
ret = drmm_vram_helper_init(dev, pci_resource_start(dev->pdev, 0),
|
||||||
if (ret)
|
priv->fb_size);
|
||||||
|
if (ret) {
|
||||||
|
drm_err(dev, "Error initializing VRAM MM; %d\n", ret);
|
||||||
goto err;
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
ret = hibmc_kms_init(priv);
|
ret = hibmc_kms_init(priv);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@@ -64,10 +64,6 @@ int hibmc_de_init(struct hibmc_drm_private *priv);
|
|||||||
int hibmc_vdac_init(struct hibmc_drm_private *priv);
|
int hibmc_vdac_init(struct hibmc_drm_private *priv);
|
||||||
|
|
||||||
int hibmc_mm_init(struct hibmc_drm_private *hibmc);
|
int hibmc_mm_init(struct hibmc_drm_private *hibmc);
|
||||||
int hibmc_dumb_create(struct drm_file *file, struct drm_device *dev,
|
|
||||||
struct drm_mode_create_dumb *args);
|
|
||||||
int hibmc_ddc_create(struct drm_device *drm_dev, struct hibmc_connector *connector);
|
int hibmc_ddc_create(struct drm_device *drm_dev, struct hibmc_connector *connector);
|
||||||
|
|
||||||
extern const struct drm_mode_config_funcs hibmc_mode_funcs;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,50 +0,0 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
/* Hisilicon Hibmc SoC drm driver
|
|
||||||
*
|
|
||||||
* Based on the bochs drm driver.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2016 Huawei Limited.
|
|
||||||
*
|
|
||||||
* Author:
|
|
||||||
* Rongrong Zou <zourongrong@huawei.com>
|
|
||||||
* Rongrong Zou <zourongrong@gmail.com>
|
|
||||||
* Jianhua Li <lijianhua@huawei.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/pci.h>
|
|
||||||
|
|
||||||
#include <drm/drm_atomic_helper.h>
|
|
||||||
#include <drm/drm_gem.h>
|
|
||||||
#include <drm/drm_gem_framebuffer_helper.h>
|
|
||||||
#include <drm/drm_gem_vram_helper.h>
|
|
||||||
#include <drm/drm_print.h>
|
|
||||||
|
|
||||||
#include "hibmc_drm_drv.h"
|
|
||||||
|
|
||||||
int hibmc_mm_init(struct hibmc_drm_private *hibmc)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
struct drm_device *dev = &hibmc->dev;
|
|
||||||
|
|
||||||
ret = drmm_vram_helper_init(dev, pci_resource_start(dev->pdev, 0),
|
|
||||||
hibmc->fb_size);
|
|
||||||
if (ret) {
|
|
||||||
drm_err(dev, "Error initializing VRAM MM; %d\n", ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int hibmc_dumb_create(struct drm_file *file, struct drm_device *dev,
|
|
||||||
struct drm_mode_create_dumb *args)
|
|
||||||
{
|
|
||||||
return drm_gem_vram_fill_create_dumb(file, dev, 0, 128, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct drm_mode_config_funcs hibmc_mode_funcs = {
|
|
||||||
.mode_valid = drm_vram_helper_mode_valid,
|
|
||||||
.atomic_check = drm_atomic_helper_check,
|
|
||||||
.atomic_commit = drm_atomic_helper_commit,
|
|
||||||
.fb_create = drm_gem_fb_create,
|
|
||||||
};
|
|
Reference in New Issue
Block a user