drm/connector: Add helper to compare HDR metadata
authorMaxime Ripard <maxime@cerno.tech>
Fri, 30 Apr 2021 09:44:48 +0000 (11:44 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 7 May 2021 15:13:09 +0000 (17:13 +0200)
commit72921cdf8ac248c904e3883418d2f74f45028222
treebb5fcfbe81c0031cc498fd72d84437f14019547c
parente057b52c1d90e2898fdc01c95d21bd70c81b968a
drm/connector: Add helper to compare HDR metadata

All the drivers that support the HDR metadata property have a similar
function to compare the metadata from one connector state to the next,
and force a mode change if they differ.

All these functions run pretty much the same code, so let's turn it into
an helper that can be shared across those drivers.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210430094451.2145002-2-maxime@cerno.tech
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
drivers/gpu/drm/drm_connector.c
drivers/gpu/drm/i915/display/intel_atomic.c
include/drm/drm_connector.h