drm/xe: Implement HW workaround 14016763929
To workaround a HW bug on DG2, driver is required to map the whole ppgtt virtual address space before GPU workload submission. Thus set the XE_VM_FLAG_SCRATCH_PAGE flag during vm create so the whole address space is mapped to point to scratch page. v1: - Move the workaround implementation from xe_vm_create to xe_vm_create_ioctl - Brian - Reorder error checking in xe_vm_create_ioctl - Jose - Implement WA only for DG2-G10 and DG2-G12 Signed-off-by: Oak Zeng <oak.zeng@intel.com> Reviewed-by: Brian Welty <brian.welty@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
de4651d6dd
commit
7f6c6e5085
drivers/gpu/drm/xe
@ -40,7 +40,7 @@ quiet_cmd_wa_oob = GEN $(notdir $(generated_oob))
|
||||
$(generated_oob) &: $(obj)/xe_gen_wa_oob $(srctree)/$(src)/xe_wa_oob.rules
|
||||
$(call cmd,wa_oob)
|
||||
|
||||
$(obj)/xe_guc.o $(obj)/xe_wa.o $(obj)/xe_ring_ops.o: $(generated_oob)
|
||||
$(obj)/xe_guc.o $(obj)/xe_wa.o $(obj)/xe_ring_ops.o $(obj)/xe_vm.o: $(generated_oob)
|
||||
|
||||
# Please keep these build lists sorted!
|
||||
|
||||
|
@ -29,6 +29,8 @@
|
||||
#include "xe_res_cursor.h"
|
||||
#include "xe_sync.h"
|
||||
#include "xe_trace.h"
|
||||
#include "generated/xe_wa_oob.h"
|
||||
#include "xe_wa.h"
|
||||
|
||||
#define TEST_VM_ASYNC_OPS_ERROR
|
||||
|
||||
@ -1979,6 +1981,13 @@ int xe_vm_create_ioctl(struct drm_device *dev, void *data,
|
||||
int err;
|
||||
u32 flags = 0;
|
||||
|
||||
if (XE_WA(xe_root_mmio_gt(xe), 14016763929))
|
||||
args->flags |= DRM_XE_VM_CREATE_SCRATCH_PAGE;
|
||||
|
||||
if (XE_IOCTL_DBG(xe, args->flags & DRM_XE_VM_CREATE_FAULT_MODE &&
|
||||
!xe->info.supports_usm))
|
||||
return -EINVAL;
|
||||
|
||||
if (XE_IOCTL_DBG(xe, args->reserved[0] || args->reserved[1]))
|
||||
return -EINVAL;
|
||||
|
||||
@ -2001,10 +2010,6 @@ int xe_vm_create_ioctl(struct drm_device *dev, void *data,
|
||||
xe_device_in_fault_mode(xe)))
|
||||
return -EINVAL;
|
||||
|
||||
if (XE_IOCTL_DBG(xe, args->flags & DRM_XE_VM_CREATE_FAULT_MODE &&
|
||||
!xe->info.supports_usm))
|
||||
return -EINVAL;
|
||||
|
||||
if (args->flags & DRM_XE_VM_CREATE_SCRATCH_PAGE)
|
||||
flags |= XE_VM_FLAG_SCRATCH_PAGE;
|
||||
if (args->flags & DRM_XE_VM_CREATE_COMPUTE_MODE)
|
||||
|
@ -15,3 +15,5 @@
|
||||
18020744125 PLATFORM(PVC)
|
||||
1509372804 PLATFORM(PVC), GRAPHICS_STEP(A0, C0)
|
||||
1409600907 GRAPHICS_VERSION_RANGE(1200, 1250)
|
||||
14016763929 SUBPLATFORM(DG2, G10)
|
||||
SUBPLATFORM(DG2, G12)
|
||||
|
Loading…
x
Reference in New Issue
Block a user