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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user