Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] drm/msm/dcp: DRM_MSM_DCP bool dependency on tristate VIRTIO allows 
DRM_MSM=y with VIRTIO=m
--

commit 29edd03d5dbd7916e10401025f35f2e578051ed0
Author: Jayant Shekhar <[email protected]>

drm/msm/dcp: Add HFI packet helpers

This commit adds the HFI packet definitions, packing and unpacking helpers,
and key-value parsing utilities for communicating with the Display
Coprocessor (DCP) firmware, along with the DRM_MSM_DCP Kconfig symbol and
Makefile rules.

> diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
> index ed1c4775d1e92..a9f049271c251 100644
> --- a/drivers/gpu/drm/msm/Kconfig
> +++ b/drivers/gpu/drm/msm/Kconfig
> @@ -114,6 +114,31 @@ config DRM_MSM_DPU
>         the MSM DRM driver. It is the display controller found in devices
>         using e.g. SDM845 and newer platforms.
>  
> +config DRM_MSM_DCP
> +     bool "Enable DCP firmware-delegated display support in MSM DRM driver"
> +     depends on DRM_MSM
> +     depends on VIRTIO
> +     select DRM_MSM_KMS
> +     select DRM_BRIDGE_CONNECTOR
> +     select DRM_MIPI_DSI
> +     select DRM_DISPLAY_DSC_HELPER
> +     default y

[Severity: Low]
Can this Kconfig dependency allow CONFIG_DRM_MSM_DCP=y when CONFIG_DRM_MSM=y
and CONFIG_VIRTIO=m?

Both DRM_MSM and VIRTIO are tristate symbols, while DRM_MSM_DCP is a bool
symbol whose objects in drivers/gpu/drm/msm/Makefile are linked directly
into msm.o via msm-display-$(CONFIG_DRM_MSM_DCP) and
msm-$(CONFIG_DRM_MSM_KMS) += $(msm-display-y):

drivers/gpu/drm/msm/Makefile:
    msm-display-$(CONFIG_DRM_MSM_DCP) += \
            dcp/hfi/hfi_packer.o \
            dcp/hfi/hfi_unpacker.o \
            dcp/hfi/hfi_utils.o

In Kconfig, a bool option with depends on DRM_MSM and depends on VIRTIO
evaluates its upper bound as y even when CONFIG_DRM_MSM=y and
CONFIG_VIRTIO=m. When the DCP VirtIO transport and driver objects are added
to msm-display-$(CONFIG_DRM_MSM_DCP) later in this series ("drm/msm/dcp: Add
HFI VirtIO transport", "drm/msm/dcp: Add Qualcomm VirtIO transport wrapper",
and "drm/msm/dcp: Add DCP VirtIO driver"), built-in msm.o calls VirtIO core
and vring symbols such as register_virtio_driver(), register_virtio_device(),
virtio_find_vqs(), and vring_create_virtqueue() that live in loadable
modules when CONFIG_VIRTIO=m, resulting in a vmlinux link failure.

Should DRM_MSM_DCP use depends on VIRTIO=y || VIRTIO=DRM_MSM (or DRM_MSM use
depends on VIRTIO || !DRM_MSM_DCP) to prevent a built-in msm driver from
linking against modular virtio?

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

Reply via email to