diff options
author | Sultan Alsawaf <sultan@kerneltoast.com> | 2023-01-22 20:57:14 -0800 |
---|---|---|
committer | Sultan Alsawaf <sultan@kerneltoast.com> | 2023-02-28 22:43:37 -0800 |
commit | be864d8e185fe9e699fa661e70e02b319384dee6 (patch) | |
tree | 6013f44796f891237057f5eb3654873eaf216fe2 /hw/xfree86/drivers/modesetting | |
parent | 1fd9d79ae0dac5ae5f84f8012aa2764fcb777ea1 (diff) |
modesetting: Pass CRTC pointer to TearFree flip handlers
The CRTC pointer will soon be needed in the TearFree flip handlers, so pass
it in instead of passing in drmmode_tearfree_ptr.
No functional change.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Diffstat (limited to 'hw/xfree86/drivers/modesetting')
-rw-r--r-- | hw/xfree86/drivers/modesetting/pageflip.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/xfree86/drivers/modesetting/pageflip.c b/hw/xfree86/drivers/modesetting/pageflip.c index b0ff9655b..08a1bcd31 100644 --- a/hw/xfree86/drivers/modesetting/pageflip.c +++ b/hw/xfree86/drivers/modesetting/pageflip.c @@ -476,7 +476,9 @@ error_out: static void ms_tearfree_flip_abort(void *data) { - drmmode_tearfree_ptr trf = data; + xf86CrtcPtr crtc = data; + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + drmmode_tearfree_ptr trf = &drmmode_crtc->tearfree; trf->flip_seq = 0; } @@ -484,7 +486,9 @@ ms_tearfree_flip_abort(void *data) static void ms_tearfree_flip_handler(uint64_t msc, uint64_t usec, void *data) { - drmmode_tearfree_ptr trf = data; + xf86CrtcPtr crtc = data; + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + drmmode_tearfree_ptr trf = &drmmode_crtc->tearfree; /* Swap the buffers and complete the flip */ trf->back_idx ^= 1; @@ -498,7 +502,7 @@ ms_do_tearfree_flip(ScreenPtr screen, xf86CrtcPtr crtc) drmmode_tearfree_ptr trf = &drmmode_crtc->tearfree; uint32_t idx = trf->back_idx, seq; - seq = ms_drm_queue_alloc(crtc, trf, ms_tearfree_flip_handler, + seq = ms_drm_queue_alloc(crtc, crtc, ms_tearfree_flip_handler, ms_tearfree_flip_abort); if (!seq) goto no_flip; |