devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] drm/msm: Support a750 "software fuse" for raytracing
@ 2024-04-26 18:33 Connor Abbott
  2024-04-26 18:33 ` [PATCH v2 1/6] arm64: dts: qcom: sm8650: Fix GPU cx_mem size Connor Abbott
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Connor Abbott @ 2024-04-26 18:33 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Neil Armstrong, Jun Nie, Rob Clark, Abhinav Kumar,
	Dmitry Baryshkov, Sean Paul, Marijn Suijten
  Cc: linux-arm-msm, devicetree, freedreno, Connor Abbott

On a750, Qualcomm decided to gate support for certain features behind a
"software fuse." This consists of a register in the cx_mem zone, which
is normally only writeable by the TrustZone firmware.  On bootup it is
0, and we must call an SCM method to initialize it. Then we communicate
its value to userspace. This implements all of this, copying the SCM
call from the downstream kernel and kgsl.

So far the only optional feature we use is ray tracing (i.e. the
"ray_intersection" instruction) in a pending Mesa MR [1], so that's what
we expose to userspace. There's one extra patch to write some missing
registers, which depends on the register XML bump but is otherwise
unrelated, I just included it to make things easier on myself.

Note, 'drm/msm/a7xx: Initialize a750 "software fuse"' has a compile-time
dependency on 'firmware: qcom_scm: Add gpu_init_regs call' and it
depends on 'arm64: dts: qcom: sm8650: Fix GPU cx_mem size' to avoid a
boot-time hang. The commit the latter fixes, db33633b05c0 ("arm64: dts:
qcom: sm8650: add GPU nodes"), hasn't landed upstream yet, so we can
avoid regressions by merging it first. I think the rest of the series
can go through drm/msm for 6.10 after we land the first commit in the
same tree as db33633b05c0 to make sure linux-next is never broken,
although we'll need Bjorn's ack to land 'firmware: qcom_scm: Add
gpu_init_regs call' through drm/msm.

v2: - Refactor a7xx_init_cx_mem() into a750-specific and a740/a730 paths.

[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28447

Connor Abbott (6):
  arm64: dts: qcom: sm8650: Fix GPU cx_mem size
  firmware: qcom_scm: Add gpu_init_regs call
  drm/msm: Update a6xx registers
  drm/msm/a7xx: Initialize a750 "software fuse"
  drm/msm: Add MSM_PARAM_RAYTRACING uapi
  drm/msm/a7xx: Add missing register writes from downstream

 arch/arm64/boot/dts/qcom/sm8650.dtsi          |  2 +-
 drivers/firmware/qcom/qcom_scm.c              | 14 +++
 drivers/firmware/qcom/qcom_scm.h              |  3 +
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c         | 97 ++++++++++++++++++-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c       |  3 +
 drivers/gpu/drm/msm/adreno/adreno_gpu.h       |  2 +
 drivers/gpu/drm/msm/registers/adreno/a6xx.xml | 28 +++++-
 include/linux/firmware/qcom/qcom_scm.h        | 23 +++++
 include/uapi/drm/msm_drm.h                    |  1 +
 9 files changed, 168 insertions(+), 5 deletions(-)

--
2.31.1

---
Connor Abbott (6):
      arm64: dts: qcom: sm8650: Fix GPU cx_mem size
      firmware: qcom_scm: Add gpu_init_regs call
      drm/msm: Update a6xx registers
      drm/msm/a7xx: Initialize a750 "software fuse"
      drm/msm: Add MSM_PARAM_RAYTRACING uapi
      drm/msm/a7xx: Add missing register writes from downstream

 arch/arm64/boot/dts/qcom/sm8650.dtsi          |  2 +-
 drivers/firmware/qcom/qcom_scm.c              | 14 ++++
 drivers/firmware/qcom/qcom_scm.h              |  3 +
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c         | 96 ++++++++++++++++++++++++++-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c       |  3 +
 drivers/gpu/drm/msm/adreno/adreno_gpu.h       |  2 +
 drivers/gpu/drm/msm/registers/adreno/a6xx.xml | 28 +++++++-
 include/linux/firmware/qcom/qcom_scm.h        | 23 +++++++
 include/uapi/drm/msm_drm.h                    |  1 +
 9 files changed, 167 insertions(+), 5 deletions(-)
---
base-commit: 7e6b8924568d1aa476b77323df8d2bdd31bd7257
change-id: 20240426-a750-raytracing-dee7a526513b

Best regards,
-- 
Connor Abbott <cwabbott0@gmail.com>


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-05-02  8:03 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26 18:33 [PATCH v2 0/6] drm/msm: Support a750 "software fuse" for raytracing Connor Abbott
2024-04-26 18:33 ` [PATCH v2 1/6] arm64: dts: qcom: sm8650: Fix GPU cx_mem size Connor Abbott
2024-04-26 18:36   ` Dmitry Baryshkov
2024-04-27 12:04   ` Konrad Dybcio
2024-05-02  8:03   ` Neil Armstrong
2024-04-26 18:34 ` [PATCH v2 2/6] firmware: qcom_scm: Add gpu_init_regs call Connor Abbott
2024-04-26 18:38   ` Dmitry Baryshkov
2024-04-27 12:07   ` Konrad Dybcio
2024-04-26 18:34 ` [PATCH v2 3/6] drm/msm: Update a6xx registers Connor Abbott
2024-04-26 18:38   ` Dmitry Baryshkov
2024-04-26 18:34 ` [PATCH v2 4/6] drm/msm/a7xx: Initialize a750 "software fuse" Connor Abbott
2024-04-26 18:44   ` Dmitry Baryshkov
2024-04-27 12:19   ` Konrad Dybcio
2024-04-30 10:31     ` Connor Abbott
2024-04-26 18:34 ` [PATCH v2 5/6] drm/msm: Add MSM_PARAM_RAYTRACING uapi Connor Abbott
2024-04-26 18:44   ` Dmitry Baryshkov
2024-04-27 12:20   ` Konrad Dybcio
2024-04-26 18:34 ` [PATCH v2 6/6] drm/msm/a7xx: Add missing register writes from downstream Connor Abbott
2024-04-27 12:23   ` Konrad Dybcio
2024-05-01 20:20 ` (subset) [PATCH v2 0/6] drm/msm: Support a750 "software fuse" for raytracing Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).