Skip to content

Commit 7abc7d4

Browse files
robclarkdanvet
authored andcommitted
drm: don't override possible_crtcs for primary/cursor planes
It is kind of a pointless restriction. If userspace does silly things like using crtcA's cursor plane on crtcB, and then setcursor on crtcA, it will end up with the overlay disabled on crtcB. But userspace is allowed to shoot itself like this. v2: don't WARN_ON() if caller did not set ->possible_crtcs. This keeps the existing behavior by default, if caller does not set the ->possible_crtcs. Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 91d5ee0 commit 7abc7d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/drm_crtc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
229229

230230
crtc->primary = primary;
231231
crtc->cursor = cursor;
232-
if (primary)
232+
if (primary && !primary->possible_crtcs)
233233
primary->possible_crtcs = 1 << drm_crtc_index(crtc);
234-
if (cursor)
234+
if (cursor && !cursor->possible_crtcs)
235235
cursor->possible_crtcs = 1 << drm_crtc_index(crtc);
236236

237237
ret = drm_crtc_crc_init(crtc);

0 commit comments

Comments
 (0)