feat: update gpu to Linux_SDK_V1.2.1

This version update involves a lot of content, so the previous version
has been deleted and the new version has been re-merged into the kernel.

The configuration file for the GPU driver originates from a previous
version.

Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
This commit is contained in:
Mingzheng Xing
2023-08-30 21:19:50 +08:00
committed by Han Gao
parent 807db9d981
commit f72e7cd077
250 changed files with 10635 additions and 7697 deletions

View File

@@ -58,7 +58,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
#define PVRSRV_MEMALLOCFLAGS_FMTSPEC IMG_UINT64_FMTSPECx
#if defined(__KERNEL__) || defined(SERVICES_SC)
#if defined(__KERNEL__)
#include "pvrsrv_memallocflags_internal.h"
#endif /* __KERNEL__ */
@@ -538,7 +538,7 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
/*!
Indicates the particular memory that's being allocated is sparse and the
sparse regions should not be backed by dummy page
*/
*/
#define PVRSRV_MEMALLOCFLAG_SPARSE_NO_DUMMY_BACKING (1ULL << 18)
/*!
@@ -549,9 +549,12 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
#define PVRSRV_IS_SPARSE_DUMMY_BACKING_REQUIRED(uiFlags) (((uiFlags) & PVRSRV_MEMALLOCFLAG_SPARSE_NO_DUMMY_BACKING) == 0U)
/*!
Services is going to clean the cache for the allocated memory.
For performance reasons avoid usage if allocation is written to by the
CPU anyway before the next GPU kick.
Used to force Services to carry out at least one CPU cache invalidate on a
CPU cached buffer during allocation of the memory. Applicable to incoherent
systems, it must be used for buffers which are CPU cached and which will not
be 100% written to by the CPU before the GPU accesses it. For performance
reasons, avoid usage if the whole buffer that is allocated is written to by
the CPU anyway before the next GPU kick, or if the system is coherent.
*/
#define PVRSRV_MEMALLOCFLAG_CPU_CACHE_CLEAN (1ULL<<19)
@@ -570,7 +573,7 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
by zero page at the time of mapping.
The zero backed page is always with read only attribute irrespective of its
original attributes.
*/
*/
#define PVRSRV_MEMALLOCFLAG_SPARSE_ZERO_BACKING (1ULL << 20)
#define PVRSRV_IS_SPARSE_ZERO_BACKING_REQUIRED(uiFlags) (((uiFlags) & \
PVRSRV_MEMALLOCFLAG_SPARSE_ZERO_BACKING) == PVRSRV_MEMALLOCFLAG_SPARSE_ZERO_BACKING)
@@ -650,8 +653,10 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
*/
#define PVRSRV_CHECK_POISON_ON_ALLOC(uiFlags) (((uiFlags) & PVRSRV_MEMALLOCFLAG_POISON_ON_ALLOC) != 0U)
#if defined(DEBUG) || defined(SERVICES_SC)
/*!
Causes memory to be trashed when freed, as a lazy man's security measure.
Causes memory to be trashed when freed, used when debugging only, not to be used
as a security measure.
*/
#define PVRSRV_MEMALLOCFLAG_POISON_ON_FREE (1ULL<<29)
@@ -661,6 +666,7 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
@Return True if the flag is set, false otherwise
*/
#define PVRSRV_CHECK_POISON_ON_FREE(uiFlags) (((uiFlags) & PVRSRV_MEMALLOCFLAG_POISON_ON_FREE) != 0U)
#endif /* DEBUG */
/*!
Avoid address alignment to a CPU or GPU cache line size.
@@ -822,20 +828,27 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
* Trusted device mask -- Flags in the mask are allowed for trusted device
* because the driver cannot access the memory
*/
#if defined(DEBUG) || defined(SERVICES_SC)
#define PVRSRV_MEMALLOCFLAGS_TDFWMASK ~(PVRSRV_MEMALLOCFLAG_KERNEL_CPU_MAPPABLE | \
PVRSRV_MEMALLOCFLAG_ZERO_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_POISON_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_POISON_ON_FREE | \
PVRSRV_MEMALLOCFLAG_POISON_ON_FREE | \
PVRSRV_MEMALLOCFLAGS_CPU_MMUFLAGSMASK | \
PVRSRV_MEMALLOCFLAG_SPARSE_NO_DUMMY_BACKING)
#else
#define PVRSRV_MEMALLOCFLAGS_TDFWMASK ~(PVRSRV_MEMALLOCFLAG_KERNEL_CPU_MAPPABLE | \
PVRSRV_MEMALLOCFLAG_ZERO_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_POISON_ON_ALLOC | \
PVRSRV_MEMALLOCFLAGS_CPU_MMUFLAGSMASK | \
PVRSRV_MEMALLOCFLAG_SPARSE_NO_DUMMY_BACKING)
#endif
/*!
PMR flags mask -- for internal services use only. This is the set of flags
that will be passed down and stored with the PMR, this also includes the
MMU flags which the PMR has to pass down to mm_common.c at PMRMap time.
*/
#if defined(DEBUG) || defined(SERVICES_SC)
#define PVRSRV_MEMALLOCFLAGS_PMRFLAGSMASK (PVRSRV_MEMALLOCFLAG_DEVICE_FLAGS_MASK | \
PVRSRV_MEMALLOCFLAG_CPU_CACHE_CLEAN | \
PVRSRV_MEMALLOCFLAG_KERNEL_CPU_MAPPABLE | \
@@ -848,8 +861,23 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
PVRSRV_MEMALLOCFLAG_NO_OSPAGES_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_SPARSE_NO_DUMMY_BACKING | \
PVRSRV_MEMALLOCFLAG_SPARSE_ZERO_BACKING | \
PVRSRV_MEMALLOCFLAG_VAL_SHARED_BUFFER | \
PVRSRV_MEMALLOCFLAG_VAL_SHARED_BUFFER | \
PVRSRV_PHYS_HEAP_HINT_MASK)
#else
#define PVRSRV_MEMALLOCFLAGS_PMRFLAGSMASK (PVRSRV_MEMALLOCFLAG_DEVICE_FLAGS_MASK | \
PVRSRV_MEMALLOCFLAG_CPU_CACHE_CLEAN | \
PVRSRV_MEMALLOCFLAG_KERNEL_CPU_MAPPABLE | \
PVRSRV_MEMALLOCFLAG_ZERO_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_SVM_ALLOC | \
PVRSRV_MEMALLOCFLAG_POISON_ON_ALLOC | \
PVRSRV_MEMALLOCFLAGS_GPU_MMUFLAGSMASK | \
PVRSRV_MEMALLOCFLAGS_CPU_MMUFLAGSMASK | \
PVRSRV_MEMALLOCFLAG_NO_OSPAGES_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_SPARSE_NO_DUMMY_BACKING | \
PVRSRV_MEMALLOCFLAG_SPARSE_ZERO_BACKING | \
PVRSRV_MEMALLOCFLAG_VAL_SHARED_BUFFER | \
PVRSRV_PHYS_HEAP_HINT_MASK)
#endif
/*!
* CPU mappable mask -- Any flag set in the mask requires memory to be CPU mappable
@@ -874,11 +902,18 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
memory might be reused.
*/
#if defined(DEBUG) || defined(SERVICES_SC)
#define PVRSRV_MEMALLOCFLAGS_RA_DIFFERENTIATION_MASK (PVRSRV_MEMALLOCFLAGS_PMRFLAGSMASK \
& \
~(PVRSRV_MEMALLOCFLAG_ZERO_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_POISON_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_POISON_ON_FREE))
#else
#define PVRSRV_MEMALLOCFLAGS_RA_DIFFERENTIATION_MASK (PVRSRV_MEMALLOCFLAGS_PMRFLAGSMASK \
& \
~(PVRSRV_MEMALLOCFLAG_ZERO_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_POISON_ON_ALLOC))
#endif
/*!
Flags that affect _allocation_
*/
@@ -903,6 +938,7 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
/*!
Flags that affect _physical allocations_ in the DevMemX API
*/
#if defined(DEBUG) || defined(SERVICES_SC)
#define PVRSRV_MEMALLOCFLAGS_DEVMEMX_PHYSICAL_MASK (PVRSRV_MEMALLOCFLAGS_CPU_MMUFLAGSMASK | \
PVRSRV_MEMALLOCFLAG_GPU_CACHE_MODE_MASK | \
PVRSRV_MEMALLOCFLAG_CPU_READ_PERMITTED | \
@@ -912,6 +948,16 @@ typedef IMG_UINT64 PVRSRV_MEMALLOCFLAGS_T;
PVRSRV_MEMALLOCFLAG_POISON_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_POISON_ON_FREE | \
PVRSRV_PHYS_HEAP_HINT_MASK)
#else
#define PVRSRV_MEMALLOCFLAGS_DEVMEMX_PHYSICAL_MASK (PVRSRV_MEMALLOCFLAGS_CPU_MMUFLAGSMASK | \
PVRSRV_MEMALLOCFLAG_GPU_CACHE_MODE_MASK | \
PVRSRV_MEMALLOCFLAG_CPU_READ_PERMITTED | \
PVRSRV_MEMALLOCFLAG_CPU_WRITE_PERMITTED | \
PVRSRV_MEMALLOCFLAG_CPU_CACHE_CLEAN | \
PVRSRV_MEMALLOCFLAG_ZERO_ON_ALLOC | \
PVRSRV_MEMALLOCFLAG_POISON_ON_ALLOC | \
PVRSRV_PHYS_HEAP_HINT_MASK)
#endif
/*!
Flags that affect _virtual allocations_ in the DevMemX API