* [PATCH 1/2] accel/rocket: Fix Rockchip NPU compilation
2025-08-02 19:25 [PATCH 0/2] accel/rocket: Fix build errors and sparse warning Brigham Campbell
@ 2025-08-02 19:25 ` Brigham Campbell
2025-08-02 19:25 ` [PATCH 2/2] accel/rocket: Fix undeclared const rocket_pm_ops Brigham Campbell
2025-08-03 15:33 ` [PATCH 0/2] accel/rocket: Fix build errors and sparse warning Tomeu Vizoso
2 siblings, 0 replies; 5+ messages in thread
From: Brigham Campbell @ 2025-08-02 19:25 UTC (permalink / raw)
To: Tomeu Vizoso, Oded Gabbay
Cc: dri-devel, linux-kernel, linux-kernel-mentees, skhan,
Brigham Campbell
Replace DRM_GPU_SCHED_STAT_NOMINAL with GPU_DRM_SCHED_STAT_RESET, in
accordance with commit 0a5dc1b67ef5 ("drm/sched: Rename
DRM_GPU_SCHED_STAT_NOMINAL to DRM_GPU_SCHED_STAT_RESET")
Pass extra parameter to drm_sched_job_init, as required by commit
2956554823ce ("drm/sched: Store the drm client_id in drm_sched_fence")
Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
---
drivers/accel/rocket/rocket_job.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/accel/rocket/rocket_job.c b/drivers/accel/rocket/rocket_job.c
index e731da15ebffca12e74035d2739a666a8e02d747..5d4afd69230623215e3105da7153d2d010636d52 100644
--- a/drivers/accel/rocket/rocket_job.c
+++ b/drivers/accel/rocket/rocket_job.c
@@ -390,7 +390,7 @@ static enum drm_gpu_sched_stat rocket_job_timedout(struct drm_sched_job *sched_j
atomic_set(&core->reset.pending, 1);
rocket_reset(core, sched_job);
- return DRM_GPU_SCHED_STAT_NOMINAL;
+ return DRM_GPU_SCHED_STAT_RESET;
}
static void rocket_reset_work(struct work_struct *work)
@@ -552,7 +552,7 @@ static int rocket_ioctl_submit_job(struct drm_device *dev, struct drm_file *file
ret = drm_sched_job_init(&rjob->base,
&file_priv->sched_entity,
- 1, NULL);
+ 1, NULL, file->client_id);
if (ret)
goto out_put_job;
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] accel/rocket: Fix undeclared const rocket_pm_ops
2025-08-02 19:25 [PATCH 0/2] accel/rocket: Fix build errors and sparse warning Brigham Campbell
2025-08-02 19:25 ` [PATCH 1/2] accel/rocket: Fix Rockchip NPU compilation Brigham Campbell
@ 2025-08-02 19:25 ` Brigham Campbell
2025-08-03 15:33 ` [PATCH 0/2] accel/rocket: Fix build errors and sparse warning Tomeu Vizoso
2 siblings, 0 replies; 5+ messages in thread
From: Brigham Campbell @ 2025-08-02 19:25 UTC (permalink / raw)
To: Tomeu Vizoso, Oded Gabbay
Cc: dri-devel, linux-kernel, linux-kernel-mentees, skhan,
Brigham Campbell, kernel test robot
Fix sparse warning regarding an undeclared const rocket_pm_ops, which is
used in rocket_drv.c.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508030021.uwdr4P08-lkp@intel.com/
Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
---
drivers/accel/rocket/rocket_drv.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/accel/rocket/rocket_drv.h b/drivers/accel/rocket/rocket_drv.h
index f50634935b605c542cce16a2b91c1e43ec16bc81..2c673bb99ccc1d90e2dafdc89e9a5c6df216a309 100644
--- a/drivers/accel/rocket/rocket_drv.h
+++ b/drivers/accel/rocket/rocket_drv.h
@@ -9,6 +9,8 @@
#include "rocket_device.h"
+extern const struct dev_pm_ops rocket_pm_ops;
+
struct rocket_iommu_domain {
struct iommu_domain *domain;
struct kref kref;
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] accel/rocket: Fix build errors and sparse warning
2025-08-02 19:25 [PATCH 0/2] accel/rocket: Fix build errors and sparse warning Brigham Campbell
2025-08-02 19:25 ` [PATCH 1/2] accel/rocket: Fix Rockchip NPU compilation Brigham Campbell
2025-08-02 19:25 ` [PATCH 2/2] accel/rocket: Fix undeclared const rocket_pm_ops Brigham Campbell
@ 2025-08-03 15:33 ` Tomeu Vizoso
2025-08-03 16:14 ` Brigham Campbell
2 siblings, 1 reply; 5+ messages in thread
From: Tomeu Vizoso @ 2025-08-03 15:33 UTC (permalink / raw)
To: Brigham Campbell
Cc: Oded Gabbay, dri-devel, linux-kernel, linux-kernel-mentees, skhan,
kernel test robot
Hi Brigham,
thanks for the fixes. Will pick them up. Hope you don't mind if I
change the subject of the first patch to something a bit more
specific, such as:
accel/rocket: Adapt to changes in drm/sched API
Regards,
Tomeu
On Sat, Aug 2, 2025 at 9:25 PM Brigham Campbell <me@brighamcampbell.com> wrote:
>
> Fix two build errors in rockchip NPU support code which were caused by
> the integration of recent changes in the drm subsystem.
>
> Fix a sparse warning regarding an undeclared const, rocket_pm_ops.
>
> I tested these changes by enabling DRM_ACCEL_ROCKET and recompiling with
> `make C=2`.
>
> Signed-off-by: Brigham Campbell <me@brighamcampbell.com>
> ---
> Brigham Campbell (2):
> accel/rocket: Fix Rockchip NPU compilation
> accel/rocket: Fix undeclared const rocket_pm_ops
>
> drivers/accel/rocket/rocket_drv.h | 2 ++
> drivers/accel/rocket/rocket_job.c | 4 ++--
> 2 files changed, 4 insertions(+), 2 deletions(-)
> ---
> base-commit: 01ac6e4e53b6351df42c97d217b0d2dbeef5c917
> change-id: 20250802-fix-rockchip-npu-build-ca759ba8da06
>
> Best regards,
> --
> Brigham Campbell <me@brighamcampbell.com>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] accel/rocket: Fix build errors and sparse warning
2025-08-03 15:33 ` [PATCH 0/2] accel/rocket: Fix build errors and sparse warning Tomeu Vizoso
@ 2025-08-03 16:14 ` Brigham Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Brigham Campbell @ 2025-08-03 16:14 UTC (permalink / raw)
To: Tomeu Vizoso
Cc: Oded Gabbay, dri-devel, linux-kernel, linux-kernel-mentees, skhan,
kernel test robot, dri-devel
On Sun Aug 3, 2025 at 9:33 AM MDT, Tomeu Vizoso wrote:
> thanks for the fixes. Will pick them up. Hope you don't mind if I
> change the subject of the first patch to something a bit more
> specific, such as:
>
> accel/rocket: Adapt to changes in drm/sched API
No, I don't mind at all. Go ahead and use your editorial discretion with
the shortlogs and commit messages. I'll put more thought into the patch
subject next time.
Thanks,
Brigham
^ permalink raw reply [flat|nested] 5+ messages in thread