Thank you for your contribution! Sashiko AI review found 2 potential issue(s) 
to consider:
- [Medium] drm/panthor: missing driver version bump for UAPI addition
- [Low] drm/tyr: build failure due to exhaustive struct initialization
--

commit 543a83f06edb5e6a777b3ef1eefcac27b352d2c8
Author: Karunika Choo <[email protected]>

drm/panthor: Add 64-bit GPU_ID decoding for v15 GPUs

Mali v15 exposes a 64-bit GPU_ID register with a different field layout
from earlier GPUs. This patch adds the register definitions, decoding helpers,
and populates the new uAPI gpu_wide_id field.

> diff --git a/include/uapi/drm/panthor_drm.h b/include/uapi/drm/panthor_drm.h
> index a2ff0f4ec6915..843a0b40e1d36 100644
> --- a/include/uapi/drm/panthor_drm.h
> +++ b/include/uapi/drm/panthor_drm.h
[ ... ]
> @@ -376,6 +376,19 @@ struct drm_panthor_gpu_info {
>  
>       /** @gpu_features: Bitmask describing supported GPU-wide features */
>       __u64 gpu_features;
> +
> +     /**
> +      * @gpu_wide_id: 64-bit GPU ID for v15 and later GPUs. @gpu_id is 0 when
> +      * this is populated.
> +      */
> +     __u64 gpu_wide_id;

[Severity: Medium]
Does the addition of this new UAPI field require a driver version bump?

The UAPI documentation for Panthor mandates that each new flag or field
addition must come with a driver version update, so the userspace driver
doesn't have to rely on trial and error to know which flags are supported.

However, the driver minor version in panthor_drm_driver within
drivers/gpu/drm/panthor/panthor_drv.c remains at 9:

        .major = 1,
        .minor = 9,

Will userspace be forced to use trial and error to determine support for
this field without an incremented minor version?

[Severity: Low]
Will this UAPI structure modification cause a build failure in the Rust tyr
driver?

The Rust driver utilizes this structure via bindgen and initializes it
exhaustively in GpuInfo::new() within drivers/gpu/drm/tyr/gpu.rs:

        Self(uapi::drm_panthor_gpu_info {
            gpu_id: io.read(GPU_ID).into_raw(),
            gpu_rev: io.read(REVIDR).into_raw(),

Because the exhaustive initializer lacks the new gpu_wide_id field, the
Rust compiler will fail with a missing field error. Has this compile-time
regression been addressed?

> +#define DRM_PANTHOR_WIDE_ARCH_MAJOR(x)               (((x) >> 56) & 0xff)
> +#define DRM_PANTHOR_WIDE_ARCH_MINOR(x)               (((x) >> 48) & 0xff)

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=4

Reply via email to