lkml.org 
[lkml]   [2018]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drm: check_pixel_format() should return true if no modifiers are passed for a supported pixel format
Date
If a plane supports a pixel format and the framebuffer does not pass any
modifiers, then drm_plane_check_pixel_format() should always return true
for the given format regardless of whether the plane supports any
modifiers or not.

Signed-off-by: Ayan Kumar Halder <ayan.halder@arm.com>
---
drivers/gpu/drm/drm_plane.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 6d2a6e4..873c084 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -564,6 +564,9 @@ int drm_plane_check_pixel_format(struct drm_plane *plane,
if (!plane->modifier_count)
return 0;

+ if (modifier == DRM_FORMAT_MOD_NONE)
+ return 0;
+
for (i = 0; i < plane->modifier_count; i++) {
if (modifier == plane->modifiers[i])
break;
--
2.7.4
\
 
 \ /
  Last update: 2018-05-25 17:36    [W:0.046 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site