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 <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/fafe7517-fb98-4992-e059-88429ac488bc@linux.intel.com
This commit is contained in:
@@ -4859,7 +4859,8 @@ bool drm_detect_monitor_audio(struct edid *edid)
|
|||||||
if (!edid_ext)
|
if (!edid_ext)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
has_audio = ((edid_ext[3] & EDID_BASIC_AUDIO) != 0);
|
has_audio = (edid_ext[0] == CEA_EXT &&
|
||||||
|
(edid_ext[3] & EDID_BASIC_AUDIO) != 0);
|
||||||
|
|
||||||
if (has_audio) {
|
if (has_audio) {
|
||||||
DRM_DEBUG_KMS("Monitor has basic audio support\n");
|
DRM_DEBUG_KMS("Monitor has basic audio support\n");
|
||||||
@@ -5187,10 +5188,14 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
|
|||||||
|
|
||||||
/* The existence of a CEA block should imply RGB support */
|
/* The existence of a CEA block should imply RGB support */
|
||||||
info->color_formats = DRM_COLOR_FORMAT_RGB444;
|
info->color_formats = DRM_COLOR_FORMAT_RGB444;
|
||||||
|
|
||||||
|
/* CTA DisplayID Data Block does not have byte #3 */
|
||||||
|
if (edid_ext[0] == CEA_EXT) {
|
||||||
if (edid_ext[3] & EDID_CEA_YCRCB444)
|
if (edid_ext[3] & EDID_CEA_YCRCB444)
|
||||||
info->color_formats |= DRM_COLOR_FORMAT_YCBCR444;
|
info->color_formats |= DRM_COLOR_FORMAT_YCBCR444;
|
||||||
if (edid_ext[3] & EDID_CEA_YCRCB422)
|
if (edid_ext[3] & EDID_CEA_YCRCB422)
|
||||||
info->color_formats |= DRM_COLOR_FORMAT_YCBCR422;
|
info->color_formats |= DRM_COLOR_FORMAT_YCBCR422;
|
||||||
|
}
|
||||||
|
|
||||||
if (cea_db_offsets(edid_ext, &start, &end))
|
if (cea_db_offsets(edid_ext, &start, &end))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ int igt_check_plane_state(void *ignored)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
const struct drm_crtc_state crtc_state = {
|
static const struct drm_crtc_state crtc_state = {
|
||||||
.crtc = ZERO_SIZE_PTR,
|
.crtc = ZERO_SIZE_PTR,
|
||||||
.enable = true,
|
.enable = true,
|
||||||
.active = true,
|
.active = true,
|
||||||
@@ -87,14 +87,14 @@ int igt_check_plane_state(void *ignored)
|
|||||||
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC)
|
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
struct drm_plane plane = {
|
static struct drm_plane plane = {
|
||||||
.dev = NULL
|
.dev = NULL
|
||||||
};
|
};
|
||||||
struct drm_framebuffer fb = {
|
static struct drm_framebuffer fb = {
|
||||||
.width = 2048,
|
.width = 2048,
|
||||||
.height = 2048
|
.height = 2048
|
||||||
};
|
};
|
||||||
struct drm_plane_state plane_state = {
|
static struct drm_plane_state plane_state = {
|
||||||
.plane = &plane,
|
.plane = &plane,
|
||||||
.crtc = ZERO_SIZE_PTR,
|
.crtc = ZERO_SIZE_PTR,
|
||||||
.fb = &fb,
|
.fb = &fb,
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ static int ttm_range_man_alloc(struct ttm_resource_manager *man,
|
|||||||
spin_unlock(&rman->lock);
|
spin_unlock(&rman->lock);
|
||||||
|
|
||||||
if (unlikely(ret)) {
|
if (unlikely(ret)) {
|
||||||
ttm_resource_fini(man, *res);
|
ttm_resource_fini(man, &node->base);
|
||||||
kfree(node);
|
kfree(node);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user