[PATCH i-g-t 4/6] tests/xe_ccs: Use logical && instead of bitwise &

Lucas De Marchi lucas.demarchi at intel.com
Mon Sep 23 21:02:15 UTC 2024


On Mon, Sep 23, 2024 at 11:45:55PM GMT, Ville Syrjälä wrote:
>From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
>The code appears to want to use a logical AND instead
>of a bitwise AND. Make it so.
>
>Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

same comment as previous patch.


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>---
> tests/intel/xe_ccs.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/tests/intel/xe_ccs.c b/tests/intel/xe_ccs.c
>index a55ee5abd5b3..e656e5123841 100644
>--- a/tests/intel/xe_ccs.c
>+++ b/tests/intel/xe_ccs.c
>@@ -344,8 +344,8 @@ static void block_copy(int xe,
> 	uint64_t bb_size = xe_bb_size(xe, SZ_4K);
> 	uint64_t ahnd = intel_allocator_open(xe, ctx->vm, INTEL_ALLOCATOR_RELOC);
> 	uint32_t run_id = mid_tiling;
>-	uint32_t mid_region = (AT_LEAST_GEN(intel_get_drm_devid(xe), 20) &
>-							!xe_has_vram(xe)) ? region1 : region2;
>+	uint32_t mid_region = (AT_LEAST_GEN(intel_get_drm_devid(xe), 20) &&
>+			       !xe_has_vram(xe)) ? region1 : region2;
> 	uint32_t bb;
> 	enum blt_compression mid_compression = config->compression;
> 	int mid_compression_format = param.compression_format;
>@@ -479,8 +479,8 @@ static void block_multicopy(int xe,
> 	uint64_t bb_size = xe_bb_size(xe, SZ_4K);
> 	uint64_t ahnd = intel_allocator_open(xe, ctx->vm, INTEL_ALLOCATOR_RELOC);
> 	uint32_t run_id = mid_tiling;
>-	uint32_t mid_region = (AT_LEAST_GEN(intel_get_drm_devid(xe), 20) &
>-							!xe_has_vram(xe)) ? region1 : region2;
>+	uint32_t mid_region = (AT_LEAST_GEN(intel_get_drm_devid(xe), 20) &&
>+			       !xe_has_vram(xe)) ? region1 : region2;
> 	uint32_t bb;
> 	enum blt_compression mid_compression = config->compression;
> 	int mid_compression_format = param.compression_format;
>-- 
>2.44.2
>


More information about the igt-dev mailing list