> -----Original Message-----
> From: Kandpal, Suraj <[email protected]>
> Sent: Monday, April 14, 2025 9:47 AM
> To: [email protected]; [email protected]; intel-
> [email protected]; [email protected]
> Cc: Nautiyal, Ankit K <[email protected]>; Murthy, Arun R
> <[email protected]>; Kandpal, Suraj <[email protected]>
> Subject: [PATCH 12/13] drm/i915/backlight: Use drm helper to set edp
> backlight
> 
> Now that the drm helper sets the backlight using luminance too we can use
> that. Remove the obselete function.
> 
> Signed-off-by: Suraj Kandpal <[email protected]>
> ---
Reviewed-by: Arun R Murthy <[email protected]>

Thanks and Regards,
Arun R Murthy
--------------------

>  .../drm/i915/display/intel_dp_aux_backlight.c | 34 ++-----------------
>  1 file changed, 3 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index 2eff9b545390..95b29d9af335 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -476,31 +476,6 @@ static u32 intel_dp_aux_vesa_get_backlight(struct
> intel_connector *connector, en
>       return connector->panel.backlight.level;  }
> 
> -static int
> -intel_dp_aux_vesa_set_luminance(struct intel_connector *connector, u32
> level) -{
> -     struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
> -     u8 buf[3];
> -     int ret;
> -
> -     level = level * 1000;
> -     level &= 0xffffff;
> -     buf[0] = (level & 0x0000ff);
> -     buf[1] = (level & 0x00ff00) >> 8;
> -     buf[2] = (level & 0xff0000) >> 16;
> -
> -     ret = drm_dp_dpcd_write(&intel_dp->aux,
> DP_EDP_PANEL_TARGET_LUMINANCE_VALUE,
> -                             buf, sizeof(buf));
> -     if (ret != sizeof(buf)) {
> -             drm_err(intel_dp->aux.drm_dev,
> -                     "%s: Failed to set VESA Aux Luminance: %d\n",
> -                     intel_dp->aux.name, ret);
> -             return -EINVAL;
> -     } else {
> -             return 0;
> -     }
> -}
> -
>  static void
>  intel_dp_aux_vesa_set_backlight(const struct drm_connector_state
> *conn_state, u32 level)  { @@ -508,11 +483,6 @@
> intel_dp_aux_vesa_set_backlight(const struct drm_connector_state
> *conn_state, u3
>       struct intel_panel *panel = &connector->panel;
>       struct intel_dp *intel_dp = enc_to_intel_dp(connector->encoder);
> 
> -     if (panel->backlight.edp.vesa.luminance_control_support) {
> -             if (!intel_dp_aux_vesa_set_luminance(connector, level))
> -                     return;
> -     }
> -
>       if (!panel->backlight.edp.vesa.info.aux_set) {
>               const u32 pwm_level =
> intel_backlight_level_to_pwm(connector, level);
> 
> @@ -538,7 +508,9 @@ intel_dp_aux_vesa_enable_backlight(const struct
> intel_crtc_state *crtc_state,
>               if (ret == 1)
>                       return;
> 
> -             if (!intel_dp_aux_vesa_set_luminance(connector, level))
> +             if (!drm_edp_backlight_set_level(&intel_dp->aux,
> +                                              &panel-
> >backlight.edp.vesa.info,
> +                                              level))
>                       return;
>       }
> 
> --
> 2.34.1

Reply via email to