All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/hsw: enable atomic in L3 for some steppings.
@ 2015-01-05  1:05 Zhigang Gong
  2015-01-05  3:03 ` Francisco Jerez
  2015-01-05  7:05 ` shuang.he
  0 siblings, 2 replies; 7+ messages in thread
From: Zhigang Gong @ 2015-01-05  1:05 UTC (permalink / raw)
  To: intel-gfx; +Cc: Zhigang Gong

According to bspec, ROW_CHICKEN3's bit 6 which is to disable
move of cacheable global atomics to L3 is needed for GT3 D
stepping.

I enabled it and tested it with HSW GT2 D stepping and GT3 E stepping.
The atomics works fine in beignet. And it could get more than 10x performance
improvement with some workload, for an example, the "splat" kernel in darktable,
without this patch, it consumes 50 seconds in one large raw picture processing.
But with this patch, the same process only takes less than 1 second.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 7d99a9c..8a27802 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5938,10 +5938,12 @@ static void haswell_init_clock_gating(struct drm_device *dev)
 
 	ilk_init_lp_watermarks(dev);
 
-	/* L3 caching of data atomics doesn't work -- disable it. */
-	I915_WRITE(HSW_SCRATCH1, HSW_SCRATCH1_L3_DATA_ATOMICS_DISABLE);
-	I915_WRITE(HSW_ROW_CHICKEN3,
-		   _MASKED_BIT_ENABLE(HSW_ROW_CHICKEN3_L3_GLOBAL_ATOMICS_DISABLE));
+	if (IS_HSW_GT3(dev) && dev->pdev->revision <= 6) {
+		/* L3 caching of data atomics doesn't work -- disable it. */
+		I915_WRITE(HSW_SCRATCH1, HSW_SCRATCH1_L3_DATA_ATOMICS_DISABLE);
+		I915_WRITE(HSW_ROW_CHICKEN3,
+			   _MASKED_BIT_ENABLE(HSW_ROW_CHICKEN3_L3_GLOBAL_ATOMICS_DISABLE));
+	}
 
 	/* This is required by WaCatErrorRejectionIssue:hsw */
 	I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG,
-- 
1.8.3.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-06 14:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05  1:05 [PATCH] drm/i915/hsw: enable atomic in L3 for some steppings Zhigang Gong
2015-01-05  3:03 ` Francisco Jerez
2015-01-05  2:36   ` Zhigang Gong
2015-01-05 17:27     ` Francisco Jerez
2015-01-06  8:01       ` Zhigang Gong
2015-01-06 14:19         ` Francisco Jerez
2015-01-05  7:05 ` shuang.he

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.