public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument
@ 2026-05-19 13:12 Javier Martinez Canillas
  2026-05-19 15:10 ` [EXTERNAL] [PATCH] drm/imagination: Fix missing pvr_power_fw_{en,dis}able() argument Brajesh Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 13:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Brajesh Gupta, David Airlie,
	Frank Binns, Maarten Lankhorst, Matt Coster, Maxime Ripard,
	Simona Vetter, Thomas Zimmermann, dri-devel

Commit 42577ba79fbf ("drm/imagination: Rename FW booted to FW initialised")
dropped by mistake the last argument of the functions pvr_power_fw_enable()
and pvr_power_fw_disable(), leading to the following compile error:

  CC [M]  drivers/gpu/drm/imagination/pvr_power.o
drivers/gpu/drm/imagination/pvr_power.c: In function ‘pvr_power_device_suspend’:
drivers/gpu/drm/imagination/pvr_power.c:382:23: error: too few arguments to function ‘pvr_power_fw_disable’; expected 3, have 2
  382 |                 err = pvr_power_fw_disable(pvr_dev, false);
      |                       ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/imagination/pvr_power.c:93:1: note: declared here
   93 | pvr_power_fw_disable(struct pvr_device *pvr_dev, bool hard_reset, bool rpm_suspend)
      | ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/imagination/pvr_power.c: In function ‘pvr_power_device_resume’:
drivers/gpu/drm/imagination/pvr_power.c:412:23: error: too few arguments to function ‘pvr_power_fw_enable’; expected 2, have 1
  412 |                 err = pvr_power_fw_enable(pvr_dev);
      |                       ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/imagination/pvr_power.c:122:1: note: declared here
  122 | pvr_power_fw_enable(struct pvr_device *pvr_dev, bool rpm_resume)
      | ^~~~~~~~~~~~~~~~~~~
make[6]: *** [scripts/Makefile.build:289: drivers/gpu/drm/imagination/pvr_power.o] Error 1
make[5]: *** [scripts/Makefile.build:548: drivers/gpu/drm/imagination] Error 2
make[4]: *** [scripts/Makefile.build:548: drivers/gpu/drm] Error 2
make[3]: *** [scripts/Makefile.build:548: drivers/gpu] Error 2
make[2]: *** [scripts/Makefile.build:548: drivers] Error 2
make[1]: *** [/home/javier/devel/linux/Makefile:2141: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2

Fixes: 42577ba79fbf ("drm/imagination: Rename FW booted to FW initialised")
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---


 drivers/gpu/drm/imagination/pvr_power.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/imagination/pvr_power.c b/drivers/gpu/drm/imagination/pvr_power.c
index 0ed9e7be604b..a71d5b35601e 100644
--- a/drivers/gpu/drm/imagination/pvr_power.c
+++ b/drivers/gpu/drm/imagination/pvr_power.c
@@ -379,7 +379,7 @@ pvr_power_device_suspend(struct device *dev)
 		return -EIO;
 
 	if (READ_ONCE(pvr_dev->fw_dev.initialised)) {
-		err = pvr_power_fw_disable(pvr_dev, false);
+		err = pvr_power_fw_disable(pvr_dev, false, true);
 		if (err)
 			goto err_drm_dev_exit;
 	}
@@ -409,7 +409,7 @@ pvr_power_device_resume(struct device *dev)
 		goto err_drm_dev_exit;
 
 	if (READ_ONCE(pvr_dev->fw_dev.initialised)) {
-		err = pvr_power_fw_enable(pvr_dev);
+		err = pvr_power_fw_enable(pvr_dev, true);
 		if (err)
 			goto err_power_off;
 	}
-- 
2.54.0

base-commit: c1079aebb4de218caa86c44f9a53700d1a582683
branch: drm-misc-next


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [EXTERNAL] [PATCH] drm/imagination: Fix missing pvr_power_fw_{en,dis}able() argument
  2026-05-19 13:12 [PATCH] drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument Javier Martinez Canillas
@ 2026-05-19 15:10 ` Brajesh Gupta
  2026-05-20  9:00   ` Javier Martinez Canillas
  2026-05-25 12:55 ` Claude review: drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument Claude Code Review Bot
  2026-05-25 12:55 ` Claude Code Review Bot
  2 siblings, 1 reply; 7+ messages in thread
From: Brajesh Gupta @ 2026-05-19 15:10 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, javierm@redhat.com
  Cc: tzimmermann@suse.de, Matt Coster, simona@ffwll.ch,
	dri-devel@lists.freedesktop.org, airlied@gmail.com, Frank Binns,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org

On Tue, 2026-05-19 at 15:12 +0200, Javier Martinez Canillas wrote:
> *** CAUTION: This email originates from a source not known to Imagination Technologies. Think before you click a link or open an attachment ***
> 
> Commit 42577ba79fbf ("drm/imagination: Rename FW booted to FW initialised")
> dropped by mistake the last argument of the functions pvr_power_fw_enable()
> and pvr_power_fw_disable(), leading to the following compile error:
> 
>   CC [M]  drivers/gpu/drm/imagination/pvr_power.o
> drivers/gpu/drm/imagination/pvr_power.c: In function ‘pvr_power_device_suspend’:
> drivers/gpu/drm/imagination/pvr_power.c:382:23: error: too few arguments to function ‘pvr_power_fw_disable’; expected 3, have 2
>   382 |                 err = pvr_power_fw_disable(pvr_dev, false);
>       |                       ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/imagination/pvr_power.c:93:1: note: declared here
>    93 | pvr_power_fw_disable(struct pvr_device *pvr_dev, bool hard_reset, bool rpm_suspend)
>       | ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/imagination/pvr_power.c: In function ‘pvr_power_device_resume’:
> drivers/gpu/drm/imagination/pvr_power.c:412:23: error: too few arguments to function ‘pvr_power_fw_enable’; expected 2, have 1
>   412 |                 err = pvr_power_fw_enable(pvr_dev);
>       |                       ^~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/imagination/pvr_power.c:122:1: note: declared here
>   122 | pvr_power_fw_enable(struct pvr_device *pvr_dev, bool rpm_resume)
>       | ^~~~~~~~~~~~~~~~~~~
> make[6]: *** [scripts/Makefile.build:289: drivers/gpu/drm/imagination/pvr_power.o] Error 1
> make[5]: *** [scripts/Makefile.build:548: drivers/gpu/drm/imagination] Error 2
> make[4]: *** [scripts/Makefile.build:548: drivers/gpu/drm] Error 2
> make[3]: *** [scripts/Makefile.build:548: drivers/gpu] Error 2
> make[2]: *** [scripts/Makefile.build:548: drivers] Error 2
> make[1]: *** [/home/javier/devel/linux/Makefile:2141: .] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
> 
> Fixes: 42577ba79fbf ("drm/imagination: Rename FW booted to FW initialised")
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
> 
> 
>  drivers/gpu/drm/imagination/pvr_power.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imagination/pvr_power.c b/drivers/gpu/drm/imagination/pvr_power.c
> index 0ed9e7be604b..a71d5b35601e 100644
> --- a/drivers/gpu/drm/imagination/pvr_power.c
> +++ b/drivers/gpu/drm/imagination/pvr_power.c
> @@ -379,7 +379,7 @@ pvr_power_device_suspend(struct device *dev)
>  		return -EIO;
>  
>  	if (READ_ONCE(pvr_dev->fw_dev.initialised)) {
> -		err = pvr_power_fw_disable(pvr_dev, false);
> +		err = pvr_power_fw_disable(pvr_dev, false, true);
>  		if (err)
>  			goto err_drm_dev_exit;
>  	}
> @@ -409,7 +409,7 @@ pvr_power_device_resume(struct device *dev)
>  		goto err_drm_dev_exit;
>  
>  	if (READ_ONCE(pvr_dev->fw_dev.initialised)) {
> -		err = pvr_power_fw_enable(pvr_dev);
> +		err = pvr_power_fw_enable(pvr_dev, true);
>  		if (err)
>  			goto err_power_off;
>  	}

Reviewed-by: Brajesh Gupta <brajesh.gupta@imgtec.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [EXTERNAL] [PATCH] drm/imagination: Fix missing pvr_power_fw_{en,dis}able() argument
  2026-05-19 15:10 ` [EXTERNAL] [PATCH] drm/imagination: Fix missing pvr_power_fw_{en,dis}able() argument Brajesh Gupta
