mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-08 23:55:14 +00:00
drm/i915/psr: Check if sink PSR capability changed
eDP specification states that sink can have its PSR capability changed, I have never found any panel doing that but lets add that for completeness. For now it is not reading back the PSR capabilities and if possible re-enabling PSR, this will be added if a panel is found using this feature. v4: Cleaning DP_PSR_CAPS_CHANGE Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191128014852.214135-4-jose.souza@intel.com
This commit is contained in:
parent
700355af64
commit
ba0af30d24
1 changed files with 24 additions and 0 deletions
|
@ -1437,6 +1437,29 @@ static void psr_alpm_check(struct intel_dp *intel_dp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void psr_capability_changed_check(struct intel_dp *intel_dp)
|
||||||
|
{
|
||||||
|
struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
|
||||||
|
struct i915_psr *psr = &dev_priv->psr;
|
||||||
|
u8 val;
|
||||||
|
int r;
|
||||||
|
|
||||||
|
r = drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_ESI, &val);
|
||||||
|
if (r != 1) {
|
||||||
|
DRM_ERROR("Error reading DP_PSR_ESI\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (val & DP_PSR_CAPS_CHANGE) {
|
||||||
|
intel_psr_disable_locked(intel_dp);
|
||||||
|
psr->sink_not_reliable = true;
|
||||||
|
DRM_DEBUG_KMS("Sink PSR capability changed, disabling PSR\n");
|
||||||
|
|
||||||
|
/* Clearing it */
|
||||||
|
drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_ESI, val);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void intel_psr_short_pulse(struct intel_dp *intel_dp)
|
void intel_psr_short_pulse(struct intel_dp *intel_dp)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
|
struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
|
||||||
|
@ -1480,6 +1503,7 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp)
|
||||||
drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_ERROR_STATUS, error_status);
|
drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_ERROR_STATUS, error_status);
|
||||||
|
|
||||||
psr_alpm_check(intel_dp);
|
psr_alpm_check(intel_dp);
|
||||||
|
psr_capability_changed_check(intel_dp);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
mutex_unlock(&psr->lock);
|
mutex_unlock(&psr->lock);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue