* Re: [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere
[not found] ` <20181112150114.18395-2-maarten.lankhorst@linux.intel.com>
@ 2018-11-12 15:36 ` Heiko Stuebner
0 siblings, 0 replies; only message in thread
From: Heiko Stuebner @ 2018-11-12 15:36 UTC (permalink / raw)
To: Maarten Lankhorst, amd-gfx, Daniel Vetter
Cc: dri-devel, intel-gfx, David Airlie, Mali DP Maintainers,
linux-kernel, linux-arm-kernel, linux-mediatek, linux-arm-msm,
freedreno, nouveau, linux-renesas-soc, linux-rockchip,
linux-tegra
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@linux.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@sntech.de>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-12 15:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20181112150114.18395-1-maarten.lankhorst@linux.intel.com>
[not found] ` <20181112150114.18395-2-maarten.lankhorst@linux.intel.com>
2018-11-12 15:36 ` [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).