Skip to content

drm_hwcomposer: Fix drmSetMaster() usage

After commit 3b24cd91 ("drm_hwcomposer: Ensure composer has master access to DRM/KMS") was merged I started seeing failures on 5.4 based kernels.

Diggin into it, it seemed on those kernels drmSetMaster() was always returning -EACCES, due to the following upstream kernel change not being present:

That change landed around 5.6, so for older kernels we need to make sure older kernels without this patch still work. So this patch, as suggested by Roman Stratiienko, reworks the logic so we call drmSetMaster() and then check drmIsMaster(), rather then failing due to the return value.

With this patch, things are back to working on both hikey960 and db845c with 5.4 based kernels. Signed-off-by: John Stultz Change-Id: I7f2adba3ddbd36169b6d26baf49299046efcf906

Edited by John Stultz

Merge request reports