@ 2026-05-20  9:00   ` Javier Martinez Canillas
  0 siblings, 0 replies; 7+ messages in thread
From: Javier Martinez Canillas @ 2026-05-20  9:00 UTC (permalink / raw)
  To: Brajesh Gupta, linux-kernel@vger.kernel.org
  Cc: tzimmermann@suse.de, Matt Coster, simona@ffwll.ch,
	dri-devel@lists.freedesktop.org, airlied@gmail.com, Frank Binns,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org

Brajesh Gupta <Brajesh.Gupta@imgtec.com> writes:

> On Tue, 2026-05-19 at 15:12 +0200, Javier Martinez Canillas wrote:

[...]

>>  	if (READ_ONCE(pvr_dev->fw_dev.initialised)) {
>> -		err = pvr_power_fw_enable(pvr_dev);
>> +		err = pvr_power_fw_enable(pvr_dev, true);
>>  		if (err)
>>  			goto err_power_off;
>>  	}
>
> Reviewed-by: Brajesh Gupta <brajesh.gupta@imgtec.com>

Pushed to drm-misc (drm-misc-next). Thanks!

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Claude review: drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument
  2026-05-19 13:12 [PATCH] drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument Javier Martinez Canillas
  2026-05-19 15:10 ` [EXTERNAL] [PATCH] drm/imagination: Fix missing pvr_power_fw_{en,dis}able() argument Brajesh Gupta
  2026-05-25 12:55 ` Claude review: drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument Claude Code Review Bot
@ 2026-05-25 12:55 ` Claude Code Review Bot
  2 siblings, 0 replies; 7+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:55 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument
