[PATCH 09/13] DRI2: track CRTC in event record

Ilija Hadzic ilijahadzic at gmail.com
Wed May 8 19:39:44 PDT 2013


Tracking the CRTC associated with an event will save us
some lookups later in event handlers.

Signed-off-by: Ilija Hadzic <ihadzic at research.bell-labs.com>
---
 src/radeon_dri2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index be3aef6..d5840db 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -498,6 +498,7 @@ typedef struct _DRI2FrameEvent {
     ClientPtr client;
     enum DRI2FrameEventType type;
     int frame;
+    xf86CrtcPtr crtc;
 
     /* for swaps & flips only */
     DRI2SwapEventPtr event_complete;
@@ -645,6 +646,7 @@ radeon_dri2_schedule_flip(ScrnInfoPtr scrn, ClientPtr client,
     flip_info->event_complete = func;
     flip_info->event_data = data;
     flip_info->frame = target_msc;
+    flip_info->crtc = crtc;
 
     xf86DrvMsgVerb(scrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
 		   "%s:%d fevent[%p]\n", __func__, __LINE__, flip_info);
@@ -1021,6 +1023,7 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
     wait_info->client = client;
     wait_info->type = DRI2_WAITMSC;
     wait_info->valid = TRUE;
+    wait_info->crtc = crtc;
 
     if (ListAddDRI2ClientEvents(client, &wait_info->link)) {
         xf86DrvMsg(scrn->scrnIndex, X_WARNING,
@@ -1246,6 +1249,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
     swap_info->front = front;
     swap_info->back = back;
     swap_info->valid = TRUE;
+    swap_info->crtc = crtc;
     if (ListAddDRI2ClientEvents(client, &swap_info->link)) {
         xf86DrvMsg(scrn->scrnIndex, X_WARNING,
                 "add events to client private failed.\n");
-- 
1.8.1.5



More information about the xorg-driver-ati mailing list