Commit Graph

18 Commits

Author SHA1 Message Date
Kamal Agrawal
06ede7c29d kgsl: Update documentation for IOCTL_KGSL_GPUOBJ_ALLOC
For 32 bit MMUs, IOCTL_KGSL_GPUOBJ_ALLOC returns 32-bit virtual
address. For 64-bit MMUs, if KGSL_MEMFLAGS_FORCE_32BIT is not set,
this IOCTL will return 64-bit VA for both 64-bit and compat tasks.
Update the documentation in header file to reflect the same.

Change-Id: I0d5d8f54ed35c0b8f9f6264b708697a136365486
Signed-off-by: Kamal Agrawal <quic_kamaagra@quicinc.com>
2024-06-18 16:49:31 +05:30
Sanjay Yadav
8d89a74a49 kgsl: Fix multiple warnings and errors
To improve code readability address multiple warnings and errors.
Fixed coding style issues such as indentation, spacing, semicolon, etc.

Change-Id: Id0f87f055ae69b92902d181ed61e0cf2fd77e6e2
Signed-off-by: Sanjay Yadav <quic_sanjyada@quicinc.com>
2024-03-14 18:10:29 +05:30
Hareesh Gundu
4de7b3816b msm: kgsl: Add Gen8 support
Add Gen8 support for KGSL code base.

Change-Id: Ic9fcf51cc1fe01e8fad4a04c4a3ef11dd2517869
Signed-off-by: Hareesh Gundu <quic_hareeshg@quicinc.com>
2023-11-02 09:31:48 -07:00
Lynus Vaz
767c1748a9 msm: kgsl: Add a new IOCTL_KGSL_READ_CALIBRATED_TIMESTAMPS ioctl
Add the IOCTL_KGSL_READ_CALIBRATED_TIMESTAMPS ioctl. Userspace can use
this interface to simultaneously sample the GPU timer, MONOTONIC and
MONOTONIC_RAW CPU timers. This interface also returns the maximum deviation
between the samples obtained.

Change-Id: If25eedbc923d76785b2d35b034635362d00d52d8
Signed-off-by: Lynus Vaz <quic_lvaz@quicinc.com>
2023-07-26 09:18:36 -07:00
Sanjay Yadav
8f4980da4f msm: kgsl: Fix miscellaneous comments uapi header file
Some structure names and their fields are inappropriate
in comments of uapi header file. Fix the same as well.

Change-Id: If87f7befc8d25638eed82dc9a5200943aec27dcb
Signed-off-by: Sanjay Yadav <quic_sanjyada@quicinc.com>
2023-04-06 16:39:29 +05:30
Lynus Vaz
50cf0e7420 msm: kgsl: Add a KGSL_MEMFLAGS_VBO_NO_MAP_ZERO flag
Not all VBOs require the zero page mapped. These VBOs can use the
KGSL_MEMFLAGS_VBO_NO_MAP_ZERO flag to reduce time spent on allocate and
bind operations. VBOs that use this flag are mapped only to the ranges
bound to it. So, when binding and cleaning up those VBOs make sure we only
unmap the ranges that were already mapped.

Change-Id: I995db2d94f5e2c58ebdea3c6de1e4bc3df841093
Signed-off-by: Lynus Vaz <quic_lvaz@quicinc.com>
2023-02-22 08:07:06 -08:00
Deepak Kumar
81a5d27ead msm: kgsl: Add properties for secure VA size and usage query
Add properties KGSL_PROP_GPU_SECURE_VA_SIZE and
KGSL_PROP_GPU_SECURE_VA_INUSE for secure VA size
and usage query. This is needed by userspace to
allocate and manage secure heap.

Change-Id: I423857ec7165bcbb5f896b15c0b1a787791d6e64
Signed-off-by: Deepak Kumar <quic_dkumar@quicinc.com>
2023-01-25 23:15:57 +05:30
Hareesh Gundu
a698ebd321 msm: kgsl: Add support for Gen7 AQE
AQE is Application QRISC Engine which runs application code
for Mesh shading and Ray pipeline. The application code is
essentially a scheduler. It looks at SP output and schedules
draws and kernels to run via regular SQE.

Change-Id: I4e5924f4a72655c807fa9b8356d15fee880800dd
Signed-off-by: Hareesh Gundu <quic_hareeshg@quicinc.com>
2023-01-20 01:30:42 -08:00
Lynus Vaz
7a3db9182e msm: kgsl: Add an adreno property to query the UCHE_TRAP_BASE
Add a new KGSL_PROP_UCHE_TRAP_BASE adreno property so that userspace can
query UCHE_TRAP_BASE.

Change-Id: Ib80332f2500d37c07f92eb647f5d35a14f09daa7
Signed-off-by: Lynus Vaz <quic_lvaz@quicinc.com>
2023-01-03 01:22:19 -08:00
Hareesh Gundu
d77eab04c9 msm: kgsl: Get Gen7 HW feature support information
For Gen7 hardware feature support information is available
in a register. Read HW feature support information and update
software feature configuration accordingly. Also add two new
kgsl properties for userspace to query HW feature info
   1) KGSL_PROP_IS_RAYTRACING_ENABLED
   2) KGSL_PROP_IS_FASTBLEND_ENABLED

