diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-08-17 14:59:40 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-08-17 14:59:40 +0300 |
commit | 9cd2e854d61ccfa51686f3ed7b0c917708fc641f (patch) | |
tree | edb756768fbeeb11bcb990d047efed9bc774d1d7 /drivers/gpu/drm/hisilicon | |
parent | 68acb6afb6f56d8ab92352993425b5472cf79a78 (diff) | |
download | linux-9cd2e854d61ccfa51686f3ed7b0c917708fc641f.tar.xz |
Revert "drm/hisilicon: Don't set drm_device->platformdev"
This reverts commit d25bcfb8c2e18b9b36f037f38be4d4792ebf8d57.
I somehow missed that it only compiles on arm64 and broke the driver
rather badly.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/hisilicon')
-rw-r--r-- | drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h | 4 |
3 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 91188f33b1d9..eaa3df75fc5c 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -989,9 +989,9 @@ static int ade_dts_parse(struct platform_device *pdev, struct ade_hw_ctx *ctx) return 0; } -static int ade_drm_init(struct platform_device *pdev) +static int ade_drm_init(struct drm_device *dev) { - struct drm_device *drm_dev = platform_get_drvdata(dev); + struct platform_device *pdev = dev->platformdev; struct ade_data *ade; struct ade_hw_ctx *ctx; struct ade_crtc *acrtc; @@ -1050,9 +1050,9 @@ static int ade_drm_init(struct platform_device *pdev) return 0; } -static void ade_drm_cleanup(struct platform_device *pdev) +static void ade_drm_cleanup(struct drm_device *dev) { - struct drm_device *drm_dev = platform_get_drvdata(dev); + struct platform_device *pdev = dev->platformdev; struct ade_data *ade = platform_get_drvdata(pdev); struct drm_crtc *crtc = &ade->acrtc.base; @@ -1062,4 +1062,4 @@ static void ade_drm_cleanup(struct platform_device *pdev) const struct kirin_dc_ops ade_dc_ops = { .init = ade_drm_init, .cleanup = ade_drm_cleanup -; +}; diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 6b0f9f6c16e1..1fc2f502d20d 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -41,7 +41,7 @@ static int kirin_drm_kms_cleanup(struct drm_device *dev) #endif drm_kms_helper_poll_fini(dev); drm_vblank_cleanup(dev); - dc_ops->cleanup(to_platform_device(dev->dev)); + dc_ops->cleanup(dev); drm_mode_config_cleanup(dev); devm_kfree(dev->dev, priv); dev->dev_private = NULL; @@ -103,7 +103,7 @@ static int kirin_drm_kms_init(struct drm_device *dev) kirin_drm_mode_config_init(dev); /* display controller init */ - ret = dc_ops->init(to_platform_device(dev)); + ret = dc_ops->init(dev); if (ret) goto err_mode_config_cleanup; @@ -210,6 +210,8 @@ static int kirin_drm_bind(struct device *dev) if (!drm_dev) return -ENOMEM; + drm_dev->platformdev = to_platform_device(dev); + ret = kirin_drm_kms_init(drm_dev); if (ret) goto err_drm_dev_unref; diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h index a0bb217c4c64..1a07caf8e7f4 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h @@ -15,8 +15,8 @@ /* display controller init/cleanup ops */ struct kirin_dc_ops { - int (*init)(struct platform_device *pdev); - void (*cleanup)(struct platform_device *pdev); + int (*init)(struct drm_device *dev); + void (*cleanup)(struct drm_device *dev); }; struct kirin_drm_private { |