[PATCH 8/8] drm/i915/pps: Eliminate pointless get_delay() macro

Jani Nikula jani.nikula at linux.intel.com
Thu Nov 7 09:20:37 UTC 2024


On Wed, 06 Nov 2024, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Now that we have pps_units_to_msecs(), get_delay() looks
> rather pointless. Nuke it.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_pps.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c
> index 378a525eec16..173bcae5f0e2 100644
> --- a/drivers/gpu/drm/i915/display/intel_pps.c
> +++ b/drivers/gpu/drm/i915/display/intel_pps.c
> @@ -1560,13 +1560,11 @@ static void pps_init_delays(struct intel_dp *intel_dp)
>  	assign_final(power_cycle);
>  #undef assign_final
>  
> -#define get_delay(field)	pps_units_to_msecs(final->field)
> -	intel_dp->pps.panel_power_up_delay = get_delay(power_up);
> -	intel_dp->pps.backlight_on_delay = get_delay(backlight_on);
> -	intel_dp->pps.backlight_off_delay = get_delay(backlight_off);
> -	intel_dp->pps.panel_power_down_delay = get_delay(power_down);
> -	intel_dp->pps.panel_power_cycle_delay = get_delay(power_cycle);
> -#undef get_delay
> +	intel_dp->pps.panel_power_up_delay = pps_units_to_msecs(final->power_up);
> +	intel_dp->pps.backlight_on_delay = pps_units_to_msecs(final->backlight_on);
> +	intel_dp->pps.backlight_off_delay = pps_units_to_msecs(final->backlight_off);
> +	intel_dp->pps.panel_power_down_delay = pps_units_to_msecs(final->power_down);
> +	intel_dp->pps.panel_power_cycle_delay = pps_units_to_msecs(final->power_cycle);
>  
>  	drm_dbg_kms(display->drm,
>  		    "panel power up delay %d, power down delay %d, power cycle delay %d\n",

-- 
Jani Nikula, Intel


More information about the Intel-gfx mailing list