[PATCH v3 11/23] drm: kirin: use vblank hooks in struct drm_crtc_funcs

Xinliang Liu xinliang.liu at linaro.org
Thu Feb 16 03:23:39 UTC 2017


On 7 February 2017 at 17:16, Shawn Guo <shawnguo at kernel.org> wrote:
> From: Shawn Guo <shawn.guo at linaro.org>
>
> 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.
>
> Signed-off-by: Shawn Guo <shawn.guo at linaro.org>
> Cc: Xinliang Liu <z.liuxinliang at hisilicon.com>

Thanks Shawn for the rework patches,
For the kirin,
Reviewed-by: Xinliang Liu <xinliang.liu at linaro.org>

Thanks,
-xinliang

> ---
>  drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 10 ++++------
>  1 file 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 void ade_crtc_atomic_flush(struct drm_crtc *crtc,
>         .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;
>  }
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list