Skip to content

Commit 335b237

Browse files
armurthytursulin
authored andcommitted
drm/i915/dp: Read ALPM caps after DPCD init
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: 15438b3 ("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 (cherry picked from commit 88442ba) Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
1 parent 5923a6e commit 335b237

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

drivers/gpu/drm/i915/display/intel_alpm.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ bool intel_alpm_is_alpm_aux_less(struct intel_dp *intel_dp,
4343

4444
void intel_alpm_init(struct intel_dp *intel_dp)
4545
{
46-
u8 dpcd;
47-
48-
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_RECEIVER_ALPM_CAP, &dpcd) < 0)
49-
return;
50-
51-
intel_dp->alpm_dpcd = dpcd;
5246
mutex_init(&intel_dp->alpm.lock);
5347
}
5448

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4577,6 +4577,7 @@ static bool
45774577
intel_edp_init_dpcd(struct intel_dp *intel_dp, struct intel_connector *connector)
45784578
{
45794579
struct intel_display *display = to_intel_display(intel_dp);
4580+
int ret;
45804581

45814582
/* this function is meant to be called only once */
45824583
drm_WARN_ON(display->drm, intel_dp->dpcd[DP_DPCD_REV] != 0);
@@ -4616,6 +4617,12 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp, struct intel_connector *connector
46164617
*/
46174618
intel_dp_init_source_oui(intel_dp);
46184619

4620+
/* Read the ALPM DPCD caps */
4621+
ret = drm_dp_dpcd_read_byte(&intel_dp->aux, DP_RECEIVER_ALPM_CAP,
4622+
&intel_dp->alpm_dpcd);
4623+
if (ret < 0)
4624+
return false;
4625+
46194626
/*
46204627
* This has to be called after intel_dp->edp_dpcd is filled, PSR checks
46214628
* for SET_POWER_CAPABLE bit in intel_dp->edp_dpcd[1]

0 commit comments

Comments
 (0)