From: Jordan Justen Date: Fri, 4 Aug 2023 18:22:05 +0000 (-0700) Subject: anvil,hasvk: Rename need_clflush to need_flush X-Git-Tag: upstream/23.3.3~2407 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=735026e81100d53a68d48e09b7c4d4f64945881a;p=platform%2Fupstream%2Fmesa.git anvil,hasvk: Rename need_clflush to need_flush $ git grep -l need_clflush | xargs sed -i 's/need_clflush/need_flush/g' Signed-off-by: Jordan Justen Reviewed-by: Lionel Landwerlin Part-of: --- diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index d6b3874..24d93a1 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -355,7 +355,7 @@ anv_batch_bo_link(struct anv_cmd_buffer *cmd_buffer, *map = intel_canonical_address(next_bbo->bo->offset + next_bbo_offset); #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - if (cmd_buffer->device->physical->memory.need_clflush) + if (cmd_buffer->device->physical->memory.need_flush) intel_flush_range(map, sizeof(uint64_t)); #endif } @@ -1425,7 +1425,7 @@ anv_queue_submit_simple_batch(struct anv_queue *queue, memcpy(batch_bo->map, batch->start, batch_size); #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) intel_flush_range(batch_bo->map, batch_size); #endif diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 448b7a1..ea80517 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -977,7 +977,7 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd) if ((props & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) && !(props & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - device->memory.need_clflush = true; + device->memory.need_flush = true; #else return vk_errorf(device, VK_ERROR_INITIALIZATION_FAILED, "Memory configuration requires flushing, but it's not implemented for this architecture"); @@ -2853,7 +2853,7 @@ anv_device_init_trivial_batch(struct anv_device *device) anv_batch_emit(&batch, GFX7_MI_NOOP, noop); #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) intel_clflush_range(batch.start, batch.next - batch.start); #endif @@ -4196,7 +4196,7 @@ VkResult anv_FlushMappedMemoryRanges( #ifdef SUPPORT_INTEL_INTEGRATED_GPUS ANV_FROM_HANDLE(anv_device, device, _device); - if (!device->physical->memory.need_clflush) + if (!device->physical->memory.need_flush) return VK_SUCCESS; /* Make sure the writes we're flushing have landed. */ @@ -4227,7 +4227,7 @@ VkResult anv_InvalidateMappedMemoryRanges( #ifdef SUPPORT_INTEL_INTEGRATED_GPUS ANV_FROM_HANDLE(anv_device, device, _device); - if (!device->physical->memory.need_clflush) + if (!device->physical->memory.need_flush) return VK_SUCCESS; for (uint32_t i = 0; i < memoryRangeCount; i++) { diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 3e52272..c990d94 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -961,7 +961,7 @@ struct anv_physical_device { uint32_t heap_count; struct anv_memory_heap heaps[VK_MAX_MEMORY_HEAPS]; #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - bool need_clflush; + bool need_flush; #endif } memory; diff --git a/src/intel/vulkan/anv_utrace.c b/src/intel/vulkan/anv_utrace.c index 0862598..2602568 100644 --- a/src/intel/vulkan/anv_utrace.c +++ b/src/intel/vulkan/anv_utrace.c @@ -248,7 +248,7 @@ anv_utrace_create_ts_buffer(struct u_trace_context *utctx, uint32_t size_b) memset(bo->map, 0, bo->size); #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) intel_clflush_range(bo->map, bo->size); #endif diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index f25ff91..b8a07ec 100644 --- a/src/intel/vulkan/anv_wsi.c +++ b/src/intel/vulkan/anv_wsi.c @@ -114,7 +114,7 @@ VkResult anv_QueuePresentKHR( if (device->debug_frame_desc) { device->debug_frame_desc->frame_id++; #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - if (device->physical->memory.need_clflush) { + if (device->physical->memory.need_flush) { intel_clflush_range(device->debug_frame_desc, sizeof(*device->debug_frame_desc)); } diff --git a/src/intel/vulkan/i915/anv_batch_chain.c b/src/intel/vulkan/i915/anv_batch_chain.c index 9387814..aee04c5 100644 --- a/src/intel/vulkan/i915/anv_batch_chain.c +++ b/src/intel/vulkan/i915/anv_batch_chain.c @@ -423,7 +423,7 @@ setup_execbuf_for_cmd_buffers(struct anv_execbuf *execbuf, } #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) anv_cmd_buffer_clflush(cmd_buffers, num_cmd_buffers); #endif @@ -513,7 +513,7 @@ setup_utrace_execbuf(struct anv_execbuf *execbuf, struct anv_queue *queue, } #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) intel_flush_range(submit->batch_bo->map, submit->batch_bo->size); #endif diff --git a/src/intel/vulkan/xe/anv_batch_chain.c b/src/intel/vulkan/xe/anv_batch_chain.c index eb184b1..988812b 100644 --- a/src/intel/vulkan/xe/anv_batch_chain.c +++ b/src/intel/vulkan/xe/anv_batch_chain.c @@ -180,7 +180,7 @@ xe_queue_exec_utrace_locked(struct anv_queue *queue, xe_exec_fill_sync(&xe_sync, utrace_submit->sync, 0, TYPE_SIGNAL); #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) intel_flush_range(utrace_submit->batch_bo->map, utrace_submit->batch_bo->size); #endif @@ -244,7 +244,7 @@ xe_queue_exec_locked(struct anv_queue *queue, anv_cmd_buffer_chain_command_buffers(cmd_buffers, cmd_buffer_count); #ifdef SUPPORT_INTEL_INTEGRATED_GPUS - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) anv_cmd_buffer_clflush(cmd_buffers, cmd_buffer_count); #endif diff --git a/src/intel/vulkan_hasvk/anv_batch_chain.c b/src/intel/vulkan_hasvk/anv_batch_chain.c index a13c167..a294b49 100644 --- a/src/intel/vulkan_hasvk/anv_batch_chain.c +++ b/src/intel/vulkan_hasvk/anv_batch_chain.c @@ -1899,7 +1899,7 @@ setup_execbuf_for_cmd_buffers(struct anv_execbuf *execbuf, anv_cmd_buffer_process_relocs(cmd_buffers[0], &cmd_buffers[0]->surface_relocs); } - if (device->physical->memory.need_clflush) { + if (device->physical->memory.need_flush) { __builtin_ia32_mfence(); for (uint32_t i = 0; i < num_cmd_buffers; i++) { u_vector_foreach(bbo, &cmd_buffers[i]->seen_bbos) { @@ -1986,7 +1986,7 @@ setup_utrace_execbuf(struct anv_execbuf *execbuf, struct anv_queue *queue, flush->batch_bo->exec_obj_index = last_idx; } - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) intel_flush_range(flush->batch_bo->map, flush->batch_bo->size); execbuf->execbuf = (struct drm_i915_gem_execbuffer2) { @@ -2421,7 +2421,7 @@ anv_queue_submit_simple_batch(struct anv_queue *queue, return result; memcpy(batch_bo->map, batch->start, batch_size); - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) intel_flush_range(batch_bo->map, batch_size); struct anv_execbuf execbuf = { diff --git a/src/intel/vulkan_hasvk/anv_device.c b/src/intel/vulkan_hasvk/anv_device.c index 0016c40..4e917b0 100644 --- a/src/intel/vulkan_hasvk/anv_device.c +++ b/src/intel/vulkan_hasvk/anv_device.c @@ -450,12 +450,12 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd) }; } - device->memory.need_clflush = false; + device->memory.need_flush = false; for (unsigned i = 0; i < device->memory.type_count; i++) { VkMemoryPropertyFlags props = device->memory.types[i].propertyFlags; if ((props & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) && !(props & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) - device->memory.need_clflush = true; + device->memory.need_flush = true; } return VK_SUCCESS; @@ -2535,7 +2535,7 @@ anv_device_init_trivial_batch(struct anv_device *device) anv_batch_emit(&batch, GFX7_MI_BATCH_BUFFER_END, bbe); anv_batch_emit(&batch, GFX7_MI_NOOP, noop); - if (device->physical->memory.need_clflush) + if (device->physical->memory.need_flush) intel_clflush_range(batch.start, batch.next - batch.start); return VK_SUCCESS; @@ -3678,7 +3678,7 @@ VkResult anv_FlushMappedMemoryRanges( { ANV_FROM_HANDLE(anv_device, device, _device); - if (!device->physical->memory.need_clflush) + if (!device->physical->memory.need_flush) return VK_SUCCESS; /* Make sure the writes we're flushing have landed. */ @@ -3708,7 +3708,7 @@ VkResult anv_InvalidateMappedMemoryRanges( { ANV_FROM_HANDLE(anv_device, device, _device); - if (!device->physical->memory.need_clflush) + if (!device->physical->memory.need_flush) return VK_SUCCESS; for (uint32_t i = 0; i < memoryRangeCount; i++) { diff --git a/src/intel/vulkan_hasvk/anv_private.h b/src/intel/vulkan_hasvk/anv_private.h index d514da1..a632bd5 100644 --- a/src/intel/vulkan_hasvk/anv_private.h +++ b/src/intel/vulkan_hasvk/anv_private.h @@ -907,7 +907,7 @@ struct anv_physical_device { struct anv_memory_type types[VK_MAX_MEMORY_TYPES]; uint32_t heap_count; struct anv_memory_heap heaps[VK_MAX_MEMORY_HEAPS]; - bool need_clflush; + bool need_flush; } memory; struct anv_memregion sys; @@ -1425,7 +1425,7 @@ write_reloc(const struct anv_device *device, void *p, uint64_t v, bool flush) *(uint32_t *)p = v; } - if (flush && device->physical->memory.need_clflush) + if (flush && device->physical->memory.need_flush) intel_flush_range(p, reloc_size); } diff --git a/src/intel/vulkan_hasvk/anv_wsi.c b/src/intel/vulkan_hasvk/anv_wsi.c index 2cd6523..df18bd0 100644 --- a/src/intel/vulkan_hasvk/anv_wsi.c +++ b/src/intel/vulkan_hasvk/anv_wsi.c @@ -97,7 +97,7 @@ VkResult anv_QueuePresentKHR( if (device->debug_frame_desc) { device->debug_frame_desc->frame_id++; - if (device->physical->memory.need_clflush) { + if (device->physical->memory.need_flush) { intel_clflush_range(device->debug_frame_desc, sizeof(*device->debug_frame_desc)); }