Re: [PATCH] drm/imagination: Fix PowerVR UAPI constant references in kernel-doc

From: Luigi Santivetti

Date: Tue Sep 15 2026 - 05:14:09 EST


On Tue, 2026-09-15 at 09:51 +0100, Luigi Santivetti wrote:
> On Sat, 2026-09-12 at 08:30 +0200, Karl Mehltretter wrote:
> > The PowerVR UAPI comments contain misspellings of the enhancement query
> > selector, two buffer object flags, and the job submission ioctl. The
> > correct names were already present in the UAPI definitions when these
> > comments were introduced.
> >
> > Use DRM_PVR_DEV_QUERY_ENHANCEMENTS_GET, DRM_PVR_BO_PM_FW_PROTECT,
> > DRM_PVR_BO_ALLOW_CPU_USERSPACE_ACCESS, and DRM_IOCTL_PVR_SUBMIT_JOBS in
> > the corresponding comments.
> >
> > Fixes: 1088d89e5515 ("drm/imagination/uapi: Add PowerVR driver UAPI")
> > Assisted-by: LLM
> > Signed-off-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>
>
> Reviewed-by: Luigi Santivetti <luigi.santivetti@xxxxxxxxxx>
>
> Thank you!
> Luigi

Would you mind propagating your fix driver-wise?

$ grep -wnrE
"DRM_IOCTL_PVR_SUBMIT_JOB|DRM_PVR_DEV_ENHANCEMENTS_GET|DRM_PVR_BO_DEVICE_PM_FW_P
ROTECT|DRM_PVR_BO_CPU_ALLOW_USERSPACE_ACCESS" drivers/gpu/drm/imagination/
drivers/gpu/drm/imagination/pvr_fw.c:1841: * %DRM_PVR_BO_DEVICE_PM_FW_PROTECT is
implied for all FW objects. Consequently,
drivers/gpu/drm/imagination/pvr_fw.c:1842: * this function will fail if @flags
has %DRM_PVR_BO_CPU_ALLOW_USERSPACE_ACCESS
drivers/gpu/drm/imagination/pvr_fw.c:1923: * %DRM_PVR_BO_DEVICE_PM_FW_PROTECT is
implied for all FW objects. Consequently,
drivers/gpu/drm/imagination/pvr_fw.c:1924: * this function will fail if @flags
has %DRM_PVR_BO_CPU_ALLOW_USERSPACE_ACCESS
drivers/gpu/drm/imagination/pvr_fw.c:1961: * %DRM_PVR_BO_DEVICE_PM_FW_PROTECT is
implied for all FW objects. Consequently,
drivers/gpu/drm/imagination/pvr_fw.c:1962: * this function will fail if @flags
has %DRM_PVR_BO_CPU_ALLOW_USERSPACE_ACCESS
drivers/gpu/drm/imagination/pvr_fw.c:1998: * %DRM_PVR_BO_DEVICE_PM_FW_PROTECT is
implied for all FW objects. Consequently,
drivers/gpu/drm/imagination/pvr_fw.c:1999: * this function will fail if @flags
has %DRM_PVR_BO_CPU_ALLOW_USERSPACE_ACCESS
drivers/gpu/drm/imagination/pvr_drv.c:1183: * Called from userspace with
%DRM_IOCTL_PVR_SUBMIT_JOB.

>
> ---
> >  include/uapi/drm/pvr_drm.h | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/uapi/drm/pvr_drm.h b/include/uapi/drm/pvr_drm.h
> > index
> > ccf6c2112468f3f53b093bc298dac2bbbfd35e6e..d97a69b83cc59338b7aae306e4dfa1320f
> > 07
> > 1a2d 100644
> > --- a/include/uapi/drm/pvr_drm.h
> > +++ b/include/uapi/drm/pvr_drm.h
> > @@ -231,7 +231,7 @@ struct drm_pvr_dev_query_quirks {
> >   * the user mode driver.
> >   *
> >   * When fetching this type &struct drm_pvr_ioctl_dev_query_args.type must
> > be
> > set
> > - * to %DRM_PVR_DEV_ENHANCEMENTS_GET.
> > + * to %DRM_PVR_DEV_QUERY_ENHANCEMENTS_GET.
> >   */
> >  struct drm_pvr_dev_query_enhancements {
> >   /**
> > @@ -848,8 +848,8 @@ struct drm_pvr_ioctl_create_free_list_args {
> >   * @max_num_pages * ``sizeof(__u32)``.
> >   *
> >   * The buffer object must have been created with
> > - * %DRM_PVR_BO_DEVICE_PM_FW_PROTECT set and
> > - * %DRM_PVR_BO_CPU_ALLOW_USERSPACE_ACCESS not set.
> > + * %DRM_PVR_BO_PM_FW_PROTECT set and
> > + * %DRM_PVR_BO_ALLOW_CPU_USERSPACE_ACCESS not set.
> >   */
> >   __u64 free_list_gpu_addr;
> >  
> > @@ -1277,7 +1277,7 @@ struct drm_pvr_job {
> >  };
> >  
> >  /**
> > - * struct drm_pvr_ioctl_submit_jobs_args - Arguments for
> > %DRM_IOCTL_PVR_SUBMIT_JOB
> > + * struct drm_pvr_ioctl_submit_jobs_args - Arguments for
> > %DRM_IOCTL_PVR_SUBMIT_JOBS
> >   *
> >   * If the syscall returns an error it is important to check the value of
> >   * @jobs.count. This indicates the index into @jobs.array where the
>