summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChanho Park <chanho61.park@samsung.com>2014-01-13 15:48:02 +0900
committerChanho Park <chanho61.park@samsung.com>2014-04-16 21:47:09 +0900
commitfbd33644a71e1a8eb3461724a32e1ceae0bfd5ec (patch)
tree47093dc2e0feaf91e5badd2fc3ee89f81747b73e
parent63350606dc129d42d744681af3a72a66481950e4 (diff)
downloadlinux-3.10-fbd33644a71e1a8eb3461724a32e1ceae0bfd5ec.tar.gz
linux-3.10-fbd33644a71e1a8eb3461724a32e1ceae0bfd5ec.tar.bz2
linux-3.10-fbd33644a71e1a8eb3461724a32e1ceae0bfd5ec.zip
drm/pl111: always use contiguous buffer for gem allocation
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
-rw-r--r--drivers/gpu/drm/pl111/pl111_drm_gem.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/drivers/gpu/drm/pl111/pl111_drm_gem.c b/drivers/gpu/drm/pl111/pl111_drm_gem.c
index bd52399be76..a4151772583 100644
--- a/drivers/gpu/drm/pl111/pl111_drm_gem.c
+++ b/drivers/gpu/drm/pl111/pl111_drm_gem.c
@@ -51,19 +51,8 @@ struct pl111_gem_bo *pl111_drm_gem_create(struct drm_device *dev,
* than a single sg can hold.
* In this case we fall back to using contiguous memory
*/
- if (!create_contig_buffer) {
- long unsigned int n_pages =
- PAGE_ALIGN(size) >> PAGE_SHIFT;
- if (n_pages > SG_MAX_SINGLE_ALLOC) {
- create_contig_buffer = true;
- /*
- * Non-contiguous allocation request changed to
- * contigous
- */
- DRM_INFO("non-contig alloc to contig %lu > %lu pages.",
- n_pages, SG_MAX_SINGLE_ALLOC);
- }
- }
+ if (!create_contig_buffer)
+ create_contig_buffer = true;
#endif
if (!create_contig_buffer) {
/* not scanout compatible - use non-contiguous buffer */
@@ -103,8 +92,7 @@ struct pl111_gem_bo *pl111_drm_gem_create(struct drm_device *dev,
goto finish;
}
}
-
- DRM_DEBUG_KMS("s=%llu, flags=0x%x, %s 0x%.8lx, type=%d\n",
+ DRM_DEBUG_KMS("s=%lu, flags=0x%x, %s 0x%.8lx, type=%d\n",
size, flags,
(bo->type == PL111_BOT_DMA) ? "physaddr" : "shared page array",
(bo->type == PL111_BOT_DMA)
@@ -176,19 +164,8 @@ int pl111_dumb_create(struct drm_file *file_priv,
* than a single sg can hold.
* In this case we fall back to using contiguous memory
*/
- if (!create_contig_buffer) {
- long unsigned int n_pages =
- PAGE_ALIGN(args->size) >> PAGE_SHIFT;
- if (n_pages > SG_MAX_SINGLE_ALLOC) {
- create_contig_buffer = true;
- /*
- * Non-contiguous allocation request changed to
- * contigous
- */
- DRM_INFO("non-contig alloc to contig %lu > %lu pages.",
- n_pages, SG_MAX_SINGLE_ALLOC);
- }
- }
+ if (!create_contig_buffer)
+ create_contig_buffer = true;
#endif
if (!create_contig_buffer) {
/* not scanout compatible - use non-contiguous buffer */
@@ -231,7 +208,8 @@ int pl111_dumb_create(struct drm_file *file_priv,
DRM_DEBUG_KMS("dumb_create: 0x%p with w=%d, h=%d, p=%d, bpp=%d,",
bo, args->width, args->height, args->pitch, args->bpp);
- DRM_DEBUG_KMS("bytes_pp=%d, s=%llu, flags=0x%x, %s 0x%.8lx, type=%d\n",
+
+ DRM_DEBUG_KMS("bytes_pp=%d, s=%lu, flags=0x%x, %s 0x%.8lx, type=%d\n",
bytes_pp, args->size, args->flags,
(bo->type == PL111_BOT_DMA) ? "physaddr" : "shared page array",
(bo->type == PL111_BOT_DMA)