From patchwork Tue Jul 10 13:32:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cooper Yuan X-Patchwork-Id: 1177541 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 1DA8CDFF34 for ; Tue, 10 Jul 2012 13:35:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 510C5A09AA for ; Tue, 10 Jul 2012 06:35:11 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 9FD5BA09F7 for ; Tue, 10 Jul 2012 06:33:23 -0700 (PDT) Received: by lbbgg6 with SMTP id gg6so290787lbb.36 for ; Tue, 10 Jul 2012 06:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=zw4wothF5bKWNVR/7K2vwC/Li9u88A//toM/A8AtMqs=; b=Ydq/DttAh9HlxBZi4dXp5JuHsH7GoXtPDnf2jPhjQ8QPisr6udKgQVjxR6XB28BR0b 5VJh4Bwc6oPOZveNjJG9ytOrNYH93kd+LGarjZSI+nKZq8TpM/U6gBHxjqYk93klGdLF H4c3rDmCmOD0LuCaHTRAzSR+vN/wSZKHYkuCR/VLuQNKq8AOTGzg5hWJjZBqd9D3a3xk RbD3OWz6+Y8LHN54d+GPjZFFDf9KElUDtdXoTC3vrEGmyF8H4ereE8R9DqdnTKbjDXRl nziAtrKLADRXgchx/zbFIcLbMGQxeK8/XfiDUi6PkYvR4pC8ft4CUybPpNIkDe4y44z5 bWFg== Received: by 10.112.82.42 with SMTP id f10mr14665086lby.95.1341927202493; Tue, 10 Jul 2012 06:33:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.9.66 with HTTP; Tue, 10 Jul 2012 06:32:42 -0700 (PDT) From: Cooper Yuan Date: Tue, 10 Jul 2012 15:32:42 +0200 Message-ID: Subject: [PATCH 1/3] drm/exynos: correct dma_buf exporter permission as ReadWrite To: dri-devel@lists.freedesktop.org Cc: Inki Dae X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Set dma_buf exporter permission as ReadWrite, otherwise mmap will get errno 13: permission denied. Signed-off-by: Cooper Yuan --- drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev, diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c index 613bf8a..e4eeb0b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c @@ -29,6 +29,7 @@ #include "exynos_drm_drv.h" #include "exynos_drm_gem.h" +#include #include static struct sg_table *exynos_pages_to_sg(struct page **pages, int nr_pages, @@ -179,7 +180,7 @@ struct dma_buf *exynos_dmabuf_prime_export(struct drm_device *drm_dev, struct exynos_drm_gem_obj *exynos_gem_obj = to_exynos_gem_obj(obj); return dma_buf_export(exynos_gem_obj, &exynos_dmabuf_ops, - exynos_gem_obj->base.size, 0600); + exynos_gem_obj->base.size, O_RDWR); }