]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
drm/exynos: do not support CONTIG gem buffer allocation
authorPrathyush K <prathyush.k@samsung.com>
Mon, 19 Nov 2012 07:36:54 +0000 (13:06 +0530)
committerGerrit <chrome-bot@google.com>
Tue, 27 Nov 2012 09:16:35 +0000 (01:16 -0800)
Currently, drm framework only supports allocation and mapping of
non-contig gem buffers. In the next versions of drm (v3.7),
this option to choose contig/non-contig is not supported. So for now,
we just return error in case user asks for contig gem buffers.

BUG=chrome-os-partner:15569
TEST=Built kernel and booted on snow.

Change-Id: Ibb164e812f4d175b6601145dffab1aaec28de4f5
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/38291
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Akshu Agrawal <akshu@chromium.org>
drivers/gpu/drm/exynos/exynos_drm_gem.c

index ebe0b8c787ac95ae9bd02d235ca481f6e1ae89ae..babceb7d369c4b26448a43bf4d294093f44324c3 100644 (file)
@@ -634,6 +634,19 @@ int exynos_drm_gem_dumb_create(struct drm_file *file_priv,
 
        DRM_DEBUG_KMS("%s\n", __FILE__);
 
+       if (!(args->flags & EXYNOS_BO_NONCONTIG)) {
+               DRM_ERROR("contig buffer allocation not supported.\n");
+               /*
+                * HACK: Currently we do not support CONTIG buffer
+                * allocation from user space. The drm framework
+                * supports non-contig buffers only. In the next versions
+                * the option to choose contig/non-contig buffers itself
+                * is not supported through this flag. For now, we just
+                * return error.
+                */
+               return -EINVAL;
+       }
+
        /*
         * alocate memory to be used for framebuffer.
         * - this callback would be called by user application