[PATCH i-g-t 3/6] tests/kms_ccs: Use logical && instead of bitwise &
Lucas De Marchi
lucas.demarchi at intel.com
Mon Sep 23 21:01:21 UTC 2024
On Mon, Sep 23, 2024 at 11:45:54PM 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>
>---
> tests/intel/kms_ccs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
>index 835a3fe5aed2..8be8ac58e576 100644
>--- a/tests/intel/kms_ccs.c
>+++ b/tests/intel/kms_ccs.c
>@@ -394,8 +394,8 @@ static void access_flat_ccs_surface(struct igt_fb *fb, bool verify_compression)
> uint16_t cpu_caching = DRM_XE_GEM_CPU_CACHING_WC;
> uint8_t uc_mocs = intel_get_uc_mocs_index(fb->fd);
> uint8_t comp_pat_index = intel_get_pat_idx_wt(fb->fd);
>- uint32_t region = (AT_LEAST_GEN(intel_get_drm_devid(fb->fd), 20) &
>- xe_has_vram(fb->fd)) ? REGION_LMEM(0) : REGION_SMEM;
>+ uint32_t region = (AT_LEAST_GEN(intel_get_drm_devid(fb->fd), 20) &&
>+ xe_has_vram(fb->fd)) ? REGION_LMEM(0) : REGION_SMEM;
nit: first parenthesis is also pointless and it'd read better without
breaking the line in the middle of the condition.
Anyway,
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
Lucas De Marchi
>
> struct drm_xe_engine_class_instance inst = {
> .engine_class = DRM_XE_ENGINE_CLASS_COPY,
>--
>2.44.2
>
More information about the igt-dev
mailing list