public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/msm/a6xx: Add HFI support for CLX feature
Date: Sat, 16 May 2026 08:47:13 +1000	[thread overview]
Message-ID: <review-patch1-20260516-a8xx-clx-support-v1-1-62508bf651ac@oss.qualcomm.com> (raw)
In-Reply-To: <20260516-a8xx-clx-support-v1-1-62508bf651ac@oss.qualcomm.com>

Patch Review

**The HFI plumbing is correct.** The `a6xx_hfi_enable_clx()` / `a6xx_hfi_enable_iff_pclx()` pair follows the same pattern as existing `a6xx_hfi_enable_acd()`. The size calculation for the dynamically-allocated `a6xx_hfi_table` is correct, and `a6xx_hfi_send_msg()` fills in the header word.

**Issue: `a6xx_limits_tbl.tbl` should be `const`-qualified.**

In `a6xx_gpu.h`:
```c
struct a6xx_limits_tbl {
	/** @tbl: List of limits table **/
	struct a6xx_hfi_limits_tbl *tbl;
	...
};
```

The `tbl` pointer should be `const struct a6xx_hfi_limits_tbl *tbl`, since:
1. The `DECLARE_ADRENO_LIMITS_TABLE` macro creates a `static const struct a6xx_limits_tbl`, so the compiler needs the member to accept a pointer to const data.
2. The data is only ever read (`memcpy` source in `a6xx_hfi_enable_iff_pclx`), never written.

Without `const`, the assignment from the `static const` table data in patches 2/3 will produce a warning (discarding `const` qualifier) — or worse, silently strip the constness. This should be:
```c
const struct a6xx_hfi_limits_tbl *tbl;
```

**Minor: memcpy from const source is fine.** The `memcpy(&cmd, info->clx_tbl, sizeof(cmd))` in `a6xx_hfi_enable_clx()` correctly copies the const catalog data into a stack-local `cmd` before `a6xx_hfi_send_msg` mutates the header — good pattern.

**Ordering is correct.** CLX is enabled after ACD and before IFPC in `a6xx_hfi_start()`, which makes sense — current limiting should be established before entering IFPC.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-15 22:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 20:07 [PATCH 0/3] drm/msm/adreno: Support for CLX feature on A8xx Akhil P Oommen
2026-05-15 20:07 ` [PATCH 1/3] drm/msm/a6xx: Add HFI support for CLX feature Akhil P Oommen
2026-05-15 22:47   ` Claude Code Review Bot [this message]
2026-05-15 20:07 ` [PATCH 2/3] drm/msm/a6xx: Enable CLX feature on A840 Akhil P Oommen
2026-05-15 22:47   ` Claude review: " Claude Code Review Bot
2026-05-15 20:07 ` [PATCH 3/3] drm/msm/a8xx: Enable CLX feature on Adreno X2-85 Akhil P Oommen
2026-05-15 22:47   ` Claude review: " Claude Code Review Bot
2026-05-15 22:47 ` Claude review: drm/msm/adreno: Support for CLX feature on A8xx Claude Code Review 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=review-patch1-20260516-a8xx-clx-support-v1-1-62508bf651ac@oss.qualcomm.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.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