[igt-dev] [PATCH i-g-t v2 2/3] lib/huc_copy: Rename to avoid macro name clash

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Mar 7 14:32:50 UTC 2023


Hi Zbigniew,

On 2023-03-07 at 11:45:18 +0100, Zbigniew Kempczyński wrote:
> Adding intel_gpu_commands.h requires to solve some name clashes.
> Rename MFX_WAIT to HUC_MFX_WAIT to be consistent with other macros
> in the huc code.
> 
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>

imho it may be better to place it as first patch.

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

Regards,
Kamil

> ---
>  lib/huc_copy.c | 6 +++---
>  lib/huc_copy.h | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/huc_copy.c b/lib/huc_copy.c
> index 6ec68864b7..bf8254c612 100644
> --- a/lib/huc_copy.c
> +++ b/lib/huc_copy.c
> @@ -80,14 +80,14 @@ gen9_huc_copyfunc(int fd, uint64_t ahnd,
>  	buf[i++] = 0;
>  	buf[i++] = 0x3;
>  
> -	buf[i++] = MFX_WAIT;
> -	buf[i++] = MFX_WAIT;
> +	buf[i++] = HUC_MFX_WAIT;
> +	buf[i++] = HUC_MFX_WAIT;
>  
>  	buf[i++] = HUC_PIPE_MODE_SELECT;
>  	buf[i++] = 0;
>  	buf[i++] = 0;
>  
> -	buf[i++] = MFX_WAIT;
> +	buf[i++] = HUC_MFX_WAIT;
>  
>  	memset(reloc, 0, sizeof(reloc));
>  
> diff --git a/lib/huc_copy.h b/lib/huc_copy.h
> index 69d1409335..1789e87359 100644
> --- a/lib/huc_copy.h
> +++ b/lib/huc_copy.h
> @@ -31,7 +31,7 @@
>  #include "intel_reg.h"
>  
>  #define PARALLEL_VIDEO_PIPE		(0x3<<29)
> -#define MFX_WAIT			(PARALLEL_VIDEO_PIPE|(0x1<<27)|(0x1<<8))
> +#define HUC_MFX_WAIT			(PARALLEL_VIDEO_PIPE|(0x1<<27)|(0x1<<8))
>  
>  #define HUC_IMEM_STATE			(PARALLEL_VIDEO_PIPE|(0x2<<27)|(0xb<<23)|(0x1<<16)|0x3)
>  #define HUC_PIPE_MODE_SELECT		(PARALLEL_VIDEO_PIPE|(0x2<<27)|(0xb<<23)|0x1)
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list