All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend 1/2] drm: Fix EDID color fromat parsing
@ 2012-02-28  9:21 Lars-Peter Clausen
  2012-02-28  9:21 ` [PATCH resend 2/2] drm: Parse color format information in CEA blocks Lars-Peter Clausen
  2012-02-28 18:04 ` [PATCH resend 1/2] drm: Fix EDID color fromat parsing Jesse Barnes
  0 siblings, 2 replies; 7+ messages in thread
From: Lars-Peter Clausen @ 2012-02-28  9:21 UTC (permalink / raw)
  To: David Airlie; +Cc: dri-devel

The code should obviously check the EDID feature field for EDID feature flags
and not the color_formats field of the drm_display_info struct. Also update the
color_formats field with new modes instead of overwriting the current mode.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/gpu/drm/drm_edid.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 7ee7be1..a6bb2f5 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1700,10 +1700,10 @@ static void drm_add_display_info(struct edid *edid,
 	}
 
 	info->color_formats = DRM_COLOR_FORMAT_RGB444;
-	if (info->color_formats & DRM_EDID_FEATURE_RGB_YCRCB444)
-		info->color_formats = DRM_COLOR_FORMAT_YCRCB444;
-	if (info->color_formats & DRM_EDID_FEATURE_RGB_YCRCB422)
-		info->color_formats = DRM_COLOR_FORMAT_YCRCB422;
+	if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB444)
+		info->color_formats |= DRM_COLOR_FORMAT_YCRCB444;
+	if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB422)
+		info->color_formats |= DRM_COLOR_FORMAT_YCRCB422;
 
 	/* Get data from CEA blocks if present */
 	edid_ext = drm_find_cea_extension(edid);
-- 
1.7.9

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-15 15:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-28  9:21 [PATCH resend 1/2] drm: Fix EDID color fromat parsing Lars-Peter Clausen
2012-02-28  9:21 ` [PATCH resend 2/2] drm: Parse color format information in CEA blocks Lars-Peter Clausen
2012-02-28 18:06   ` Jesse Barnes
2012-02-28 18:04 ` [PATCH resend 1/2] drm: Fix EDID color fromat parsing Jesse Barnes
2012-03-01 19:26   ` Lars-Peter Clausen
2012-03-01 22:13     ` Tormod Volden
2012-03-15 15:31   ` Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.