diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-01-21 15:20:55 +0000 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2016-03-07 15:37:01 +0100 |
commit | 8779aa8f8b7fa397a0abe9e6af3334ea41e15836 (patch) | |
tree | dee6d6d72cc751324eff34863b73fdac762d60b8 /drivers/gpu/drm/etnaviv/etnaviv_gem.h | |
parent | b6325f409959c7e1065ef1537f2e54cf4d7ab465 (diff) |
drm: etnaviv: clean up submit_bo()
As we now store the etnaviv_vram_mapping, we no longer need to store
the iova itself: we can get this directly from the mapping structure.
Arrange for submit_bo() to return a pointer to etnaviv_gem_submit_bo,
and directly access mapping->iova when applying relocations.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_gem.h')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gem.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.h b/drivers/gpu/drm/etnaviv/etnaviv_gem.h index 22f350b2e824..02665d8c10ee 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.h @@ -88,6 +88,12 @@ static inline bool is_active(struct etnaviv_gem_object *etnaviv_obj) #define MAX_CMDS 4 +struct etnaviv_gem_submit_bo { + u32 flags; + struct etnaviv_gem_object *obj; + struct etnaviv_vram_mapping *mapping; +}; + /* Created per submit-ioctl, to track bo's and cmdstream bufs, etc, * associated with the cmdstream submission for synchronization (and * make it easier to unwind when things go wrong, etc). This only @@ -99,12 +105,7 @@ struct etnaviv_gem_submit { struct ww_acquire_ctx ticket; u32 fence; unsigned int nr_bos; - struct { - u32 flags; - struct etnaviv_gem_object *obj; - struct etnaviv_vram_mapping *mapping; - u32 iova; - } bos[0]; + struct etnaviv_gem_submit_bo bos[0]; }; int etnaviv_gem_wait_bo(struct etnaviv_gpu *gpu, struct drm_gem_object *obj, |