drm/msm: enable separate binding of GPU and display devices
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Sat, 5 Jul 2025 10:02:35 +0000 (13:02 +0300)
committerRob Clark <robin.clark@oss.qualcomm.com>
Sat, 5 Jul 2025 14:37:21 +0000 (07:37 -0700)
commit217ed15bd399980981f90f4332bc7ad4b05baa7e
treef334f85ee2f2c128ad2fe3687e7c04659106ac84
parent643515a9cd091b2a3eff18fdd5caa30c5d816889
drm/msm: enable separate binding of GPU and display devices

There are cases when we want to have separate DRM devices for GPU and
display pipelines.
One example is development, when it is beneficial to be able to bind the
GPU driver separately, without the display pipeline (and without the
hacks adding "amd,imageon" to the compatible string).
Another example is some of Qualcomm platforms, which have two MDSS
units, but only one GPU. With current approach it is next to impossible
to support this usecase properly, while separate binding allows users to
have three DRM devices: two for MDSS units and a single headless GPU.

Add kernel param msm.separate_gpu_kms, which if set to true forces
creation of separate display and GPU DRM devices. Mesa supports this
setup by using the kmsro wrapper.

The param is disabled by default, in order to be able to test userspace
for the compatibility issues. Simple clients are able to handle this
setup automatically.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/662590/
[Rob: renamed the modparam to separate_gpu_kms, and add missing
      DRIVER_GEM_GPUVA]
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
drivers/gpu/drm/msm/adreno/adreno_device.c
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h