Skip to content

Fix primary output handling in amdgpu_crtc_covering_box().

Commit e39a3ee0 tries 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 Fixes: e39a3ee0 ("Prefer crtc of primary output for synchronization when screen has to crtcs with the same coverage")

Merge request reports