]> www.infradead.org Git - users/willy/linux.git/commit
drm/i915/dp: Enable AUX based backlight for HDR
authorSuraj Kandpal <suraj.kandpal@intel.com>
Tue, 7 May 2024 04:04:06 +0000 (09:34 +0530)
committerUma Shankar <uma.shankar@intel.com>
Mon, 13 May 2024 10:32:29 +0000 (16:02 +0530)
commitb0944c983d274ac485f44f1b0d3a31a52fc3f6e2
tree381c4c211d5b6e7914f76b86f70713993f5bcbce
parentf60ce4bd058cdc54bd7a2eb6067cbbf054cda1a2
drm/i915/dp: Enable AUX based backlight for HDR

As of now whenerver HDR is switched on we use the PWM to change the
backlight as opposed to AUX based backlight changes in terms of nits.
This patch writes to the appropriate DPCD registers to enable aux
based backlight using values in nits.

--v2
-Fix max_cll and max_fall assignment [Jani]
-Fix the size sent in drm_dpcd_write [Jani]

--v3
-Content Luminance needs to be sent only for pre-ICL after that
it is directly picked up from hdr metadata [Ville]

--v4
-Add checks for HDR TCON cap bits [Ville]
-Check eotf of hdr_output_data and sets bits base of that value.

--v5
-Fix capability check bits.
-Check colorspace before setting BT2020

--v6
-Use intel_dp_has_gamut_dip to check if we have capability
to send sdp [Ville]
-Seprate filling of all hdr tcon related bits into it's
own function.
-Check eotf data to make sure we are in HDR mode [Sebastian]

--v7
-Fix confusion function name for hdr mode check [Jani]
-Fix the condition which tells us if we are in HDR mode or not
[Sebastian]

--v8
-Call fill_hdr_tcon_param unconditionally as some parameters may not
be dependent on the fact if we are in hdr mode or not [Sebastian]
-Fix some conditions after change in hdr mode check [Sebastian]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240507040407.1056061-7-suraj.kandpal@intel.com
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c