[PATCH 7/8] drm: Add old state pointer to CRTC .enable() helper function
Philipp Zabel
p.zabel at pengutronix.de
Wed Jun 28 08:15:56 UTC 2017
On Wed, 2017-06-28 at 00:16 +0300, Laurent Pinchart wrote:
> The old state is useful for drivers that need to perform operations at
> enable time that depend on the transition between the old and new
> states.
>
> While at it, rename the operation to .atomic_enable() to be consistent
> with .atomic_disable(), as the .enable() operation is used by atomic
> helpers only.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
[...]
> diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c
> index 5456c15d962c..53e0b24beda6 100644
> --- a/drivers/gpu/drm/imx/ipuv3-crtc.c
> +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c
> @@ -50,7 +50,8 @@ static inline struct ipu_crtc *to_ipu_crtc(struct drm_crtc *crtc)
> return container_of(crtc, struct ipu_crtc, base);
> }
>
> -static void ipu_crtc_enable(struct drm_crtc *crtc)
> +static void ipu_crtc_atomic_enable(struct drm_crtc *crtc,
> + struct drm_crtc_state *old_state)
> {
> struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc);
> struct ipu_soc *ipu = dev_get_drvdata(ipu_crtc->dev->parent);
> @@ -293,7 +294,7 @@ static const struct drm_crtc_helper_funcs ipu_helper_funcs = {
> .atomic_check = ipu_crtc_atomic_check,
> .atomic_begin = ipu_crtc_atomic_begin,
> .atomic_disable = ipu_crtc_atomic_disable,
> - .enable = ipu_crtc_enable,
> + .atomic_enable = ipu_crtc_atomic_enable,
> };
>
> static void ipu_put_resources(struct ipu_crtc *ipu_crtc)
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> index 6582e1f56d37..5971b0827d1b 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
> @@ -366,7 +366,8 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc)
> }
> }
>
> -static void mtk_drm_crtc_enable(struct drm_crtc *crtc)
> +static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc,
> + struct drm_crtc_state *old_state)
> {
> struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
> struct mtk_ddp_comp *ovl = mtk_crtc->ddp_comp[0];
> @@ -487,10 +488,10 @@ static const struct drm_crtc_funcs mtk_crtc_funcs = {
> static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = {
> .mode_fixup = mtk_drm_crtc_mode_fixup,
> .mode_set_nofb = mtk_drm_crtc_mode_set_nofb,
> - .enable = mtk_drm_crtc_enable,
> .disable = mtk_drm_crtc_disable,
> .atomic_begin = mtk_drm_crtc_atomic_begin,
> .atomic_flush = mtk_drm_crtc_atomic_flush,
> + .atomic_enable = mtk_drm_crtc_atomic_enable,
> };
>
> static int mtk_drm_crtc_init(struct drm_device *drm,
For imx-drm and mediatek,
Acked-by: Philipp Zabel <p.zabel at pengutronix.de>
regards
Philipp
More information about the dri-devel
mailing list