summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/gem.h
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-10-04 22:34:01 +0200
committerThierry Reding <treding@nvidia.com>2013-10-31 09:55:46 +0100
commit773af77fc479fd454c3f6836f86bf63996545cf4 (patch)
treea3610dd713a97cf934810079da61b1196e85d95b /drivers/gpu/drm/tegra/gem.h
parentdrm/tegra: Add 3D support (diff)
downloadlinux-773af77fc479fd454c3f6836f86bf63996545cf4.tar.xz
linux-773af77fc479fd454c3f6836f86bf63996545cf4.zip
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 @@
#include <drm/drm.h>
#include <drm/drmP.h>
+#define TEGRA_BO_TILED (1 << 0)
+
struct tegra_bo {
struct drm_gem_object gem;
struct host1x_bo base;
+ unsigned long flags;
dma_addr_t paddr;
void *vaddr;
};
@@ -38,11 +41,13 @@ static inline struct tegra_bo *to_tegra_bo(struct drm_gem_object *gem)
extern const struct host1x_bo_ops tegra_bo_ops;
-struct tegra_bo *tegra_bo_create(struct drm_device *drm, unsigned int size);
+struct tegra_bo *tegra_bo_create(struct drm_device *drm, unsigned int size,
+ unsigned long flags);
struct tegra_bo *tegra_bo_create_with_handle(struct drm_file *file,
- struct drm_device *drm,
- unsigned int size,
- unsigned int *handle);
+ struct drm_device *drm,
+ unsigned int size,
+ unsigned long flags,
+ unsigned int *handle);
void tegra_bo_free_object(struct drm_gem_object *gem);
int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm,
struct drm_mode_create_dumb *args);