drm/i915: PSR Fix standby logic for PSR on non DDI-A for certain platforms.
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/4 drm/i915: PSR Fix standby logic for PSR on non DDI-A for certain platforms.
Current platforms that support PSR on other port than A only support link standby mode.
The logic here was wrong since 'commit 89251b177b ("drm/i915: PSR:
deprecate link_standby support for core platforms.")
--- drivers/gpu/drm/i915/intel_psr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_psr.c +3 -3
@@ -327,9 +327,9 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)return false; } -if (!IS_VALLEYVIEW (dev) && !IS_CHERRYVIEW (dev) && - ((dev_priv->vbt.psr.full_link) || (dig_port->port !=PORT_A ))) { -DRM_DEBUG_KMS ("PSR condition failed: Link Standby requested/needed but not supported on this platform\n" ); +if (HAS_DDI (dev) && !dev_priv->vbt.psr.full_link && + dig_port->port !=PORT_A ) { +DRM_DEBUG_KMS ("PSR condition failed: Link Off requested/needed but not supported on this port\n" );return false; }
Signature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 2/4 drm/i915: Add PSR main link standby support back
Link standby support has been deprecated with 'commit 89251b177 ("drm/i915: PSR: deprecate link_standby support for core platforms.")'
The reason for that is that main link in full off offers more power savings and on HSW and BDW implementations on source side had known bugs with link standby.
However that same HSD report only mentions BDW and HSW and tells that a fix was going to new platforms. Since I got a SKL working really well with link in standby mode let's respect VBT again for this platforms.
--- drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 27 +++++++++++++++++++++++++-- 3 files changed, 30 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +4 -0
@@ -2567,6 +2567,10 @@ static int i915_edp_psr_status(struct seq_file *m, void *data) enabled = true; } } + +seq_printf (m,"Main link in standby mode: %s\n" , +yesno (dev_priv->psr.link_standby)); +seq_printf (m,"HW Enabled & Active bit: %s" ,yesno (enabled));if (!HAS_DDI (dev))
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -969,6 +969,7 @@ struct i915_psr {unsigned busy_frontbuffer_bits;bool psr2_support;bool aux_frame_sync; +bool link_standby; };enum intel_pch {
drivers/gpu/drm/i915/intel_psr.c +25 -2
@@ -225,7 +225,12 @@ static void hsw_psr_enable_sink(struct intel_dp *intel_dp) (aux_clock_divider << DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT)); } -drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG ,DP_PSR_ENABLE ); +if (dev_priv->psr.link_standby) +drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG , +DP_PSR_ENABLE |DP_PSR_MAIN_LINK_ACTIVE ); +else +drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG , +DP_PSR_ENABLE ); }static void vlv_psr_enable_source (struct intel_dp *intel_dp)
@@ -280,6 +285,9 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp)if (IS_HASWELL (dev)) val |=EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES ; +if (dev_priv->psr.link_standby) + val |=EDP_PSR_LINK_STANDBY ; + I915_WRITE(EDP_PSR_CTL, val | max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT | idle_frames << EDP_PSR_IDLE_FRAME_SHIFT |
@@ -327,7 +335,7 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)return false; } -if (HAS_DDI (dev) && !dev_priv->vbt.psr.full_link && +if (HAS_DDI (dev) && !dev_priv->psr.link_standby && dig_port->port !=PORT_A ) {DRM_DEBUG_KMS ("PSR condition failed: Link Off requested/needed but not supported on this port\n" );return false;
@@ -763,6 +771,21 @@ void intel_psr_init(struct drm_device *dev) dev_priv->psr_mmio_base =IS_HASWELL (dev_priv) ?HSW_EDP_PSR_BASE :BDW_EDP_PSR_BASE ; +if (IS_HASWELL (dev) ||IS_BROADWELL (dev)) +/* +* On HSW and BDW Source implementation as an issue with PSR +* exit that requires an workaround that doesn't exist on HSW +* and that on BDW requires single frame update that we don't +* implement because it needs 3 or 4 extra workarounds. +*/ + dev_priv->psr.link_standby = false; +else if (IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) +/* On VLV and CHV only standby mode is supported. */ + dev_priv->psr.link_standby = true; +else +/* For new platforms let's respect VBT back again */ + dev_priv->psr.link_standby = dev_priv->vbt.psr.full_link; +INIT_DELAYED_WORK (&dev_priv->psr.work, intel_psr_work);mutex_init (&dev_priv->psr.lock); }
Signature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/4] drm/i915: Add PSR main link standby support back
Em Sex, 2015-12-11 às 08:39 -0800, Rodrigo Vivi escreveu:
Quoted 11 lines
Link standby support has been deprecated with 'commit
89251b177("drm/i915: PSR: deprecatelink_standbysupport for core platforms.")'The reason for that is that main link in full off offers more power savings and on HSW and BDW implementations on source side had known bugs with link standby.
However that same HSD report only mentions BDW and HSW and tells that a fix was going to new platforms. Since I got a SKL working really well
Please define what "working really well" means, especially when comparing against the full-off mode that's supposed to be even better :)
Quoted 1 line
with link in standby mode let's respect VBT again for this
I see this patch fixes some of the issues I pointed in the review of patch 1/4. This patch should definitely be applied _before_ the patch where we tell intel_psr_match_conditions() to start accepting link standby mode.
Quoted 80 lines
platforms.
Cc Paulo Zanoni <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>---
drivers/gpu/drm/i915/i915_debugfs.c | 4 ++++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_psr.c | 27 +++++++++++++++++++++++++--3 files changed, 30 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/i915_debugfs.c +4
-0@@ -2567,6 +2567,10 @@ static int i915_edp_psr_status(struct seq_file *m, void *data) enabled = true; } } + +seq_printf (m,"Main link in standby mode: %s\n" , + yesno(dev_priv->psr.link_standby)); + seq_printf(m, "HW Enabled & Active bit: %s",yesno (enabled));
if (!HAS_DDI(dev))drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -969,6 +969,7 @@ struct i915_psr { unsigned busy_frontbuffer_bits; bool psr2_support; bool aux_frame_sync; +bool link_standby; };
enumintel_pch{drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -225,7 +225,12 @@ static void hsw_psr_enable_sink(struct intel_dp *intel_dp)(aux_clock_divider <<
DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT));
}drivers/gpu/drm/i915/intel_psr.c +0
-1- drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG,
DP_PSR_ENABLE);drivers/gpu/drm/i915/intel_psr.c +3
-0+if (dev_priv->psr.link_standby) + drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, + DP_PSR_ENABLE |
DP_PSR_MAIN_LINK_ACTIVE);drivers/gpu/drm/i915/intel_psr.c +3
-0+else +drm_dp_dpcd_writeb (&intel_dp->aux,DP_PSR_EN_CFG , + DP_PSR_ENABLE);}
static voidvlv_psr_enable_source(struct intel_dp *intel_dp)drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -280,6 +285,9 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp) if (IS_HASWELL(dev)) val |= EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES;drivers/gpu/drm/i915/intel_psr.c +3
-0+if (dev_priv->psr.link_standby) + val |=EDP_PSR_LINK_STANDBY ; +I915_WRITE(EDP_PSR_CTL, val |
max_sleep_time <<EDP_PSR_MAX_SLEEP_TIME_SHIFT|idle_frames<<EDP_PSR_IDLE_FRAME_SHIFT|drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -327,7 +335,7 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp) return false; }
drivers/gpu/drm/i915/intel_psr.c static bool intel_psr_match_conditions(struct intel_dp *intel_dp) · line 338
Quoted 2 lines
drivers/gpu/drm/i915/intel_psr.c +1
-1- if (HAS_DDI(dev) && !dev_priv->vbt.psr.full_link && + if (HAS_DDI(dev) && !dev_priv->psr.link_standby &&
Since I think this patch should come before patch 1, then I suppose you'll need to rebase this chunk.
Quoted 18 lines
dig_port->port !=
PORT_A) {DRM_DEBUG_KMS("PSR condition failed: Link Off requested/needed but not supported on this port\n"); return false;drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -763,6 +771,21 @@ void intel_psr_init(struct drm_device *dev)
dev_priv->psr_mmio_base=IS_HASWELL(dev_priv)?HSW_EDP_PSR_BASE:BDW_EDP_PSR_BASE;drivers/gpu/drm/i915/intel_psr.c +3
-0+if (IS_HASWELL (dev) ||IS_BROADWELL (dev)) +/* +* On HSW and BDW Source implementation as an issue with PSR
drivers/gpu/drm/i915/intel_psr.c +1
-0+ * exit that requires an workaround that doesn'texist on HSW
drivers/gpu/drm/i915/intel_psr.c +1
-0+ * and that on BDW requires single frame update thatwe don't
drivers/gpu/drm/i915/intel_psr.c +1
-0+ * implement because it needs 3 or 4 extraworkarounds.
drivers/gpu/drm/i915/intel_psr.c void intel_psr_init(struct drm_device *dev) · line 780
Quoted 1 line
drivers/gpu/drm/i915/intel_psr.c +1
-0+*/
Bikeshed: since we don't mention the exact problems anywhere, we could just go with something like "HSW and BDW require workarounds that we don't implement".
Besides the patch ordering issue, everything else looks correct.
Quoted 8 lines
drivers/gpu/drm/i915/intel_psr.c +7
-0+ dev_priv->psr.link_standby = false; + else if (IS_VALLEYVIEW(dev) || IS_CHERRYVIEW(dev)) +/* On VLV and CHV only standby mode is supported. */ + dev_priv->psr.link_standby = true; + else +/* For new platforms let's respect VBT back again */ + dev_priv->psr.link_standby = dev_priv-Quoted 1 line
vbt.psr.full_link;
Quoted 4 lines
+
INIT_DELAYED_WORK(&dev_priv->psr.work, intel_psr_work);mutex_init(&dev_priv->psr.lock);
}
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 3/4 drm/i915: Instrument PSR parameter for possible quirks with link standby.
In reply to Rodrigo ViviUnfortunately we don't know all panels and platforms out there and we found internal prototypes without VBT proper set but where only link in standby worked well.
So, before enable PSR by default let's instrument the PSR parameter in a way that we can identify different panels out there that might require or work better with link standby mode.
It is also useful to say that for backward compatibility I'm not changing the meaning of this flag. So "0" still means disabled and "1" means enabled with full support and maximum power savings.
v2: Use positive value instead of negative for different operation mode
as suggested by Daniel.
v3: As Paulo suggested use 2 to force link standby and 3 to force link
fully on. Also split the link_standby introduction in a separated patch.
--- drivers/gpu/drm/i915/i915_params.c | 7 ++++++- drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_params.c +6 -1
@@ -126,7 +126,12 @@ MODULE_PARM_DESC(enable_execlists, "(-1=auto [default], 0=disabled, 1=enabled)");module_param_named_unsafe (enable_psr, i915.enable_psr, int,0600 ); -MODULE_PARM_DESC (enable_psr,"Enable PSR (default: false)" ); +MODULE_PARM_DESC (enable_psr,"Enable PSR " +"(0=disabled [default], 1=enabled - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode)" +"In case you needed to force any different option, please " +"report PCI device ID, subsystem vendor and subsystem device ID " +"to [email protected], if your machine needs it. " +"It will then be included in an upcoming module version." );module_param_named_unsafe (preliminary_hw_support, i915.preliminary_hw_support, int,0600 ); MODULE_PARM_DESC(preliminary_hw_support,
drivers/gpu/drm/i915/intel_psr.c +17 -0
@@ -335,6 +335,12 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)return false; } +if ((IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) && + dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR condition failed: Link off requested/needed but not supported on this platform\n" ); +return false; + } +if (HAS_DDI (dev) && !dev_priv->psr.link_standby && dig_port->port !=PORT_A ) {DRM_DEBUG_KMS ("PSR condition failed: Link Off requested/needed but not supported on this port\n" );
@@ -771,6 +777,7 @@ void intel_psr_init(struct drm_device *dev) dev_priv->psr_mmio_base =IS_HASWELL (dev_priv) ?HSW_EDP_PSR_BASE :BDW_EDP_PSR_BASE ; +/* Set link_standby x link_off defaults */ if (IS_HASWELL (dev) ||IS_BROADWELL (dev))/* * On HSW and BDW Source implementation as an issue with PSR
@@ -786,6 +793,16 @@ void intel_psr_init(struct drm_device *dev)/* For new platforms let's respect VBT back again */ dev_priv->psr.link_standby = dev_priv->vbt.psr.full_link; +/* Override link_standby x link_off defaults */ +if (i915.enable_psr ==2 && !dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR: Forcing link standby\n" ); + dev_priv->psr.link_standby = true; + } +if (i915.enable_psr ==3 && dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR: Forcing main link off\n" ); + dev_priv->psr.link_standby = false; + } +INIT_DELAYED_WORK (&dev_priv->psr.work, intel_psr_work);mutex_init (&dev_priv->psr.lock); }
Signature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/4] drm/i915: Instrument PSR parameter for possible quirks with link standby.
Em Sex, 2015-12-11 às 08:39 -0800, Rodrigo Vivi escreveu:
Quoted 50 lines
Unfortunately we don't know all panels and platforms out there and we found internal prototypes without VBT proper set but where only link in standby worked well.
So, before enable PSR by default let's instrument the PSR parameter in a way that we can identify different panels out there that might require or work better with link standby mode.
It is also useful to say that for backward compatibility I'm not changing the meaning of this flag. So "0" still means disabled and "1" means enabled with full support and maximum power savings.
v2: Use positive value instead of negative for different operation mode
as suggested by Daniel.v3: As Paulo suggested use 2 to force link standby and 3 to force link
fully on. Also split thelink_standbyintroduction in a separated patch.Cc Paulo Zanoni <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>---
drivers/gpu/drm/i915/i915_params.c | 7 ++++++- drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++++++++2 files changed, 23 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_params.c +0
-0@@ -126,7 +126,12 @@ MODULE_PARM_DESC(enable_execlists, "(-1=auto [default], 0=disabled, 1=enabled)");
module_param_named_unsafe(enable_psr, i915.enable_psr, int, 0600);drivers/gpu/drm/i915/i915_params.c +2
-1-MODULE_PARM_DESC (enable_psr,"Enable PSR (default: false)" ); +MODULE_PARM_DESC (enable_psr,"Enable PSR " + "(0=disabled [default], 1=enabled - link modechosen per-platform, 2=force link-standby mode, 3=force link-off mode)"
drivers/gpu/drm/i915/i915_params.c +1
-0+ "In case you needed to force any different option,please "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "report PCI device ID, subsystem vendor andsubsystem device ID "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "to [email protected], if yourmachine needs it. "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "It will then be included in an upcoming module
Quoted 1 line
version.");
Are we making a promise here? Isn't that dangerous? :P
I'd just tell the users to open bug reports.
(I'm not requiring you to change anything here, but something something lawyers something)
Quoted 14 lines
module_param_named_unsafe(preliminary_hw_support, i915.preliminary_hw_support, int, 0600); MODULE_PARM_DESC(preliminary_hw_support,drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -335,6 +335,12 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp) return false; }
drivers/gpu/drm/i915/intel_psr.c static bool intel_psr_match_conditions(struct intel_dp *intel_dp) · line 339
Quoted 2 lines
drivers/gpu/drm/i915/intel_psr.c +2
-0+if ((IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) && + dev_priv->psr.link_standby) {
s/dev_priv->psr.link_standby/!dev_priv->psr.link_standby/
Also, I'm not sure if this chunk belongs here or at intel_psr_init(), since it effectively disables PSR. This means that i915.enable_psr=3 disables PSR on VLV/CHV. But maybe we shouldn't care since users shouldn't be using the option anyway. On the other hand, users may start claiming that i915.enable_psr=X "fixed PSR" for them while effectively it just disabled PSR, so perhaps DRM_ERROR would be better. Anyway, I'm not requesting any change, just pointing things in case you or someone else has any idea, but maybe I'd go with DRM_ERROR since users usually don't know which platform supports what, so the loud message may help them.
Another check which we seem to be missing is "if (HAS_DDI(dev_priv) && transcoder != TRANSCODER_EDP && !dev_priv->psr.link_standby)", but this depends on the result of the discussion of patch 1.
Everything else looks good, but it would be nice to see the opinions of maintainers here since they always have something to say about new i915.ko options.
Quoted 33 lines
drivers/gpu/drm/i915/intel_psr.c +1
-0+ DRM_DEBUG_KMS("PSR condition failed: Link offrequested/needed but not supported on this platform\n");
drivers/gpu/drm/i915/intel_psr.c +3
-0+return false; + } +if (
HAS_DDI(dev)&& !dev_priv->psr.link_standby &&dig_port->port!=PORT_A) {DRM_DEBUG_KMS("PSR condition failed: Link Off requested/needed but not supported on this port\n");drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -771,6 +777,7 @@ void intel_psr_init(struct drm_device *dev)
dev_priv->psr_mmio_base=IS_HASWELL(dev_priv)?HSW_EDP_PSR_BASE:BDW_EDP_PSR_BASE;drivers/gpu/drm/i915/intel_psr.c +1
-0+/* Set link_standby x link_off defaults */ if (
IS_HASWELL(dev)||IS_BROADWELL(dev))
/*
* On HSW and BDW Source implementation as an issue with PSRdrivers/gpu/drm/i915/intel_psr.c +0
-0@@ -786,6 +793,16 @@ void intel_psr_init(struct drm_device *dev) /* For new platforms let's respect VBT back again */
dev_priv->psr.link_standby= dev_priv-Quoted 1 line
vbt.psr.full_link;
drivers/gpu/drm/i915/intel_psr.c +10
-0+/* Override link_standby x link_off defaults */ +if (i915.enable_psr ==2 && !dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR: Forcing link standby\n" ); + dev_priv->psr.link_standby = true; + } +if (i915.enable_psr ==3 && dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR: Forcing main link off\n" ); + dev_priv->psr.link_standby = false; + } +
Quoted 3 lines
INIT_DELAYED_WORK(&dev_priv->psr.work, intel_psr_work);mutex_init(&dev_priv->psr.lock);
}
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/4] drm/i915: Instrument PSR parameter for possible quirks with link standby.
Quoted 4 lines · Paulo R
Em Sex, 2015-12-11 às 08:39 -0800, Rodrigo Vivi escreveu:
Quoted 3 lines
Unfortunately we don't know all panels and platforms out there and we found internal prototypes without VBT proper set but where only link in standby worked well.
:) if it is internal i assume someone has to set the vbt ,we encountered an issue sometime back that blamed vbt as incorrect only to later learn that the person who created the setup didn't care to configure the VBT.
Quoted 67 lines
Quoted 47 lines
So, before enable PSR by default let's instrument the PSR parameter in a way that we can identify different panels out there that might require or work better with link standby mode.
It is also useful to say that for backward compatibility I'm not changing the meaning of this flag. So "0" still means disabled and "1" means enabled with full support and maximum power savings.
v2: Use positive value instead of negative for different operation mode
as suggested by Daniel.v3: As Paulo suggested use 2 to force link standby and 3 to force link
fully on. Also split thelink_standbyintroduction in a separated
patch.Cc Paulo Zanoni <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_params.c | 7 ++++++- drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_params.c +2
-1@@ -126,7 +126,12 @@ MODULE_PARM_DESC(enable_execlists, "(-1=auto [default], 0=disabled, 1=enabled)");module_param_named_unsafe (enable_psr, i915.enable_psr, int,0600 ); -MODULE_PARM_DESC (enable_psr,"Enable PSR (default: false)" ); +MODULE_PARM_DESC (enable_psr,"Enable PSR " + "(0=disabled [default], 1=enabled - link modechosen per-platform, 2=force link-standby mode, 3=force link-off mode)"
drivers/gpu/drm/i915/i915_params.c +1
-0+ "In case you needed to force any different option,please "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "report PCI device ID, subsystem vendor andsubsystem device ID "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "to [email protected], if yourmachine needs it. "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "It will then be included in an upcoming moduleQuoted 1 line
version.");
Are we making a promise here? Isn't that dangerous? :P
I'd just tell the users to open bug reports.
(I'm not requiring you to change anything here, but something something lawyers something)Quoted 14 lines
module_param_named_unsafe(preliminary_hw_support,
i915.preliminary_hw_support, int, 0600);
MODULE_PARM_DESC(preliminary_hw_support,drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -335,6 +335,12 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)return false; }
Quoted 2 lines
drivers/gpu/drm/i915/intel_psr.c static bool intel_psr_match_conditions(struct intel_dp *intel_dp) · line 339
Quoted 2 lines
drivers/gpu/drm/i915/intel_psr.c +2
-0+if ((IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) && + dev_priv->psr.link_standby) {
IS_VALLEYVIEW() will return true for both valleyview and cherryview so the above check for cherryview can be removed.
Quoted 13 lines
s/dev_priv->psr.link_standby/!dev_priv->psr.link_standby/
Also, I'm not sure if this chunk belongs here or at
intel_psr_init(), since it effectively disables PSR. This means that i915.enable_psr=3 disables PSR on VLV/CHV. But maybe we shouldn't care since users shouldn't be using the option anyway. On the other hand, users may start claiming that i915.enable_psr=X "fixed PSR" for them while effectively it just disabled PSR, so perhapsDRM_ERRORwould be better. Anyway, I'm not requesting any change, just pointing things in case you or someone else has any idea, but maybe I'd go withDRM_ERRORsince users usually don't know which platform supports what, so the loud message may help them.
i agree, psr_match_conditions should check for parameters that can change dynamically post boot to decide if we can enable psr or not, if link_standby cannot be changed post boot we should check for it in init
so we can avoid psr being enabled in the first place.
Quoted 9 lines
Another check which we seem to be missing is "if (
HAS_DDI(dev_priv)&& transcoder !=TRANSCODER_EDP&& !dev_priv->psr.link_standby)", but this depends on the result of the discussion of patch 1.Everything else looks good, but it would be nice to see the opinions of maintainers here since they always have something to say about new i915.ko options.
Quoted 5 lines
drivers/gpu/drm/i915/intel_psr.c static bool intel_psr_match_conditions(struct intel_dp *intel_dp) · line 343
Quoted 5 lines
drivers/gpu/drm/i915/intel_psr.c +4
-0+ DRM_DEBUG_KMS("PSR condition failed: Link off requested/needed but not supported on this platform\n"); + return false; + } +
sorry i came late to this thread, but can you point me to some issues for link off in CHT/VLV ? we have enabled link off in CHT Android and it seems to be working fine. we can check again if we have missed something.
Quoted 27 lines
Quoted 27 lines
drivers/gpu/drm/i915/intel_psr.c +0
-0if (HAS_DDI(dev) && !dev_priv->psr.link_standby &&
dig_port->port!=PORT_A) {
DRM_DEBUG_KMS("PSR condition failed: Link Off
requested/needed but not supported on this port\n");drivers/gpu/drm/i915/intel_psr.c +1
-0@@ -771,6 +777,7 @@ void intel_psr_init(struct drm_device *dev) dev_priv->psr_mmio_base =IS_HASWELL (dev_priv) ?HSW_EDP_PSR_BASE :BDW_EDP_PSR_BASE ; +/* Set link_standby x link_off defaults */ if (IS_HASWELL (dev) ||IS_BROADWELL (dev))/* * On HSW and BDW Source implementation as an issue with PSR
drivers/gpu/drm/i915/intel_psr.c +9
-0@@ -786,6 +793,16 @@ void intel_psr_init(struct drm_device *dev)/* For new platforms let's respect VBT back again */ dev_priv->psr.link_standby = dev_priv- > vbt.psr.full_link; +/* Override link_standby x link_off defaults */ +if (i915.enable_psr ==2 && !dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR: Forcing link standby\n" ); + dev_priv->psr.link_standby = true; + } +if (i915.enable_psr ==3 && dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR: Forcing main link off\n" ); + dev_priv->psr.link_standby = false; + }
Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_psr.c +1
-0+INIT_DELAYED_WORK (&dev_priv->psr.work, intel_psr_work);mutex_init (&dev_priv->psr.lock);}_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/4] drm/i915: Instrument PSR parameter for possible quirks with link standby.
Em Qui, 2016-01-21 às 08:35 +0530, Thulasimani, Sivakumar escreveu:
Quoted 7 lines · Paulo R
Quoted 5 lines
Em Sex, 2015-12-11 às 08:39 -0800, Rodrigo Vivi escreveu:
Quoted 4 lines
Unfortunately we don't know all panels and platforms out there and we
found internal prototypes without VBT proper set but where only link in standby worked well.
Quoted 5 lines
:) if it is internal i assume someone has to set the vbt ,we encountered
an issue
sometime back that blamed vbt as incorrect only to later learn that the person who created the setup didn't care to configure the VBT.
But in order to discover if the VBT is incorrect, the parameter can be used.
Quoted 73 lines
Quoted 73 lines
Quoted 54 lines
So, before enable PSR by default let's instrument the PSR parameter
in a way that we can identify different panels out there that might
require or work better with link standby mode.It is also useful to say that for backward compatibility I'm not changing the meaning of this flag. So "0" still means disabled and "1" means enabled with full support and maximum power savings.
v2: Use positive value instead of negative for different operation
mode
as suggested by Daniel.v3: As Paulo suggested use 2 to force link standby and 3 to force link
fully on. Also split thelink_standbyintroduction in a separated
patch.Cc Paulo Zanoni <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>---
drivers/gpu/drm/i915/i915_params.c| 7 ++++++- drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++++++++2 files changed, 23 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_params.c +0
-0@@ -126,7 +126,12 @@ MODULE_PARM_DESC(enable_execlists, "(-1=auto [default], 0=disabled, 1=enabled)");
module_param_named_unsafe(enable_psr, i915.enable_psr, int, 0600);drivers/gpu/drm/i915/i915_params.c +2
-1-MODULE_PARM_DESC (enable_psr,"Enable PSR (default: false)" ); +MODULE_PARM_DESC (enable_psr,"Enable PSR " + "(0=disabled [default], 1=enabled - link modechosen per-platform, 2=force link-standby mode, 3=force link-off mode)"
drivers/gpu/drm/i915/i915_params.c +1
-0+ "In case you needed to force any differentoption,
please "drivers/gpu/drm/i915/i915_params.c +1
-0+ "report PCI device ID, subsystem vendor andsubsystem device ID "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "to [email protected], if yourmachine needs it. "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "It will then be included in an upcoming moduleQuoted 1 line
version.");
Are we making a promise here? Isn't that dangerous? :P I'd just tell the users to open bug reports.
(I'm not requiring you to change anything here, but something something
lawyers something)Quoted 12 lines
module_param_named_unsafe(preliminary_hw_support, i915.preliminary_hw_support, int, 0600); MODULE_PARM_DESC(preliminary_hw_support,drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -335,6 +335,12 @@ static boolintel_psr_match_conditions(struct
intel_dp*intel_dp)
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_psr.c static bool intel_psr_match_conditions(struct intel_dp *intel_dp) · line 339
Quoted 5 lines
return false;
}drivers/gpu/drm/i915/intel_psr.c +2
-0+if ((IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) && + dev_priv->psr.link_standby) {
IS_VALLEYVIEW()will return true for both valleyview and cherryview so
the above check for cherryview can be removed.
Not anymore:
commit 666a45379e2c29bc16e60648e5ad8f6f8b7fa6ce
Author: Wayne Boyer <[email protected]>
Date: Wed Dec 9 12:29:35 2015 -0800
drm/i915: Separate cherryview from valleyview
Quoted 35 lines
Quoted 17 lines
s/dev_priv->psr.link_standby/!dev_priv->psr.link_standby/
Also, I'm not sure if this chunk belongs here or at
intel_psr_init(),
since it effectively disables PSR. This means that i915.enable_psr=3
disables PSR on VLV/CHV. But maybe we shouldn't care since users shouldn't be using the option anyway. On the other hand, users may start claiming that i915.enable_psr=X "fixed PSR" for them while effectively it just disabled PSR, so perhapsDRM_ERRORwould be better.
Anyway, I'm not requesting any change, just pointing things in case you
or someone else has any idea, but maybe I'd go withDRM_ERRORsince users usually don't know which platform supports what, so the loud message may help them.i agree,
psr_match_conditionsshould check for parameters that can change
dynamically post boot to decide if we can enable psr or not, iflink_standbycannot be changed post boot we should check for it in init
so we can avoid psr being enabled in the first place.Quoted 12 lines
Another check which we seem to be missing is "if (
HAS_DDI(dev_priv)&&
transcoder !=TRANSCODER_EDP&& !dev_priv->psr.link_standby)", but this
depends on the result of the discussion of patch 1.Everything else looks good, but it would be nice to see the opinions of
maintainers here since they always have something to say about new i915.ko options.
Quoted 10 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_psr.c static bool intel_psr_match_conditions(struct intel_dp *intel_dp) · line 343
Quoted 5 lines
drivers/gpu/drm/i915/intel_psr.c +1
-0+ DRM_DEBUG_KMS("PSR condition failed: Link offrequested/needed but not supported on this platform\n");
drivers/gpu/drm/i915/intel_psr.c +3
-0+return false; + } +sorry i came late to this thread, but can you point me to some issues for
link off in CHT/VLV ? we have enabled link off in CHT Android and it seems
to be working fine. we can check again if we have missed something.
The issue is that the upstream Kernel does not appear to support it, since vlv_psr_enable_sink() always sets DP_PSR_MAIN_LINK_ACTIVE. But I didn't check if VLV_PSRCTL is properly setting link active too.
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
if (
HAS_DDI(dev)&& !dev_priv->psr.link_standby &&dig_port->port!=PORT_A) {DRM_DEBUG_KMS("PSR condition failed: Link Off requested/needed but not supported on this port\n");drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -771,6 +777,7 @@ void intel_psr_init(struct drm_device *dev)
dev_priv->psr_mmio_base=IS_HASWELL(dev_priv)?HSW_EDP_PSR_BASE:BDW_EDP_PSR_BASE;drivers/gpu/drm/i915/intel_psr.c +1
-0+/* Set link_standby x link_off defaults */ if (
IS_HASWELL(dev)||IS_BROADWELL(dev)) /*
* On HSW and BDW Source implementation as an issue
with PSRdrivers/gpu/drm/i915/intel_psr.c +0
-0@@ -786,6 +793,16 @@ void intel_psr_init(struct drm_device *dev) /* For new platforms let's respect VBT backagain */
dev_priv->psr.link_standby= dev_priv-Quoted 1 line
vbt.psr.full_link;
drivers/gpu/drm/i915/intel_psr.c +2
-0+/* Override link_standby x link_off defaults */ +if (i915.enable_psr ==2 && !dev_priv->psr.link_standby){
drivers/gpu/drm/i915/intel_psr.c +4
-0+DRM_DEBUG_KMS ("PSR: Forcing link standby\n" ); + dev_priv->psr.link_standby = true; + } +if (i915.enable_psr ==3 && dev_priv->psr.link_standby){
drivers/gpu/drm/i915/intel_psr.c +3
-0+DRM_DEBUG_KMS ("PSR: Forcing main link off\n" ); + dev_priv->psr.link_standby = false; + }
Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
+
INIT_DELAYED_WORK(&dev_priv->psr.work, intel_psr_work);mutex_init(&dev_priv->psr.lock);
}_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/4] drm/i915: Instrument PSR parameter for possible quirks with link standby.
Quoted 95 lines · Paulo R
Em Qui, 2016-01-21 às 08:35 +0530, Thulasimani, Sivakumar escreveu:
Quoted 11 lines · Paulo R
Quoted 5 lines
Em Sex, 2015-12-11 às 08:39 -0800, Rodrigo Vivi escreveu:
Quoted 4 lines
Unfortunately we don't know all panels and platforms out there and we
found internal prototypes without VBT proper set but where only link in standby worked well.:) if it is internal i assume someone has to set the vbt ,we encountered
an issue
sometime back that blamed vbt as incorrect only to later learn that the person who created the setup didn't care to configure the VBT.But in order to discover if the VBT is incorrect, the parameter can be used.
Quoted 75 lines
Quoted 75 lines
Quoted 53 lines
So, before enable PSR by default let's instrument the PSR parameter
in a way that we can identify different panels out there that might
require or work better with link standby mode.It is also useful to say that for backward compatibility I'm not changing the meaning of this flag. So "0" still means disabled and "1" means enabled with full support and maximum power savings.
v2: Use positive value instead of negative for different operation
mode
as suggested by Daniel.v3: As Paulo suggested use 2 to force link standby and 3 to force link
fully on. Also split thelink_standbyintroduction in a
separated
patch.Cc Paulo Zanoni <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_params.c | 7 ++++++- drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_params.c +2
-1@@ -126,7 +126,12 @@ MODULE_PARM_DESC(enable_execlists, "(-1=auto [default], 0=disabled, 1=enabled)");module_param_named_unsafe (enable_psr, i915.enable_psr, int,0600 ); -MODULE_PARM_DESC (enable_psr,"Enable PSR (default: false)" ); +MODULE_PARM_DESC (enable_psr,"Enable PSR " + "(0=disabled [default], 1=enabled - link modechosen per-platform, 2=force link-standby mode, 3=force link-off mode)"
drivers/gpu/drm/i915/i915_params.c +1
-0+ "In case you needed to force any differentoption,
please "drivers/gpu/drm/i915/i915_params.c +1
-0+ "report PCI device ID, subsystem vendor andsubsystem device ID "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "to [email protected], if yourmachine needs it. "
drivers/gpu/drm/i915/i915_params.c +1
-0+ "It will then be included in an upcoming moduleQuoted 1 line
version.");
Are we making a promise here? Isn't that dangerous? :P I'd just tell the users to open bug reports.
(I'm not requiring you to change anything here, but something something
lawyers something)Quoted 15 lines
module_param_named_unsafe(preliminary_hw_support,
i915.preliminary_hw_support, int, 0600);
MODULE_PARM_DESC(preliminary_hw_support,drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -335,6 +335,12 @@ static boolintel_psr_match_conditions(struct
intel_dp*intel_dp)return false; }Quoted 5 lines
Quoted 2 lines
drivers/gpu/drm/i915/intel_psr.c static bool intel_psr_match_conditions(struct intel_dp *intel_dp) · line 339
Quoted 2 lines
drivers/gpu/drm/i915/intel_psr.c +2
-0+if ((IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) && + dev_priv->psr.link_standby) {
IS_VALLEYVIEW()will return true for both valleyview and cherryview so
the above check for cherryview can be removed.
Quoted 6 lines
Not anymore:
commit666a45379e2c29bc16e60648e5ad8f6f8b7fa6ceAuthor: Wayne Boyer <[email protected]> Date: Wed Dec 9 12:29:35 2015 -0800drm/i915: Separate cherryview from valleyview
Thanks for commit id of patch :). jumping on upstream every now and then will lead to missing a lot of changes happening.
Quoted 46 lines
Quoted 36 lines
Quoted 4 lines
s/dev_priv->psr.link_standby/!dev_priv->psr.link_standby/
Quoted 14 lines
Also, I'm not sure if this chunk belongs here or at
intel_psr_init(),
since it effectively disables PSR. This means that i915.enable_psr=3
disables PSR on VLV/CHV. But maybe we shouldn't care since users shouldn't be using the option anyway. On the other hand, users may start claiming that i915.enable_psr=X "fixed PSR" for them while effectively it just disabled PSR, so perhapsDRM_ERRORwould be better.
Anyway, I'm not requesting any change, just pointing things in case you
or someone else has any idea, but maybe I'd go withDRM_ERRORsince users usually don't know which platform supports what, so the loud message may help them.i agree,
psr_match_conditionsshould check for parameters that can change
dynamically post boot to decide if we can enable psr or not, iflink_standbycannot be changed post boot we should check for it in init
so we can avoid psr being enabled in the first place.Quoted 12 lines
Another check which we seem to be missing is "if (
HAS_DDI(dev_priv)&&
transcoder !=TRANSCODER_EDP&& !dev_priv->psr.link_standby)", but this
depends on the result of the discussion of patch 1.Everything else looks good, but it would be nice to see the opinions of
maintainers here since they always have something to say about new i915.ko options.Quoted 10 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_psr.c static bool intel_psr_match_conditions(struct intel_dp *intel_dp) · line 343
Quoted 5 lines
drivers/gpu/drm/i915/intel_psr.c +1
-0+ DRM_DEBUG_KMS("PSR condition failed: Link offrequested/needed but not supported on this platform\n");
drivers/gpu/drm/i915/intel_psr.c +3
-0+return false; + } +sorry i came late to this thread, but can you point me to some issues for
link off in CHT/VLV ? we have enabled link off in CHT Android and it seems
to be working fine. we can check again if we have missed something.
Quoted 4 lines
The issue is that the upstream Kernel does not appear to support it, since
vlv_psr_enable_sink()always setsDP_PSR_MAIN_LINK_ACTIVE. But I didn't check ifVLV_PSRCTLis properly setting link active too.
We too initially failed to get link off working, the main culprit being link training. Our LT is too slow (~10ms) to bring up the panel from link off. we had to write an optimized version of LT that will train the link back again. ideally the code to reuse last trained values is similar to what we tried (try EQ directly since we expect both CR & EQ to be passing with those values) it should help in allowing link off on CHV & VLV.
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
if (HAS_DDI(dev) && !dev_priv->psr.link_standby && dig_port->port != PORT_A) { DRM_DEBUG_KMS("PSR condition failed: Link Offrequested/needed but not supported on this port\n");
drivers/gpu/drm/i915/intel_psr.c +1
-0@@ -771,6 +777,7 @@ void intel_psr_init(struct drm_device *dev) dev_priv->psr_mmio_base =IS_HASWELL (dev_priv) ?HSW_EDP_PSR_BASE :BDW_EDP_PSR_BASE ; +/* Set link_standby x link_off defaults */ if (IS_HASWELL (dev) ||IS_BROADWELL (dev))/* * On HSW and BDW Source implementation as an issue
with PSRdrivers/gpu/drm/i915/intel_psr.c +0
-0@@ -786,6 +793,16 @@ void intel_psr_init(struct drm_device *dev)/* For new platforms let's respect VBT back again */
dev_priv->psr.link_standby= dev_priv-Quoted 1 line
vbt.psr.full_link;
drivers/gpu/drm/i915/intel_psr.c +2
-0+/* Override link_standby x link_off defaults */ +if (i915.enable_psr ==2 && !dev_priv->psr.link_standby){
drivers/gpu/drm/i915/intel_psr.c +4
-0+DRM_DEBUG_KMS ("PSR: Forcing link standby\n" ); + dev_priv->psr.link_standby = true; + } +if (i915.enable_psr ==3 && dev_priv->psr.link_standby){
drivers/gpu/drm/i915/intel_psr.c +3
-0+DRM_DEBUG_KMS ("PSR: Forcing main link off\n" ); + dev_priv->psr.link_standby = false; + }
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
+
INIT_DELAYED_WORK(&dev_priv->psr.work, intel_psr_work); mutex_init(&dev_priv->psr.lock); }_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 3/4] drm/i915: Instrument PSR parameter for possible quirks with link standby.
In reply to Rodrigo ViviQuoted 31 lines · Rodrigo Vivi
Unfortunately we don't know all panels and platforms out there and we found internal prototypes without VBT proper set but where only link in standby worked well.
So, before enable PSR by default let's instrument the PSR parameter in a way that we can identify different panels out there that might require or work better with link standby mode.
It is also useful to say that for backward compatibility I'm not changing the meaning of this flag. So "0" still means disabled and "1" means enabled with full support and maximum power savings.
v2: Use positive value instead of negative for different operation mode
as suggested by Daniel.v3: As Paulo suggested use 2 to force link standby and 3 to force link
fully on. Also split thelink_standbyintroduction in a separated patch.Cc Paulo Zanoni <[email protected]>Cc Daniel Vetter <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_params.c | 7 ++++++- drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_params.c +0
-0
drivers/gpu/drm/i915/i915_params.c MODULE_PARM_DESC(enable_execlists, · line 130
Quoted 6 lines
drivers/gpu/drm/i915/i915_params.c +2
-1@@ -126,7 +126,12 @@ MODULE_PARM_DESC(enable_execlists, "(-1=auto [default], 0=disabled, 1=enabled)");module_param_named_unsafe (enable_psr, i915.enable_psr, int,0600 ); -MODULE_PARM_DESC (enable_psr,"Enable PSR (default: false)" ); +MODULE_PARM_DESC (enable_psr,"Enable PSR " + "(0=disabled [default], 1=enabled - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode)"
Since this parameter is _unsafe, I'm fine with adding the alternatives.
drivers/gpu/drm/i915/i915_params.c MODULE_PARM_DESC(enable_execlists, · line 134
Quoted 4 lines
drivers/gpu/drm/i915/i915_params.c +4
-0+"In case you needed to force any different option, please " +"report PCI device ID, subsystem vendor and subsystem device ID " +"to [email protected], if your machine needs it. " + "It will then be included in an upcoming module version.");
However I object to the implied plan of quirking this in the driver. I do not think quirking should be perceived as a viable option for anything. It's a maintainability nightmare.
BR,
Jani.
Quoted 45 lines
drivers/gpu/drm/i915/i915_params.c +0
-0module_param_named_unsafe (preliminary_hw_support, i915.preliminary_hw_support, int,0600 ); MODULE_PARM_DESC(preliminary_hw_support,drivers/gpu/drm/i915/intel_psr.c +17
-0@@ -335,6 +335,12 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)return false; } +if ((IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) && + dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR condition failed: Link off requested/needed but not supported on this platform\n" ); +return false; + } +if (HAS_DDI (dev) && !dev_priv->psr.link_standby && dig_port->port !=PORT_A ) {DRM_DEBUG_KMS ("PSR condition failed: Link Off requested/needed but not supported on this port\n" );@@ -771,6 +777,7 @@ void intel_psr_init(struct drm_device *dev) dev_priv->psr_mmio_base =IS_HASWELL (dev_priv) ?HSW_EDP_PSR_BASE :BDW_EDP_PSR_BASE ; +/* Set link_standby x link_off defaults */ if (IS_HASWELL (dev) ||IS_BROADWELL (dev))/* * On HSW and BDW Source implementation as an issue with PSR @@ -786,6 +793,16 @@ void intel_psr_init(struct drm_device *dev)/* For new platforms let's respect VBT back again */ dev_priv->psr.link_standby = dev_priv->vbt.psr.full_link; +/* Override link_standby x link_off defaults */ +if (i915.enable_psr ==2 && !dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR: Forcing link standby\n" ); + dev_priv->psr.link_standby = true; + } +if (i915.enable_psr ==3 && dev_priv->psr.link_standby) { +DRM_DEBUG_KMS ("PSR: Forcing main link off\n" ); + dev_priv->psr.link_standby = false; + } +INIT_DELAYED_WORK (&dev_priv->psr.work, intel_psr_work);mutex_init (&dev_priv->psr.lock); }
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 4/4 drm/i915: Enable PSR by default.
In reply to Rodrigo ViviWith a reliable frontbuffer tracking and all instability corner cases solved let's re-enabled PSR by default on all supported platforms.
In case a new issue is found and PSR is the main suspect, please check if i915.enable_psr=0 really makes your problem go away. If this is the case PSR is the culprit so after that please check if i915.enable_psr=2 or i915.enable_psr=3 solves your issue and please let us know. There are many panels out there and not all implementations apparently work as we would expect.
In case you needed to force it on standby or disabled, please report PCI device ID, subsystem vendor and subsystem device ID to [email protected], if your machine needs it. It will then be included in an upcoming module version.
Also, if the standby mode doesn't help a bugzilla entry is desirable containing:
- dmesg (drm.debug=0xe)
- Platform information. Vendor, model, id, pci id.
- Graphical environment: Gnome, KDE, openbox, etc...
- Details how to reproduce.
- Also good if you could run PSR test cases of Intel-gpu-tools
There are Intel-gpu-tools test cases that can be helpful to determine if PSR is working as expected:kms_psr_sink_crc and kms_psr_frontbuffer_tracking.
v2: Rebased on top of psr paramenter change.
v3: Rebase and improve commit message.
v4: Rebase after changing previous patch.
--- drivers/gpu/drm/i915/i915_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_params.c +2 -2
@@ -37,7 +37,7 @@ struct i915_params i915 __read_mostly = { .enable_execlists = -1, .enable_hangcheck = true, .enable_ppgtt = -1, - .enable_psr = 0, + .enable_psr = 1, .preliminary_hw_support = IS_ENABLED(CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT), .disable_power_well = -1, .enable_ips = 1,
@@ -127,7 +127,7 @@ MODULE_PARM_DESC(enable_execlists,module_param_named_unsafe (enable_psr, i915.enable_psr, int,0600 );MODULE_PARM_DESC (enable_psr,"Enable PSR " -"(0=disabled [default], 1=enabled - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode)" +"(0=disabled, 1=enabled [default] - link mode chosen per-platform, 2=force link-standby mode, 3=force link-off mode)" "In case you needed to force any different option, please " "report PCI device ID, subsystem vendor and subsystem device ID " "to [email protected], if your machine needs it. "
Signature · 6 lines
2.4.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Em Sex, 2015-12-11 às 08:39 -0800, Rodrigo Vivi escreveu:
Quoted 6 lines
Current platforms that support PSR on other port than A only support link
standby mode.The logic here was wrong since 'commit
89251b177b("drm/i915: PSR:
deprecatelink_standbysupport for core platforms.")
What's wrong/broken with the logic?
Quoted 25 lines
Cc Paulo Zanoni <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>---
drivers/gpu/drm/i915/intel_psr.c | 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -327,9 +327,9 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp) return false; }drivers/gpu/drm/i915/intel_psr.c +0
-2-if (!IS_VALLEYVIEW (dev) && !IS_CHERRYVIEW (dev) && - ((dev_priv->vbt.psr.full_link) || (dig_port->port !=
PORT_A))) {drivers/gpu/drm/i915/intel_psr.c +0
-1- DRM_DEBUG_KMS("PSR condition failed: Link Standbyrequested/needed but not supported on this platform\n");
drivers/gpu/drm/i915/intel_psr.c +3
-0+if (HAS_DDI (dev) && !dev_priv->vbt.psr.full_link && + dig_port->port != PORT_A) { + DRM_DEBUG_KMS("PSR condition failed: Link Off
Quoted 2 lines
requested/needed but not supported on this port\n"); return false;
I spent a long time looking at this patch, trying to understand what exactly changed. You didn't really mention which specific case was wrong and why. Please explicitly mention the case and platform, also replacing "certain platforms" for something more precise.
The code mentions "full_link", "link standby" and "link off", but there's nothing clarifying the relationship between them. It seems "full_link" means "link standby", but I suppose we could put a comment somewhere clarifying this. We previously had dev_priv-
Quoted 1 line
psr.link_standby, but we don't have this anymore.
It seems that with the previous code we only supported link off on port A, nothing else. This is reflected both by the check you're changing and by hsw_psr_enable_source(). Now we're only going to reject link off for ports B/C/D/E. This means that this patch is both enabling ports B/C/D/E _and_ enabling link standby support on port A. Maybe we could do this through two separate patches: one for the port A new feature, the other for the new ports. This means:
- We're now accepting link standby on every port, but we don't have the code to set link standby on port A.
- We're now accepting port B/C/D/E on DDI platforms, but our code currently hardcodes PSR to the register associated with transcoder eDP.
Also, according to 89251b177b58, we don't want link standby for HSW/BDW, but we're accepting this now. So this patch is a half-revert of that commit.
By the way, the spec talks in terms of transcoders and our code talks in terms of ports. I know there was some direct relationship between them at some point, but as we add more platforms, we increase the chance that our implicit assertions between the relationship of transcoders and ports may not be valid anymore. So please either add some assertions, or some huge comment, or just change the code to check transcoders instead of ports.
To conclude: I still can't see what's wrong with the current code.
Quoted 2 lines
}
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Vivi, Rodrigo
maintainerQuoted 10 lines · Paulo R
Em Sex, 2015-12-11 às 08:39 -0800, Rodrigo Vivi escreveu:
Quoted 7 lines
Current platforms that support PSR on other port than A only support
link
standby mode.The logic here was wrong since 'commit
89251b177b("drm/i915: PSR:
deprecatelink_standbysupport for core platforms.")What's wrong/broken with the logic?
If we request link_standby via VBT and we aren't on TransEDP-at-DDI-A we are nowadays avoiding PSR
With this patch if full_link disabled (== link off == main link off == not in link standby mode) and we are not using DDIA than we block PSR and lets get PSR on the links_standby on non portA that we are currently blocking...
Quoted 18 lines
Quoted 18 lines
Cc Paulo Zanoni <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_psr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_psr.c +0
-0@@ -327,9 +327,9 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp)return false; }
Quoted 15 lines
Quoted 10 lines
drivers/gpu/drm/i915/intel_psr.c +3
-3- if (!IS_VALLEYVIEW(dev) && !IS_CHERRYVIEW(dev) && - ((dev_priv->vbt.psr.full_link) || (dig_port->port != PORT_A))) { - DRM_DEBUG_KMS("PSR condition failed: Link Standby requested/needed but not supported on this platform\n"); +if (HAS_DDI (dev) && !dev_priv->vbt.psr.full_link && + dig_port->port !=PORT_A ) { + DRM_DEBUG_KMS("PSR condition failed: Link Offrequested/needed but not supported on this port\n");
return false;I spent a long time looking at this patch, trying to understand what exactly changed. You didn't really mention which specific case was wrong and why. Please explicitly mention the case and platform, also replacing "certain platforms" for something more precise.
Your comments made me to keep looking to my own patch a long time as well trying to understand what I had done...
Quoted 7 lines
The code mentions "
full_link", "link standby" and "link off", but there's nothing clarifying the relationship between them. It seems "full_link" means "link standby", but I suppose we could put a comment
somewhere clarifying this. We previously had dev_priv-Quoted 1 line
psr.link_standby, but we don't have this anymore.
yeah, this is indeed confusing names and also was the reason that I staid a long time also confused by my patch.
I will try to explain a bit here and put this comment somewhere in the code and in the commit message.
We have 2 situations:
1 - Main/Full link needs to be enabled the whole time in stand by mode to allow source-sink communication when exiting PSR.
2 - All links can be disabled, go off on PSR entry.
This is optimal case for power savings, but depend on the panel implementation it can fail badly. So if we identify this earlier during product development OEMs can set this VBT bit to force the link standby.
So, full_link == standby == link on
link-off == ! stand-by == ! full link
The confusion happens because VESA uses one way and our spec another and VBT another.
Quoted 7 lines
It seems that with the previous code we only supported link off on port
A, nothing else. This is reflected both by the check you're changing and byhsw_psr_enable_source(). Now we're only going to reject link off
for ports B/C/D/E.
nope the previous one support link off for ports B/C/D/E and skip on standy, and this is exactly the issue.
Quoted 6 lines
This means that this patch is both enabling ports
B/C/D/E _and_ enabling link standby support on port A. Maybe we could do this through two separate patches: one for the port A new feature, the other for the new ports. This means:
- We're now accepting link standby on every port, but we don't have
the code to set link standby on port A.
Well, this was already the case on BDW+... for HSW PSR is tied to DDI-A according spec and this restriction was removed on BDW by adding the IS_HASWELL(dev) to the pre-existing port != DDIA
Quoted 3 lines
- We're now accepting port B/C/D/E on DDI platforms, but our code
currently hardcodes PSR to the register associated with transcoder eDP.
Oh wait, you are absolutely right here! We do not block PSR on this function, but we just use transcoder_EDP one...
Now I believe we should just remove this entire block and that IS_HASWELL and get tied again to DDI_A and transcoder_EDP before a rework that would make that really work. With a low priority since we never really target platforms with 2 eDPs or eDP on other port than not TRANS_EDP+DDIA.
What do you think?
Quoted 4 lines
Also, according to
89251b177b58, we don't want link standby for HSW/BDW, but we're accepting this now. So this patch is a half-revert of that commit.
not really... because the logic was inverted on that commit causing all the confusion...
Quoted 9 lines
By the way, the spec talks in terms of transcoders and our code talks in terms of ports. I know there was some direct relationship between them at some point, but as we add more platforms, we increase the chance that our implicit assertions between the relationship of transcoders and ports may not be valid anymore. So please either add some assertions, or some huge comment, or just change the code to check
transcoders instead of ports.
well, initial specs were also talking in terms of trans_edp + DDI_A or ! DDI_A, etc. But based on registers divided by transcoder we would need the full rework to allow multiple PSR in different transcoders... Also another question is where would we get a machine like this to validate?!
So, let's fully tie it to transcoder_edp for now?
Quoted 2 lines
To conclude: I still can't see what's wrong with the current code.
I hope it is clear now, but we can talk more tomorrow about it on irc.
Thank you very much for all highlights here!
Quoted 3 lines
Quoted 3 lines
}
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx