Skip to content

drm/msm: rework the ties between KMS and GPU parts of the driver

Dmitry Baryshkov dri-devel linux-arm-msm linux-media lkml 5 versions – In review

Get series with b4
b4 am [email protected] change-id 20250411-msm-gpu-split-2701e49e40f0

Versions newest first

  1. v5 Latest5 patches 2 repliesIn review
  2. v410 patches 0 repliesSuperseded
  3. v311 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v211 patches4 repliesSuperseded
v17 patches6 repliesSuperseded

Changes in v5 from the cover letter

- Rebased on msm-next, dropped applied patches, re-picked up no-GPU
patch
- Rewored debugfs, GEM VM_BIND and ioctls code to reduce number of
#ifdef's
- Link to v4: https://lore.kernel.org/r/[email protected]

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/msm: correct separate_gpu_kms descriptiondrivers/gpu/drm/msm/msm_drv.c+1 -10 replies
2/5drm/msm: split VM_BIND from the rest of GEM VMA codedrivers/gpu/drm/msm/Makefile drivers/gpu/drm/msm/msm_gem_vm_bind.c drivers/gpu/drm/msm/msm_gem_vma.c +1 more+1225 -11742 replies
3/5drm/msm: split away IOCTLs implementationdrivers/gpu/drm/msm/Makefile drivers/gpu/drm/msm/msm_drv.c drivers/gpu/drm/msm/msm_ioctl.c +1 more+523 -4880 replies
4/5drm/msm: split debugfs implementationdrivers/gpu/drm/msm/Makefile drivers/gpu/drm/msm/msm_debugfs.c drivers/gpu/drm/msm/msm_debugfs.h +7 more+476 -4410 replies
5/5drm/msm: make it possible to disable GPU supportdrivers/gpu/drm/msm/Kconfig drivers/gpu/drm/msm/Makefile drivers/gpu/drm/msm/msm_drv.c +6 more+240 -1350 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/5] drm/msm: rework the ties between KMS and GPU parts of the driver

Currently the KMS and GPU parts of the msm driver are pretty much intertwined. It is impossible to register a KMS-only device and registering a GPU-only DRM device requires modifying the DT. Not to mention that binding the GPU-only device creates an interim platform devices, which complicates IOMMU setup.

Rework the driver:
- Make it possible to disable KMS parts (if MDP4, MDP5 and DPU drivers are disabled).
- Register GPU-only devices without an interim platform device.
- Add module param that makes msm driver register GPU and KMS devices separately.

---
Changes in v5:
- Rebased on msm-next, dropped applied patches, re-picked up no-GPU
patch
- Rewored debugfs, GEM VM_BIND and ioctls code to reduce number of
#ifdef's
- Link to v4: https://lore.kernel.org/r/[email protected]

Changes in v4:
- Rebased on msm-next(-robclark)
- Temporarily dropped the "no-GPU" patch, it will be reposted later
(Rob)
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Disabled SYNCOBJ / SYNCOBJ_TIMELINE for KMS-only driver (Rob Clark)
- Further refine Kconfig dependencies
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Got rid of mdp4_crtc.id and msm_drm_private.num_crtcs
- Moved msm_drm_private.wq and msm_drm_private.event_thread to struct
msm_kms (Rob Clark)
- Moved HDMI / DSI / DP pointers to msm_kms (Abhinav)
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Dmitry Baryshkov (5):
drm/msm: correct separate_gpu_kms description drm/msm: split VM_BIND from the rest of GEM VMA code drm/msm: split away IOCTLs implementation drm/msm: split debugfs implementation drm/msm: make it possible to disable GPU support

 drivers/gpu/drm/msm/Kconfig           |   27 +-
 drivers/gpu/drm/msm/Makefile          |   21 +-
 drivers/gpu/drm/msm/msm_debugfs.c     |  420 ------------
 drivers/gpu/drm/msm/msm_debugfs.h     |   14 -
 drivers/gpu/drm/msm/msm_drv.c         |  645 +++---------------
 drivers/gpu/drm/msm/msm_drv.h         |   16 -
 drivers/gpu/drm/msm/msm_gem.h         |   10 +
 drivers/gpu/drm/msm/msm_gem_debugfs.c |   96 +++
 drivers/gpu/drm/msm/msm_gem_vm_bind.c | 1116 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/msm/msm_gem_vma.c     | 1177 +--------------------------------
 drivers/gpu/drm/msm/msm_gem_vma.h     |  119 ++++
 drivers/gpu/drm/msm/msm_gpu.c         |   45 ++
 drivers/gpu/drm/msm/msm_gpu.h         |  111 +++-
 drivers/gpu/drm/msm/msm_gpu_debugfs.c |  213 ++++++
 drivers/gpu/drm/msm/msm_ioctl.c       |  484 ++++++++++++++
 drivers/gpu/drm/msm/msm_ioctl.h       |   37 ++
 drivers/gpu/drm/msm/msm_kms.h         |    8 +
 drivers/gpu/drm/msm/msm_kms_debugfs.c |  129 ++++
 drivers/gpu/drm/msm/msm_submitqueue.c |   12 +-
 19 files changed, 2463 insertions(+), 2237 deletions(-)

---
base-commit: 05af764719214d6568adb55c8749dec295228da8
change-id: 20250411-msm-gpu-split-2701e49e40f0

Best regards,

Signature · 2 lines
With best wishes
Dmitry