OSDN Git Service

minigbm: Remove (c) from copyright notice.
[android-x86/external-minigbm.git] / tegra.c
diff --git a/tegra.c b/tegra.c
index 513229c..b3e362a 100644 (file)
--- a/tegra.c
+++ b/tegra.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
+ * Copyright 2014 The Chromium OS Authors. All rights reserved.
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
@@ -35,13 +35,13 @@ enum nv_mem_kind
 
 static struct supported_combination combos[4] = {
        {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE,
-               DRV_BO_USE_CURSOR | DRV_BO_USE_LINEAR | DRV_BO_USE_SW_READ_OFTEN | DRV_BO_USE_SW_WRITE_OFTEN},
+               BO_USE_CURSOR | BO_USE_LINEAR | BO_USE_SW_READ_OFTEN | BO_USE_SW_WRITE_OFTEN},
        {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE,
-               DRV_BO_USE_RENDERING | DRV_BO_USE_SW_READ_RARELY | DRV_BO_USE_SW_WRITE_RARELY},
+               BO_USE_RENDERING | BO_USE_SW_READ_RARELY | BO_USE_SW_WRITE_RARELY},
        {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE,
-               DRV_BO_USE_CURSOR | DRV_BO_USE_LINEAR | DRV_BO_USE_SW_READ_OFTEN | DRV_BO_USE_SW_WRITE_OFTEN},
+               BO_USE_CURSOR | BO_USE_LINEAR | BO_USE_SW_READ_OFTEN | BO_USE_SW_WRITE_OFTEN},
        {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE,
-               DRV_BO_USE_RENDERING | DRV_BO_USE_SW_READ_RARELY | DRV_BO_USE_SW_WRITE_RARELY},
+               BO_USE_RENDERING | BO_USE_SW_READ_RARELY | BO_USE_SW_WRITE_RARELY},
 };
 
 static int compute_block_height_log2(int height)
@@ -94,7 +94,7 @@ static void compute_layout_blocklinear(int width, int height, int format,
 static void compute_layout_linear(int width, int height, int format,
                                  uint32_t *stride, uint32_t *size)
 {
-       *stride = drv_stride_from_format(format, width, 0);
+       *stride = ALIGN(drv_stride_from_format(format, width, 0), 64);
        *size = *stride * height;
 }
 
@@ -112,7 +112,7 @@ static int tegra_bo_create(struct bo *bo, uint32_t width, uint32_t height,
        struct drm_tegra_gem_create gem_create;
        int ret;
 
-       if (flags & DRV_BO_USE_RENDERING)
+       if (flags & BO_USE_RENDERING)
                compute_layout_blocklinear(width, height, format, &kind,
                                           &block_height_log2, &stride, &size);
        else