Skip to content

Commit c73c357

Browse files
committed
Merge tag 'drm-misc-next-fixes-2022-03-24-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next-fixes for v5.18-rc1: - Make audio and color plane support checking only happen when a CEA extension block is found. - Fix a small regression from ttm_resource_fini() - Small selftest fix. Signed-off-by: Dave Airlie <[email protected]> From: Maarten Lankhorst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 21050a3 + 7344bad commit c73c357

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

drivers/gpu/drm/drm_edid.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4859,7 +4859,8 @@ bool drm_detect_monitor_audio(struct edid *edid)
48594859
if (!edid_ext)
48604860
goto end;
48614861

4862-
has_audio = ((edid_ext[3] & EDID_BASIC_AUDIO) != 0);
4862+
has_audio = (edid_ext[0] == CEA_EXT &&
4863+
(edid_ext[3] & EDID_BASIC_AUDIO) != 0);
48634864

48644865
if (has_audio) {
48654866
DRM_DEBUG_KMS("Monitor has basic audio support\n");
@@ -5187,10 +5188,14 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
51875188

51885189
/* The existence of a CEA block should imply RGB support */
51895190
info->color_formats = DRM_COLOR_FORMAT_RGB444;
5190-
if (edid_ext[3] & EDID_CEA_YCRCB444)
5191-
info->color_formats |= DRM_COLOR_FORMAT_YCBCR444;
5192-
if (edid_ext[3] & EDID_CEA_YCRCB422)
5193-
info->color_formats |= DRM_COLOR_FORMAT_YCBCR422;
5191+
5192+
/* CTA DisplayID Data Block does not have byte #3 */
5193+
if (edid_ext[0] == CEA_EXT) {
5194+
if (edid_ext[3] & EDID_CEA_YCRCB444)
5195+
info->color_formats |= DRM_COLOR_FORMAT_YCBCR444;
5196+
if (edid_ext[3] & EDID_CEA_YCRCB422)
5197+
info->color_formats |= DRM_COLOR_FORMAT_YCBCR422;
5198+
}
51945199

51955200
if (cea_db_offsets(edid_ext, &start, &end))
51965201
return;

drivers/gpu/drm/selftests/test-drm_plane_helper.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int igt_check_plane_state(void *ignored)
7777
{
7878
int ret;
7979

80-
const struct drm_crtc_state crtc_state = {
80+
static const struct drm_crtc_state crtc_state = {
8181
.crtc = ZERO_SIZE_PTR,
8282
.enable = true,
8383
.active = true,
@@ -87,14 +87,14 @@ int igt_check_plane_state(void *ignored)
8787
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC)
8888
},
8989
};
90-
struct drm_plane plane = {
90+
static struct drm_plane plane = {
9191
.dev = NULL
9292
};
93-
struct drm_framebuffer fb = {
93+
static struct drm_framebuffer fb = {
9494
.width = 2048,
9595
.height = 2048
9696
};
97-
struct drm_plane_state plane_state = {
97+
static struct drm_plane_state plane_state = {
9898
.plane = &plane,
9999
.crtc = ZERO_SIZE_PTR,
100100
.fb = &fb,

drivers/gpu/drm/ttm/ttm_range_manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static int ttm_range_man_alloc(struct ttm_resource_manager *man,
8989
spin_unlock(&rman->lock);
9090

9191
if (unlikely(ret)) {
92-
ttm_resource_fini(man, *res);
92+
ttm_resource_fini(man, &node->base);
9393
kfree(node);
9494
return ret;
9595
}

0 commit comments

Comments
 (0)