On Thu, Apr 04, 2019 at 04:04:25PM -0700, Lucas De Marchi wrote:
> Reorder if/else so we check for gen >= 11 first, similar to most of
> other checks in the driver.
> 
> Signed-off-by: Lucas De Marchi <[email protected]>

Reviewed-by: Rodrigo Vivi <[email protected]>

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 0e05ee1f3ea0..25eff3728fcd 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4367,15 +4367,16 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,
>               return 0;
>       }
>  
> -     if (INTEL_GEN(dev_priv) < 11)
> +     if (INTEL_GEN(dev_priv) >= 11)
> +             total_data_rate =
> +                     icl_get_total_relative_data_rate(cstate,
> +                                                      plane_data_rate);
> +     else
>               total_data_rate =
>                       skl_get_total_relative_data_rate(cstate,
>                                                        plane_data_rate,
>                                                        uv_plane_data_rate);
> -     else
> -             total_data_rate =
> -                     icl_get_total_relative_data_rate(cstate,
> -                                                      plane_data_rate);
> +
>  
>       skl_ddb_get_pipe_allocation_limits(dev_priv, cstate, total_data_rate,
>                                          ddb, alloc, &num_active);
> -- 
> 2.21.0
> 
> _______________________________________________
> Intel-gfx mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to