All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Improving the situation regarding RGB quantization ranges
@ 2020-04-13 21:40 ` Yussuf Khalil
  0 siblings, 0 replies; 38+ messages in thread
From: Yussuf Khalil @ 2020-04-13 21:40 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, dri-devel, linux-kernel
  Cc: Yussuf Khalil

The CTA-861 specification differentiates between IT and CE modes. For the
latter, it requires sources to send "limited RGB quantization range", i.e.,
allowed RGB values are constrained to 16 - 235 (in the 8 bit case). A sink may
indicate support for full range RGB (0 - 255) in CE modes through its EDID,
allowing the source to override the recommendations set by CTA-861.

For computer screens it is usually desirable to have full range RGB output. In
reality, though, many displays set a CE mode as preferred in their EDID and
leave the "Quantization Range Selectable" bit unset despite having no issues
with full range output. Therefore, it makes sense to provide the user with
a method of overriding the standards-compliant selection.

The current situation in DRM regarding the RGB quantization range is somewhat
messy. We have drivers that
 - behave standards-compliant and provide a custom override property (e.g.,
   i915, gma500)
 - behave standards-compliant and provide no override (e.g., vc4)
 - behave standards-compliant and select full range for CE modes if the screen
   indicates support (e.g., tda998x)
 - probably don't care at all

This series is an effort to fix the situation. It introduces a property for
overriding the RGB quantization range that is defined in the DRM core and can
be attached to connectors by all drivers, providing a driver-independent way of
overriding the defaults to userspace. So far, I've wired up the new property in
i915 only.

Yussuf Khalil (5):
  drm/modes: Indicate CEA-861 CE modes to user-space
  drm: Add "RGB quantization range" connector property
  drm: Add drm_connector_state_select_rgb_quantization_range() helper
  drm/atomic-helper: Consider RGB quantization changes to be mode
    changes
  drm/i915: Replace "Broadcast RGB" with "RGB quantization range"
    property

 drivers/gpu/drm/drm_atomic_helper.c           |  6 ++
 drivers/gpu/drm/drm_atomic_uapi.c             |  4 ++
 drivers/gpu/drm/drm_connector.c               | 66 +++++++++++++++++++
 drivers/gpu/drm/drm_modes.c                   | 14 ++++
 drivers/gpu/drm/i915/display/intel_atomic.c   |  8 ---
 .../gpu/drm/i915/display/intel_connector.c    | 39 ++++-------
 .../gpu/drm/i915/display/intel_connector.h    |  2 +-
 .../drm/i915/display/intel_display_types.h    |  8 ---
 drivers/gpu/drm/i915/display/intel_dp.c       | 24 ++-----
 drivers/gpu/drm/i915/display/intel_dp_mst.c   |  2 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c     | 19 ++----
 drivers/gpu/drm/i915/display/intel_sdvo.c     | 18 ++---
 drivers/gpu/drm/i915/i915_drv.h               |  1 -
 include/drm/drm_connector.h                   | 27 ++++++++
 include/drm/drm_mode_config.h                 |  7 ++
 include/uapi/drm/drm_mode.h                   |  2 +
 16 files changed, 160 insertions(+), 87 deletions(-)

-- 
2.26.0


^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2020-04-17 14:59 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 21:40 [PATCH 0/5] Improving the situation regarding RGB quantization ranges Yussuf Khalil
2020-04-13 21:40 ` Yussuf Khalil
2020-04-13 21:40 ` [PATCH 1/5] drm/modes: Indicate CEA-861 CE modes to user-space Yussuf Khalil
2020-04-13 21:40   ` Yussuf Khalil
2020-04-14 12:41   ` Daniel Vetter
2020-04-14 12:41     ` Daniel Vetter
2020-04-16 13:51     ` Yussuf Khalil
2020-04-16 13:51       ` Yussuf Khalil
2020-04-17 14:57       ` Daniel Vetter
2020-04-17 14:57         ` Daniel Vetter
2020-04-13 21:40 ` [PATCH 2/5] drm: Add "RGB quantization range" connector property Yussuf Khalil
2020-04-13 21:40   ` Yussuf Khalil
2020-04-13 22:32   ` Simon Ser
2020-04-13 22:32     ` Simon Ser
2020-04-13 21:40 ` [PATCH 3/5] drm: Add drm_connector_state_select_rgb_quantization_range() helper Yussuf Khalil
2020-04-13 21:40   ` Yussuf Khalil
2020-04-13 21:40 ` [PATCH 4/5] drm/atomic-helper: Consider RGB quantization changes to be mode changes Yussuf Khalil
2020-04-13 21:40   ` Yussuf Khalil
2020-04-13 21:40 ` [PATCH 5/5] drm/i915: Replace "Broadcast RGB" with "RGB quantization range" property Yussuf Khalil
2020-04-13 21:40   ` Yussuf Khalil
2020-04-13 22:35   ` Simon Ser
2020-04-13 22:35     ` Simon Ser
2020-04-14 11:17     ` Jani Nikula
2020-04-14 11:17       ` Jani Nikula
2020-04-14 11:21       ` Jani Nikula
2020-04-14 11:21         ` Jani Nikula
2020-04-14 12:34         ` Daniel Vetter
2020-04-14 12:34           ` Daniel Vetter
2020-04-14 21:11           ` Yussuf Khalil
2020-04-14 21:11             ` Yussuf Khalil
2020-04-15  7:33             ` Jani Nikula
2020-04-15  7:33               ` Jani Nikula
2020-04-15 11:13               ` Daniel Vetter
2020-04-15 11:13                 ` Daniel Vetter
2020-04-16 13:44                 ` Yussuf Khalil
2020-04-16 13:44                   ` Yussuf Khalil
2020-04-17 14:59                   ` Daniel Vetter
2020-04-17 14:59                     ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.