The helper intel_dp_dsc_compute_bpp gives the maximum pipe bpp that is
allowed with DSC. Renaming the function to reflect the same.

Signed-off-by: Ankit Nautiyal <ankit.k.nauti...@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index eb00fdf5a3ad..d0c63888dfff 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -115,7 +115,7 @@ bool intel_dp_is_edp(struct intel_dp *intel_dp)
 }
 
 static void intel_dp_unset_edid(struct intel_dp *intel_dp);
-static int intel_dp_dsc_compute_bpp(struct intel_dp *intel_dp, u8 dsc_max_bpc);
+static int intel_dp_dsc_get_bpp_max(struct intel_dp *intel_dp, u8 dsc_max_bpc);
 
 /* Is link rate UHBR and thus 128b/132b? */
 bool intel_dp_is_uhbr(const struct intel_crtc_state *crtc_state)
@@ -1002,7 +1002,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,
                 * TBD pass the connector BPC,
                 * for now U8_MAX so that max BPC on that platform would be 
picked
                 */
-               int pipe_bpp = intel_dp_dsc_compute_bpp(intel_dp, U8_MAX);
+               int pipe_bpp_max = intel_dp_dsc_get_bpp_max(intel_dp, U8_MAX);
 
                if (intel_dp_is_edp(intel_dp)) {
                        dsc_max_output_bpp =
@@ -1018,7 +1018,7 @@ intel_dp_mode_valid(struct drm_connector *_connector,
                                                                target_clock,
                                                                mode->hdisplay,
                                                                bigjoiner,
-                                                               pipe_bpp);
+                                                               pipe_bpp_max);
                        dsc_slice_count =
                                intel_dp_dsc_get_slice_count(intel_dp,
                                                             target_clock,
@@ -1323,7 +1323,7 @@ intel_dp_compute_link_config_wide(struct intel_dp 
*intel_dp,
        return -EINVAL;
 }
 
-static int intel_dp_dsc_compute_bpp(struct intel_dp *intel_dp, u8 max_req_bpc)
+static int intel_dp_dsc_get_bpp_max(struct intel_dp *intel_dp, u8 max_req_bpc)
 {
        struct drm_i915_private *i915 = dp_to_i915(intel_dp);
        int i, num_bpc;
@@ -1422,7 +1422,7 @@ static int intel_dp_dsc_compute_config(struct intel_dp 
*intel_dp,
        struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
        const struct drm_display_mode *adjusted_mode =
                &pipe_config->hw.adjusted_mode;
-       int pipe_bpp;
+       int pipe_bpp_max;
        int ret;
 
        pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) &&
@@ -1431,10 +1431,10 @@ static int intel_dp_dsc_compute_config(struct intel_dp 
*intel_dp,
        if (!intel_dp_supports_dsc(intel_dp, pipe_config))
                return -EINVAL;
 
-       pipe_bpp = intel_dp_dsc_compute_bpp(intel_dp, 
conn_state->max_requested_bpc);
+       pipe_bpp_max = intel_dp_dsc_get_bpp_max(intel_dp, 
conn_state->max_requested_bpc);
 
        /* Min Input BPC for ICL+ is 8 */
-       if (pipe_bpp < 8 * 3) {
+       if (pipe_bpp_max < 8 * 3) {
                drm_dbg_kms(&dev_priv->drm,
                            "No DSC support for less than 8bpc\n");
                return -EINVAL;
@@ -1445,7 +1445,7 @@ static int intel_dp_dsc_compute_config(struct intel_dp 
*intel_dp,
         * Optimize this later for the minimum possible link rate/lane count
         * with DSC enabled for the requested mode.
         */
-       pipe_config->pipe_bpp = pipe_bpp;
+       pipe_config->pipe_bpp = pipe_bpp_max;
        pipe_config->port_clock = limits->max_rate;
        pipe_config->lane_count = limits->max_lane_count;
 
@@ -1467,7 +1467,7 @@ static int intel_dp_dsc_compute_config(struct intel_dp 
*intel_dp,
                                                        
adjusted_mode->crtc_clock,
                                                        
adjusted_mode->crtc_hdisplay,
                                                        
pipe_config->bigjoiner_pipes,
-                                                       pipe_bpp);
+                                                       pipe_bpp_max);
                dsc_dp_slice_count =
                        intel_dp_dsc_get_slice_count(intel_dp,
                                                     adjusted_mode->crtc_clock,
@@ -1486,7 +1486,7 @@ static int intel_dp_dsc_compute_config(struct intel_dp 
*intel_dp,
        /* As of today we support DSC for only RGB */
        if (intel_dp->force_dsc_bpp) {
                if (intel_dp->force_dsc_bpp >= 8 &&
-                   intel_dp->force_dsc_bpp < pipe_bpp) {
+                   intel_dp->force_dsc_bpp < pipe_bpp_max) {
                        drm_dbg_kms(&dev_priv->drm,
                                    "DSC BPP forced to %d",
                                    intel_dp->force_dsc_bpp);
-- 
2.25.1

Reply via email to