]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/backlight: Use drm_edp_backlight_enable
authorSuraj Kandpal <suraj.kandpal@intel.com>
Fri, 20 Jun 2025 06:34:45 +0000 (12:04 +0530)
committerSuraj Kandpal <suraj.kandpal@intel.com>
Mon, 30 Jun 2025 15:11:51 +0000 (20:41 +0530)
Use drm dp helper to enable backlight now that it has been modified
to set PANEL_LUMINANCE_CONTROL_ENABLE bit based on if capability
supports it and the driver wants it. Remove the dead code.

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-14-suraj.kandpal@intel.com
drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c

index e1fd6773cc04be11b9ace7966e5412e790cc1758..41228478b21c784a918772180fd2ee4f6ff838f6 100644 (file)
@@ -498,20 +498,6 @@ intel_dp_aux_vesa_enable_backlight(const struct intel_crtc_state *crtc_state,
        struct intel_connector *connector = to_intel_connector(conn_state->connector);
        struct intel_panel *panel = &connector->panel;
        struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
-       int ret;
-
-       if (panel->backlight.edp.vesa.luminance_control_support) {
-               ret = drm_dp_dpcd_writeb(&intel_dp->aux, DP_EDP_BACKLIGHT_MODE_SET_REGISTER,
-                                        DP_EDP_PANEL_LUMINANCE_CONTROL_ENABLE);
-
-               if (ret == 1)
-                       return;
-
-               if (!drm_edp_backlight_set_level(&intel_dp->aux,
-                                                &panel->backlight.edp.vesa.info,
-                                                level))
-                       return;
-       }
 
        if (!panel->backlight.edp.vesa.info.aux_enable) {
                u32 pwm_level;