Skip to content

Commit 0e0ae65

Browse files
rodrigovividanvet
authored andcommitted
drm/i915: BDW PSR: Remove DDIA limitation for Broadwell.
Broadwell has a PSR per transcoder, where DDIA supports link disable and link standby modes while other transcoders only support link standby. Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 4c8c700 commit 0e0ae65

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

drivers/gpu/drm/i915/intel_dp.c

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,16 +1683,21 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp)
16831683

16841684
static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp)
16851685
{
1686-
struct drm_device *dev = intel_dp_to_dev(intel_dp);
1686+
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
1687+
struct drm_device *dev = dig_port->base.base.dev;
16871688
struct drm_i915_private *dev_priv = dev->dev_private;
16881689
uint32_t aux_clock_divider;
16891690
int precharge = 0x3;
16901691
int msg_size = 5; /* Header(4) + Message(1) */
1692+
bool only_standby = false;
16911693

16921694
aux_clock_divider = intel_dp->get_aux_clock_divider(intel_dp, 0);
16931695

1696+
if (IS_BROADWELL(dev) && dig_port->port != PORT_A)
1697+
only_standby = true;
1698+
16941699
/* Enable PSR in sink */
1695-
if (intel_dp->psr_dpcd[1] & DP_PSR_NO_TRAIN_ON_EXIT)
1700+
if (intel_dp->psr_dpcd[1] & DP_PSR_NO_TRAIN_ON_EXIT || only_standby)
16961701
drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG,
16971702
DP_PSR_ENABLE & ~DP_PSR_MAIN_LINK_ACTIVE);
16981703
else
@@ -1711,14 +1716,19 @@ static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp)
17111716

17121717
static void intel_edp_psr_enable_source(struct intel_dp *intel_dp)
17131718
{
1714-
struct drm_device *dev = intel_dp_to_dev(intel_dp);
1719+
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
1720+
struct drm_device *dev = dig_port->base.base.dev;
17151721
struct drm_i915_private *dev_priv = dev->dev_private;
17161722
uint32_t max_sleep_time = 0x1f;
17171723
uint32_t idle_frames = 1;
17181724
uint32_t val = 0x0;
17191725
const uint32_t link_entry_time = EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES;
1726+
bool only_standby = false;
17201727

1721-
if (intel_dp->psr_dpcd[1] & DP_PSR_NO_TRAIN_ON_EXIT) {
1728+
if (IS_BROADWELL(dev) && dig_port->port != PORT_A)
1729+
only_standby = true;
1730+
1731+
if (intel_dp->psr_dpcd[1] & DP_PSR_NO_TRAIN_ON_EXIT || only_standby) {
17221732
val |= EDP_PSR_LINK_STANDBY;
17231733
val |= EDP_PSR_TP2_TP3_TIME_0us;
17241734
val |= EDP_PSR_TP1_TIME_0us;
@@ -1746,8 +1756,13 @@ static bool intel_edp_psr_match_conditions(struct intel_dp *intel_dp)
17461756

17471757
dev_priv->psr.source_ok = false;
17481758

1749-
if ((intel_encoder->type != INTEL_OUTPUT_EDP) ||
1750-
(dig_port->port != PORT_A)) {
1759+
if (!HAS_PSR(dev)) {
1760+
DRM_DEBUG_KMS("PSR not supported on this platform\n");
1761+
return false;
1762+
}
1763+
1764+
if (IS_HASWELL(dev) && (intel_encoder->type != INTEL_OUTPUT_EDP ||
1765+
dig_port->port != PORT_A)) {
17511766
DRM_DEBUG_KMS("HSW ties PSR to DDI A (eDP)\n");
17521767
return false;
17531768
}

0 commit comments

Comments
 (0)