minigbm: Use clflushopt if supported
Use clflushopt if it is supported instead of clflush. clflushopt is more optimized and suggested by the HW engineers. It has improved MTL unmap operation times significantly. BUG=b:274641129 TEST=camera preview should be minimum of 30fps Signed-off-by: Nirmoy Das <nirmoy.das@intel.com> Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com> Change-Id: I9bf7e355d5ebdfb1647c578173123bb73db5571d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/4382538 Reviewed-by: Dominik Behr <dbehr@chromium.org>
This commit is contained in:
parent
84b3a09ef0
commit
5d2a76894d
1 changed files with 5 additions and 0 deletions
5
i915.c
5
i915.c
|
|
@ -406,9 +406,14 @@ static void i915_clflush(void *start, size_t size)
|
|||
|
||||
__builtin_ia32_mfence();
|
||||
while (p < end) {
|
||||
#if defined(__CLFLUSHOPT__)
|
||||
__builtin_ia32_clflushopt(p);
|
||||
#else
|
||||
__builtin_ia32_clflush(p);
|
||||
#endif
|
||||
p = (void *)((uintptr_t)p + I915_CACHELINE_SIZE);
|
||||
}
|
||||
__builtin_ia32_mfence();
|
||||
}
|
||||
|
||||
static int i915_init(struct driver *drv)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue