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: 162804 Delivered-To: patches@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp904064jan; Wed, 24 Apr 2019 10:08:55 -0700 (PDT) X-Received: by 2002:a63:1601:: with SMTP id w1mr27115713pgl.258.1556125735837; Wed, 24 Apr 2019 10:08:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556125735; cv=none; d=google.com; s=arc-20160816; b=yf9MJT6kP8X3Igae/wJL9xE9hj5vIx24HnwTNdfJi/vDQf3fLhOtUgpQYK5kloMLPu I/kSEcOlq5+tqj2EHkqCwZcEGK5NX47KWLZ8nDMLbfuax3mMuCiwhmIC07ae/E+Cujgq UNQUEd1PDEssCYqvnW5bIK7FSaGTfgdIEYQMnmSXLyWRrSx++pomUt7ef94wz8P6nDcF aWPC1a8lhByAp8gCSRx3A5gsvK9RmB/Bt0YkvVqK034gPTd8jRqyyAnNdWYiGP7+kVzo vQhhd92i4a4nrMoivo0TPCvGdRQYiyTI/kcQHoEZIDlSm7nU56PzMAVH+R6XIzknRI3a +QDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VSHWfn1d0RNfNqAGpfbv5d3OwNaRJi8ca2rT/Zc5NEk=; b=dv69v62YTTn/oo9qS/6dzqG4DsmhElTBq+EdsP5k1X5wSId3JgcJilB6aLdw9yZ1K6 Rz7Xv6F7/8mpt02Lz2/WfKr0CjnYFwzhwtG/+hlHOqEoIxMxNSTsMd+MSd/ryHSSc8su PjWCLyizwpYaDnq1EgTx5ZK2ONT1/JySohYJxm2rbYoHCG6op3G03CCZjrFqYt6Asz3k 2tLCzZpp1X6UgTZWbEJViKeR2NRNjEMSv8+cVrSX2mKVVOeJgDP5pGR/4Y7qt4+44LQN HtrW0itnhOAirbolEMDgzuWatpW/7Oay3BwsofAvYEsu2E68fLXjYhPMF0Mnd/Uxi27W 5SCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vxVNkJrz; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id cl14sor17529573plb.30.2019.04.24.10.08.55 for (Google Transport Security); Wed, 24 Apr 2019 10:08:55 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vxVNkJrz; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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=gzwfnyJGMouBsimwPHbhuT10juDiWMBLaxccAGHTuJ9nLgkMsUDNEQgbaNuUA4zQVU fWw+HNmRpAcdaFBlrmKDqdPWzYzIw+T1+jNTYzD3n4aSYlc0GGcgs/3eoRlc//T/D9cq 2Wblfc6yql+SLhHMjXzHVmLjGHFOPsDD/aDzmNk9hYH7TOuJLJCRPY3i1HUK+PyxMZvC Xmpex3TGYIlY3csMO06aIqa7bF8omWkHkcAZPiRafH0LgV3wSF9ViJgPCTc7xujfeBxY BY4UY9PecCLaepYZFRA25oD7r2ax7rZAEpLBcvQnBeSRgEjyoC2AMtcKSXn/9g0TKPwF 02Dg== X-Gm-Message-State: APjAAAVSQEvAMXwWMC5esh1mB8RILJOEMOMdkGoLza+MjaDA4mTkFjRu hC0nZ5RMSTCtu6gFU4QPCBJq13gDoOWp5Q== 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) Return-Path: 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 Cc: Hemant Hariyani , Emil Velikov , Sean Paul , Alistair Strachan , Marissa Wall , Praneeth Bajjuri , John Stultz 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> 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(-) -- 2.7.4 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;