summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlija Hadzic <ilijahadzic@gmail.com>2013-05-08 22:39:44 -0400
committerMichel Dänzer <michel@daenzer.net>2013-05-29 15:27:28 +0200
commit84bce7943b735aee19e26be4d47fdf140564f3f5 (patch)
treedfa48de13c78ce37d524818fe5164a58b3537f04
parente40d5390b3efdea3e02267413350410d8e6a2970 (diff)
DRI2: track CRTC in event record
Tracking the CRTC associated with an event will save us some lookups later in event handlers. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/radeon_dri2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index c6f271e3..7d3b16ae 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -501,6 +501,7 @@ typedef struct _DRI2FrameEvent {
ClientPtr client;
enum DRI2FrameEventType type;
int frame;
+ xf86CrtcPtr crtc;
/* for swaps & flips only */
DRI2SwapEventPtr event_complete;
@@ -648,6 +649,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);
@@ -1024,6 +1026,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,
@@ -1249,6 +1252,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");