Skip to contentSkip to conversation

drm-intel-collector - update

PATCH In review Rodrigo Vivi 1 participant 3 messages Mar 13, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover drm-intel-collector - update

This is another drm-intel-collector updated notice:
http://cgit.freedesktop.org/~vivijim/drm-intel/log/?h=drm-intel-collector

Here goes the update list in order for better reviewers assignment:

Patch drm/i915: Verify address field of PCBR register. - Reviewer:
Patch drm/i915: Bring UP Power Wells before disabling RC6. - Reviewer:
Patch drm/i915: Per-process stats work better when evaluated per-process - Reviewer:
Patch drm/i915: dma_buf_vunmap is presumed not to fail, don't let it - Reviewer:

Overall Process:

drm-intel-collector - review request
1. Daniel pushs drm-intel-testing (every 2 weeks)
2. I rebase drm-intel-collector onto drm-intel-testing
3. Add Reviewer: tag with voluntered reviewers. If you don't believe you should be assigned on a particular patch please don't get mad just tell you wont review or volunteer someone else.
4. I resubmit remaining patches for review without picking any new (drm-intel-collector - review request)

drm-intel-collector - updated
5. One week later I collect all simple (1-2) patches that wasn't yet reviewed and not queued by Daniel from one testing update until another.
6. Request automated QA's PRTS automated i-g-t tests comparing drm-intel-testing x drm-intel-collector
7. If tests are ok I send the update notification or the patches as a series to intel-gfx mailing list for better tracking and to be reviewed. (drm-intel-collector - updated)
8. Let me know volunteers for review new patches and also let me know if I've picked any patch that I shouldn't.

There are some reasons that some patches can be left behind:
1. Your patch didn't applied cleanly and I couldn't easily solve the conflicts.
2. Kernel didn't compiled with your patch.
3. I simply missed it. If you believe this is the case please warn me.

Please help me to get these patches reviewed and queued by Daniel.

Also, please let me know if you have further ideas how to improve this process.

Thanks in advance,
Rodrigo.

Chris Wilson (2):
drm/i915: Per-process stats work better when evaluated per-process drm/i915: dma_buf_vunmap is presumed not to fail, don't let it

Deepak S (2):
drm/i915: Verify address field of PCBR register. drm/i915: Bring UP Power Wells before disabling RC6.

 drivers/gpu/drm/i915/i915_debugfs.c     | 34 ++++++++++++++++++++++++++-------
 drivers/gpu/drm/i915/i915_drv.h         |  2 ++
 drivers/gpu/drm/i915/i915_gem_context.c |  1 +
 drivers/gpu/drm/i915/i915_gem_dmabuf.c  |  6 +-----
 drivers/gpu/drm/i915/i915_reg.h         |  1 +
 drivers/gpu/drm/i915/intel_pm.c         | 15 +++++++++++++--
 6 files changed, 45 insertions(+), 14 deletions(-)
Signature · 1 line
1.8.5.3
#1 lore raw

PATCH 1/4 drm/i915: Verify address field of PCBR register.

From: Deepak S <[email protected]>

RC6 should be enabled only if the PCBR register is programmed properly either BIOS or Gfx. This patches address the case where PCBR allocation fails due buggy BIOS or due to stolen memory allocation failed.

v2: Add #define for magic numbers (Daniel)

v3: Use VLV_PCBR_ADDR_SHIFT instead of MASK (Jani)

---
 drivers/gpu/drm/i915/i915_reg.h | 1 +
 drivers/gpu/drm/i915/intel_pm.c | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index 146609a..31a2c24 100644
@@ -5023,6 +5023,7 @@ enum punit_power_well {
 #define GEN6_GT_GFX_RC6				0x138108
 #define GEN6_GT_GFX_RC6p			0x13810C
 #define GEN6_GT_GFX_RC6pp			0x138110
+#define VLV_PCBR_ADDR_SHIFT			12
 
 #define GEN6_PCODE_MAILBOX			0x138124
 #define   GEN6_PCODE_READY			(1<<31)
drivers/gpu/drm/i915/intel_pm.c +7 -2
index ad58ce3..2aaeb79 100644
@@ -3597,7 +3597,7 @@ static void valleyview_enable_rps(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_ring_buffer *ring;
-	u32 gtfifodbg, val, hw_max, hw_min, rc6_mode = 0;
+	u32 gtfifodbg, val, hw_max, hw_min, rc6_mode = 0, pcbr;
 	int i;
 
 	WARN_ON(!mutex_is_locked(&dev_priv->rps.hw_lock));
@@ -3640,7 +3640,12 @@ static void valleyview_enable_rps(struct drm_device *dev)
 		   _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH |
 				      VLV_MEDIA_RC6_COUNT_EN |
 				      VLV_RENDER_RC6_COUNT_EN));
-	if (intel_enable_rc6(dev) & INTEL_RC6_ENABLE)
+
+	/* Enable RC6 Only if the PCBR address is configured either by
+	 * BIOS or Gfx Driver */
+	pcbr = I915_READ(VLV_PCBR);
+	if (intel_enable_rc6(dev) & INTEL_RC6_ENABLE &&
+						(pcbr >> VLV_PCBR_ADDR_SHIFT))
 		rc6_mode = GEN7_RC_CTL_TO_MODE | VLV_RC_CTL_CTX_RST_PARALLEL;
 
 	intel_print_rc6_info(dev, rc6_mode);
Signature · 1 line
1.8.5.3
#2 lore raw

PATCH 2/4 drm/i915: Bring UP Power Wells before disabling RC6.

In reply to Rodrigo Vivi

From: Deepak S <[email protected]>

We need do forcewake before Disabling RC6, This is what the BIOS expects while going into suspend.

v2: updated commit message. (Daniel)

---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +6 -0
index 2aaeb79..122f78c 100644
@@ -3187,8 +3187,14 @@ static void valleyview_disable_rps(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
+	/* we're doing forcewake before Disabling RC6,
+	 * This what the BIOS expects when going into suspend */
+	gen6_gt_force_wake_get(dev_priv, FORCEWAKE_ALL);
+
 	I915_WRITE(GEN6_RC_CONTROL, 0);
 
+	gen6_gt_force_wake_put(dev_priv, FORCEWAKE_ALL);
+
 	gen6_disable_rps_interrupts(dev);
 
 	if (dev_priv->vlv_pctx) {
Signature · 1 line
1.8.5.3