Change-Id: I7ac395e91f7f8f173717a30c7750064c1f10d13f
Signed-off-by: Hareesh Gundu <quic_hareeshg@quicinc.com>
2023-01-03 01:21:35 -08:00
Kaushal Sanadhya
ff40416c6e msm: kgsl: Add support to query GPU VA size
Add support for querying GPU VA size through IOCTL_KGSL_DEVICE_GETPROPERTY
from userspace. This info can be used by the userspace to allocate buffer
of appropriate size.

Change-Id: Ibbcac033d964a1cb171bc18f8f8df3dff49247c9
Signed-off-by: Kaushal Sanadhya <quic_ksanadhy@quicinc.com>
2022-08-13 01:03:18 +05:30
Urvashi Agrawal
daf30da785 msm: kgsl: Add a property to check for LPAC
Add an Adreno property for LPAC so that userspace can
check if KGSL has LPAC enabled before sending an LPAC
context.

Change-Id: I7a83d2510c2f4e65250bd1bafebce6ff2c97f9a7
Signed-off-by: Urvashi Agrawal <quic_urvaagra@quicinc.com>
2022-07-22 09:59:20 -07:00
Urvashi Agrawal
35da388154 msm: kgsl: Add support for LPAC on hwsched
Make LPAC related changes to support LPAC on
hwsched.

Change-Id: I4316e2e4e36fc79d05d738669d75a67cd6e6a934
Signed-off-by: Urvashi Agrawal <quic_urvaagra@quicinc.com>
Signed-off-by: Kamal Agrawal <quic_kamaagra@quicinc.com>
2022-05-06 19:56:51 +05:30
Hareesh Gundu
cbb6a4ba74 msm: kgsl: Update recurring command ioctl number
IOCTL_KGSL_RECURRING_COMMAND number is conflict with
the IOCTL_KGSL_GET_FAULT_REPORT number. Hence update
recurring command ioctl number to have unique one.

Change-Id: I1fdf18cd6a53d12eb47b468920f1592b06a989ea
Signed-off-by: Hareesh Gundu <quic_hareeshg@quicinc.com>
2022-04-07 11:27:27 -07:00
Hareesh Gundu
32ecd86ca5 msm: kgsl: Add support for IOCTL_KGSL_RECURRING_COMMAND
IOCTL_KGSL_RECURRING_COMMAND will be used in Late Stage
Reprojection (LSR) to submit recurring workload. KMD will
send the recurring command object information to GMU through
HFI message, when KMD receives recurring ioctl with the
KGSL_DRAWOBJ_START_RECURRING flag. Recurring command will be
untracked from GMU when application invokes recurring ioctl
with the KGSL_DRAWOBJ_STOP_RECURRING flag. Overall only one
recurring command will be active and it will be
submitted to GPU upon receiving IPC interrupt from EVA.

Change-Id: If9e81c0ff845bf84ec60b21c40da46c68289280b
Signed-off-by: Hareesh Gundu <quic_hareeshg@quicinc.com>
2022-03-09 05:42:02 -08:00
Mohammed Mirza Mandayappurath Manzoor
6b69f39eab msm: kgsl: Add support for TSE, LRZ, RAZ and HLSQ perfcounters
The select register for TSE, LRZ, RAZ and HLSQ counters are virtualized.
Hence we need to program CP aperture control to route the register write
to correct pipe.

Also, since these registers do not have retention, update the power up
list to include the pipe id so that CP can program its aperture correct.

Change-Id: I7d553b19e81f3ea58bd870efd7fcc1a6bd45a875
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <quic_mmandaya@quicinc.com>
2022-01-04 12:50:32 -08:00
Kamal Agrawal
907f856d4b msm: kgsl: Add GPU fault report
To aid developers in tracking down errors in the application, expose a new
IOCTL to provide GPU fault report.

This will help to retrieve diagnostic information about faults that might
have caused GPU hang. Application developers can use this information to
debug issues.

Faults tracking for a context can be enabled by specifying a flag
(KGSL_CONTEXT_FAULT_INFO) during context creation. Fault report can be
queried with new IOCTL_KGSL_GET_FAULT_REPORT ioctl once the context is
invalidated.

Change-Id: I7372b18f3b235183bc5dd070a7bdf92a0484bacb
Signed-off-by: Kamal Agrawal <quic_kamaagra@quicinc.com>
2022-01-04 12:50:32 -08:00
Lynus Vaz
a38e9d3e98 msm: kgsl: Initial KGSL commit
Snapshot of the Adreno GPU (KGSL) driver from msm-5.10 commit
b809380cd817 (Merge "defconfig: enable new touch NT36XXX_SPI").

Add in the Makefile and other changes required to compile kgsl code
outside the kernel tree.

Change-Id: I63801a9c9ebcd6e2dbd20f023b664caf7255818c
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
2021-08-26 09:55:25 -07:00