All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Joseph Telaak" <joseph@telaak.dev>, dri-devel@lists.freedesktop.org
Cc: media-ci@linuxtv.org
Subject: Re: [PATCH RFC 09/13] drm/powervr_sgx: Add the client command checks
Date: Thu, 12 Nov 2026 23:14:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-211935@kernel.org> (raw)
In-Reply-To: <20261112-powervr-sgx-v1-9-c69b84bac011@telaak.dev>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/powervr_sgx: missing PDS row extents for bg_pds addresses
  in render
--

commit 2c01add46bb408f66c7c7d092a2528c557b38dee
Author: Joseph Telaak <joseph@telaak.dev>

drm/powervr_sgx: Add the client command checks

This commit adds client command copying, extension chain walking, per-field
validation tables, VM mapping checks, and cross-field rules for PowerVR SGX
commands.

> diff --git a/drivers/gpu/drm/powervr_sgx/pvrsgx_cmd_defs.c b/drivers/gpu/drm/powervr_sgx/pvrsgx_cmd_defs.c
> new file mode 100644
> index 0000000000000..f73c80199b527
> --- /dev/null
> +++ b/drivers/gpu/drm/powervr_sgx/pvrsgx_cmd_defs.c

[ ... ]

> +	{
> +		.name = "pixel_event_pds_addr",
> +		.offset = offsetof(struct pvrsgx_cmd_render_all, base.pixel_event_pds_addr),
> +		.size = 8,
> +		.check = PVRSGX_CMD_CHECK_ADDR,
> +		.heap = PVRSGX_CMD_HEAP_PDS_PIXEL,
> +		.align = 16,
> +		.extent = PVRSGX_CMD_EXTENT_PDS_ROWS,
> +		.extent_field = offsetof(struct pvrsgx_cmd_render_all, base.pixel_event_pds_rows),
> +	},
> +	{
> +		.name = "bg_pds_secondary_addr",
> +		.offset = offsetof(struct pvrsgx_cmd_render_all, base.bg_pds_secondary_addr),
> +		.size = 8,
> +		.check = PVRSGX_CMD_CHECK_ADDR,
> +		.heap = PVRSGX_CMD_HEAP_PDS_PIXEL,
> +		.align = 16,
> +	},
> +	{
> +		.name = "bg_pds_primary_addr",
> +		.offset = offsetof(struct pvrsgx_cmd_render_all, base.bg_pds_primary_addr),
> +		.size = 8,
> +		.check = PVRSGX_CMD_CHECK_ADDR,
> +		.heap = PVRSGX_CMD_HEAP_PDS_PIXEL,
> +		.align = 16,
> +	},

[Severity: Medium]
Should bg_pds_secondary_addr and bg_pds_primary_addr in sgx545_render_fields
also set .extent = PVRSGX_CMD_EXTENT_PDS_ROWS with .extent_field pointing to
base.bg_pds_secondary_rows and base.bg_pds_primary_rows?

mapped_fields() skips address fields where f->extent is 0, so
pvrsgx_cmd_check_mapped() never checks that these background PDS program
extents are mapped in the job's VM.  A render command with an unmapped or
partially mapped background PDS address in the PDS_PIXEL heap will pass
validation and trigger a GPU page fault when executed.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-powervr-sgx-v1-0-c69b84bac011@telaak.dev?part=9

  reply	other threads:[~2026-11-12 23:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 22:58 [PATCH RFC 00/13] drm/powervr_sgx: Add a DRM driver for PowerVR SGX5xx GPUs Joseph Telaak
2026-11-12 22:58 ` [PATCH RFC 01/13] drm/gem-shmem: Map pages for the DMA device Joseph Telaak
2026-11-12 23:11   ` sashiko-bot
2026-11-12 22:58 ` [PATCH RFC 02/13] drm/gma500: Publish the Cedarview SGX as an auxiliary device Joseph Telaak
2026-11-12 22:58 ` [PATCH RFC 03/13] drm/gma500: Export GEM objects as dma-bufs Joseph Telaak
2026-11-12 23:16   ` sashiko-bot
2026-11-12 22:58 ` [PATCH RFC 04/13] drm/powervr_sgx: Add the uAPI header and its documentation Joseph Telaak
2026-11-12 23:12   ` sashiko-bot
2026-11-12 22:58 ` [PATCH RFC 05/13] drm/powervr_sgx: Add the core table, registers and device bring-up Joseph Telaak
2026-11-12 23:16   ` sashiko-bot
2026-11-12 22:58 ` [PATCH RFC 06/13] drm/powervr_sgx: Load and start the microkernel Joseph Telaak
2026-11-12 22:58 ` [PATCH RFC 07/13] drm/powervr_sgx: Add GEM objects, VMs and dma-buf sharing Joseph Telaak
2026-11-12 22:58 ` [PATCH RFC 08/13] drm/powervr_sgx: Add contexts, the scheduler and SUBMIT_JOBS Joseph Telaak
2026-11-12 22:58 ` [PATCH RFC 09/13] drm/powervr_sgx: Add the client command checks Joseph Telaak
2026-11-12 23:14   ` sashiko-bot [this message]
2026-11-12 22:59 ` [PATCH RFC 10/13] drm/powervr_sgx: Add render jobs Joseph Telaak
2026-11-12 22:59 ` [PATCH RFC 11/13] drm/powervr_sgx: Validate shader code in the kernel Joseph Telaak
2026-11-12 22:59 ` [PATCH RFC 12/13] drm/powervr_sgx: Add the DRM driver, power management and debugging Joseph Telaak
2026-11-12 22:59 ` [PATCH RFC 13/13] drm/powervr_sgx: Add KUnit tests Joseph Telaak

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=sashiko-outbox-211935@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=joseph@telaak.dev \
    --cc=media-ci@linuxtv.org \
    --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.