Skip to content

Commit 5d02626

Browse files
kleinermalexdeucher
authored andcommitted
drm/edid: Store all supported hdmi deep color modes in drm_display_info
HDMI deep color setup must know which modes are supported if it needs to degrade gracefully, as only 12 bpc / dc_36 is guaranteed, but 10 bpc / dc_30 is optional. The maximum bpc is not sufficient for this. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent d71c48f commit 5d02626

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎drivers/gpu/drm/drm_edid.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,18 +3471,21 @@ static bool drm_assign_hdmi_deep_color_info(struct edid *edid,
34713471

34723472
if (hdmi[6] & DRM_EDID_HDMI_DC_30) {
34733473
dc_bpc = 10;
3474+
info->edid_hdmi_dc_modes |= DRM_EDID_HDMI_DC_30;
34743475
DRM_DEBUG("%s: HDMI sink does deep color 30.\n",
34753476
connector->name);
34763477
}
34773478

34783479
if (hdmi[6] & DRM_EDID_HDMI_DC_36) {
34793480
dc_bpc = 12;
3481+
info->edid_hdmi_dc_modes |= DRM_EDID_HDMI_DC_36;
34803482
DRM_DEBUG("%s: HDMI sink does deep color 36.\n",
34813483
connector->name);
34823484
}
34833485

34843486
if (hdmi[6] & DRM_EDID_HDMI_DC_48) {
34853487
dc_bpc = 16;
3488+
info->edid_hdmi_dc_modes |= DRM_EDID_HDMI_DC_48;
34863489
DRM_DEBUG("%s: HDMI sink does deep color 48.\n",
34873490
connector->name);
34883491
}

‎include/drm/drm_crtc.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ struct drm_display_info {
121121
enum subpixel_order subpixel_order;
122122
u32 color_formats;
123123

124+
/* Mask of supported hdmi deep color modes */
125+
u8 edid_hdmi_dc_modes;
126+
124127
u8 cea_rev;
125128
};
126129

0 commit comments

Comments
 (0)