Author: Javier Martinez Canillas <javierm@redhat.com>
Patches: 3
Reviewed: 2026-05-25T22:55:10.151528

---

This is a single, straightforward build-fix patch. Commit `42577ba79fbf` ("drm/imagination: Rename FW booted to FW initialised") accidentally dropped arguments from two function calls in the suspend/resume paths, causing a compile failure. The fix correctly restores the missing arguments. The patch is correct, minimal, and properly tagged with a `Fixes:` line.

**Verdict: Looks good.** This should be merged promptly as the broken commit prevents building the imagination driver entirely.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Claude review: drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument
  2026-05-19 13:12 [PATCH] drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument Javier Martinez Canillas
  2026-05-19 15:10 ` [EXTERNAL] [PATCH] drm/imagination: Fix missing pvr_power_fw_{en,dis}able() argument Brajesh Gupta
@ 2026-05-25 12:55 ` Claude Code Review Bot
  2026-05-25 12:55 ` Claude Code Review Bot
  2 siblings, 0 replies; 7+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:55 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Correctness: Good.**

The two changes match the function signatures exactly:

1. `pvr_power_fw_disable(pvr_dev, false, true)` — adds the missing `rpm_suspend` parameter. Passing `true` is correct because `pvr_power_device_suspend()` is the system PM suspend path and needs the IRQ disabled (lines 109-112 of `pvr_power.c` show `rpm_suspend=true` calls `disable_irq()`). The `false` for `hard_reset` is also correct — a suspend is not a hard reset.

2. `pvr_power_fw_enable(pvr_dev, true)` — adds the missing `rpm_resume` parameter. Passing `true` is correct because `pvr_power_device_resume()` is the system PM resume path and needs the IRQ re-enabled (line 126-127 show `rpm_resume=true` calls `enable_irq()`).

These values are consistent with the existing (pre-regression) code in the drm-next tree, where the same calls at lines 382 and 412 already have the correct arguments.

**Commit message: Good.** Includes the compiler error output, the `Fixes:` tag pointing to the offending commit, and the `base-commit` / `branch` metadata.

**No issues found.** Reviewed-by would be appropriate here.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Claude review: drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument
  2026-05-19 13:11 [PATCH] " Javier Martinez Canillas
@ 2026-05-25 12:56 ` Claude Code Review Bot
  2026-05-25 12:56 ` Claude Code Review Bot
  1 sibling, 0 replies; 7+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:56 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument
Author: Javier Martinez Canillas <javierm@redhat.com>
Patches: 1
Reviewed: 2026-05-25T22:56:24.610071

---

This is a single-patch fix for a clear build breakage in the Imagination (PowerVR) GPU driver. Commit 42577ba79fbf ("drm/imagination: Rename FW booted to FW initialised") renamed `fw_dev.booted` to `fw_dev.initialised` but simultaneously dropped required arguments from the `pvr_power_fw_disable()` and `pvr_power_fw_enable()` calls in the suspend/resume paths. The fix is straightforward, correct, and well-documented with the build error in the commit message.

**Verdict: The patch looks correct. Recommend applying.**

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Claude review: drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument
  2026-05-19 13:11 [PATCH] " Javier Martinez Canillas
  2026-05-25 12:56 ` Claude review: " Claude Code Review Bot
