Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] drm/nova: missing kernel-parameters.txt entry for 
acknowledge_unstable_uapi
--

commit 77a1b4c686914a70a5ae235e8e03b1e3542d6c45
Author: Danilo Krummrich <[email protected]>

drm/nova: require explicit opt-in to unstable uAPI

This commit adds the acknowledge_unstable_uapi module parameter to
nova-drm to require users to explicitly opt in to the unstable uAPI before
enabling the driver, and taints the kernel when enabled.

> diff --git a/drivers/gpu/drm/nova/Kconfig b/drivers/gpu/drm/nova/Kconfig
> index ba16c74401f8f..2cb62517b2f9b 100644
> --- a/drivers/gpu/drm/nova/Kconfig
> +++ b/drivers/gpu/drm/nova/Kconfig
> @@ -12,6 +12,15 @@ config DRM_NOVA
>         Choose this if you want to build the Nova DRM driver for Nvidia
>         GSP-based GPUs.
>  
> -       This driver is work in progress and may not be functional.
> +       This driver is under active upstream development and may not be
> +       functional. Its uAPI is intended to be developed upstream alongside
> +       the driver and is not yet stable. It may change incompatibly during
> +       development.
> +
> +       Loading requires the acknowledge_unstable_uapi=1 module parameter, or
> +       nova-drm.acknowledge_unstable_uapi=1 on the kernel command line when
> +       built in.
> +
> +       Enabling the driver taints the kernel.
>  
>         If M is selected, the module will be called nova-drm.
> diff --git a/drivers/gpu/drm/nova/nova.rs b/drivers/gpu/drm/nova/nova.rs
> index 1fd454c7e0dfb..ad68f6e1a613b 100644
> --- a/drivers/gpu/drm/nova/nova.rs
> +++ b/drivers/gpu/drm/nova/nova.rs

[ ... ]

> -kernel::module_auxiliary_driver! {
> -    type: NovaDriver,
> +module! {
> +    type: NovaModule,
>      name: "nova-drm",
>      authors: ["Danilo Krummrich"],
>      description: "Nova GPU driver",
>      license: "GPL v2",
> +    params: {
> +        acknowledge_unstable_uapi: bool {
> +            default: false,
> +            description: "Acknowledge that Nova and its uAPI are under 
> active upstream development \
> +                          and the uAPI may change incompatibly; enable the 
> driver (taints kernel)",
> +        },
> +    },
> +}
> +
> +#[pin_data]
> +struct NovaModule {
> +    #[pin]
> +    _driver: Registration<auxiliary::Adapter<NovaDriver>>,
> +}
> +
> +impl NovaModule {
> +    fn check_unstable_uapi() -> Result {
> +        pr_warn!("Nova and its uAPI are under active upstream 
> development\n");
> +
> +        if !module_parameters::acknowledge_unstable_uapi.value() {
> +            pr_err!("Driver disabled: Nova's uAPI is unstable and may change 
> incompatibly\n");
> +            pr_info!("Set nova-drm.acknowledge_unstable_uapi=1 to enable 
> (taints kernel)\n");

[Severity: Low]
Since NovaModule defines the acknowledge_unstable_uapi parameter in
drivers/gpu/drm/nova/nova.rs and both DRM_NOVA in
drivers/gpu/drm/nova/Kconfig and NovaModule::check_unstable_uapi()
instruct users to pass nova-drm.acknowledge_unstable_uapi=1 on the kernel
command line when built in, should this parameter also be documented in
Documentation/admin-guide/kernel-parameters.txt?

> +            return Err(EPERM);
> +        }

[ ... ]

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

Reply via email to