Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/nouveau: build failure in nouveau_platform_resume() when
  PM_DEVFREQ=n
--

commit 7f3a768f8ef913fb90efb9c01241f3d8714fc297
Author: Ville Syrjälä <[email protected]>

drm/nouveau: Allow platform driver build with COMPILE_TEST=y

This commit allows NOUVEAU_PLATFORM_DRIVER to be enabled when COMPILE_TEST=y
even on non-Tegra architectures.

> diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig
> index 3b5757aed9c84..d7b432c839e5f 100644
> --- a/drivers/gpu/drm/nouveau/Kconfig
> +++ b/drivers/gpu/drm/nouveau/Kconfig
> @@ -34,7 +34,7 @@ config DRM_NOUVEAU
>  
>  config NOUVEAU_PLATFORM_DRIVER
>       bool "Nouveau (NVIDIA) SoC GPUs"
> -     depends on DRM_NOUVEAU && ARCH_TEGRA
> +     depends on DRM_NOUVEAU && (ARCH_TEGRA || COMPILE_TEST)
>       default y
>       help
>         Support for Nouveau platform driver, used for SoC GPUs as found

[Severity: Medium]
Does this break the build in nouveau_platform_resume() when
CONFIG_PM_SLEEP=y and CONFIG_PM_DEVFREQ=n?

DRM_NOUVEAU only has "select PM_DEVFREQ if ARCH_TEGRA", so when
ARCH_TEGRA=n and COMPILE_TEST=y, CONFIG_PM_DEVFREQ can remain disabled.
The fallback stub for gk20a_devfreq_resume() in
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a_devfreq.h is missing the
pointer asterisk on its parameter:

drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a_devfreq.h:
    #if defined(CONFIG_PM_DEVFREQ)
    int gk20a_devfreq_init(struct nvkm_clk *base, struct gk20a_devfreq 
**devfreq);
    int gk20a_devfreq_resume(struct device *dev);
    int gk20a_devfreq_suspend(struct device *dev);
    #else
    static inline int gk20a_devfreq_init(struct nvkm_clk *base, struct 
gk20a_devfreq **devfreq)
    {
        return 0;
    }

    static inline int gk20a_devfreq_resume(struct device dev) { return 0; }
    static inline int gk20a_devfreq_suspend(struct device *dev) { return 0; }
    #endif

Passing struct device *dev from nouveau_platform_resume() to
gk20a_devfreq_resume() then fails to compile with an incompatible type
error.

-- 
Sashiko AI review · 
https://sashiko.dev/#/patchset/[email protected]?part=19

Reply via email to