Skip to content

Commit

Permalink
drm/vblank: Pass crtc_id to page_flip_ioctl.
Browse files Browse the repository at this point in the history
We added crtc_id to the atomic ioctl, but forgot to add it for vblank
and page flip events. Commit bd386e5 ("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: bd386e5 ("drm: Reorganize drm_pending_event to support future event types [v2]")
Fixes: 5db06a8 ("drm: Pass CRTC ID in userspace vblank events")
Cc: Daniel Stone <daniels@collabora.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.12+
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #irc
Testcase: igt/kms_vblank/crtc_id
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171123103737.47138-1-maarten.lankhorst@linux.intel.com
  • Loading branch information
mlankhorst committed Nov 23, 2017
1 parent f150891 commit b8a3365
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/drm_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
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);
Expand Down

0 comments on commit b8a3365

Please sign in to comment.