]> Git Repo - linux.git/commitdiff
drm/vblank: Pass crtc_id to page_flip_ioctl.
authorMaarten Lankhorst <[email protected]>
Thu, 23 Nov 2017 10:37:37 +0000 (11:37 +0100)
committerMaarten Lankhorst <[email protected]>
Thu, 23 Nov 2017 12:04:19 +0000 (13:04 +0100)
We added crtc_id to the atomic ioctl, but forgot to add it for vblank
and page flip events. Commit bd386e518056 ("drm: Reorganize
drm_pending_event to support future event types [v2]") added it to
the vblank event, but page flip event was still missing.

Correct this and add a test for making sure we always set crtc_id correctly.

Fixes: bd386e518056 ("drm: Reorganize drm_pending_event to support future event types [v2]")
Fixes: 5db06a8a98f5 ("drm: Pass CRTC ID in userspace vblank events")
Cc: Daniel Stone <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Gustavo Padovan <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v4.12+
Reviewed-by: Daniel Vetter <[email protected]> #irc
Testcase: igt/kms_vblank/crtc_id
Signed-off-by: Maarten Lankhorst <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/drm_plane.c

index 19404e34cd592d4a19720efa8b64d3fc4854569f..37a93cdffb4ad0e7986a634df4d70ccc3fef286e 100644 (file)
@@ -1030,6 +1030,7 @@ retry:
                e->event.base.type = DRM_EVENT_FLIP_COMPLETE;
                e->event.base.length = sizeof(e->event);
                e->event.vbl.user_data = page_flip->user_data;
+               e->event.vbl.crtc_id = crtc->base.id;
                ret = drm_event_reserve_init(dev, file_priv, &e->base, &e->event.base);
                if (ret) {
                        kfree(e);
This page took 0.060848 seconds and 4 git commands to generate.