diff mbox series

[05/14] drm/i915/dp: Remove HAS_DSC macro for intel_dp_dsc_max_src_input_bpc

Message ID 20241204092642.1835807-6-ankit.k.nautiyal@intel.com (mailing list archive)
State New
Headers show
Series DP DSC min/max src bpc fixes | expand

Commit Message

Nautiyal, Ankit K Dec. 4, 2024, 9:26 a.m. UTC
DSC support is already checked before the helper
intel_dp_dsc_max_src_input_bpc is called.
Remove the check from the helper.

v2: Drop the argument struct drm_i915_private *i915. (Suraj)

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

Comments

Suraj Kandpal Dec. 4, 2024, 4:08 p.m. UTC | #1
> -----Original Message-----
> From: Nautiyal, Ankit K <ankit.k.nautiyal@intel.com>
> Sent: Wednesday, December 4, 2024 2:57 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: intel-xe@lists.freedesktop.org; Kandpal, Suraj <suraj.kandpal@intel.com>;
> jani.nikula@linux.intel.com; Deak, Imre <imre.deak@intel.com>
> Subject: [PATCH 05/14] drm/i915/dp: Remove HAS_DSC macro for
> intel_dp_dsc_max_src_input_bpc
> 
> DSC support is already checked before the helper
> intel_dp_dsc_max_src_input_bpc is called.
> Remove the check from the helper.
> 
> v2: Drop the argument struct drm_i915_private *i915. (Suraj)
> 

LGTM,
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>

> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index d48fa94b2705..3989873c9516 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2184,10 +2184,10 @@ static int dsc_compute_compressed_bpp(struct
> intel_dp *intel_dp,  }
> 
>  static
> -u8 intel_dp_dsc_min_src_input_bpc(struct drm_i915_private *i915)
> +u8 intel_dp_dsc_min_src_input_bpc(void)
>  {
>  	/* Min DSC Input BPC for ICL+ is 8 */
> -	return HAS_DSC(i915) ? 8 : 0;
> +	return 8;
>  }
> 
>  static
> @@ -2199,7 +2199,7 @@ bool is_dsc_pipe_bpp_sufficient(struct
> drm_i915_private *i915,
>  	u8 dsc_max_bpc, dsc_min_bpc, dsc_max_pipe_bpp,
> dsc_min_pipe_bpp;
> 
>  	dsc_max_bpc = min(intel_dp_dsc_max_src_input_bpc(i915),
> conn_state->max_requested_bpc);
> -	dsc_min_bpc = intel_dp_dsc_min_src_input_bpc(i915);
> +	dsc_min_bpc = intel_dp_dsc_min_src_input_bpc();
> 
>  	dsc_max_pipe_bpp = min(dsc_max_bpc * 3, limits->pipe.max_bpp);
>  	dsc_min_pipe_bpp = max(dsc_min_bpc * 3, limits->pipe.min_bpp);
> @@ -2266,7 +2266,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct
> intel_dp *intel_dp,
>  	dsc_max_bpc = min_t(u8, dsc_max_bpc, max_req_bpc);
>  	dsc_max_bpp = min(dsc_max_bpc * 3, limits->pipe.max_bpp);
> 
> -	dsc_min_bpc = intel_dp_dsc_min_src_input_bpc(i915);
> +	dsc_min_bpc = intel_dp_dsc_min_src_input_bpc();
>  	dsc_min_bpp = max(dsc_min_bpc * 3, limits->pipe.min_bpp);
> 
>  	/*
> --
> 2.45.2
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index d48fa94b2705..3989873c9516 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2184,10 +2184,10 @@  static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,
 }
 
 static
-u8 intel_dp_dsc_min_src_input_bpc(struct drm_i915_private *i915)
+u8 intel_dp_dsc_min_src_input_bpc(void)
 {
 	/* Min DSC Input BPC for ICL+ is 8 */
-	return HAS_DSC(i915) ? 8 : 0;
+	return 8;
 }
 
 static
@@ -2199,7 +2199,7 @@  bool is_dsc_pipe_bpp_sufficient(struct drm_i915_private *i915,
 	u8 dsc_max_bpc, dsc_min_bpc, dsc_max_pipe_bpp, dsc_min_pipe_bpp;
 
 	dsc_max_bpc = min(intel_dp_dsc_max_src_input_bpc(i915), conn_state->max_requested_bpc);
-	dsc_min_bpc = intel_dp_dsc_min_src_input_bpc(i915);
+	dsc_min_bpc = intel_dp_dsc_min_src_input_bpc();
 
 	dsc_max_pipe_bpp = min(dsc_max_bpc * 3, limits->pipe.max_bpp);
 	dsc_min_pipe_bpp = max(dsc_min_bpc * 3, limits->pipe.min_bpp);
@@ -2266,7 +2266,7 @@  static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
 	dsc_max_bpc = min_t(u8, dsc_max_bpc, max_req_bpc);
 	dsc_max_bpp = min(dsc_max_bpc * 3, limits->pipe.max_bpp);
 
-	dsc_min_bpc = intel_dp_dsc_min_src_input_bpc(i915);
+	dsc_min_bpc = intel_dp_dsc_min_src_input_bpc();
 	dsc_min_bpp = max(dsc_min_bpc * 3, limits->pipe.min_bpp);
 
 	/*