aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/gem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/tegra/gem.c')
-rw-r--r--drivers/gpu/drm/tegra/gem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index 78cc8143760a..ce023fa3e8ae 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -16,6 +16,7 @@
16#include <linux/dma-buf.h> 16#include <linux/dma-buf.h>
17#include <drm/tegra_drm.h> 17#include <drm/tegra_drm.h>
18 18
19#include "drm.h"
19#include "gem.h" 20#include "gem.h"
20 21
21static inline struct tegra_bo *host1x_to_tegra_bo(struct host1x_bo *bo) 22static inline struct tegra_bo *host1x_to_tegra_bo(struct host1x_bo *bo)
@@ -126,7 +127,7 @@ struct tegra_bo *tegra_bo_create(struct drm_device *drm, unsigned int size,
126 goto err_mmap; 127 goto err_mmap;
127 128
128 if (flags & DRM_TEGRA_GEM_CREATE_TILED) 129 if (flags & DRM_TEGRA_GEM_CREATE_TILED)
129 bo->flags |= TEGRA_BO_TILED; 130 bo->tiling.mode = TEGRA_BO_TILING_MODE_TILED;
130 131
131 if (flags & DRM_TEGRA_GEM_CREATE_BOTTOM_UP) 132 if (flags & DRM_TEGRA_GEM_CREATE_BOTTOM_UP)
132 bo->flags |= TEGRA_BO_BOTTOM_UP; 133 bo->flags |= TEGRA_BO_BOTTOM_UP;
@@ -259,8 +260,10 @@ int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm,
259 struct drm_mode_create_dumb *args) 260 struct drm_mode_create_dumb *args)
260{ 261{
261 int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); 262 int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8);
263 struct tegra_drm *tegra = drm->dev_private;
262 struct tegra_bo *bo; 264 struct tegra_bo *bo;
263 265
266 min_pitch = round_up(min_pitch, tegra->pitch_align);
264 if (args->pitch < min_pitch) 267 if (args->pitch < min_pitch)
265 args->pitch = min_pitch; 268 args->pitch = min_pitch;
266 269