diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2017-02-07 12:16:23 +0300 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-02-21 19:17:45 +0300 |
commit | d4f6750f9b816bd7448e7a63fa71ca84fd77e3e9 (patch) | |
tree | 9ce4907d89aef411fe7fd6ef9aa840eb90d8d1b0 /drivers/gpu/drm/hisilicon | |
parent | 15f080f08d48af9388142e45a247c8410736178b (diff) | |
download | linux-d4f6750f9b816bd7448e7a63fa71ca84fd77e3e9.tar.xz |
drm: kirin: use vblank hooks in struct drm_crtc_funcs
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
Reviewed-by: Xinliang Liu <xinliang.liu@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-12-git-send-email-shawnguo@kernel.org
Diffstat (limited to 'drivers/gpu/drm/hisilicon')
-rw-r--r-- | drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 0624fab8046f..c96c228a9898 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -302,9 +302,8 @@ static void ade_set_medianoc_qos(struct ade_crtc *acrtc) SOCKET_QOS_EN, SOCKET_QOS_EN); } -static int ade_enable_vblank(struct drm_device *dev, unsigned int pipe) +static int ade_crtc_enable_vblank(struct drm_crtc *crtc) { - struct drm_crtc *crtc = drm_crtc_from_index(dev, pipe); struct ade_crtc *acrtc = to_ade_crtc(crtc); struct ade_hw_ctx *ctx = acrtc->ctx; void __iomem *base = ctx->base; @@ -318,9 +317,8 @@ static int ade_enable_vblank(struct drm_device *dev, unsigned int pipe) return 0; } -static void ade_disable_vblank(struct drm_device *dev, unsigned int pipe) +static void ade_crtc_disable_vblank(struct drm_crtc *crtc) { - struct drm_crtc *crtc = drm_crtc_from_index(dev, pipe); struct ade_crtc *acrtc = to_ade_crtc(crtc); struct ade_hw_ctx *ctx = acrtc->ctx; void __iomem *base = ctx->base; @@ -570,6 +568,8 @@ static const struct drm_crtc_funcs ade_crtc_funcs = { .set_property = drm_atomic_helper_crtc_set_property, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, + .enable_vblank = ade_crtc_enable_vblank, + .disable_vblank = ade_crtc_disable_vblank, }; static int ade_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, @@ -1025,8 +1025,6 @@ static int ade_drm_init(struct platform_device *pdev) IRQF_SHARED, dev->driver->name, acrtc); if (ret) return ret; - dev->driver->enable_vblank = ade_enable_vblank; - dev->driver->disable_vblank = ade_disable_vblank; return 0; } |