Skip to content

Commit

Permalink
REGRESSION(47dee03): Broke DRM plugin on RPi4 (#614)
Browse files Browse the repository at this point in the history
find_crtc_for_encoder() should not only check the bitmask but also
the ID of the CRTC.

(cherry picked from commit 843f874)
  • Loading branch information
clopez authored and aperezdc committed Dec 13, 2023
1 parent 445d1b4 commit 92d1f07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/drm/cog-platform-drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ find_crtc_for_encoder(const drmModeRes *resources, const drmModeEncoder *encoder
for (int i = 0; i < resources->count_crtcs; i++) {
const uint32_t crtc_mask = 1 << i;
const uint32_t crtc_id = resources->crtcs[i];
if (encoder->possible_crtcs & crtc_mask) {
if (encoder->possible_crtcs & crtc_mask && encoder->crtc_id == crtc_id) {
return crtc_id;
}
}
Expand Down

0 comments on commit 92d1f07

Please sign in to comment.