Skip to contentSkip to conversation

drm/i915: HSW/BDW PSR Set idle_frames=2 since sometimes it can be off by 1.

PATCH In review Rodrigo Vivi 4 participants 5 messages Oct 30, 2014 – Nov 11, 2014

Subsystems (2)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/1 drm/i915: HSW/BDW PSR Set idle_frames=2 since sometimes it can be off by 1.

It was identified that in some cases when moving cursor Hardware can do mistake with idle_frame count. So Spec is being updated to use 2 as minimum idle_frames.

Reference: https://hsdhsw.intel.com/hsd/haswell_platform/default.aspx#sighting/default.aspx?sighting_id=4394433

Cc Arthur Runyan <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +1 -1
index 47e9d71..8cfbbc2 100644
@@ -2178,7 +2178,7 @@ static void intel_edp_psr_enable_source(struct intel_dp *intel_dp)
 	struct drm_device *dev = dig_port->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	uint32_t max_sleep_time = 0x1f;
-	uint32_t idle_frames = 1;
+	uint32_t idle_frames = 2; /* 2 is the minimum allowed */
 	uint32_t val = 0x0;
 	const uint32_t link_entry_time = EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES;
 	bool only_standby = false;
Signature · 6 lines
1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 8 lines · Rodrigo Vivi

It was identified that in some cases when moving cursor Hardware can do mistake with idle_frame count. So Spec is being updated to use 2 as minimum idle_frames.

Reference: https://hsdhsw.intel.com/hsd/haswell_platform/default.aspx#sighting/default.aspx?sighting_id=4394433

Cc Arthur Runyan <[email protected]>
Cc Jani Nikula <[email protected]>

Since we have full-blown sw frontbuffer tracking: Do we care?

I.e. is the effect of idle_frames = 1 that the hw will go bananas (bad, we want this patch) or that it might miss a cursor movement (no problem, the kernel will catch it anyway)?

Cheers, Daniel

Quoted 24 lines
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +1 -1
index 47e9d71..8cfbbc2 100644
@@ -2178,7 +2178,7 @@ static void intel_edp_psr_enable_source(struct intel_dp *intel_dp)
 	struct drm_device *dev = dig_port->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	uint32_t max_sleep_time = 0x1f;
-	uint32_t idle_frames = 1;
+	uint32_t idle_frames = 2; /* 2 is the minimum allowed */
 	uint32_t val = 0x0;
 	const uint32_t link_entry_time = EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES;
 	bool only_standby = false;
Signature · 6 lines
1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 14 lines

From: Daniel Vetter

Quoted 5 lines · Rodrigo Vivi

It was identified that in some cases when moving cursor Hardware can do mistake with idle_frame count. So Spec is being updated to use 2 as minimum idle_frames.

Reference:

https://hsdhsw.intel.com/hsd/haswell_platform/default.aspx#sighting/default.as
px?sighting_id=4394433

Quoted 3 lines
Cc Arthur Runyan <[email protected]>
Cc Jani Nikula <[email protected]>
Quoted 6 lines

Since we have full-blown sw frontbuffer tracking: Do we care?

I.e. is the effect of idle_frames = 1 that the hw will go bananas (bad, we want this patch) or that it might miss a cursor movement (no problem, the kernel will catch it anyway)?

The behavior will depend on the panel. Going bananas is a possibility.
It also looks like VBT is being used to indicate that some panels have minimum idle frame requirements, so you really should be using VBT + 1 to ensure the hardware always outputs at least the VBT specified number of frames.

Quoted 12 lines

Cheers, Daniel

