All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: dri-devel <dri-devel@lists.freedesktop.org>
Cc: Praneeth Bajjuri <praneeth@ti.com>,
	Hemant Hariyani <hemanthariyani@ti.com>,
	Alistair Strachan <astrachan@google.com>,
	Marissa Wall <marissaw@google.com>,
	Sean Paul <seanpaul@chromium.org>,
	Emil Velikov <emil.velikov@collabora.com>
Subject: [RFC][PATCH 5/5] libdrm: omap: Add DRM_RDWR flag to dmabuf export
Date: Fri, 19 Apr 2019 21:24:55 -0700	[thread overview]
Message-ID: <1555734295-31015-6-git-send-email-john.stultz@linaro.org> (raw)
In-Reply-To: <1555734295-31015-1-git-send-email-john.stultz@linaro.org>

From: Hemant Hariyani <hemanthariyani@ti.com>

Allows mmap on dmabuf fd with MAP_SHARED and PROT_WRITE.

This fixes boot failures caused due to mmap() returning error

Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Alistair Strachan <astrachan@google.com>
Cc: Marissa Wall <marissaw@google.com>
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
[picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Signed-off-by: Alistair Strachan <astrachan@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 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;
 
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-04-20  4:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-20  4:24 [RFC][PATCH 0/5] libdrm: Patches from AOSP John Stultz
2019-04-20  4:24 ` [RFC][PATCH 1/5] libdrm: Use mmap64 instead of __mmap2 John Stultz
2019-04-22 15:03   ` Alex Deucher
2019-04-23  9:47   ` Emil Velikov
2019-04-20  4:24 ` [RFC][PATCH 2/5] libdrm: amdgpu: Initialize unions with memset rather than "= {0}" John Stultz
2019-04-22 14:58   ` Alex Deucher
2019-04-22 18:35     ` John Stultz
2019-04-23 12:51       ` Christian König
2019-04-23 10:13   ` Emil Velikov
2019-04-20  4:24 ` [RFC][PATCH 3/5] libdrm: Avoid additional drm open close John Stultz
2019-04-22 15:00   ` Alex Deucher
2019-04-20  4:24 ` [RFC][PATCH 4/5] libdrm: reduce number of reallocations in drmModeAtomicAddProperty John Stultz
2019-04-22 15:06   ` Alex Deucher
2019-04-23 10:12   ` Emil Velikov
2019-04-20  4:24 ` John Stultz [this message]
2019-04-23 10:26   ` [RFC][PATCH 5/5] libdrm: omap: Add DRM_RDWR flag to dmabuf export Emil Velikov
2019-04-23 12:56     ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1555734295-31015-6-git-send-email-john.stultz@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=astrachan@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=hemanthariyani@ti.com \
    --cc=marissaw@google.com \
    --cc=praneeth@ti.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.