mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Fix primary output handling in amdgpu_crtc_covering_box().
Commite39a3ee07ctries to reintroduce the RandR primary output as a tie breaker in amdgpu_crtc_covering_box(), but that function wrongly assigns a void* devPrivate, which is actually a xf86CrtcPtr, to the RRCrtcPtr primary_crtc, a pointer target type mismatch! This causes a later pointer comparison of primary_crtc with RRCrtcPtr crtc to always fail, so that the user selected primary output can not ever successfully act as a tie-breaker when multiple candidate crtcs cover the same box area, defeating the whole purpose of that commit! Not sure how this failure could have ever evaded any basic testing. Fix this trivially by assigning the right variable. Successfully tested on a multi-display setup, verifying that the primary output now works as tie breaker as intended. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Fixes:e39a3ee07c("Prefer crtc of primary output for synchronization when screen has to crtcs with the same coverage")
This commit is contained in:
@@ -126,7 +126,7 @@ amdgpu_crtc_covering_box(ScreenPtr pScreen, BoxPtr box, Bool screen_is_xf86_hint
|
||||
|
||||
primary_output = RRFirstOutput(pScreen);
|
||||
if (primary_output && primary_output->crtc)
|
||||
primary_crtc = primary_output->crtc->devPrivate;
|
||||
primary_crtc = primary_output->crtc;
|
||||
|
||||
for (c = 0; c < pScrPriv->numCrtcs; c++) {
|
||||
crtc = pScrPriv->crtcs[c];
|
||||
|
||||
Reference in New Issue
Block a user