* [PATCH] drm/xe: Fix operator precedence bug in emit_flush_invalidate
@ 2026-05-13 11:37 lirongqing
2026-05-13 14:57 ` Thomas Hellström
2026-05-13 16:29 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: lirongqing @ 2026-05-13 11:37 UTC (permalink / raw)
To: Matthew Brost, Thomas Hellström, Rodrigo Vivi, David Airlie,
Simona Vetter, Matthew Auld, intel-xe, dri-devel
Cc: Li RongQing
From: Li RongQing <lirongqing@baidu.com>
The expression:
MI_FLUSH_IMM_DW | (flush_flags & MI_INVALIDATE_TLB) ?: 0;
is parsed as:
(MI_FLUSH_DW | MI_FLUSH_DW_OP_STOREDW | MI_FLUSH_IMM_DW |
(flush_flags & MI_INVALIDATE_TLB)) ?: 0;
Since the combined constant flags are always non-zero, the GNU extension
'?: 0' acts as a no-op and does not change the value. Remove this redundant
and confusing logic.
Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
drivers/gpu/drm/xe/xe_ring_ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c
index cfeb4fc..ee468d3 100644
--- a/drivers/gpu/drm/xe/xe_ring_ops.c
+++ b/drivers/gpu/drm/xe/xe_ring_ops.c
@@ -144,7 +144,7 @@ static int emit_bb_start(u64 batch_addr, u32 ppgtt_flag, u32 *dw, int i)
static int emit_flush_invalidate(u32 addr, u32 val, u32 flush_flags, u32 *dw, int i)
{
dw[i++] = MI_FLUSH_DW | MI_FLUSH_DW_OP_STOREDW |
- MI_FLUSH_IMM_DW | (flush_flags & MI_INVALIDATE_TLB) ?: 0;
+ MI_FLUSH_IMM_DW | (flush_flags & MI_INVALIDATE_TLB);
dw[i++] = addr | MI_FLUSH_DW_USE_GTT;
dw[i++] = 0;
--
2.9.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/xe: Fix operator precedence bug in emit_flush_invalidate
2026-05-13 11:37 [PATCH] drm/xe: Fix operator precedence bug in emit_flush_invalidate lirongqing
@ 2026-05-13 14:57 ` Thomas Hellström
2026-05-13 16:29 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Hellström @ 2026-05-13 14:57 UTC (permalink / raw)
To: lirongqing, Matthew Brost, Rodrigo Vivi, David Airlie,
Simona Vetter, Matthew Auld, intel-xe, dri-devel
On Wed, 2026-05-13 at 07:37 -0400, lirongqing wrote:
> From: Li RongQing <lirongqing@baidu.com>
>
> The expression:
> MI_FLUSH_IMM_DW | (flush_flags & MI_INVALIDATE_TLB) ?: 0;
>
> is parsed as:
> (MI_FLUSH_DW | MI_FLUSH_DW_OP_STOREDW | MI_FLUSH_IMM_DW |
> (flush_flags & MI_INVALIDATE_TLB)) ?: 0;
>
> Since the combined constant flags are always non-zero, the GNU
> extension
> '?: 0' acts as a no-op and does not change the value. Remove this
> redundant
> and confusing logic.
>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Will push to drm-xe-next once CI is clean.
> ---
> drivers/gpu/drm/xe/xe_ring_ops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c
> b/drivers/gpu/drm/xe/xe_ring_ops.c
> index cfeb4fc..ee468d3 100644
> --- a/drivers/gpu/drm/xe/xe_ring_ops.c
> +++ b/drivers/gpu/drm/xe/xe_ring_ops.c
> @@ -144,7 +144,7 @@ static int emit_bb_start(u64 batch_addr, u32
> ppgtt_flag, u32 *dw, int i)
> static int emit_flush_invalidate(u32 addr, u32 val, u32 flush_flags,
> u32 *dw, int i)
> {
> dw[i++] = MI_FLUSH_DW | MI_FLUSH_DW_OP_STOREDW |
> - MI_FLUSH_IMM_DW | (flush_flags &
> MI_INVALIDATE_TLB) ?: 0;
> + MI_FLUSH_IMM_DW | (flush_flags &
> MI_INVALIDATE_TLB);
>
> dw[i++] = addr | MI_FLUSH_DW_USE_GTT;
> dw[i++] = 0;
^ permalink raw reply [flat|nested] 3+ messages in thread
* ✗ LGCI.VerificationFailed: failure for drm/xe: Fix operator precedence bug in emit_flush_invalidate
2026-05-13 11:37 [PATCH] drm/xe: Fix operator precedence bug in emit_flush_invalidate lirongqing
2026-05-13 14:57 ` Thomas Hellström
@ 2026-05-13 16:29 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2026-05-13 16:29 UTC (permalink / raw)
To: lirongqing; +Cc: intel-xe
== Series Details ==
Series: drm/xe: Fix operator precedence bug in emit_flush_invalidate
URL : https://patchwork.freedesktop.org/series/166516/
State : failure
== Summary ==
Address 'lirongqing@baidu.com' is not on the allowlist, which prevents CI from being triggered for this patch.
If you want Intel GFX CI to accept this address, please contact the script maintainers at i915-ci-infra@lists.freedesktop.org.
Exception occurred during validation, bailing out!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-13 16:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 11:37 [PATCH] drm/xe: Fix operator precedence bug in emit_flush_invalidate lirongqing
2026-05-13 14:57 ` Thomas Hellström
2026-05-13 16:29 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox