]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/dp: Read ALPM caps after DPCD init
authorArun R Murthy <arun.r.murthy@intel.com>
Wed, 4 Mar 2026 07:21:57 +0000 (12:51 +0530)
committerAnimesh Manna <animesh.manna@intel.com>
Mon, 9 Mar 2026 08:01:03 +0000 (13:31 +0530)
For eDP read the ALPM DPCD caps after DPCD initalization and just before
the PSR init.

v2: Move intel_alpm_init to intel_edp_init_dpcd (Jouni)
v3: Add Fixes with commit-id (Jouni)
v4: Separated the alpm dpcd read caps from alpm_init and moved to
intel_edp_init_dpcd.
v5: Read alpm_caps always for eDP irrespective of the eDP version (Jouni)
v6: replace drm_dp_dpcd_readb with drm_dp_dpcd_read_byte (Jouni)

Fixes: 15438b325987 ("drm/i915/alpm: Add compute config for lobf")
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patch.msgid.link/20260304072157.1123283-1-arun.r.murthy@intel.com
drivers/gpu/drm/i915/display/intel_alpm.c
drivers/gpu/drm/i915/display/intel_dp.c

index b3334bc4d0f9661a584bfa9de99712ec2cd4a0ba..a7350ce8e716386ba915ba39652113587b8a033f 100644 (file)
@@ -44,12 +44,6 @@ bool intel_alpm_is_alpm_aux_less(struct intel_dp *intel_dp,
 
 void intel_alpm_init(struct intel_dp *intel_dp)
 {
-       u8 dpcd;
-
-       if (drm_dp_dpcd_readb(&intel_dp->aux, DP_RECEIVER_ALPM_CAP, &dpcd) < 0)
-               return;
-
-       intel_dp->alpm_dpcd = dpcd;
        mutex_init(&intel_dp->alpm.lock);
 }
 
index 0c03b6fb6fd82b0b010fe5f7591ce5e0d8d2d04c..fbb5e2f9c2414123bec81cdba2ed76339c4af262 100644 (file)
@@ -4722,6 +4722,7 @@ static bool
 intel_edp_init_dpcd(struct intel_dp *intel_dp, struct intel_connector *connector)
 {
        struct intel_display *display = to_intel_display(intel_dp);
+       int ret;
 
        /* this function is meant to be called only once */
        drm_WARN_ON(display->drm, intel_dp->dpcd[DP_DPCD_REV] != 0);
@@ -4761,6 +4762,12 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp, struct intel_connector *connector
         */
        intel_dp_init_source_oui(intel_dp);
 
+       /* Read the ALPM DPCD caps */
+       ret = drm_dp_dpcd_read_byte(&intel_dp->aux, DP_RECEIVER_ALPM_CAP,
+                                   &intel_dp->alpm_dpcd);
+       if (ret < 0)
+               return false;
+
        /*
         * This has to be called after intel_dp->edp_dpcd is filled, PSR checks
         * for SET_POWER_CAPABLE bit in intel_dp->edp_dpcd[1]