Re: [PATCH 1/4] drm/i915/dp: Simplify checks for helper intel_dp_dsc_max_src_input_bpc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/7/2023 3:28 PM, Jani Nikula wrote:
On Tue, 07 Nov 2023, Ankit Nautiyal <ankit.k.nautiyal@xxxxxxxxx> wrote:
Return 0 if platform doesn't support DSC, and return 12 for Display ver
12+.
This just describes the diff in English. I'd be more interested in
reading e.g. whether there's a functional change here.

Effectively there is no functional change.

At the moment, it is implicit that DSC is supported on ICL onwards so platforms earlier than ICL should return 0 for this function.

The change is to make it explicit that if the platform does not have DSC support (using the HAS_DSC macro), return 0.

I should have mention this in the commit message. Will update the commit message and resend this patch.


Thanks & Regards,

Ankit


BR,
Jani.

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

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 1891c0cc187d..d9e1d15a386e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1569,13 +1569,14 @@ intel_dp_compute_link_config_wide(struct intel_dp *intel_dp,
  static
  u8 intel_dp_dsc_max_src_input_bpc(struct drm_i915_private *i915)
  {
+	if (!HAS_DSC(i915))
+		return 0;
+
  	/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
-	if (DISPLAY_VER(i915) >= 12)
-		return 12;
  	if (DISPLAY_VER(i915) == 11)
  		return 10;
- return 0;
+	return 12;
  }
int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector,



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux