From: Prathyush K Date: Mon, 19 Nov 2012 07:36:54 +0000 (+0530) Subject: drm/exynos: do not support CONTIG gem buffer allocation X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=52526e85024e7e2bd56409ed856aa85c1e1d4858;p=people%2Faperard%2Flinux-chromebook.git drm/exynos: do not support CONTIG gem buffer allocation 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 Reviewed-on: https://gerrit.chromium.org/gerrit/38291 Reviewed-by: Sean Paul Reviewed-by: Michael Spang Reviewed-by: Stéphane Marchesin Tested-by: Akshu Agrawal --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index ebe0b8c787ac9..babceb7d369c4 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c @@ -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