mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Akhil P Oommen <akhilpo@oss.qualcomm.com>
To: Rob Clark <robin.clark@oss.qualcomm.com>,
	Sean Paul <sean@poorly.run>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Ulf Hansson <ulfh@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Akisaira <akisaira@outlook.com>,
	Vladyslav Tymoshchuk <tvlad744@gmail.com>,
	Val Packett <val@packett.cool>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Akhil P Oommen <akhilpo@oss.qualcomm.com>,
	Haitao Xu <haitao.xu@oss.qualcomm.com>
Subject: [PATCH v2 0/8] drm/msm: Attach a driver to GMU
Date: Fri, 30 Oct 2026 22:39:21 +0530	[thread overview]
Message-ID: <20261030-gmu-sync-state-fix-v2-0-89d3082d97af@oss.qualcomm.com> (raw)

With the introduction of sync_state in the genpd framework, any consumer
device of GCC and GPUCC which is not bound to a driver will result in
bootup warnings like below:

[   24.362666] gcc-kaanapali 100000.clock-controller: sync_state() pending due to 3d37000.gmu
[   24.371210] gxclkctl-kaanapali 3d64000.clock-controller: sync_state() pending due to 3d37000.gmu
[   24.380268] gpucc-kaanapali 3d90000.clock-controller: sync_state() pending due to 3d37000.gmu

To silence these warnings and also to have a proper state in driver core,
attach a driver to the GMU and set it up as a component device for the drm
master device.

The first few patches are preparatory fixes. And the later patches
introduces a driver for GMU device and a couple of minor refactors.

I have ignored most of the T-b/R-b tags as there is significant code
churn in v2 when compared to v1.

Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
---
Changes in v2:
- Reorder patches to move fixes to the front (Dmitry)
- New patch to remove unused gpu_ops paramer (Dmitry)
- New patch to consolidate msm_gpu_probe into msm_drv_probe
- Drop patch#2 in the v1 series as it doesn't make sense after rebase
- A new patch to pass around DRM private data via devres
- Retrieve GPU data from master's private data during GMU bind
- Move devfreq initialiation post GPU/GMU bind to avoid handling thermal
  mitigation while GMU device is not bound to the driver.
- Ensure GPU is queicent before GMU unbind.
- Link to v1: https://lore.kernel.org/r/20260513-gmu-sync-state-fix-v1-0-6e33e6aa9b4f@oss.qualcomm.com

---
Akhil P Oommen (6):
      drm/msm/adreno: Fix invalid drvdata typecast in adreno_remove()
      drm/msm/adreno/a6xx: Mark cxpd device_link as stateless
      drm/msm: Keep DRM private data separate from GPU drvdata
      drm/msm/adreno: Simplify adreno_probe()
      drm/msm: Always use component model for standalone GPU
      drm/msm: Attach a driver to the GMU

Haitao Xu (2):
      drm/msm: Remove dead gpu_ops parameter from msm_drm_init/uninit
      drm/msm: Consolidate msm_gpu_probe into msm_drv_probe

 drivers/gpu/drm/msm/adreno/a6xx_gmu.c      | 117 +++++++++++++++++++---------
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c      |  19 +----
 drivers/gpu/drm/msm/adreno/a6xx_gpu.h      |   3 -
 drivers/gpu/drm/msm/adreno/adreno_device.c |  40 ++++++----
 drivers/gpu/drm/msm/adreno/adreno_gpu.h    |   2 +
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c    |   8 +-
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c   |   3 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c   |   9 +--
 drivers/gpu/drm/msm/dp/dp_display.c        |   4 +-
 drivers/gpu/drm/msm/dsi/dsi.c              |   4 +-
 drivers/gpu/drm/msm/hdmi/hdmi.c            |   4 +-
 drivers/gpu/drm/msm/msm_drv.c              | 119 +++++++++++++++--------------
 drivers/gpu/drm/msm/msm_drv.h              |   9 ++-
 drivers/gpu/drm/msm/msm_gpu.c              |   3 -
 drivers/gpu/drm/msm/msm_gpu.h              |   1 +
 drivers/gpu/drm/msm/msm_gpu_devfreq.c      |   5 ++
 drivers/gpu/drm/msm/msm_kms.c              |  17 ++---
 17 files changed, 205 insertions(+), 162 deletions(-)
---
base-commit: 5fed66a6fde4dcc6a63ecec6f32e1a331dc4e1a4
change-id: 20260511-gmu-sync-state-fix-bc6b2d809371

Best regards,
-- 
Akhil P Oommen <akhilpo@oss.qualcomm.com>


             reply	other threads:[~2026-10-30 17:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 17:09 Akhil P Oommen [this message]
2026-10-30 17:09 ` [PATCH v2 1/8] drm/msm/adreno: Fix invalid drvdata typecast in adreno_remove() Akhil P Oommen
2026-10-30 17:09 ` [PATCH v2 2/8] drm/msm/adreno/a6xx: Mark cxpd device_link as stateless Akhil P Oommen
2026-10-30 17:09 ` [PATCH v2 3/8] drm/msm: Keep DRM private data separate from GPU drvdata Akhil P Oommen
2026-10-30 17:09 ` [PATCH v2 4/8] drm/msm/adreno: Simplify adreno_probe() Akhil P Oommen
2026-10-30 17:09 ` [PATCH v2 5/8] drm/msm: Always use component model for standalone GPU Akhil P Oommen
2026-10-30 17:09 ` [PATCH v2 6/8] drm/msm: Attach a driver to the GMU Akhil P Oommen
2026-10-30 17:09 ` [PATCH v2 7/8] drm/msm: Remove dead gpu_ops parameter from msm_drm_init/uninit Akhil P Oommen
2026-10-30 17:09 ` [PATCH v2 8/8] drm/msm: Consolidate msm_gpu_probe into msm_drv_probe Akhil P Oommen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261030-gmu-sync-state-fix-v2-0-89d3082d97af@oss.qualcomm.com \
    --to=akhilpo@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=akisaira@outlook.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=haitao.xu@oss.qualcomm.com \
    --cc=jesszhan0024@gmail.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=tvlad744@gmail.com \
    --cc=ulfh@kernel.org \
    --cc=val@packett.cool \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®