diff mbox series

[04/14] drm/i915/dp: Drop check for FEC in intel_dp_fec_compute_config

Message ID 20241204092642.1835807-5-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
Support for FEC is already checked in intel_dp_supports_dsc().
Therefore the check can be dropped from the helper
intel_dp_fec_compute_config.

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

Comments

Kandpal, Suraj Dec. 5, 2024, 6:26 a.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 04/14] drm/i915/dp: Drop check for FEC in
> intel_dp_fec_compute_config
> 
> Support for FEC is already checked in intel_dp_supports_dsc().
> Therefore the check can be dropped from the helper
> intel_dp_fec_compute_config.

I think the commit message can be improved 
"Support for FEC is already checked by intel_dp_supports_dsc() in
Intel_dp_dsc_compute_config() which gets called before intel_dp_fec_compute_config()

With that fixed 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 | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index ccc495842518..d48fa94b2705 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2345,7 +2345,6 @@ static int intel_edp_dsc_compute_pipe_bpp(struct
> intel_dp *intel_dp,  }
> 
>  static void intel_dp_fec_compute_config(struct intel_dp *intel_dp,
> -					const struct intel_connector
> *connector,
>  					struct intel_crtc_state *crtc_state)  {
>  	if (crtc_state->fec_enable)
> @@ -2359,9 +2358,6 @@ static void intel_dp_fec_compute_config(struct
> intel_dp *intel_dp,
>  	if (intel_dp_is_edp(intel_dp))
>  		return;
> 
> -	if (!intel_dp_supports_fec(intel_dp, connector, crtc_state))
> -		return;
> -
>  	if (intel_dp_is_uhbr(crtc_state))
>  		return;
> 
> @@ -2384,7 +2380,7 @@ int intel_dp_dsc_compute_config(struct intel_dp
> *intel_dp,
>  	int num_joined_pipes = intel_crtc_num_joined_pipes(pipe_config);
>  	int ret;
> 
> -	intel_dp_fec_compute_config(intel_dp, connector, pipe_config);
> +	intel_dp_fec_compute_config(intel_dp, pipe_config);
> 
>  	if (!intel_dp_dsc_supports_format(connector, pipe_config-
> >output_format))
>  		return -EINVAL;
> --
> 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 ccc495842518..d48fa94b2705 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2345,7 +2345,6 @@  static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
 }
 
 static void intel_dp_fec_compute_config(struct intel_dp *intel_dp,
-					const struct intel_connector *connector,
 					struct intel_crtc_state *crtc_state)
 {
 	if (crtc_state->fec_enable)
@@ -2359,9 +2358,6 @@  static void intel_dp_fec_compute_config(struct intel_dp *intel_dp,
 	if (intel_dp_is_edp(intel_dp))
 		return;
 
-	if (!intel_dp_supports_fec(intel_dp, connector, crtc_state))
-		return;
-
 	if (intel_dp_is_uhbr(crtc_state))
 		return;
 
@@ -2384,7 +2380,7 @@  int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
 	int num_joined_pipes = intel_crtc_num_joined_pipes(pipe_config);
 	int ret;
 
-	intel_dp_fec_compute_config(intel_dp, connector, pipe_config);
+	intel_dp_fec_compute_config(intel_dp, pipe_config);
 
 	if (!intel_dp_dsc_supports_format(connector, pipe_config->output_format))
 		return -EINVAL;