From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 3/6] tests/kms_ccs: Use logical && instead of bitwise &
Date: Tue, 24 Sep 2024 00:32:14 +0300 [thread overview]
Message-ID: <ZvHeXjNdzz0IiFC3@intel.com> (raw)
In-Reply-To: <qziedgc6uoxqm4px4jquizuouiznolm3udkbaj7n4mrxtagibe@5rvdyzyuiwwt>
On Mon, Sep 23, 2024 at 04:01:21PM -0500, Lucas De Marchi wrote:
> On Mon, Sep 23, 2024 at 11:45:54PM GMT, Ville Syrjälä wrote:
> >From: Ville Syrjälä <ville.syrjala@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@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.
This code should probably be refactored more heavily anyway
since we seem to be repeating ourselves many times.
>
> Anyway,
>
>
> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
>
> Lucas De Marchi
>
> >
> > struct drm_xe_engine_class_instance inst = {
> > .engine_class = DRM_XE_ENGINE_CLASS_COPY,
> >--
> >2.44.2
> >
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2024-09-23 21:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 20:45 [PATCH i-g-t 0/6] igt: Clean up some Intel platform checks Ville Syrjala
2024-09-23 20:45 ` [PATCH i-g-t 1/6] tests/gem_ctx_engines: Fix gen6+ check Ville Syrjala
2024-09-23 20:57 ` Lucas De Marchi
2024-09-23 20:45 ` [PATCH i-g-t 2/6] tests/kms_frontbuffer_tracking: Simplify tiling vs. platform tests Ville Syrjala
2024-09-23 20:58 ` Lucas De Marchi
2024-09-23 20:45 ` [PATCH i-g-t 3/6] tests/kms_ccs: Use logical && instead of bitwise & Ville Syrjala
2024-09-23 21:01 ` Lucas De Marchi
2024-09-23 21:32 ` Ville Syrjälä [this message]
2024-09-23 20:45 ` [PATCH i-g-t 4/6] tests/xe_ccs: " Ville Syrjala
2024-09-23 21:02 ` Lucas De Marchi
2024-09-24 6:34 ` Zbigniew Kempczyński
2024-09-23 20:45 ` [PATCH i-g-t 5/6] igt: Get rid of AT_LEAST_DISPLAY() Ville Syrjala
2024-09-23 21:02 ` Lucas De Marchi
2024-09-23 20:45 ` [PATCH i-g-t 6/6] igt: Get rid of AT_LEAST_GEN() Ville Syrjala
2024-09-23 21:09 ` Lucas De Marchi
2024-09-25 23:39 ` ✓ CI.xeBAT: success for igt: Clean up some Intel platform checks Patchwork
2024-09-25 23:53 ` ✓ Fi.CI.BAT: " Patchwork
2024-09-26 4:10 ` ✗ CI.xeFULL: failure " Patchwork
2024-09-26 9:27 ` ✗ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZvHeXjNdzz0IiFC3@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox