aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/gem.h
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-10-04 16:34:01 -0400
committerThierry Reding <treding@nvidia.com>2013-10-31 04:55:46 -0400
commit773af77fc479fd454c3f6836f86bf63996545cf4 (patch)
treea3610dd713a97cf934810079da61b1196e85d95b /drivers/gpu/drm/tegra/gem.h
parent5f60ed0d840d53e9d65aa54e1a5365af8ce2769e (diff)
drm/tegra: Add support for tiled buffer objects
The gr2d and gr3d engines work more efficiently on buffers with a tiled memory layout. Allow created buffers to be marked as tiled so that the display controller can scan them out properly. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/gem.h')
-rw-r--r--drivers/gpu/drm/tegra/gem.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tegra/gem.h b/drivers/gpu/drm/tegra/gem.h
index 2b54f1425d5e..c4993fc2c3bd 100644
--- a/drivers/gpu/drm/tegra/gem.h
+++ b/drivers/gpu/drm/tegra/gem.h
@@ -24,9 +24,12 @@
24#include <drm/drm.h> 24#include <drm/drm.h>
25#include <drm/drmP.h> 25#include <drm/drmP.h>
26 26
27#define TEGRA_BO_TILED (1 << 0)
28
27struct tegra_bo { 29struct tegra_bo {
28 struct drm_gem_object gem; 30 struct drm_gem_object gem;
29 struct host1x_bo base; 31 struct host1x_bo base;
32 unsigned long flags;
30 dma_addr_t paddr; 33 dma_addr_t paddr;
31 void *vaddr; 34 void *vaddr;
32}; 35};
@@ -38,11 +41,13 @@ static inline struct tegra_bo *to_tegra_bo(struct drm_gem_object *gem)
38 41
39extern const struct host1x_bo_ops tegra_bo_ops; 42extern const struct host1x_bo_ops tegra_bo_ops;
40 43
41struct tegra_bo *tegra_bo_create(struct drm_device *drm, unsigned int size); 44struct tegra_bo *tegra_bo_create(struct drm_device *drm, unsigned int size,
45 unsigned long flags);
42struct tegra_bo *tegra_bo_create_with_handle(struct drm_file *file, 46struct tegra_bo *tegra_bo_create_with_handle(struct drm_file *file,
43 struct drm_device *drm, 47 struct drm_device *drm,
44 unsigned int size, 48 unsigned int size,
45 unsigned int *handle); 49 unsigned long flags,
50 unsigned int *handle);
46void tegra_bo_free_object(struct drm_gem_object *gem); 51void tegra_bo_free_object(struct drm_gem_object *gem);
47int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm, 52int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm,
48 struct drm_mode_create_dumb *args); 53 struct drm_mode_create_dumb *args);