@ 2026-05-25 12:56 ` Claude Code Review Bot
  1 sibling, 0 replies; 7+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:56 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Correctness: Good.** The fix adds the missing arguments with the correct values:

1. **`pvr_power_fw_disable(pvr_dev, false, true)`** — The third argument `rpm_suspend=true` is correct for the device suspend path. When `rpm_suspend` is true, the function calls `disable_irq(pvr_dev->irq)` (line 111 in pvr_power.c), which is the right thing to do during system suspend. This is consistent with the non-suspend caller at line 548 which passes `rpm_suspend=false` (that's the reset path, where IRQ management is handled differently).

2. **`pvr_power_fw_enable(pvr_dev, true)`** — The argument `rpm_resume=true` is correct for the device resume path. When `rpm_resume` is true, the function calls `enable_irq(pvr_dev->irq)` (line 127), re-enabling the IRQ that was disabled during suspend. Again consistent with the reset caller at line 571 which passes `false`.

**Commit message: Good.** Includes the full build error output, clearly identifies the offending commit, and has a proper `Fixes:` tag.

**Minor note:** The drm-next tree I checked already has the correct arguments at these call sites but still uses `fw_dev.booted` rather than `fw_dev.initialised`, suggesting the broken commit 42577ba79fbf hasn't landed there yet (or this fix was already folded in via a different route). The patch's `base-commit` and `branch: drm-misc-next` confirm it targets the tree where the breakage exists.

No issues found. This is a clean, obvious build fix.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-05-25 12:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 13:12 [PATCH] drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument Javier Martinez Canillas
2026-05-19 15:10 ` [EXTERNAL] [PATCH] drm/imagination: Fix missing pvr_power_fw_{en,dis}able() argument Brajesh Gupta
2026-05-20  9:00   ` Javier Martinez Canillas
2026-05-25 12:55 ` Claude review: drm/imagination: Fix missing pvr_power_fw_{en, dis}able() argument Claude Code Review Bot
2026-05-25 12:55 ` Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-05-19 13:11 [PATCH] " Javier Martinez Canillas
2026-05-25 12:56 ` Claude review: " Claude Code Review Bot
2026-05-25 12:56 ` Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox