aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-04-16 09:16:18 -0400
committerDave Airlie <airlied@redhat.com>2012-04-20 07:44:49 -0400
commitee58808deca66bd0879562abf606e171752e8e15 (patch)
treea7624b29220ad28329b9f23e59a0482889238197
parentd1b45d5f0586041fe750d90a62ba09cffb3eace1 (diff)
drm: Fix EDID color format parsing
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> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_edid.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 5a18b0df8285..8a4580c2a1d0 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1699,10 +1699,10 @@ static void drm_add_display_info(struct edid *edid,
1699 } 1699 }
1700 1700
1701 info->color_formats = DRM_COLOR_FORMAT_RGB444; 1701 info->color_formats = DRM_COLOR_FORMAT_RGB444;
1702 if (info->color_formats & DRM_EDID_FEATURE_RGB_YCRCB444) 1702 if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB444)
1703 info->color_formats = DRM_COLOR_FORMAT_YCRCB444; 1703 info->color_formats |= DRM_COLOR_FORMAT_YCRCB444;
1704 if (info->color_formats & DRM_EDID_FEATURE_RGB_YCRCB422) 1704 if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB422)
1705 info->color_formats = DRM_COLOR_FORMAT_YCRCB422; 1705 info->color_formats |= DRM_COLOR_FORMAT_YCRCB422;
1706 1706
1707 /* Get data from CEA blocks if present */ 1707 /* Get data from CEA blocks if present */
1708 edid_ext = drm_find_cea_extension(edid); 1708 edid_ext = drm_find_cea_extension(edid);