Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5da02786 authored by Kasin Li's avatar Kasin Li Committed by Hai Li
Browse files

soc: qcom: hgsl: Add doorbell support to gvm



Used under guest system, it submits GPU tasks into hardware while host
driver is unaware of it.

Hgsl communicates with GPU hardware using either GPU registers or
TCSR compute signaling hardware block.

Change-Id: I881941953ee2340a4c47f10e85e4b0a1dfb87a50
Signed-off-by: default avatarKasin Li <donglil@codeaurora.org>
Signed-off-by: default avatarHai Li <hali@codeaurora.org>
Signed-off-by: default avatarThomas (Wonyoung) Yun <wyun@codeaurora.org>
parent d0e7d3c3
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
Top Control and Status Register(TCSR) for HGSL

TCSR hardware contains compute signal sub-block, which allows drivers in hypervisor
Linux to communicate with GPU hardware directly. This HGSL TCSR driver is to enable
the TCSR compute signal hardware. There are multiple instances of compute signal.
Each instance is either a signal sender or signal receiver.

The HGSL TCSR driver is built on top of generic TCSR driver, refer to
Documentation/devicetree/bindings/mfd/qcom,tcsr.txt for the generic TCSR driver.

Required properties:
- compatible : Must be "qcom,hgsl-tcsr-sender" or "qcom,hgsl-tcsr-receiver"
- syscon     : Point to the generic TCSR compute signal node
- syscon-glb : Point to the generice TCSR node for compute signal global control.
	       This is only needed by signal sender.
- interrupts : Specify IRQ information used by the compute signal.
	       This is only needed by signal receiver.

Examples:
	hgsl_tcsr_sender0: hgsl_tcsr_sender0 {
		compatible = "qcom,hgsl-tcsr-sender";
		syscon = <&tcsr_compute_signal_sender0>;
		syscon-glb = <&tcsr_compute_signal_glb>;
	};

	hgsl_tcsr_receiver0: hgsl_tcsr_receiver0 {
		compatible = "qcom,hgsl-tcsr-receiver";
		syscon = <&tcsr_compute_signal_receiver0>;
		interrupts = <0 238 0>;
	};
+30 −0
Original line number Diff line number Diff line
* HGSL

HGSL(Hypervisor Graphics system layer) is graphics driver under the hypervisor system.

Required properties:
- compatible : Must be "qcom,hgsl"

- reg : physical base address and length of the register set(s).

- reg-names : names corresponding to each reg property value.
	      reg_hwver: HW version registers
	      reg_doorbell_idx: address of GMUAO_DOORBELL_IDX

Optional properties:
- qcom,glb-db-senders : Point to possible nodes of HGSL TCSR sender. The user will select
		        which sender to use. The driver will use TCSR compute signal to
		        send signal to GPU.
- qcom,glb-db-receivers : Point to possible nodes of HGSL TCSR receiver. The user will
			  select which receiver to use. The driver will use TCSR compute
			  signal to receive signal from GPU.

Example:
	msm_gpu_hyp {
		compatible = "qcom,hgsl";
		reg = <0x2c00000 0x8>, <0x2c8f000 0x4>;
		reg-names = "hgsl_reg_hwinf", "hgsl_reg_gmucx";

		qcom,glb-db-senders = <&hgsl_tcsr_sender0 &hgsl_tcsr_sender1>;
		qcom,glb-db-receivers = <&hgsl_tcsr_receiver0 &hgsl_tcsr_receiver1>;
	};
+1 −0
Original line number Diff line number Diff line
@@ -886,6 +886,7 @@ endif # MSM_PM || MSM_PM_LEGACY
source "drivers/soc/qcom/memshare/Kconfig"
source "drivers/soc/qcom/hab/Kconfig"
source "drivers/soc/qcom/rmnet_ctl/Kconfig"
source "drivers/soc/qcom/hgsl/Kconfig"

config MSM_PERFORMANCE
	tristate "msm performance driver to support userspace fmin/fmax request"
+1 −0
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ obj-$(CONFIG_QCOM_CDSP_RM) += cdsprm.o
obj-$(CONFIG_QCOM_CX_IPEAK) += cx_ipeak.o
obj-$(CONFIG_QCOM_AOP_DDR_MESSAGING) += aop_ddr_msgs.o
obj-$(CONFIG_MSM_HAB) += hab/
obj-$(CONFIG_QCOM_HGSL) += hgsl/
obj-$(CONFIG_QCOM_HYP_CORE_CTL) += hyp_core_ctl.o
obj-$(CONFIG_QCOM_AOP_DDRSS_COMMANDS) += aop_ddrss_cmds.o
obj-$(CONFIG_RMNET_CTL) += rmnet_ctl/
+21 −0
Original line number Diff line number Diff line
#
# Hypervisor graphics system layer configuration
#
config QCOM_HGSL_TCSR_SIGNAL
	bool "TCSR signal for Hypervisor GSL"
	depends on MFD_SYSCON
	help
	  The TCSR compute signal module provides hgsl driver
	  in hypervisor Linux a way to send/receive signals
	  to/from A6x GPU hardware directly, without going
	  through host system.

config QCOM_HGSL
	bool "Graphics driver for Hypervisor"
	depends on QTI_GVM
	depends on QCOM_HGSL_TCSR_SIGNAL
	help
	  This driver could help commands submmitting functions for
	  hypervisor Linux. With HFI feature provided by A6x, it
	  could submit commands directly to hardware without passing
	  them to host system.
Loading