summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2015-02-14 18:30:29 +0000
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-02-24 00:07:05 +0100
commitb76687910693b1f6c32a3251a8291d67363bba34 (patch)
tree6452da876111dc6dbd93be1913ec0df3186e3f5b /drivers/gpu/drm/i915/i915_dma.c
parentcb0a08c1ed7daa16d13876e3e1b8787d95b25b0e (diff)
drm/i915/skl: Tune IZ hashing when subslices are unbalanced
When one EU is disabled in a particular subslice, we can tune how the work is spread between subslices to improve EU utilization. v2: - Use a bitfield to record which subslice(s) has(have) 7 EUs. That will also make the machinery work if several sublices have 7 EUs. (Jeff Mcgee) - Only apply the different hashing algorithm if the slice is effectively unbalanced by checking there's a single subslice with 7 EUs. (Jeff Mcgee) v3: Fix typo in comment (Jeff Mcgee) Issue: VIZ-3845 Cc: Jeff Mcgee <jeff.mcgee@intel.com> Reviewed-by: Jeff Mcgee <jeff.mcgee@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 9a365b40b50e..f9992ca11d10 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -650,13 +650,24 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
continue;
for (ss = 0; ss < ss_max; ss++) {
+ u32 n_disabled;
+
if (ss_disable & (0x1 << ss))
/* skip disabled subslice */
continue;
- info->eu_total += eu_max -
- hweight8(eu_disable[s] >>
- (ss * eu_max));
+ n_disabled = hweight8(eu_disable[s] >>
+ (ss * eu_max));
+
+ /*
+ * Record which subslice(s) has(have) 7 EUs. we
+ * can tune the hash used to spread work among
+ * subslices if they are unbalanced.
+ */
+ if (eu_max - n_disabled == 7)
+ info->subslice_7eu[s] |= 1 << ss;
+
+ info->eu_total += eu_max - n_disabled;
}
}