]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/dp: Enable backlight control using luminance
authorSuraj Kandpal <suraj.kandpal@intel.com>
Fri, 20 Jun 2025 06:34:42 +0000 (12:04 +0530)
committerSuraj Kandpal <suraj.kandpal@intel.com>
Mon, 30 Jun 2025 15:11:48 +0000 (20:41 +0530)
Add flag to enable brightness control via luminance value
when enabling edp backlight.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://lore.kernel.org/r/20250620063445.3603086-11-suraj.kandpal@intel.com
drivers/gpu/drm/display/drm_dp_helper.c

index f30a041ec29be9eb019e41c06d3a37e988ced3d7..e46c9dfc9753c264c08a6fa1f0fd0e3687861386 100644 (file)
@@ -4038,6 +4038,9 @@ int drm_edp_backlight_enable(struct drm_dp_aux *aux, const struct drm_edp_backli
        else
                dpcd_buf = DP_EDP_BACKLIGHT_CONTROL_MODE_PWM;
 
+       if (bl->luminance_set)
+               dpcd_buf |= DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE;
+
        if (bl->pwmgen_bit_count) {
                ret = drm_dp_dpcd_write_byte(aux, DP_EDP_PWMGEN_BIT_COUNT, bl->pwmgen_bit_count);
                if (ret < 0)