summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4/vc4_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_drv.h')
-rw-r--r--drivers/gpu/drm/vc4/vc4_drv.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
index 09134809bf15..dae325a3854d 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.h
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
@@ -218,6 +218,11 @@ struct vc4_dev {
struct {
struct timer_list timer;
struct work_struct reset_work;
+
+ /* The instruction and uniforms caches were cleared at the
+ * last check that found no progress.
+ */
+ bool caches_cleared;
} hangcheck;
struct drm_modeset_lock ctm_state_lock;
@@ -255,6 +260,9 @@ struct vc4_bo {
*/
struct vc4_validated_shader_info *validated_shader;
+ /* Byte offset of the shader code in the BO. */
+ u32 shader_offset;
+
/* One of enum vc4_kernel_bo_type, or VC4_BO_TYPE_COUNT + i
* for user-allocated labels.
*/
@@ -596,6 +604,12 @@ struct vc4_crtc {
* access to that value.
*/
unsigned int current_hvs_channel;
+
+ /**
+ * @async_flip_wq: Ordered workqueue completing the CRTC's async
+ * page flips.
+ */
+ struct workqueue_struct *async_flip_wq;
};
#define to_vc4_crtc(_crtc) \
@@ -796,6 +810,11 @@ struct vc4_file {
struct xarray perfmons;
bool bin_bo_used;
+
+ /* Counter picking the start offset of the next shader BO's code,
+ * see vc4_create_shader_bo_ioctl().
+ */
+ atomic_t shader_offset_idx;
};
static inline struct vc4_exec_info *
@@ -1083,7 +1102,7 @@ bool vc4_check_tex_size(struct vc4_exec_info *exec,
/* vc4_validate_shader.c */
struct vc4_validated_shader_info *
-vc4_validate_shader(struct drm_gem_dma_object *shader_obj);
+vc4_validate_shader(struct drm_gem_dma_object *shader_obj, u32 offset);
/* vc4_perfmon.c */
void vc4_perfmon_get(struct vc4_perfmon *perfmon);