aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2015-02-14 13:30:29 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-02-23 18:07:05 -0500
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)
650 continue; 650 continue;
651 651
652 for (ss = 0; ss < ss_max; ss++) { 652 for (ss = 0; ss < ss_max; ss++) {
653 u32 n_disabled;
654
653 if (ss_disable & (0x1 << ss)) 655 if (ss_disable & (0x1 << ss))
654 /* skip disabled subslice */ 656 /* skip disabled subslice */
655 continue; 657 continue;
656 658
657 info->eu_total += eu_max - 659 n_disabled = hweight8(eu_disable[s] >>
658 hweight8(eu_disable[s] >> 660 (ss * eu_max));
659 (ss * eu_max)); 661
662 /*
663 * Record which subslice(s) has(have) 7 EUs. we
664 * can tune the hash used to spread work among
665 * subslices if they are unbalanced.
666 */
667 if (eu_max - n_disabled == 7)
668 info->subslice_7eu[s] |= 1 << ss;
669
670 info->eu_total += eu_max - n_disabled;
660 } 671 }
661 } 672 }
662 673