Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] drm/panel: selecting DRM_MIPI_DBI without SPI breaks CONFIG_SPI=n build
--

commit 6d2fecb3d7209826695a1566f8263dc71e26e02f
Author: Svyatoslav Ryhel <[email protected]>

drm/panel: Add Hitachi TX10D07VM0BAA MIPI DBI Type B panel driver

This commit adds a DRM panel driver for the Hitachi TX10D07VM0BAA 4" WVGA MIPI
DBI Type B panel used in the LG Optimus 2X P990 smartphone.

> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
> index 7a520b4d60fef..0e86628bcdb80 100644
> --- a/drivers/gpu/drm/panel/Kconfig
> +++ b/drivers/gpu/drm/panel/Kconfig
> @@ -274,6 +274,20 @@ config DRM_PANEL_HIMAX_HX8394
>  
>         If M is selected the module will be called panel-himax-hx8394.
>  
> +config DRM_PANEL_HITACHI_TX10D07VM0BAA
> +     tristate "Hitachi TX10D07VM0BAA MIPI DBI Type B panel"
> +     depends on OF
> +     depends on BACKLIGHT_CLASS_DEVICE
> +     select DRM_MIPI_DBI

[Severity: Low]
Does selecting DRM_MIPI_DBI here without a dependency on SPI cause a build
regression when CONFIG_SPI is disabled?

Previously, every Kconfig symbol selecting DRM_MIPI_DBI either depended on SPI
or used conditional selection on SPI. With DRM_PANEL_HITACHI_TX10D07VM0BAA
selecting DRM_MIPI_DBI unconditionally, drivers/gpu/drm/drm_mipi_dbi.c can now
be built with CONFIG_SPI=n.

In drivers/gpu/drm/drm_mipi_dbi.c, mipi_dbi_dcs_read_commands is defined
outside the CONFIG_SPI guard:

static const u8 mipi_dbi_dcs_read_commands[] = {
        MIPI_DCS_GET_DISPLAY_ID,
        ...
};

However, its only user is mipi_dbi_spi_init(), which is inside the
#if IS_ENABLED(CONFIG_SPI) block:

int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *dbi,
                      struct gpio_desc *dc)
{
        ...
        dbi->read_commands = mipi_dbi_dcs_read_commands;

Because drivers/gpu/drm/Makefile enables -Wunused-const-variable:

subdir-ccflags-y += $(call cc-option, -Wunused-const-variable)

building with CONFIG_DRM_PANEL_HITACHI_TX10D07VM0BAA enabled and CONFIG_SPI=n
triggers an unused-const-variable warning on mipi_dbi_dcs_read_commands (which
becomes a build error with CONFIG_DRM_WERROR or CONFIG_WERROR).

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

Reply via email to