Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/edid: improve non-desktop quirk logging

Improve non-desktop quirk logging if the EDID indicates non-desktop. If
both are set, note about redundant quirk. If there's no quirk but the
EDID indicates non-desktop, don't log non-desktop is set to 0.

Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com>
Tested-by: Philipp Zabel <philipp.zabel@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211228101051.317989-1-jani.nikula@intel.com

+10 -7
+10 -7
drivers/gpu/drm/drm_edid.c
··· 5365 5365 info->width_mm = edid->width_cm * 10; 5366 5366 info->height_mm = edid->height_cm * 10; 5367 5367 5368 - info->non_desktop = !!(quirks & EDID_QUIRK_NON_DESKTOP); 5369 - 5370 5368 drm_get_monitor_range(connector, edid); 5371 5369 5372 - DRM_DEBUG_KMS("non_desktop set to %d\n", info->non_desktop); 5373 - 5374 5370 if (edid->revision < 3) 5375 - return quirks; 5371 + goto out; 5376 5372 5377 5373 if (!(edid->input & DRM_EDID_INPUT_DIGITAL)) 5378 - return quirks; 5374 + goto out; 5379 5375 5380 5376 drm_parse_cea_ext(connector, edid); 5381 5377 ··· 5391 5395 5392 5396 /* Only defined for 1.4 with digital displays */ 5393 5397 if (edid->revision < 4) 5394 - return quirks; 5398 + goto out; 5395 5399 5396 5400 switch (edid->input & DRM_EDID_DIGITAL_DEPTH_MASK) { 5397 5401 case DRM_EDID_DIGITAL_DEPTH_6: ··· 5428 5432 info->color_formats |= DRM_COLOR_FORMAT_YCRCB422; 5429 5433 5430 5434 drm_update_mso(connector, edid); 5435 + 5436 + out: 5437 + if (quirks & EDID_QUIRK_NON_DESKTOP) { 5438 + drm_dbg_kms(connector->dev, "Non-desktop display%s\n", 5439 + info->non_desktop ? " (redundant quirk)" : ""); 5440 + info->non_desktop = true; 5441 + } 5431 5442 5432 5443 return quirks; 5433 5444 }