diff --git a/src/imagination/common/pvr_device_info.h b/src/imagination/common/pvr_device_info.h index d92fb0f6199..683e6cacaf8 100644 --- a/src/imagination/common/pvr_device_info.h +++ b/src/imagination/common/pvr_device_info.h @@ -87,7 +87,7 @@ * #pvr_get_packed_bvnc() and #PVR_BVNC_PACK() */ #define PVR_BVNC_UNPACK_B(bvnc) \ - ((uint16_t)(((bvnc)&PVR_BVNC_PACK_MASK_B) >> PVR_BVNC_PACK_SHIFT_B)) + ((uint16_t)(((bvnc) & PVR_BVNC_PACK_MASK_B) >> PVR_BVNC_PACK_SHIFT_B)) /** * Unpacks V value (version ID) from packed BVNC. @@ -99,7 +99,7 @@ * #pvr_get_packed_bvnc() and #PVR_BVNC_PACK() */ #define PVR_BVNC_UNPACK_V(bvnc) \ - ((uint16_t)(((bvnc)&PVR_BVNC_PACK_MASK_V) >> PVR_BVNC_PACK_SHIFT_V)) + ((uint16_t)(((bvnc) & PVR_BVNC_PACK_MASK_V) >> PVR_BVNC_PACK_SHIFT_V)) /** * Unpacks N value (number of scalable units) from packed BVNC. @@ -111,7 +111,7 @@ * #pvr_get_packed_bvnc() and #PVR_BVNC_PACK() */ #define PVR_BVNC_UNPACK_N(bvnc) \ - ((uint16_t)(((bvnc)&PVR_BVNC_PACK_MASK_N) >> PVR_BVNC_PACK_SHIFT_N)) + ((uint16_t)(((bvnc) & PVR_BVNC_PACK_MASK_N) >> PVR_BVNC_PACK_SHIFT_N)) /** * Unpacks C value (config ID) from packed BVNC. @@ -123,7 +123,7 @@ * #pvr_get_packed_bvnc() and #PVR_BVNC_PACK() */ #define PVR_BVNC_UNPACK_C(bvnc) \ - ((uint16_t)(((bvnc)&PVR_BVNC_PACK_MASK_C) >> PVR_BVNC_PACK_SHIFT_C)) + ((uint16_t)(((bvnc) & PVR_BVNC_PACK_MASK_C) >> PVR_BVNC_PACK_SHIFT_C)) /** * Tests whether a physical device has a given feature. diff --git a/src/imagination/common/pvr_dump.h b/src/imagination/common/pvr_dump.h index cd1f2b549cc..e5b50fd6e81 100644 --- a/src/imagination/common/pvr_dump.h +++ b/src/imagination/common/pvr_dump.h @@ -353,9 +353,9 @@ static inline bool pvr_dump_buffer_truncate(struct pvr_dump_buffer_ctx *ctx, return true; } -static inline const void *restrict -pvr_dump_buffer_peek(struct pvr_dump_buffer_ctx *const restrict ctx, - const uint64_t nr_bytes) +static inline const void *restrict pvr_dump_buffer_peek( + struct pvr_dump_buffer_ctx *const restrict ctx, + const uint64_t nr_bytes) { if (!ctx->base.ok || !pvr_dump_ctx_require_top(&ctx->base)) return NULL; @@ -368,9 +368,9 @@ pvr_dump_buffer_peek(struct pvr_dump_buffer_ctx *const restrict ctx, return ctx->ptr; } -static inline const void *restrict -pvr_dump_buffer_take(struct pvr_dump_buffer_ctx *const restrict ctx, - const uint64_t nr_bytes) +static inline const void *restrict pvr_dump_buffer_take( + struct pvr_dump_buffer_ctx *const restrict ctx, + const uint64_t nr_bytes) { const void *const ptr = pvr_dump_buffer_peek(ctx, nr_bytes); diff --git a/src/imagination/csbgen/pvr_packet_helpers.h b/src/imagination/csbgen/pvr_packet_helpers.h index 59d555d3a4a..50a643764d7 100644 --- a/src/imagination/csbgen/pvr_packet_helpers.h +++ b/src/imagination/csbgen/pvr_packet_helpers.h @@ -92,8 +92,9 @@ __pvr_uint_unpack(uint64_t packed, uint32_t start, uint32_t end) return (packed >> start) & mask; } -static inline __attribute__((always_inline)) uint64_t -__pvr_sint(int64_t v, uint32_t start, uint32_t end) +static inline __attribute__((always_inline)) uint64_t __pvr_sint(int64_t v, + uint32_t start, + uint32_t end) { const int width = end - start + 1; diff --git a/src/imagination/vulkan/pds/pvr_pds.c b/src/imagination/vulkan/pds/pvr_pds.c index 44daff1321f..f5aa39edb6e 100644 --- a/src/imagination/vulkan/pds/pvr_pds.c +++ b/src/imagination/vulkan/pds/pvr_pds.c @@ -36,7 +36,7 @@ #include "util/macros.h" #define H32(X) (uint32_t)((((X) >> 32U) & 0xFFFFFFFFUL)) -#define L32(X) (uint32_t)(((X)&0xFFFFFFFFUL)) +#define L32(X) (uint32_t)(((X) & 0xFFFFFFFFUL)) /***************************************************************************** Macro definitions diff --git a/src/imagination/vulkan/pvr_cmd_buffer.c b/src/imagination/vulkan/pvr_cmd_buffer.c index a766d4dbd03..e5452b7b0bd 100644 --- a/src/imagination/vulkan/pvr_cmd_buffer.c +++ b/src/imagination/vulkan/pvr_cmd_buffer.c @@ -674,8 +674,7 @@ static VkResult pvr_setup_texture_state_words( pvr_csb_pack (&descriptor->sampler.words[1], TEXSTATE_SAMPLER_WORD1, - sampler) { - } + sampler) {} return VK_SUCCESS; } @@ -1087,7 +1086,7 @@ static void pvr_setup_pbe_state( break; } -#define PVR_DEC_IF_NOT_ZERO(_v) (((_v) > 0) ? (_v)-1 : 0) +#define PVR_DEC_IF_NOT_ZERO(_v) (((_v) > 0) ? (_v) - 1 : 0) render_params.min_x_clip = MAX2(0, render_area->offset.x); render_params.min_y_clip = MAX2(0, render_area->offset.y); @@ -3896,8 +3895,7 @@ static VkResult pvr_setup_descriptor_mappings( pvr_csb_pack (&point_sampler_words[1], TEXSTATE_SAMPLER_WORD1, - sampler) { - } + sampler) {} struct pvr_suballoc_bo *point_sampler_bo; result = pvr_cmd_buffer_upload_general(cmd_buffer, @@ -3932,8 +3930,7 @@ static VkResult pvr_setup_descriptor_mappings( pvr_csb_pack (&ia_sampler_words[1], TEXSTATE_SAMPLER_WORD1, - sampler) { - } + sampler) {} struct pvr_suballoc_bo *ia_sampler_bo; result = pvr_cmd_buffer_upload_general(cmd_buffer, diff --git a/src/imagination/vulkan/pvr_device.c b/src/imagination/vulkan/pvr_device.c index 3cf85e26ce7..b9a66ee6e1f 100644 --- a/src/imagination/vulkan/pvr_device.c +++ b/src/imagination/vulkan/pvr_device.c @@ -3350,8 +3350,7 @@ VkResult pvr_CreateSampler(VkDevice _device, word.non_normalized_coords = true; } - pvr_csb_pack (&sampler->descriptor.words[1], TEXSTATE_SAMPLER_WORD1, word) { - } + pvr_csb_pack (&sampler->descriptor.words[1], TEXSTATE_SAMPLER_WORD1, word) {} /* Setup gather sampler. */ diff --git a/src/imagination/vulkan/pvr_hw_pass.h b/src/imagination/vulkan/pvr_hw_pass.h index 3f0a74e01ca..b542ab0ad52 100644 --- a/src/imagination/vulkan/pvr_hw_pass.h +++ b/src/imagination/vulkan/pvr_hw_pass.h @@ -183,7 +183,7 @@ struct pvr_renderpass_hwsetup_subpass { struct { enum pvr_renderpass_hwsetup_input_access type; uint32_t on_chip_rt; - } * input_access; + } *input_access; uint8_t output_register_mask; bool has_stencil_self_dep; diff --git a/src/imagination/vulkan/pvr_job_compute.c b/src/imagination/vulkan/pvr_job_compute.c index f65b802ab59..9893b7deedc 100644 --- a/src/imagination/vulkan/pvr_job_compute.c +++ b/src/imagination/vulkan/pvr_job_compute.c @@ -120,8 +120,7 @@ pvr_submit_info_stream_init(struct pvr_compute_ctx *ctx, } if (PVR_HAS_FEATURE(dev_info, tpu_dm_global_registers)) { - pvr_csb_pack (stream_ptr, CR_TPU_TAG_CDM_CTRL, value) { - } + pvr_csb_pack (stream_ptr, CR_TPU_TAG_CDM_CTRL, value) {} stream_ptr += pvr_cmd_length(CR_TPU_TAG_CDM_CTRL); } diff --git a/src/imagination/vulkan/pvr_job_context.h b/src/imagination/vulkan/pvr_job_context.h index 317ae295f6f..c0796298314 100644 --- a/src/imagination/vulkan/pvr_job_context.h +++ b/src/imagination/vulkan/pvr_job_context.h @@ -37,8 +37,7 @@ #define ROGUE_NUM_SHADER_STATE_BUFFERS 2U /* TODO: Add reset framework support. */ -struct pvr_reset_cmd { -}; +struct pvr_reset_cmd {}; struct rogue_sr_programs { struct pvr_bo *store_load_state_bo; diff --git a/src/imagination/vulkan/pvr_spm.c b/src/imagination/vulkan/pvr_spm.c index 8202c605e4a..d364eb6d9bc 100644 --- a/src/imagination/vulkan/pvr_spm.c +++ b/src/imagination/vulkan/pvr_spm.c @@ -991,8 +991,7 @@ pvr_spm_init_bgobj_state(struct pvr_device *device, sampler.dadjust = ROGUE_TEXSTATE_DADJUST_ZERO_UINT; } - pvr_csb_pack (&descriptor->words[1], TEXSTATE_SAMPLER_WORD1, sampler) { - } + pvr_csb_pack (&descriptor->words[1], TEXSTATE_SAMPLER_WORD1, sampler) {} /* Even if we might have 8 output regs we can only pack and write 4 dwords * using R32G32B32A32_UINT. diff --git a/src/imagination/vulkan/pvr_transfer_frag_store.c b/src/imagination/vulkan/pvr_transfer_frag_store.c index ca9e4c4712a..d6d0fbba450 100644 --- a/src/imagination/vulkan/pvr_transfer_frag_store.c +++ b/src/imagination/vulkan/pvr_transfer_frag_store.c @@ -54,10 +54,13 @@ struct pvr_transfer_frag_store_entry_data { struct pvr_tq_frag_sh_reg_layout sh_reg_layout; }; -#define to_pvr_entry_data(_entry) \ - _Generic((_entry), \ - struct hash_entry *: (struct pvr_transfer_frag_store_entry_data *)((_entry)->data), \ - const struct hash_entry *: (const struct pvr_transfer_frag_store_entry_data *)((_entry)->data)) +#define to_pvr_entry_data(_entry) \ + _Generic((_entry), \ + struct hash_entry *: (struct pvr_transfer_frag_store_entry_data \ + *)((_entry)->data), \ + const struct hash_entry *: ( \ + const struct pvr_transfer_frag_store_entry_data *)((_entry) \ + ->data)) VkResult pvr_transfer_frag_store_init(struct pvr_device *device, struct pvr_transfer_frag_store *store) @@ -122,10 +125,10 @@ static uint32_t pvr_transfer_frag_shader_key( hash |= layer->sample; shift_hash(hash, 1U); - hash |= (uint32_t) false; + hash |= (uint32_t)false; shift_hash(hash, 1U); - hash |= (uint32_t) false; + hash |= (uint32_t)false; shift_hash(hash, pixel_src_bits); hash |= (uint32_t)layer->pbe_format; diff --git a/src/imagination/vulkan/pvr_usc.c b/src/imagination/vulkan/pvr_usc.c index 8ff236d614d..15189f56bed 100644 --- a/src/imagination/vulkan/pvr_usc.c +++ b/src/imagination/vulkan/pvr_usc.c @@ -1207,7 +1207,8 @@ pco_shader *pvr_uscgen_loadop(pco_ctx *ctx, struct pvr_load_op *load_op) }; nir_intrinsic_instr *smp = pco_emit_nir_smp(&b, ¶ms); - nir_def *smp_data = nir_channels(&b, &smp->def, nir_component_mask(chans)); + nir_def *smp_data = + nir_channels(&b, &smp->def, nir_component_mask(chans)); nir_store_output(&b, smp_data, diff --git a/src/imagination/vulkan/pvr_usc.h b/src/imagination/vulkan/pvr_usc.h index 9844f6a6a59..cf197b7e319 100644 --- a/src/imagination/vulkan/pvr_usc.h +++ b/src/imagination/vulkan/pvr_usc.h @@ -42,8 +42,7 @@ pco_shader *pvr_usc_eot(pco_ctx *ctx, const struct pvr_device_info *dev_info); /* Transfer queue shader generation. */ -struct pvr_tq_props { -}; +struct pvr_tq_props {}; pco_shader *pvr_usc_tq(pco_ctx *ctx, struct pvr_tq_props *props); diff --git a/src/imagination/vulkan/pvr_wsi.c b/src/imagination/vulkan/pvr_wsi.c index 56f034f77ee..77d087d7de5 100644 --- a/src/imagination/vulkan/pvr_wsi.c +++ b/src/imagination/vulkan/pvr_wsi.c @@ -75,7 +75,8 @@ VkResult pvr_QueuePresentKHR(VkQueue _queue, VkResult result; result = wsi_common_queue_present(&queue->device->pdevice->wsi_device, - &queue->vk, pPresentInfo); + &queue->vk, + pPresentInfo); if (result != VK_SUCCESS) return result; diff --git a/src/imagination/vulkan/usc/programs/pvr_static_shaders.h b/src/imagination/vulkan/usc/programs/pvr_static_shaders.h index 2658bb748c9..0d575b82e00 100644 --- a/src/imagination/vulkan/usc/programs/pvr_static_shaders.h +++ b/src/imagination/vulkan/usc/programs/pvr_static_shaders.h @@ -2220,8 +2220,8 @@ static const struct pvr_shader_factory_info spm_load_4X_2_regs_info = { static const uint8_t spm_load_4X_4_regs_shader_code[8] = { 0 }; static const struct pvr_shader_factory_info spm_load_4X_4_regs_info = { - 0, 0, 0, 0, 0, 0, spm_load_4X_4_regs_shader_code, 0, 0, NULL, - 0, 0, NULL, 0, NULL, 0, 4 + 0, 0, 0, 0, 0, 0, spm_load_4X_4_regs_shader_code, 0, 0, NULL, 0, + 0, NULL, 0, NULL, 0, 4 }; static const uint8_t spm_load_4X_1_buffers_shader_code[8] = { 0 }; diff --git a/src/imagination/vulkan/winsys/powervr/pvr_drm.c b/src/imagination/vulkan/winsys/powervr/pvr_drm.c index 93b07813f6c..5456c6ca5ec 100644 --- a/src/imagination/vulkan/winsys/powervr/pvr_drm.c +++ b/src/imagination/vulkan/winsys/powervr/pvr_drm.c @@ -131,7 +131,7 @@ static VkResult pvr_drm_override_quirks(struct pvr_drm_winsys *drm_ws, .pointer = (__u64)&query, }; -/* clang-format off */ + /* clang-format off */ #define PVR_QUIRKS(x) \ x(48545) \ x(49927) \ @@ -253,7 +253,7 @@ static VkResult pvr_drm_override_enhancements(struct pvr_drm_winsys *drm_ws, if (result != VK_SUCCESS) goto out_free_enhancements; -/* clang-format off */ + /* clang-format off */ #define PVR_ENHANCEMENT_SET(number) \ dev_info->enhancements.has_ern##number = \ pvr_u32_in_array((uint32_t *)query.enhancements, query.count, number) diff --git a/src/imagination/vulkan/winsys/powervr/pvr_drm.h b/src/imagination/vulkan/winsys/powervr/pvr_drm.h index 9f8c4c26f1d..c8b1aa0b8d8 100644 --- a/src/imagination/vulkan/winsys/powervr/pvr_drm.h +++ b/src/imagination/vulkan/winsys/powervr/pvr_drm.h @@ -48,7 +48,6 @@ struct pvr_drm_winsys { */ struct u_rwlock dmabuf_bo_lock; - /* This array holds all our 'struct pvr_drm_winsys_bo' allocations. We use * this so we can add a refcount to our BOs and check if a particular BO was * already allocated in this device using its GEM handle. This is necessary diff --git a/src/imagination/vulkan/winsys/powervr/pvr_drm_bo.c b/src/imagination/vulkan/winsys/powervr/pvr_drm_bo.c index 29efe56b540..02a06349811 100644 --- a/src/imagination/vulkan/winsys/powervr/pvr_drm_bo.c +++ b/src/imagination/vulkan/winsys/powervr/pvr_drm_bo.c @@ -121,9 +121,9 @@ static void pvr_drm_buffer_release(struct pvr_drm_winsys_bo *drm_bo) * so we don't want to free the BO pointer, instead we want to reset it * to 0, to signal that array entry as being free. * - * We must do the reset before we actually free the BO in the kernel, since - * otherwise there is a chance the application creates another BO in a - * different thread and gets the same array entry, causing a race. + * We must do the reset before we actually free the BO in the kernel, + * since otherwise there is a chance the application creates another BO in + * a different thread and gets the same array entry, causing a race. */ memset(drm_bo, 0, sizeof(*drm_bo)); @@ -180,10 +180,10 @@ static uint64_t pvr_drm_get_alloc_flags(uint32_t ws_flags) } static inline struct pvr_drm_winsys_bo * -pvr_drm_winsys_lookup_bo(struct pvr_drm_winsys *drm_ws, - uint32_t handle) +pvr_drm_winsys_lookup_bo(struct pvr_drm_winsys *drm_ws, uint32_t handle) { - return (struct pvr_drm_winsys_bo *) util_sparse_array_get(&drm_ws->bo_map, handle); + return (struct pvr_drm_winsys_bo *)util_sparse_array_get(&drm_ws->bo_map, + handle); } VkResult pvr_drm_winsys_buffer_create(struct pvr_winsys *ws, diff --git a/src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_bridge.h b/src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_bridge.h index 067675a7d54..3d8e7643590 100644 --- a/src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_bridge.h +++ b/src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_bridge.h @@ -141,9 +141,9 @@ #define PVR_SRV_VERSION_MAJ 1U #define PVR_SRV_VERSION_MIN 17U -#define PVR_SRV_VERSION \ - (((uint32_t)((uint32_t)(PVR_SRV_VERSION_MAJ)&0xFFFFU) << 16U) | \ - (((PVR_SRV_VERSION_MIN)&0xFFFFU) << 0U)) +#define PVR_SRV_VERSION \ + (((uint32_t)((uint32_t)(PVR_SRV_VERSION_MAJ) & 0xFFFFU) << 16U) | \ + (((PVR_SRV_VERSION_MIN) & 0xFFFFU) << 0U)) #define PVR_SRV_VERSION_BUILD 6256262