]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: reorder if chain to have last gen first
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 4 Apr 2019 23:04:25 +0000 (16:04 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 30 Apr 2019 09:25:37 +0000 (02:25 -0700)
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 <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190404230426.15837-3-lucas.demarchi@intel.com
drivers/gpu/drm/i915/intel_pm.c

index 3687e91659567e28246f8ff0beb0442fc541737e..402a58d3cd8184eb98a1b0477954e9f7f6c503d4 100644 (file)
@@ -4360,15 +4360,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);