summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tilcdc/tilcdc_plane.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2020-07-08 17:20:50 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2020-07-14 11:32:33 +0300
commitcb345decb4d20b03d637869047c8cdfd2c5f34d4 (patch)
treee482327a71b972910cae543c475b3dd988d76a93 /drivers/gpu/drm/tilcdc/tilcdc_plane.c
parent895a479039e0ee4c540d34f0848360ef21d10421 (diff)
downloadlinux-cb345decb4d20b03d637869047c8cdfd2c5f34d4.tar.xz
drm/tilcdc: Use standard drm_atomic_helper_commit
Gives us proper nonblocking support for free, and a pile of other things. The tilcdc code is simply old enough that it was never converted over, but was stuck forever with the copypasta from when it was initially merged. The riskiest thing with this conversion is maybe that there's an issue with the vblank handling or vblank event handling, which will upset the modern commit support in atomic helpers. But from a cursory review drm_crtc_vblank_on/off is called in the right places, and the event handling also seems to exist (albeit with much hand-rolling and probably some races, could perhaps be converted over to drm_crtc_arm_vblank_event without any real loss). Motivated by me not having to hand-roll the dma-fence annotations for this. v2: Clear out crtc_state->event when we're handling the event, to avoid upsetting the helpers (reported by Jyri). v3: Also send out even whent the crtc is getting disabled. Tilcdc looks a bit like conversion to simple display helpers would work out really nice. Tested-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Jyri Sarha <jsarha@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200708142050.530240-1-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/tilcdc/tilcdc_plane.c')
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_plane.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_plane.c b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
index 0d09b31ae759..2f681a713815 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_plane.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_plane.c
@@ -83,9 +83,11 @@ static void tilcdc_plane_atomic_update(struct drm_plane *plane,
if (WARN_ON(!state->fb || !state->crtc->state))
return;
- tilcdc_crtc_update_fb(state->crtc,
- state->fb,
- state->crtc->state->event);
+ if (tilcdc_crtc_update_fb(state->crtc,
+ state->fb,
+ state->crtc->state->event) == 0) {
+ state->crtc->state->event = NULL;
+ }
}
static const struct drm_plane_helper_funcs plane_helper_funcs = {