summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/etnaviv/etnaviv_gem.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2016-01-21 18:20:50 +0300
committerLucas Stach <l.stach@pengutronix.de>2016-03-07 17:37:00 +0300
commitb6325f409959c7e1065ef1537f2e54cf4d7ab465 (patch)
tree11233c042e18eba366b90d28e8832f76972e7d14 /drivers/gpu/drm/etnaviv/etnaviv_gem.h
parent41db12df64ace13c98865340b5c076cdf9a99a93 (diff)
downloadlinux-b6325f409959c7e1065ef1537f2e54cf4d7ab465.tar.xz
drm: etnaviv: clean up vram_mapping submission/retire path
Currently, we scan the list of mappings each time we want to operate on the vram_mapping struct. Rather than repeatedly scanning these, look them up once in the submission path, and then use _reference and _unreference methods as necessary to manage this object. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.h b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
index ab5df8147a5f..22f350b2e824 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.h
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
@@ -102,6 +102,7 @@ struct etnaviv_gem_submit {
struct {
u32 flags;
struct etnaviv_gem_object *obj;
+ struct etnaviv_vram_mapping *mapping;
u32 iova;
} bos[0];
};
@@ -115,4 +116,9 @@ int etnaviv_gem_obj_add(struct drm_device *dev, struct drm_gem_object *obj);
struct page **etnaviv_gem_get_pages(struct etnaviv_gem_object *obj);
void etnaviv_gem_put_pages(struct etnaviv_gem_object *obj);
+struct etnaviv_vram_mapping *etnaviv_gem_mapping_get(
+ struct drm_gem_object *obj, struct etnaviv_gpu *gpu);
+void etnaviv_gem_mapping_reference(struct etnaviv_vram_mapping *mapping);
+void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping);
+
#endif /* __ETNAVIV_GEM_H__ */