[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2475529.N6HtQ5V54z@phil>
Date: Mon, 12 Nov 2018 16:36:41 +0100
From: Heiko Stuebner <heiko@...ech.de>
To: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
amd-gfx@...ts.freedesktop.org,
Daniel Vetter <daniel.vetter@...ll.ch>
Cc: dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
David Airlie <airlied@...ux.ie>,
Mali DP Maintainers <malidp@...s.arm.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
freedreno@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
linux-renesas-soc@...r.kernel.org,
linux-rockchip@...ts.infradead.org, linux-tegra@...r.kernel.org
Subject: Re: [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere
Am Montag, 12. November 2018, 16:01:14 CET schrieb Maarten Lankhorst:
> We already have __drm_atomic_helper_connector_reset() and
> __drm_atomic_helper_plane_reset(), extend this to crtc as well.
>
> Most drivers already have a gpu reset hook, correct it.
> Nouveau already implemented its own __drm_atomic_helper_crtc_reset(),
> convert it to the common one.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index fb70fb486fbf..d2d5aa676084 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -1071,13 +1071,14 @@ static void vop_crtc_destroy(struct drm_crtc *crtc)
>
> static void vop_crtc_reset(struct drm_crtc *crtc)
> {
> + struct rockchip_crtc_state *crtc_state =
> + kzalloc(sizeof(*crtc_state), GFP_KERNEL);
> +
> if (crtc->state)
> __drm_atomic_helper_crtc_destroy_state(crtc->state);
> kfree(crtc->state);
>
> - crtc->state = kzalloc(sizeof(struct rockchip_crtc_state), GFP_KERNEL);
> - if (crtc->state)
> - crtc->state->crtc = crtc;
> + __drm_atomic_helper_crtc_reset(crtc, &crtc_state->base);
> }
>
> static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc)
for the Rockchip-part
Acked-by: Heiko Stuebner <heiko@...ech.de>
Powered by blists - more mailing lists