From 7f39dbffd51743486d500f2e817566bb0f584980 Mon Sep 17 00:00:00 2001 From: Karmjit Mahil Date: Thu, 4 Aug 2022 14:00:57 +0100 Subject: [PATCH] Revert "pvr: Make pvr_cmd_pack() macro clearly internal" This reverts commit 27c57b86500ce48154533d78b74350c31152b2f3. The driver doesn't always pack or emit words directly. In some cases it might be desirable to store the struct equivalent for the control word and emit/pack at a later stage. Thus reverting to expose pvr_cmd_pack(). One such use case is in the following commit. Signed-off-by: Karmjit Mahil Reviewed-by: Rajnesh Kanwal Part-of: --- src/imagination/vulkan/pvr_csb.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/imagination/vulkan/pvr_csb.h b/src/imagination/vulkan/pvr_csb.h index 8517723f721..07001299c7c 100644 --- a/src/imagination/vulkan/pvr_csb.h +++ b/src/imagination/vulkan/pvr_csb.h @@ -129,11 +129,7 @@ VkResult pvr_csb_emit_terminate(struct pvr_csb *csb); #define PVRX(x) ROGUE_##x #define pvr_cmd_length(x) PVRX(x##_length) #define pvr_cmd_header(x) PVRX(x##_header) - -/* This helper is internal to this header. It should only be used as part of - * the pvr_csb_*() macros below. - */ -#define __pvr_cmd_pack(x) PVRX(x##_pack) +#define pvr_cmd_pack(x) PVRX(x##_pack) /** * \brief Packs a command/state into one or more dwords and stores them in the @@ -152,7 +148,7 @@ VkResult pvr_csb_emit_terminate(struct pvr_csb *csb); __builtin_expect(_loop_terminate != NULL, 1); \ ({ \ STATIC_ASSERT(sizeof(*(_dst)) == pvr_cmd_length(cmd) * 4); \ - __pvr_cmd_pack(cmd)((_dst), &name); \ + pvr_cmd_pack(cmd)((_dst), &name); \ _loop_terminate = NULL; \ })) @@ -192,7 +188,7 @@ VkResult pvr_csb_emit_terminate(struct pvr_csb *csb); *_dst = pvr_csb_alloc_dwords(csb, pvr_cmd_length(cmd)); \ __builtin_expect(_dst != NULL, 1); \ ({ \ - __pvr_cmd_pack(cmd)(_dst, &name); \ + pvr_cmd_pack(cmd)(_dst, &name); \ _dst = NULL; \ }))