drivers/gpu/drm/i915/intel_dp.c static void intel_edp_psr_enable_source(struct

Quoted 9 lines
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +0 -0
index 47e9d71..8cfbbc2 100644
@@ -2178,7 +2178,7 @@ static void intel_edp_psr_enable_source(struct

intel_dp *intel_dp)

Quoted 12 lines

drivers/gpu/drm/i915/intel_dp.c static void intel_edp_psr_enable_source(struct intel_dp *intel_dp)

Quoted 7 lines
drivers/gpu/drm/i915/intel_dp.c +1 -1
 	struct drm_device *dev = dig_port->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	uint32_t max_sleep_time = 0x1f;
-	uint32_t idle_frames = 1;
+	uint32_t idle_frames = 2; /* 2 is the minimum allowed */
 	uint32_t val = 0x0;
 	const uint32_t link_entry_time =

EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES;

Quoted 4 lines
drivers/gpu/drm/i915/intel_dp.c +0 -1
 	bool only_standby = false;
--

1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 14 lines · Arthur J
Quoted 14 lines

From: Daniel Vetter

Quoted 5 lines · Rodrigo Vivi

It was identified that in some cases when moving cursor Hardware can do mistake with idle_frame count. So Spec is being updated to use 2 as minimum idle_frames.

Reference:

https://hsdhsw.intel.com/hsd/haswell_platform/default.aspx#sighting/default.as
px?sighting_id=4394433

Quoted 3 lines
Cc Arthur Runyan <[email protected]>
Cc Jani Nikula <[email protected]>
Quoted 5 lines
Quoted 5 lines

Since we have full-blown sw frontbuffer tracking: Do we care?

I.e. is the effect of idle_frames = 1 that the hw will go bananas (bad, we want this patch) or that it might miss a cursor movement (no problem, the kernel will catch it anyway)?

Even with the frontbuffer tracking HW still controls when to really entry PSR based on this count. So I prefer to be on the safe side and do the propper setup. If we
I had faced some cases here where even with propper frontbuffer tracking idle_frames=2 let it more stable. I had also sent this same patch in the past. But at that point I didn't know we had this miss calculation issue on HW.

Quoted 4 lines
Quoted 1 line

The behavior will depend on the panel. Going bananas is a possibility.
It also looks like VBT is being used to indicate that some panels have minimum idle frame requirements, so you really should be using VBT + 1 to ensure the hardware always outputs at least the VBT specified number of frames.

After think a bit I still think this is the patch to go to -fixes. On the reorg series with 4 patches I just sent I add VBT parse and get this idle_frame from there. But I'd prefer that regorg going to dinq and this patch here to -fixes.

Quoted 22 lines
Quoted 22 lines

Cheers, Daniel

drivers/gpu/drm/i915/intel_dp.c static void intel_edp_psr_enable_source(struct

Quoted 9 lines
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_dp.c +0 -0
index 47e9d71..8cfbbc2 100644
@@ -2178,7 +2178,7 @@ static void intel_edp_psr_enable_source(struct

intel_dp *intel_dp)

drivers/gpu/drm/i915/intel_dp.c static void intel_edp_psr_enable_source(struct intel_dp *intel_dp)

Quoted 7 lines
drivers/gpu/drm/i915/intel_dp.c +1 -1
     struct drm_device *dev = dig_port->base.base.dev;
     struct drm_i915_private *dev_priv = dev->dev_private;
     uint32_t max_sleep_time = 0x1f;
-    uint32_t idle_frames = 1;
+    uint32_t idle_frames = 2; /* 2 is the minimum allowed */
     uint32_t val = 0x0;
     const uint32_t link_entry_time =

EDP_PSR_MIN_LINK_ENTRY_TIME_8_LINES;

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/i915/intel_dp.c +0 -1
     bool only_standby = false;
--

1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Thanks,
Rodrigo.

Signature · 6 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 4 lines · Rodrigo Vivi

After think a bit I still think this is the patch to go to -fixes. On the reorg series with 4 patches I just sent I add VBT parse and get this idle_frame from there. But I'd prefer that regorg going to dinq and this patch here to -fixes.

psr is disabled in 3.18 (and dinq fwiw) so I don't think this is -fixes material.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx