drm/atomic: Remove WARN_ON for invalid plane configuration.
Subsystems (2)
Maarten Lankhorst
maintainerPATCH 1/1 drm/atomic: Remove WARN_ON for invalid plane configuration.
Userspace can set a FB_ID on a plane without setting CRTC_ID, which will fail with -EINVAL, but the kernel shouldn't warn about that.
Same for !FB_ID and CRTC_ID being set.
--- drivers/gpu/drm/drm_atomic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_atomic.c +2 -2
@@ -863,10 +863,10 @@ static int drm_atomic_plane_check(struct drm_plane *plane,int ret;/* either *both* CRTC and FB must be set, or neither */ -if (WARN_ON (state->crtc && !state->fb)) { +if (state->crtc && !state->fb) {DRM_DEBUG_ATOMIC ("CRTC set but no FB\n" );return -EINVAL ; - }else if (WARN_ON (state->fb && !state->crtc)) { + }else if (state->fb && !state->crtc) {DRM_DEBUG_ATOMIC ("FB set but no CRTC\n" );return -EINVAL ; }
Signature · 6 lines
2.15.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Maarten Lankhorst
Userspace can set a
FB_IDon a plane without settingCRTC_ID, which will fail with-EINVAL, but the kernel shouldn't warn about that.Same for !FB_ID and
CRTC_IDbeing set.Signed-off-by Maarten Lankhorst <[email protected]>Acked-by Daniel Vetter <[email protected]>
Harry
Quoted 13 lines
Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_atomic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_atomic.c +0
-0@@ -863,10 +863,10 @@ static int drm_atomic_plane_check(struct drm_plane *plane,int ret;
drivers/gpu/drm/drm_atomic.c static int drm_atomic_plane_check(struct drm_plane *plane, · line 872
Quoted 10 lines
drivers/gpu/drm/drm_atomic.c +2
-2/* either *both* CRTC and FB must be set, or neither */ -if (WARN_ON (state->crtc && !state->fb)) { +if (state->crtc && !state->fb) {DRM_DEBUG_ATOMIC ("CRTC set but no FB\n" );return -EINVAL ; - }else if (WARN_ON (state->fb && !state->crtc)) { + }else if (state->fb && !state->crtc) {DRM_DEBUG_ATOMIC ("FB set but no CRTC\n" );return -EINVAL ; }
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Maarten Lankhorst
maintainerOp 30-01-18 om 16:21 schreef Harry Wentland:
Quoted 11 lines · Maarten Lankhorst
Quoted 7 lines
Userspace can set a
FB_IDon a plane without settingCRTC_ID, which will fail with-EINVAL, but the kernel shouldn't warn about that.Same for !FB_ID and
CRTC_IDbeing set.Signed-off-by Maarten Lankhorst <[email protected]>Acked-by Daniel Vetter <[email protected]>Reviewed-by Harry Wentland <[email protected]>Harry
Thanks, pushed!
~Maarten
Quoted 12 lines
Quoted 12 lines
Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_atomic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_atomic.c +0
-0@@ -863,10 +863,10 @@ static int drm_atomic_plane_check(struct drm_plane *plane,int ret;
Quoted 11 lines
drivers/gpu/drm/drm_atomic.c static int drm_atomic_plane_check(struct drm_plane *plane, · line 872
Quoted 11 lines
drivers/gpu/drm/drm_atomic.c +2
-2/* either *both* CRTC and FB must be set, or neither */ -if (WARN_ON (state->crtc && !state->fb)) { +if (state->crtc && !state->fb) {DRM_DEBUG_ATOMIC ("CRTC set but no FB\n" );return -EINVAL ; - }else if (WARN_ON (state->fb && !state->crtc)) { + }else if (state->fb && !state->crtc) {DRM_DEBUG_ATOMIC ("FB set but no CRTC\n" );return -EINVAL ; }
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel