From: sashiko-bot@kernel.org
To: "Lyude Paul" <lyude@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 1/3] drm/nouveau/kms/nv50-: Add .blend_modes to nv50_wndw_func
Date: Mon, 20 Jul 2026 21:59:35 +0000 [thread overview]
Message-ID: <20260720215935.AFB641F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260720215058.398210-2-lyude@redhat.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The macro `WNDW_BLEND_MODES` is defined as a bitwise OR of multiple values without enclosing parentheses, creating a latent bug due to operator precedence.
--
--- Patch [1]: [PATCH v3 1/3] drm/nouveau/kms/nv50-: Add .blend_modes to nv50_wndw_func ---
commit d67d01315e1f18573429becf6e45ab97a7ea2324
Author: Lyude Paul <lyude@redhat.com>
drm/nouveau/kms/nv50-: Add .blend_modes to nv50_wndw_func
This commit adds a .blend_modes field to the nv50_wndw_func struct and
various display structures. This introduces a way to look up supported
blend modes for different types of windows to expose a blend property
for all planes that can display color formats with an alpha channel.
[ ... ]
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.h b/drivers/gpu/drm/nouveau/dispnv50/wndw.h
> index 90d100514bef2..81af5c3369d4c 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.h
> +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.h
[ ... ]
> @@ -139,4 +142,11 @@ int wndwca7e_new(struct nouveau_drm *, enum drm_plane_type, int, s32,
>
> int nv50_wndw_new(struct nouveau_drm *, enum drm_plane_type, int index,
> struct nv50_wndw **);
> +
> +/* A set of blend modes supported by all wndws */
> +#define WNDW_BLEND_MODES \
> + BIT(DRM_MODE_BLEND_COVERAGE) \
> + | BIT(DRM_MODE_BLEND_PREMULTI) \
> + | BIT(DRM_MODE_BLEND_PIXEL_NONE)
[Severity: Low]
Does this multi-token macro need to be enclosed in parentheses?
If WNDW_BLEND_MODES is later used in an expression with operators that have
higher precedence than bitwise OR (such as flags & WNDW_BLEND_MODES),
it will evaluate incorrectly. Enclosing the entire expression in
parentheses would prevent future operator precedence issues.
> +
> #endif
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260720215058.398210-1-lyude@redhat.com?part=1
next prev parent reply other threads:[~2026-07-20 21:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 21:36 [PATCH v3 0/3] drm/nouveau: Fix WARN_ON() from missing blend modes Lyude Paul
2026-07-20 21:36 ` Lyude Paul
2026-07-20 21:36 ` [PATCH v3 1/3] drm/nouveau/kms/nv50-: Add .blend_modes to nv50_wndw_func Lyude Paul
2026-07-20 21:36 ` Lyude Paul
2026-07-20 21:59 ` sashiko-bot [this message]
2026-07-20 21:36 ` [PATCH v3 2/3] drm/nouveau/kms/nv50-: Introduce nv50_wndw_default_state() Lyude Paul
2026-07-20 21:36 ` Lyude Paul
2026-07-20 22:06 ` sashiko-bot
2026-07-20 22:10 ` lyude
2026-07-20 21:36 ` [PATCH v3 3/3] drm/nouveau/kms/nv50-: Unconditionally create blend_mode prop for wndws Lyude Paul
2026-07-20 21:36 ` Lyude Paul
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=20260720215935.AFB641F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=lyude@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.