From patchwork Wed Apr 24 17:08:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 10915299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0377A161F for ; Wed, 24 Apr 2019 17:09:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFA1428A77 for ; Wed, 24 Apr 2019 17:09:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3F2B28B81; Wed, 24 Apr 2019 17:09:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8160E28A77 for ; Wed, 24 Apr 2019 17:09:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7D4258925A; Wed, 24 Apr 2019 17:09:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by gabe.freedesktop.org (Postfix) with ESMTPS id 64E0A8925E for ; Wed, 24 Apr 2019 17:08:56 +0000 (UTC) Received: by mail-pl1-x641.google.com with SMTP id t16so9618858plo.0 for ; Wed, 24 Apr 2019 10:08:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VSHWfn1d0RNfNqAGpfbv5d3OwNaRJi8ca2rT/Zc5NEk=; b=eay0H32Ce9AzUCmQEaEQmIzAX4QZxd/AMFLXB/JcTe0l/phFoJSR6/UeHqhoqaEAXP 23Pq/Atxp33bz8c102a2ZBfStvrE6sZ1W7KL9y7AhWwPdZlTE/TWz0uhjf4GlkfGlmpS 3/tH6efK7YmVkoDhjISLAUNYMfzBFYxm08ulq/hTqIF/rc65IIA2L5yTiy6TlGTT4NeE Tbs8352r2X3vESW7eISVTguX01wAqHC3RD98FPMfEro+dxf5y6AHes8ol/CKS3vuJH1S rlBL1t1U9Ux//dsnwe1fOR5kglbgTAzEM6u/gL7gmbdyRBEeE3+RoH8OFbusz6uefyNp 2zcA== X-Gm-Message-State: APjAAAWs271YriTT4qQc8ZRzwkNPnr8sl1iAKe9xyeCTx/M1ixepnjwd ZW+yJYeeBsWmsDNR5CA8vt2UGxI72Ik= X-Google-Smtp-Source: APXvYqya7QwTYvCVYNxVYj9TE2uI8RZOlmI6lMrmiMVC1ZlwS00hayspHNXIurFX3UHZmDrtrTzCbw== X-Received: by 2002:a17:902:d83:: with SMTP id 3mr34793889plv.125.1556125735424; Wed, 24 Apr 2019 10:08:55 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id e4sm4425073pfn.185.2019.04.24.10.08.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Apr 2019 10:08:54 -0700 (PDT) From: John Stultz To: dri-devel Subject: [PATCH 6/6 v2] libdrm: omap: Add DRM_RDWR flag to dmabuf export Date: Wed, 24 Apr 2019 10:08:41 -0700 Message-Id: <1556125721-32145-7-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556125721-32145-1-git-send-email-john.stultz@linaro.org> References: <1556125721-32145-1-git-send-email-john.stultz@linaro.org> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VSHWfn1d0RNfNqAGpfbv5d3OwNaRJi8ca2rT/Zc5NEk=; b=vxVNkJrzIVtdHtmMwZ3jt6OoA/lcnXukHd0rCfOL7ZM2arNygI0Mwg/u+IKAt72foe FlNB40hlZ6qKhUZ1zs2y9KLXPQs1Rj9JUps99x8/a4K6ccvFQVZNVLxceaqHWVWaHwcD lt7v6fApzW+17m9MmTkFAScWaBhX8//c6I89YrFe6WBRAkEtkM5n418yXo8g9sD8hBO1 tc6iiAGvVBXvmqtmkljbddL2l+D+84Z7fJXkJpf0eYJTdwxjeLghJ/s4OfFJw/F3l3XA LCrUztQ6ENwwPe93xuWCfHn1ByziNE1qDM85WOfNUf1T4X14xYZpTkSA2Wcq0wKHL6e5 xoNA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Praneeth Bajjuri , Hemant Hariyani , Alistair Strachan , Marissa Wall , Sean Paul , Emil Velikov MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Hemant Hariyani Allows mmap on dmabuf fd with MAP_SHARED and PROT_WRITE. This fixes boot failures with Android (likely w/ closed source user-space drivers) that were caused due to mmap() returning error. Cc: Emil Velikov Cc: Sean Paul Cc: Alistair Strachan Cc: Marissa Wall Signed-off-by: Hemant Hariyani [picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/] Signed-off-by: Praneeth Bajjuri Signed-off-by: Alistair Strachan [jstultz: Tweaked commit message] Signed-off-by: John Stultz --- v2: Tweaked commit message --- omap/omap_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omap/omap_drm.c b/omap/omap_drm.c index 3aed4e0..ffacea6 100644 --- a/omap/omap_drm.c +++ b/omap/omap_drm.c @@ -414,7 +414,7 @@ drm_public int omap_bo_dmabuf(struct omap_bo *bo) if (bo->fd < 0) { struct drm_prime_handle req = { .handle = bo->handle, - .flags = DRM_CLOEXEC, + .flags = DRM_CLOEXEC | DRM_RDWR, }; int ret;