modesetting: Skip kernel work-around on error in crtc to kernel msc
ms_crtc_msc_to_kernel_msc attempts to work around kernel inconsistencies in reporting msc values by comparing the expected value with the reported value. If the kernel fails to actually provide its current values, then just skip the work around steps as there's really nothing better we can do. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
59b12c454d
commit
5adc20179e
@ -228,7 +228,7 @@ ms_crtc_msc_to_kernel_msc(xf86CrtcPtr crtc, uint64_t expect)
|
|||||||
uint64_t ust;
|
uint64_t ust;
|
||||||
int64_t diff;
|
int64_t diff;
|
||||||
|
|
||||||
ms_get_crtc_ust_msc(crtc, &ust, &msc);
|
if (ms_get_crtc_ust_msc(crtc, &ust, &msc) == Success) {
|
||||||
diff = expect - msc;
|
diff = expect - msc;
|
||||||
|
|
||||||
/* We're way off here, assume that the kernel has lost its mind
|
/* We're way off here, assume that the kernel has lost its mind
|
||||||
@ -240,6 +240,7 @@ ms_crtc_msc_to_kernel_msc(xf86CrtcPtr crtc, uint64_t expect)
|
|||||||
drmmode_crtc->vblank_offset < MAX_VBLANK_OFFSET)
|
drmmode_crtc->vblank_offset < MAX_VBLANK_OFFSET)
|
||||||
drmmode_crtc->vblank_offset = 0;
|
drmmode_crtc->vblank_offset = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return (uint32_t) (expect - drmmode_crtc->vblank_offset);
|
return (uint32_t) (expect - drmmode_crtc->vblank_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user