]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/display: read PCON capability only when present
authorChaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Thu, 19 Jun 2025 04:26:29 +0000 (09:56 +0530)
committerSuraj Kandpal <suraj.kandpal@intel.com>
Mon, 23 Jun 2025 05:54:28 +0000 (11:24 +0530)
Avoid reading the PCON capabilities redundantly on non-branch devices.

v2:
 - Make commit description more accurate. (Imre)
 - Clear intel_dp->pcon_dsc_dpcd irrespective of presense of PCON. (Imre)

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/20250619042629.3980244-1-chaitanya.kumar.borah@intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index 277b40b13948ed964f20aa1243f76aa263615360..f48912f308df7fd26c9d089e8f1bd096bfc8df95 100644 (file)
@@ -3726,6 +3726,9 @@ static void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp)
 
        memset(intel_dp->pcon_dsc_dpcd, 0, sizeof(intel_dp->pcon_dsc_dpcd));
 
+       if (!drm_dp_is_branch(intel_dp->dpcd))
+               return;
+
        if (drm_dp_dpcd_read(&intel_dp->aux, DP_PCON_DSC_ENCODER,
                             intel_dp->pcon_dsc_dpcd,
                             sizeof(intel_dp->pcon_dsc_dpcd)) < 0)