Add support for TGL in SAGV code paths
Subsystems (2)
Even though we can't actually turn on SAGV for TGL until HSDES 1409542895 is resolved, these patches prepare the code for enabling SAGV, so that once the HSDES is resolved, all we have to do is revert 8ffa4392a32e ("drm/i915/tgl: disable SAGV temporarily") to turn it on.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/3 drm/i915: Extract SAGV block time function
In prep for newer platforms having more complicated ways to determine the SAGV block time, extract the setting to a separate function. While we're at it, update the if ladder to follow the new gen -> old gen order preference, and warn on any non-specified gen.
--- drivers/gpu/drm/i915/intel_pm.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +18 -6
@@ -3662,6 +3662,23 @@ intel_has_sagv(struct drm_i915_private *dev_priv) dev_priv->sagv_status !=I915_SAGV_NOT_CONTROLLED ; } +static int +intel_get_sagv_block_time_us (struct drm_i915_private *dev_priv) +{ +int sagv_block_time_us =1000 ;/* Default to unusable block time */ + +if (IS_GEN (dev_priv,11 )) + sagv_block_time_us =10 ; +else if (IS_GEN (dev_priv,10 )) + sagv_block_time_us =20 ; +else if (IS_GEN (dev_priv,9 )) + sagv_block_time_us =30 ; +else +MISSING_CASE (INTEL_GEN (dev_priv)); + +return sagv_block_time_us; +} +/* * SAGV dynamically adjusts the system agent voltage and clock frequencies * depending on power and performance requirements. The display engine access
@@ -3755,12 +3772,7 @@ bool intel_can_enable_sagv(struct intel_atomic_state *state)if (!intel_has_sagv (dev_priv))return false; -if (IS_GEN (dev_priv,9 )) - sagv_block_time_us =30 ; -else if (IS_GEN (dev_priv,10 )) - sagv_block_time_us =20 ; -else - sagv_block_time_us =10 ; + sagv_block_time_us =intel_get_sagv_block_time_us (dev_priv);/* * If there are no active CRTCs, no additional checks need be performed
Signature · 6 lines
2.22.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 1/3] drm/i915: Extract SAGV block time function
Quoted 18 lines · James Ausmus
In prep for newer platforms having more complicated ways to determine the SAGV block time, extract the setting to a separate function. While we're at it, update the if ladder to follow the new gen -> old gen order preference, and warn on any non-specified gen.
Cc Ville Syrjälä <[email protected]>Cc Stanislav Lisovskiy <[email protected]>Cc Lucas De Marchi <[email protected]>Signed-off-by James Ausmus <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c intel_has_sagv(struct drm_i915_private *dev_priv) · line 3666
Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +2
-0@@ -3662,6 +3662,23 @@ intel_has_sagv(struct drm_i915_private *dev_priv) dev_priv->sagv_status !=I915_SAGV_NOT_CONTROLLED ; } +static int +intel_get_sagv_block_time_us (struct drm_i915_private *dev_priv)
The "_get_" in the name seems a bit superfluous.
drivers/gpu/drm/i915/intel_pm.c intel_has_sagv(struct drm_i915_private *dev_priv) · line 3679
Quoted 13 lines
drivers/gpu/drm/i915/intel_pm.c +13
-0+{ +int sagv_block_time_us =1000 ;/* Default to unusable block time */ + +if (IS_GEN (dev_priv,11 )) + sagv_block_time_us =10 ; +else if (IS_GEN (dev_priv,10 )) + sagv_block_time_us =20 ; +else if (IS_GEN (dev_priv,9 )) + sagv_block_time_us =30 ; +else +MISSING_CASE (INTEL_GEN (dev_priv)); + +return sagv_block_time_us;
Could just return directly w/o the temp variable.
Quoted 26 lines
drivers/gpu/drm/i915/intel_pm.c +3
-6+} +/* * SAGV dynamically adjusts the system agent voltage and clock frequencies * depending on power and performance requirements. The display engine access @@ -3755,12 +3772,7 @@ bool intel_can_enable_sagv(struct intel_atomic_state *state)if (!intel_has_sagv (dev_priv))return false; -if (IS_GEN (dev_priv,9 )) - sagv_block_time_us =30 ; -else if (IS_GEN (dev_priv,10 )) - sagv_block_time_us =20 ; -else - sagv_block_time_us =10 ; + sagv_block_time_us =intel_get_sagv_block_time_us (dev_priv);/* * If there are no active CRTCs, no additional checks need be performed Signature · 6 lines
2.22.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/tgl: Read SAGV block time from PCODE
In reply to James AusmusStarting from TGL, we now need to read the SAGV block time via a PCODE mailbox, rather than having a static value.
BSpec: 49326
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -8865,6 +8865,7 @@ enum {#define GEN9_SAGV_DISABLE 0x0#define GEN9_SAGV_IS_DISABLED 0x1#define GEN9_SAGV_ENABLE 0x3 +#define GEN12_PCODE_READ_SAGV_BLOCK_TIME_US 0x23#define GEN6_PCODE_DATA _MMIO(0x138128)#define GEN6_PCODE_FREQ_IA_RATIO_SHIFT 8#define GEN6_PCODE_FREQ_RING_RATIO_SHIFT 16
drivers/gpu/drm/i915/intel_pm.c +15 -5
@@ -3665,16 +3665,26 @@ intel_has_sagv(struct drm_i915_private *dev_priv)static int intel_get_sagv_block_time_us (struct drm_i915_private *dev_priv) { -int sagv_block_time_us =1000 ;/* Default to unusable block time */ +uint val =0 ; +int ret, sagv_block_time_us =1000 ;/* Default to unusable block time */ -if (IS_GEN (dev_priv,11 )) +if (INTEL_GEN (dev_priv) >=12 ) { + ret =sandybridge_pcode_read (dev_priv, +GEN12_PCODE_READ_SAGV_BLOCK_TIME_US , + &val,NULL ); +if (!ret) + sagv_block_time_us = val; +else +DRM_DEBUG_DRIVER ("Couldn't read SAGV block time!\n" ); + }else if (IS_GEN (dev_priv,11 )) { sagv_block_time_us =10 ; -else if (IS_GEN (dev_priv,10 )) + }else if (IS_GEN (dev_priv,10 )) { sagv_block_time_us =20 ; -else if (IS_GEN (dev_priv,9 )) + }else if (IS_GEN (dev_priv,9 )) { sagv_block_time_us =30 ; -else + }else {MISSING_CASE (INTEL_GEN (dev_priv)); + }return sagv_block_time_us; }
Signature · 6 lines
2.22.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915/tgl: Read SAGV block time from PCODE
Quoted 31 lines · James Ausmus
Starting from TGL, we now need to read the SAGV block time via a PCODE mailbox, rather than having a static value.
BSpec: 49326
Cc Ville Syrjälä <[email protected]>Cc Stanislav Lisovskiy <[email protected]>Cc Lucas De Marchi <[email protected]>Signed-off-by James Ausmus <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -8865,6 +8865,7 @@ enum {#define GEN9_SAGV_DISABLE 0x0#define GEN9_SAGV_IS_DISABLED 0x1#define GEN9_SAGV_ENABLE 0x3 +#define GEN12_PCODE_READ_SAGV_BLOCK_TIME_US 0x23#define GEN6_PCODE_DATA _MMIO(0x138128)#define GEN6_PCODE_FREQ_IA_RATIO_SHIFT 8#define GEN6_PCODE_FREQ_RING_RATIO_SHIFT 16drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c intel_has_sagv(struct drm_i915_private *dev_priv) · line 3668
Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +1
-1@@ -3665,16 +3665,26 @@ intel_has_sagv(struct drm_i915_private *dev_priv)static int intel_get_sagv_block_time_us (struct drm_i915_private *dev_priv) { -int sagv_block_time_us =1000 ;/* Default to unusable block time */ +uint val =0 ;
uint?
drivers/gpu/drm/i915/intel_pm.c intel_has_sagv(struct drm_i915_private *dev_priv) · line 3669
Quoted 1 line
drivers/gpu/drm/i915/intel_pm.c +1
-0+int ret, sagv_block_time_us =1000 ;/* Default to unusable block time */
val+ret could live in a tighter scope.
drivers/gpu/drm/i915/intel_pm.c intel_has_sagv(struct drm_i915_private *dev_priv) · line 3674
Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +4
-1-if (IS_GEN (dev_priv,11 )) +if (INTEL_GEN (dev_priv) >=12 ) { + ret =sandybridge_pcode_read (dev_priv, +GEN12_PCODE_READ_SAGV_BLOCK_TIME_US , + &val,NULL );
We should probably stash this somewhere so we don't have to keep asking pcode about it every single time.
Magic numbers look correct
Quoted 26 lines
drivers/gpu/drm/i915/intel_pm.c +9
-3+if (!ret) + sagv_block_time_us = val; +else +DRM_DEBUG_DRIVER ("Couldn't read SAGV block time!\n" ); + }else if (IS_GEN (dev_priv,11 )) { sagv_block_time_us =10 ; - else if (IS_GEN(dev_priv, 10)) + }else if (IS_GEN (dev_priv,10 )) { sagv_block_time_us =20 ; - else if (IS_GEN(dev_priv, 9)) + }else if (IS_GEN (dev_priv,9 )) { sagv_block_time_us =30 ; - else + }else {MISSING_CASE (INTEL_GEN (dev_priv)); + }return sagv_block_time_us; }Signature · 6 lines
2.22.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915/tgl: Read SAGV block time from PCODE
In reply to James AusmusQuoted 6 lines · James Ausmus
Starting from TGL, we now need to read the SAGV block time via a PCODE mailbox, rather than having a static value.
BSpec: 49326
Cc Ville Syrjälä <[email protected]>
Wrong address. I ignore all patches going there, so it's not doing you any good.
Quoted 63 lines
Cc Stanislav Lisovskiy <[email protected]>Cc Lucas De Marchi <[email protected]>Signed-off-by James Ausmus <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -8865,6 +8865,7 @@ enum {#define GEN9_SAGV_DISABLE 0x0#define GEN9_SAGV_IS_DISABLED 0x1#define GEN9_SAGV_ENABLE 0x3 +#define GEN12_PCODE_READ_SAGV_BLOCK_TIME_US 0x23#define GEN6_PCODE_DATA _MMIO(0x138128)#define GEN6_PCODE_FREQ_IA_RATIO_SHIFT 8#define GEN6_PCODE_FREQ_RING_RATIO_SHIFT 16drivers/gpu/drm/i915/intel_pm.c +15
-5@@ -3665,16 +3665,26 @@ intel_has_sagv(struct drm_i915_private *dev_priv)static int intel_get_sagv_block_time_us (struct drm_i915_private *dev_priv) { -int sagv_block_time_us =1000 ;/* Default to unusable block time */ +uint val =0 ; +int ret, sagv_block_time_us =1000 ;/* Default to unusable block time */ -if (IS_GEN (dev_priv,11 )) +if (INTEL_GEN (dev_priv) >=12 ) { + ret =sandybridge_pcode_read (dev_priv, +GEN12_PCODE_READ_SAGV_BLOCK_TIME_US , + &val,NULL ); +if (!ret) + sagv_block_time_us = val; +else +DRM_DEBUG_DRIVER ("Couldn't read SAGV block time!\n" ); + }else if (IS_GEN (dev_priv,11 )) { sagv_block_time_us =10 ; -else if (IS_GEN (dev_priv,10 )) + }else if (IS_GEN (dev_priv,10 )) { sagv_block_time_us =20 ; -else if (IS_GEN (dev_priv,9 )) + }else if (IS_GEN (dev_priv,9 )) { sagv_block_time_us =30 ; -else + }else {MISSING_CASE (INTEL_GEN (dev_priv)); + }return sagv_block_time_us; }Signature · 6 lines
2.22.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915/tgl: Remove single pipe restriction from SAGV
In reply to James AusmusFor Gen12, BSpec no longer tells us to disable SAGV when > 1 pipe is active. Update intel_can_enable_sagv to allow this, and loop through all active planes on all active crtcs to check against the interlaced and latency restrictions.
BSpec: 49325
--- drivers/gpu/drm/i915/intel_pm.c | 63 +++++++++++++++++---------------- 1 file changed, 32 insertions(+), 31 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +32 -31
@@ -3775,7 +3775,6 @@ bool intel_can_enable_sagv(struct intel_atomic_state *state)struct intel_crtc *crtc;struct intel_plane *plane;struct intel_crtc_state *crtc_state; -enum pipe pipe;int level, latency;int sagv_block_time_us;
@@ -3791,47 +3790,49 @@ bool intel_can_enable_sagv(struct intel_atomic_state *state)return true;/* -* SKL+ workaround: bspec recommends we disable SAGV when we have +* SKL-ICL workaround: bspec recommends we disable SAGV when we have * more then one pipe enabled */ -if (hweight8 (state->active_pipes) >1 ) +if (INTEL_GEN (dev_priv) <12 &&hweight8 (state->active_pipes) >1 )return false; -/* Since we're now guaranteed to only have one active CRTC... */ - pipe =ffs (state->active_pipes) -1 ; - crtc =intel_get_crtc_for_pipe (dev_priv, pipe); - crtc_state =to_intel_crtc_state (crtc->base.state); +for_each_intel_crtc (&dev_priv->drm, crtc) { + crtc_state =to_intel_crtc_state (crtc->base.state); +if (!crtc_state->base.active) +continue ; -if (crtc->base.state->adjusted_mode.flags &DRM_MODE_FLAG_INTERLACE ) -return false; +if (crtc->base.state->adjusted_mode.flags & +DRM_MODE_FLAG_INTERLACE ) +return false; -for_each_intel_plane_on_crtc (dev, crtc, plane) { -struct skl_plane_wm *wm = - &crtc_state->wm.skl.optimal.planes[plane->id]; +for_each_intel_plane_on_crtc (dev, crtc, plane) { +struct skl_plane_wm *wm = + &crtc_state->wm.skl.optimal.planes[plane->id]; -/* Skip this plane if it's not enabled */ -if (!wm->wm[0 ].plane_en) -continue ; +/* Skip this plane if it's not enabled */ +if (!wm->wm[0 ].plane_en) +continue ; -/* Find the highest enabled wm level for this plane */ -for (level =ilk_wm_max_level (dev_priv); - !wm->wm[level].plane_en; --level) - { } +/* Find the highest enabled wm level for this plane */ +for (level =ilk_wm_max_level (dev_priv); + !wm->wm[level].plane_en; --level) + { } - latency = dev_priv->wm.skl_latency[level]; + latency = dev_priv->wm.skl_latency[level]; -if (skl_needs_memory_bw_wa (dev_priv) && - plane->base.state->fb->modifier == -I915_FORMAT_MOD_X_TILED ) - latency +=15 ; +if (skl_needs_memory_bw_wa (dev_priv) && + plane->base.state->fb->modifier == +I915_FORMAT_MOD_X_TILED ) + latency +=15 ; -/* -* If any of the planes on this pipe don't enable wm levels that -* incur memory latencies higher than sagv_block_time_us we -* can't enable SAGV. -*/ -if (latency < sagv_block_time_us) -return false; +/* +* If any of the planes on this pipe don't enable wm +* levels that incur memory latencies higher than +* sagv_block_time_us we can't enable SAGV. +*/ +if (latency < sagv_block_time_us) +return false; + } }return true;
Signature · 6 lines
2.22.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/tgl: Remove single pipe restriction from SAGV
Quoted 50 lines · James Ausmus
For Gen12, BSpec no longer tells us to disable SAGV when > 1 pipe is active. Update
intel_can_enable_sagvto allow this, and loop through all active planes on all active crtcs to check against the interlaced and latency restrictions.BSpec: 49325
Cc Ville Syrjälä <[email protected]>Cc Stanislav Lisovskiy <[email protected]>Cc Lucas De Marchi <[email protected]>Signed-off-by James Ausmus <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 63 +++++++++++++++++---------------- 1 file changed, 32 insertions(+), 31 deletions(-)drivers/gpu/drm/i915/intel_pm.c +6
-9@@ -3775,7 +3775,6 @@ bool intel_can_enable_sagv(struct intel_atomic_state *state)struct intel_crtc *crtc;struct intel_plane *plane;struct intel_crtc_state *crtc_state; -enum pipe pipe;int level, latency;int sagv_block_time_us;@@ -3791,47 +3790,49 @@ bool intel_can_enable_sagv(struct intel_atomic_state *state)return true;/* -* SKL+ workaround: bspec recommends we disable SAGV when we have +* SKL-ICL workaround: bspec recommends we disable SAGV when we have * more then one pipe enabled */ -if (hweight8 (state->active_pipes) >1 ) +if (INTEL_GEN (dev_priv) <12 &&hweight8 (state->active_pipes) >1 )return false; -/* Since we're now guaranteed to only have one active CRTC... */ - pipe =ffs (state->active_pipes) -1 ; - crtc =intel_get_crtc_for_pipe (dev_priv, pipe); - crtc_state =to_intel_crtc_state (crtc->base.state); +for_each_intel_crtc (&dev_priv->drm, crtc) { + crtc_state =to_intel_crtc_state (crtc->base.state); +if (!crtc_state->base.active) +continue ; -if (crtc->base.state->adjusted_mode.flags &DRM_MODE_FLAG_INTERLACE ) -return false;
drivers/gpu/drm/i915/intel_pm.c bool intel_can_enable_sagv(struct intel_atomic_state *state) · line 3810
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +6
-3+if (crtc->base.state->adjusted_mode.flags & +DRM_MODE_FLAG_INTERLACE ) +return false; -for_each_intel_plane_on_crtc (dev, crtc, plane) { -struct skl_plane_wm *wm = - &crtc_state->wm.skl.optimal.planes[plane->id]; +for_each_intel_plane_on_crtc (dev, crtc, plane) { +struct skl_plane_wm *wm = + &crtc_state->wm.skl.optimal.planes[plane->id];
This whole loop is bothering me. I'd much rather we move to a scheme where each plane computes it's SAGV friendlyness when computing the watermarks. We'll anyway need that since we need to caclulate the watermarks differently for the SAGV on vs. off cases.
Quoted 49 lines
drivers/gpu/drm/i915/intel_pm.c +20
-19-/* Skip this plane if it's not enabled */ -if (!wm->wm[0 ].plane_en) -continue ; +/* Skip this plane if it's not enabled */ +if (!wm->wm[0 ].plane_en) +continue ; -/* Find the highest enabled wm level for this plane */ -for (level =ilk_wm_max_level (dev_priv); - !wm->wm[level].plane_en; --level) - { } +/* Find the highest enabled wm level for this plane */ +for (level =ilk_wm_max_level (dev_priv); + !wm->wm[level].plane_en; --level) + { } - latency = dev_priv->wm.skl_latency[level]; + latency = dev_priv->wm.skl_latency[level]; -if (skl_needs_memory_bw_wa (dev_priv) && - plane->base.state->fb->modifier == -I915_FORMAT_MOD_X_TILED ) - latency +=15 ; +if (skl_needs_memory_bw_wa (dev_priv) && + plane->base.state->fb->modifier == +I915_FORMAT_MOD_X_TILED ) + latency +=15 ; -/* -* If any of the planes on this pipe don't enable wm levels that -* incur memory latencies higher than sagv_block_time_us we -* can't enable SAGV. -*/ -if (latency < sagv_block_time_us) -return false; +/* +* If any of the planes on this pipe don't enable wm +* levels that incur memory latencies higher than +* sagv_block_time_us we can't enable SAGV. +*/ +if (latency < sagv_block_time_us) +return false; + } }return true;Signature · 1 line
2.22.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/tgl: Remove single pipe restriction from SAGV
Quoted 55 lines · Ville Syrjälä
Quoted 54 lines · James Ausmus
For Gen12, BSpec no longer tells us to disable SAGV when > 1 pipe is active. Update
intel_can_enable_sagvto allow this, and loop through all active planes on all active crtcs to check against the interlaced and latency restrictions.BSpec: 49325
Cc Ville Syrjälä <[email protected]>Cc Stanislav Lisovskiy <[email protected]>Cc Lucas De Marchi <[email protected]>Signed-off-by James Ausmus <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 63 +++++++++++++++++---------------- 1 file changed, 32 insertions(+), 31 deletions(-)drivers/gpu/drm/i915/intel_pm.c +9
-9@@ -3775,7 +3775,6 @@ bool intel_can_enable_sagv(struct intel_atomic_state *state)struct intel_crtc *crtc;struct intel_plane *plane;struct intel_crtc_state *crtc_state; -enum pipe pipe;int level, latency;int sagv_block_time_us;@@ -3791,47 +3790,49 @@ bool intel_can_enable_sagv(struct intel_atomic_state *state)return true;/* -* SKL+ workaround: bspec recommends we disable SAGV when we have +* SKL-ICL workaround: bspec recommends we disable SAGV when we have * more then one pipe enabled */ -if (hweight8 (state->active_pipes) >1 ) +if (INTEL_GEN (dev_priv) <12 &&hweight8 (state->active_pipes) >1 )return false; -/* Since we're now guaranteed to only have one active CRTC... */ - pipe =ffs (state->active_pipes) -1 ; - crtc =intel_get_crtc_for_pipe (dev_priv, pipe); - crtc_state =to_intel_crtc_state (crtc->base.state); +for_each_intel_crtc (&dev_priv->drm, crtc) { + crtc_state =to_intel_crtc_state (crtc->base.state); +if (!crtc_state->base.active) +continue ; -if (crtc->base.state->adjusted_mode.flags &DRM_MODE_FLAG_INTERLACE ) -return false; +if (crtc->base.state->adjusted_mode.flags & +DRM_MODE_FLAG_INTERLACE ) +return false;
Quoted 11 lines
drivers/gpu/drm/i915/intel_pm.c bool intel_can_enable_sagv(struct intel_atomic_state *state) · line 3810
Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +3
-3-for_each_intel_plane_on_crtc (dev, crtc, plane) { -struct skl_plane_wm *wm = - &crtc_state->wm.skl.optimal.planes[plane->id]; +for_each_intel_plane_on_crtc (dev, crtc, plane) { +struct skl_plane_wm *wm = + &crtc_state->wm.skl.optimal.planes[plane->id];This whole loop is bothering me. I'd much rather we move to a scheme where each plane computes it's SAGV friendlyness when computing the watermarks. We'll anyway need that since we need to caclulate the watermarks differently for the SAGV on vs. off cases.
Hmm, I'll have to look in to this. In the meantime, I'd like to get patches 1 & 2 of this series moving forward, as those should be what's really necessary to be able to turn on SAGV for TGL once we're ready, so I'll send those as a separate series, and leave relaxing the 1 pipe restriction as it's own work.
-James
Quoted 47 lines
Quoted 47 lines
drivers/gpu/drm/i915/intel_pm.c +20
-19-/* Skip this plane if it's not enabled */ -if (!wm->wm[0 ].plane_en) -continue ; +/* Skip this plane if it's not enabled */ +if (!wm->wm[0 ].plane_en) +continue ; -/* Find the highest enabled wm level for this plane */ -for (level =ilk_wm_max_level (dev_priv); - !wm->wm[level].plane_en; --level) - { } +/* Find the highest enabled wm level for this plane */ +for (level =ilk_wm_max_level (dev_priv); + !wm->wm[level].plane_en; --level) + { } - latency = dev_priv->wm.skl_latency[level]; + latency = dev_priv->wm.skl_latency[level]; -if (skl_needs_memory_bw_wa (dev_priv) && - plane->base.state->fb->modifier == -I915_FORMAT_MOD_X_TILED ) - latency +=15 ; +if (skl_needs_memory_bw_wa (dev_priv) && + plane->base.state->fb->modifier == +I915_FORMAT_MOD_X_TILED ) + latency +=15 ; -/* -* If any of the planes on this pipe don't enable wm levels that -* incur memory latencies higher than sagv_block_time_us we -* can't enable SAGV. -*/ -if (latency < sagv_block_time_us) -return false; +/* +* If any of the planes on this pipe don't enable wm +* levels that incur memory latencies higher than +* sagv_block_time_us we can't enable SAGV. +*/ +if (latency < sagv_block_time_us) +return false; + } }
Quoted 7 lines
Quoted 3 lines
drivers/gpu/drm/i915/intel_pm.c +0
-0return true;Signature · 1 line
2.22.1Signature · 2 lines
Ville Syrjälä Intel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Extract SAGV block time function
In reply to James Ausmus== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915: Extract SAGV block time function
URL : https://patchwork.freedesktop.org/series/67240/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
45bac93b7379 drm/i915: Extract SAGV block time function
fffc1235b9c0 drm/i915/tgl: Read SAGV block time from PCODE
56a9c538a831 drm/i915/tgl: Remove single pipe restriction from SAGV
-:79: ERROR:OPEN_BRACE: that open brace { should be on the previous line
#79: FILE: drivers/gpu/drm/i915/intel_pm.c:3817:
+ for (level = ilk_wm_max_level(dev_priv);
+ !wm->wm[level].plane_en; --level)
+ { }total: 1 errors, 0 warnings, 0 checks, 86 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Extract SAGV block time function
In reply to James Ausmus== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915: Extract SAGV block time function
URL : https://patchwork.freedesktop.org/series/67240/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6958 -> Patchwork_14539
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/
Known issues
------------
Here are the changes found in Patchwork_14539 that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@gem_ctx_switch@rcs0:
- {fi-icl-guc}: [INCOMPLETE][1] ([fdo#107713]) -> [PASS][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/fi-icl-guc/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/fi-icl-guc/igt@[email protected]
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [INCOMPLETE][3] ([fdo#107718]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/fi-blb-e6850/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/fi-blb-e6850/igt@[email protected]
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [DMESG-WARN][5] ([fdo#102614]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/fi-hsw-peppy/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/fi-hsw-peppy/igt@[email protected]
#### Warnings ####
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][7] ([fdo#111045] / [fdo#111096]) -> [FAIL][8] ([fdo#111407])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/fi-kbl-7500u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/fi-kbl-7500u/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
Participating hosts (50 -> 44)
------------------------------
Additional (1): fi-tgl-u2
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6958 -> Patchwork_14539
CI-20190529: 20190529
CI_DRM_6958: d5c4d0bc1c0570ba9128e7afb419d5d5a8ebd4bc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5203: 82326332f7af336d390e00ae87187bc207fd33dd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14539: 56a9c538a831b886c0c2c4b018fec50767d257cc @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
56a9c538a831 drm/i915/tgl: Remove single pipe restriction from SAGV fffc1235b9c0 drm/i915/tgl: Read SAGV block time from PCODE 45bac93b7379 drm/i915: Extract SAGV block time function
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/3] drm/i915: Extract SAGV block time function
In reply to James Ausmus== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915: Extract SAGV block time function
URL : https://patchwork.freedesktop.org/series/67240/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_6958_full -> Patchwork_14539_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_14539_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#111325]) +5 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb6/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb2/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-skl: [PASS][3] -> [FAIL][4] ([fdo#105363])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-skl6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-skl9/igt@[email protected]
* igt@kms_flip@plain-flip-ts-check-interruptible:
- shard-skl: [PASS][5] -> [FAIL][6] ([fdo#100368])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-skl1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-skl6/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render:
- shard-iclb: [PASS][7] -> [FAIL][8] ([fdo#103167]) +3 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [PASS][9] -> [DMESG-WARN][10] ([fdo#108566]) +5 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-apl7/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-apl7/igt@[email protected]
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
- shard-skl: [PASS][11] -> [FAIL][12] ([fdo#103191])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-skl9/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-skl6/igt@[email protected]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([fdo#108566])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-kbl3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-kbl3/igt@[email protected]
- shard-skl: [PASS][15] -> [INCOMPLETE][16] ([fdo#104108])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-skl9/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-skl6/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [PASS][17] -> [FAIL][18] ([fdo#108145]) +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-skl1/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-skl6/igt@[email protected]
* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [PASS][19] -> [SKIP][20] ([fdo#109441]) +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb7/igt@kms_psr@psr2_sprite_mmap_gtt.html
* igt@kms_vblank@pipe-a-query-forked:
- shard-snb: [PASS][21] -> [SKIP][22] ([fdo#109271])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-snb7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-snb7/igt@[email protected]
* igt@perf@blocking:
- shard-skl: [PASS][23] -> [FAIL][24] ([fdo#110728])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-skl7/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-skl5/igt@[email protected]
* igt@prime_busy@hang-bsd2:
- shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109276]) +22 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb1/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb5/igt@[email protected]
#### Possible fixes ####
* igt@gem_ctx_isolation@rcs0-s3:
- shard-skl: [INCOMPLETE][27] ([fdo#104108]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-skl4/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-skl8/igt@[email protected]
* igt@gem_exec_schedule@reorder-wide-bsd:
- shard-iclb: [SKIP][29] ([fdo#111325]) -> [PASS][30] +7 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb4/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb6/igt@[email protected]
* igt@gem_softpin@noreloc-s3:
- shard-apl: [DMESG-WARN][31] ([fdo#108566]) -> [PASS][32] +3 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-apl8/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-apl2/igt@[email protected]
* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [INCOMPLETE][33] ([fdo#103927]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-apl6/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-apl7/igt@[email protected]
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: [FAIL][35] ([fdo#105363]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-glk1/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-glk2/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
- shard-iclb: [FAIL][37] ([fdo#103167]) -> [PASS][38] +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-iclb: [INCOMPLETE][39] ([fdo#107713]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][41] ([fdo#108145] / [fdo#110403]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-skl5/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-skl10/igt@[email protected]
* igt@kms_rotation_crc@sprite-rotation-90:
- shard-iclb: [INCOMPLETE][43] ([fdo#107713] / [fdo#110026]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb7/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb1/igt@[email protected]
* igt@kms_setmode@basic:
- shard-kbl: [FAIL][45] ([fdo#99912]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-kbl2/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-kbl7/igt@[email protected]
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [DMESG-WARN][47] ([fdo#108566]) -> [PASS][48] +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-kbl3/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-kbl3/igt@[email protected]
* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [SKIP][49] ([fdo#109276]) -> [PASS][50] +27 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb5/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb4/igt@[email protected]
#### Warnings ####
* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [FAIL][51] ([fdo#111329]) -> [SKIP][52] ([fdo#109276])
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb2/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb7/igt@[email protected]
* igt@gem_mocs_settings@mocs-rc6-bsd2:
- shard-iclb: [SKIP][53] ([fdo#109276]) -> [FAIL][54] ([fdo#111330])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6958/shard-iclb6/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/shard-iclb2/igt@[email protected]
[fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110026]: https://bugs.freedesktop.org/show_bug.cgi?id=110026
[fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403
[fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (9 -> 9)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6958 -> Patchwork_14539
CI-20190529: 20190529
CI_DRM_6958: d5c4d0bc1c0570ba9128e7afb419d5d5a8ebd4bc @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5203: 82326332f7af336d390e00ae87187bc207fd33dd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14539: 56a9c538a831b886c0c2c4b018fec50767d257cc @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14539/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx