Commit d4f6750f authored by Shawn Guo's avatar Shawn Guo Committed by Sean Paul

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: default avatarXinliang Liu <xinliang.liu@linaro.org>
Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-12-git-send-email-shawnguo@kernel.org
parent 15f080f0
...@@ -302,9 +302,8 @@ static void ade_set_medianoc_qos(struct ade_crtc *acrtc) ...@@ -302,9 +302,8 @@ static void ade_set_medianoc_qos(struct ade_crtc *acrtc)
SOCKET_QOS_EN, SOCKET_QOS_EN); 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_crtc *acrtc = to_ade_crtc(crtc);
struct ade_hw_ctx *ctx = acrtc->ctx; struct ade_hw_ctx *ctx = acrtc->ctx;
void __iomem *base = ctx->base; void __iomem *base = ctx->base;
...@@ -318,9 +317,8 @@ static int ade_enable_vblank(struct drm_device *dev, unsigned int pipe) ...@@ -318,9 +317,8 @@ static int ade_enable_vblank(struct drm_device *dev, unsigned int pipe)
return 0; 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_crtc *acrtc = to_ade_crtc(crtc);
struct ade_hw_ctx *ctx = acrtc->ctx; struct ade_hw_ctx *ctx = acrtc->ctx;
void __iomem *base = ctx->base; void __iomem *base = ctx->base;
...@@ -570,6 +568,8 @@ static const struct drm_crtc_funcs ade_crtc_funcs = { ...@@ -570,6 +568,8 @@ static const struct drm_crtc_funcs ade_crtc_funcs = {
.set_property = drm_atomic_helper_crtc_set_property, .set_property = drm_atomic_helper_crtc_set_property,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_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, 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) ...@@ -1025,8 +1025,6 @@ static int ade_drm_init(struct platform_device *pdev)
IRQF_SHARED, dev->driver->name, acrtc); IRQF_SHARED, dev->driver->name, acrtc);
if (ret) if (ret)
return ret; return ret;
dev->driver->enable_vblank = ade_enable_vblank;
dev->driver->disable_vblank = ade_disable_vblank;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment