All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mohamed Ahmed" <mohamedahmedegypt2001@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 5/7] nouveau/gsp: fix vblank interrupts on GB20x
Date: Sat, 15 Aug 2026 00:08:44 +0000	[thread overview]
Message-ID: <20260815000845.41E9E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260814235705.59132-6-mohamedahmedegypt2001@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] NULL pointer dereference in `nvkm_uhead_mthd_scanoutpos` due to missing `.rgpos` callback in `gb202_head`.
- [Low] Build failure due to undeclared identifier `r535_head_state` in `gb202_head` struct.
--

--- Patch [5]: [PATCH 5/7] nouveau/gsp: fix vblank interrupts on GB20x ---
commit f0249296d0fe470f2e8d8e3f163056c84c1f8f5d
Author: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>

nouveau/gsp: fix vblank interrupts on GB20x

The GSP path programs per-head timing (vblank) interrupts the same way on
every generation. NVD5.0 (GB20x) reworked the FE interrupt frontend
around four message-based kernel vectors and moved RM head-timing
interrupts to the dedicated low-latency vector. This patch selects the
head functions and interrupt handler per generation to fix vblank interrupts.

> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c
> index fd473b4d12a82..bc91d46e646d5 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c
[ ... ]
> @@ -692,6 +692,33 @@ r535_head = {
>  	.vblank_put = r535_head_vblank_put,
>  };
>  
[ ... ]
> +static const struct nvkm_head_func
> +gb202_head = {
> +	.state = r535_head_state,

[Severity: Low]
Does r535_head_state exist? It appears this might cause a build failure
due to an undeclared identifier. The existing r535_head struct uses
gv100_head_state for this field.

[Severity: High]
Is it safe to omit the rgpos callback here?

When userspace queries the head scanout position via NVIF_HEAD_V0_SCANOUTPOS,
execution goes to nvkm_uhead_mthd_scanoutpos(), which unconditionally
dereferences head->func->rgpos:

    head->func->rgpos(head, &args->v0.hline, &args->v0.vline);

Without rgpos being set on gb202_head, will this cause a NULL pointer
dereference when accessed from userspace?

> +	.vblank_get = gb202_head_vblank_get,
> +	.vblank_put = gb202_head_vblank_put,
> +};
> +

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260814235705.59132-1-mohamedahmedegypt2001@gmail.com?part=5

  reply	other threads:[~2026-08-15  0:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 23:56 [PATCH 0/7] nouveau: assorted display fixes (GB20x, r570 DP_CONFIG_STREAM, HF-EEODB EDIDs) Mohamed Ahmed
2026-08-14 23:56 ` Mohamed Ahmed
2026-08-14 23:56 ` [PATCH 1/7] nouveau/disp: add GB20x HDMI vendor infoframe writer Mohamed Ahmed
2026-08-14 23:56   ` Mohamed Ahmed
2026-08-15  0:08   ` sashiko-bot
2026-08-14 23:57 ` [PATCH 2/7] nouveau/gsp: fix HDMI vendor infoframes on GB20x Mohamed Ahmed
2026-08-14 23:57   ` Mohamed Ahmed
2026-08-15  0:08   ` sashiko-bot
2026-08-14 23:57 ` [PATCH 3/7] nouveau/gsp: fix HDMI GCP AVMute register offsets " Mohamed Ahmed
2026-08-14 23:57   ` Mohamed Ahmed
2026-08-14 23:57 ` [PATCH 4/7] nouveau/gsp: use per-version DP_CONFIG_STREAM params on r570 firmware Mohamed Ahmed
2026-08-14 23:57   ` Mohamed Ahmed
2026-08-15  0:13   ` sashiko-bot
2026-08-14 23:57 ` [PATCH 5/7] nouveau/gsp: fix vblank interrupts on GB20x Mohamed Ahmed
2026-08-14 23:57   ` Mohamed Ahmed
2026-08-15  0:08   ` sashiko-bot [this message]
2026-08-14 23:57 ` [PATCH 6/7] nouveau/dispnv50: program pixel clocks above 2.147GHz " Mohamed Ahmed
2026-08-14 23:57   ` Mohamed Ahmed
2026-08-14 23:57 ` [PATCH 7/7] nouveau: honor HF-EEODB EDIDs by converting to struct drm_edid Mohamed Ahmed
2026-08-14 23:57   ` Mohamed Ahmed
2026-08-15  0:08   ` sashiko-bot

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=20260815000845.41E9E1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mohamedahmedegypt2001@gmail.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.