Commit c73c3576 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-fixes-2022-03-24-1' of...

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: default avatarDave 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
parents 21050a39 7344bad7
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -4859,7 +4859,8 @@ bool drm_detect_monitor_audio(struct edid *edid)
	if (!edid_ext)
		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) {
		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 */
	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)
			info->color_formats |= DRM_COLOR_FORMAT_YCBCR444;
		if (edid_ext[3] & EDID_CEA_YCRCB422)
			info->color_formats |= DRM_COLOR_FORMAT_YCBCR422;
	}

	if (cea_db_offsets(edid_ext, &start, &end))
		return;
+4 −4
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ int igt_check_plane_state(void *ignored)
{
	int ret;

	const struct drm_crtc_state crtc_state = {
	static const struct drm_crtc_state crtc_state = {
		.crtc = ZERO_SIZE_PTR,
		.enable = true,
		.active = true,
@@ -87,14 +87,14 @@ int igt_check_plane_state(void *ignored)
				DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC)
		},
	};
	struct drm_plane plane = {
	static struct drm_plane plane = {
		.dev = NULL
	};
	struct drm_framebuffer fb = {
	static struct drm_framebuffer fb = {
		.width = 2048,
		.height = 2048
	};
	struct drm_plane_state plane_state = {
	static struct drm_plane_state plane_state = {
		.plane = &plane,
		.crtc = ZERO_SIZE_PTR,
		.fb = &fb,
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ static int ttm_range_man_alloc(struct ttm_resource_manager *man,
	spin_unlock(&rman->lock);

	if (unlikely(ret)) {
		ttm_resource_fini(man, *res);
		ttm_resource_fini(man, &node->base);
		kfree(node);
		return ret;
	}