aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-06-27 10:02:51 -0400
committerLucas Stach <l.stach@pengutronix.de>2017-06-28 04:35:46 -0400
commitf4a4381ba4944603905167d044d865990356ba22 (patch)
treede20643711176489e23c3277a3722ec51fe5cd8f
parent657314b7a5d16961e7e0ecdae4a59d28123e74c0 (diff)
drm/etnaviv: fix submit flags getting overwritten by BO content
The addition of the flags member to etnaviv_gem_submit structure didn't take into account that the last member of this structure is a variable length array. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.h b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
index c4a091e87426..e437fba1209d 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.h
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
@@ -106,9 +106,10 @@ struct etnaviv_gem_submit {
106 struct etnaviv_gpu *gpu; 106 struct etnaviv_gpu *gpu;
107 struct ww_acquire_ctx ticket; 107 struct ww_acquire_ctx ticket;
108 struct dma_fence *fence; 108 struct dma_fence *fence;
109 u32 flags;
109 unsigned int nr_bos; 110 unsigned int nr_bos;
110 struct etnaviv_gem_submit_bo bos[0]; 111 struct etnaviv_gem_submit_bo bos[0];
111 u32 flags; 112 /* No new members here, the previous one is variable-length! */
112}; 113};
113 114
114int etnaviv_gem_wait_bo(struct etnaviv_gpu *gpu, struct drm_gem_object *obj, 115int etnaviv_gem_wait_bo(struct etnaviv_gpu *gpu, struct drm_gem_object *obj,