Skip to content

drm/msm: move KMS code from msm_drv.c

Dmitry Baryshkov dri-devel linux-arm-msm 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 15 repliesIn review
  2. v113 patches 1 replySuperseded

Changes in v2 from the cover letter

- Rebased on top of linux-next / updated version of [1]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13drm/msm/dsi: switch to devm_drm_bridge_add()drivers/gpu/drm/msm/dsi/dsi.c drivers/gpu/drm/msm/dsi/dsi.h drivers/gpu/drm/msm/dsi/dsi_manager.c+16 -455 replies
2/13drm/msm/hdmi: switch to devm_drm_bridge_add()drivers/gpu/drm/msm/hdmi/hdmi.c drivers/gpu/drm/msm/hdmi/hdmi.h drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +1 more+17 -436 replies
3/13drm/msm/dp: move pdev from struct dp_display_private to struct msm_dpdrivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_display.h+13 -130 replies
4/13drm/msm/dp: switch to devm_drm_bridge_add()drivers/gpu/drm/msm/dp/dp_display.c drivers/gpu/drm/msm/dp/dp_drm.c drivers/gpu/drm/msm/dp/dp_drm.h+16 -160 replies
5/13drm/msm: remove msm_drm_private::bridges fielddrivers/gpu/drm/msm/msm_drv.c drivers/gpu/drm/msm/msm_drv.h+0 -70 replies
6/13drm/msm: drop pm ops from the headless msm driverdrivers/gpu/drm/msm/msm_drv.c+0 -61 reply
7/13drm/msm: rename msm_pm_prepare/complete to note the KMS naturedrivers/gpu/drm/msm/disp/dpu1/dpu_kms.c drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +2 more+10 -101 reply
8/13drm/msm: remove shutdown callback from msm_platform_driverdrivers/gpu/drm/msm/msm_drv.c+0 -11 reply
9/13drm/msm: rename msm_drv_shutdown() to msm_kms_shutdown()drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +2 more+5 -50 replies
10/13drm/msm: switch to drmm_mode_config_init()drivers/gpu/drm/msm/msm_drv.c+5 -61 reply
11/13drm/msm: only register 'kms' debug file if KMS is useddrivers/gpu/drm/msm/msm_debugfs.c+3 -20 replies
12/13drm/msm: make fb debugfs file available only in KMS casedrivers/gpu/drm/msm/msm_debugfs.c+8 -10 replies
13/13drm/msm: carve out KMS code from msm_drv.cdrivers/gpu/drm/msm/Makefile drivers/gpu/drm/msm/msm_drv.c drivers/gpu/drm/msm/msm_kms.c +1 more+365 -3300 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by.

PatchRob ClarkAbhinav Kumar
1/13R-b
2/13R-b R-b
3/13R-b
4/13R-b
5/13R-b
6/13R-b R-b
7/13R-b R-b
8/13R-b R-b
9/13R-b
10/13R-b R-b
11/13R-b
12/13R-b
13/13R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/13] drm/msm: move KMS code from msm_drv.c

Currently both msm_drm_init() and msm_drm_uninit() functions are trying to handle both normal and headless Adreno cases. This results in a suboptimal code, since headless case still gets modesetting and atomic interfaces enabled. Two mentioned functions are a spaghetti of `if (priv->kms)' conditional code.

Move all KMS-related code (not limiting the init / teardown path) from msm_drv.c to msm_kms.c, making it more self-contained. This also disables ATOMIC and MODESET features for the headless case.

Dependencies: [1]
[1] https://patchwork.freedesktop.org/series/105392/

Changes since v1:

- Rebased on top of linux-next / updated version of [1]

Dmitry Baryshkov (13):
drm/msm/dsi: switch to devm_drm_bridge_add()
drm/msm/hdmi: switch to devm_drm_bridge_add()
drm/msm/dp: move pdev from struct dp_display_private to struct msm_dp drm/msm/dp: switch to devm_drm_bridge_add()
drm/msm: remove msm_drm_private::bridges field
drm/msm: drop pm ops from the headless msm driver
drm/msm: rename msm_pm_prepare/complete to note the KMS nature drm/msm: remove shutdown callback from msm_platform_driver drm/msm: rename msm_drv_shutdown() to msm_kms_shutdown() drm/msm: switch to drmm_mode_config_init()
drm/msm: only register 'kms' debug file if KMS is used drm/msm: make fb debugfs file available only in KMS case drm/msm: carve out KMS code from msm_drv.c

 drivers/gpu/drm/msm/Makefile             |   1 +
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c  |   6 +-
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c |   6 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c |   6 +-
 drivers/gpu/drm/msm/dp/dp_display.c      |  34 +--
 drivers/gpu/drm/msm/dp/dp_display.h      |   1 +
 drivers/gpu/drm/msm/dp/dp_drm.c          |  21 +-
 drivers/gpu/drm/msm/dp/dp_drm.h          |   2 +-
 drivers/gpu/drm/msm/dsi/dsi.c            |  28 +-
 drivers/gpu/drm/msm/dsi/dsi.h            |   3 +-
 drivers/gpu/drm/msm/dsi/dsi_manager.c    |  30 +-
 drivers/gpu/drm/msm/hdmi/hdmi.c          |  22 +-
 drivers/gpu/drm/msm/hdmi/hdmi.h          |   5 +-
 drivers/gpu/drm/msm/hdmi/hdmi_bridge.c   |  30 +-
 drivers/gpu/drm/msm/hdmi/hdmi_hpd.c      |   3 +-
 drivers/gpu/drm/msm/msm_debugfs.c        |  12 +-
 drivers/gpu/drm/msm/msm_drv.c            | 362 ++---------------------
 drivers/gpu/drm/msm/msm_drv.h            |   9 +-
 drivers/gpu/drm/msm/msm_kms.c            | 345 +++++++++++++++++++++
 drivers/gpu/drm/msm/msm_kms.h            |   3 +
 20 files changed, 451 insertions(+), 478 deletions(-)
 create mode 100644 drivers/gpu/drm/msm/msm_kms.c
Signature · 1 line
2.39.2