summaryrefslogtreecommitdiff
path: root/include/drm-uapi
diff options
context:
space:
mode:
authorIago Toral Quiroga <itoral@igalia.com>2019-09-03 10:31:42 +0200
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>2019-10-18 14:08:52 +0200
commitdb8743923253466b23299708a2060cbf6c715411 (patch)
treeaf6324a4625bed813b9ac003351d581a14dedb80 /include/drm-uapi
parent66e2d3b69fbd0310597913f5099272a033963b5d (diff)
v3d: request the kernel to flush caches when TMU is dirty
This adapts the v3d driver to the new CL submit ioctl interface that allows the driver to request a flush of the caches after the render job has completed. This seems to eliminate the kernel write violation errors reported during CTS and Piglit excutions, fixing some CTS tests and GPU resets along the way. v2: - Adapt to changes in the kernel side. - Disable shader storage and shader images if the kernel doesn't implement cache flushing. Fixes CTS tests: KHR-GLES31.core.shader_image_size.basic-nonMS-fs-float KHR-GLES31.core.shader_image_size.basic-nonMS-fs-int KHR-GLES31.core.shader_image_size.basic-nonMS-fs-uint KHR-GLES31.core.shader_image_size.advanced-nonMS-fs-float KHR-GLES31.core.shader_image_size.advanced-nonMS-fs-int KHR-GLES31.core.shader_image_size.advanced-nonMS-fs-uint KHR-GLES31.core.shader_atomic_counters.advanced-usage-many-draw-calls2 KHR-GLES31.core.shader_atomic_counters.advanced-usage-draw-update-draw KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-int KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-std140-matR KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-std140-struct KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-std430-matC-pad KHR-GLES31.core.shader_storage_buffer_object.advanced-unsizedArrayLength-fs-std430-vec Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'include/drm-uapi')
-rw-r--r--include/drm-uapi/v3d_drm.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/drm-uapi/v3d_drm.h b/include/drm-uapi/v3d_drm.h
index 58fbe48c91e..b8c6f9d9094 100644
--- a/include/drm-uapi/v3d_drm.h
+++ b/include/drm-uapi/v3d_drm.h
@@ -48,6 +48,8 @@ extern "C" {
#define DRM_IOCTL_V3D_SUBMIT_TFU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_TFU, struct drm_v3d_submit_tfu)
#define DRM_IOCTL_V3D_SUBMIT_CSD DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CSD, struct drm_v3d_submit_csd)
+#define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01
+
/**
* struct drm_v3d_submit_cl - ioctl argument for submitting commands to the 3D
* engine.
@@ -124,8 +126,7 @@ struct drm_v3d_submit_cl {
/* Number of BO handles passed in (size is that times 4). */
__u32 bo_handle_count;
- /* Pad, must be zero-filled. */
- __u32 pad;
+ __u32 flags;
};
/**
@@ -193,6 +194,7 @@ enum drm_v3d_param {
DRM_V3D_PARAM_V3D_CORE0_IDENT2,
DRM_V3D_PARAM_SUPPORTS_TFU,
DRM_V3D_PARAM_SUPPORTS_CSD,
+ DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH,
};
struct drm_v3d_get_param {