Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Issue 1262043002: Implement DRM Native Pixmap using prime buffer (Closed)

Created:
5 years, 4 months ago by vignatti (out of this project)
Modified:
4 years, 8 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, davemoore+watch_chromium.org, dzhioev+watch_chromium.org, jam, kalyank, nasko+codewatch_chromium.org, oshima+watch_chromium.org, ozone-reviews_chromium.org, piman+watch_chromium.org, stevenjb+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@new-master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement DRM Native Pixmap using prime buffer This CL implements a new client native pixmap through the prime buffer. In particular it uses a new feature of prime to map the exported graphics fd, which conveniently can be used in the GpuMemoryBuffer for zero-copy (and one-copy) rasterization in Chrome. This pretty much replaces VGEM infrastructure when that's used to share buffers in Chrome processes, so support for VGEM in Chrome is being removed as well in this CL. This feature requires Kernel changes in i915 and drm subsystems, and also in userspace mini-gbm library. BUG=581151 TEST=memory coherent (IvyBridge) and non-coherent hardware (BayTrail-T). Committed: https://crrev.com/eb129a0286bf817ce4e2d182ec1ce8222d50a316 Cr-Commit-Position: refs/heads/master@{#383513}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : ToT rebase #

Total comments: 10

Patch Set 4 : rebase code, address spang comments, and vgem removal #

Total comments: 9

Patch Set 5 : dshwang nits #

Total comments: 1

Patch Set 6 : fix sandbox restrictions pointed by piman #

Total comments: 1

Patch Set 7 : remove DRM_IOCTL_GEM_CLOSE from sandbox #

Total comments: 2

Patch Set 8 : remove drm header #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -314 lines) Patch
M content/browser/browser_main_loop.cc View 1 2 3 2 chunks +0 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 2 chunks +0 lines, -8 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 3 chunks +0 lines, -33 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M content/common/child_process_messages.h View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M content/common/sandbox_linux/bpf_renderer_policy_linux.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -11 lines 0 comments Download
M content/content_common.gypi View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/test/content_test_suite.cc View 1 2 3 2 chunks +0 lines, -3 lines 0 comments Download
M ui/ozone/common/stub_client_native_pixmap_factory.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M ui/ozone/platform/caca/ozone_platform_caca.cc View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M ui/ozone/platform/cast/client_native_pixmap_factory_cast.cc View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M ui/ozone/platform/cast/ozone_platform_cast.cc View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M ui/ozone/platform/drm/BUILD.gn View 1 2 3 2 chunks +2 lines, -9 lines 0 comments Download
M ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc View 1 2 3 5 chunks +4 lines, -31 lines 0 comments Download
A ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.h View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
A ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.cc View 1 2 3 4 1 chunk +54 lines, -0 lines 0 comments Download
D ui/ozone/platform/drm/common/client_native_pixmap_vgem.h View 1 2 3 1 chunk +0 lines, -49 lines 0 comments Download
D ui/ozone/platform/drm/common/client_native_pixmap_vgem.cc View 1 2 3 1 chunk +0 lines, -79 lines 0 comments Download
M ui/ozone/platform/drm/gbm.gypi View 1 2 3 2 chunks +2 lines, -9 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_surface_factory.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/ozone/platform/drm/host/drm_display_host_manager.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_display_host_manager.cc View 1 2 3 4 6 chunks +0 lines, -24 lines 0 comments Download
M ui/ozone/platform/drm/ozone_platform_gbm.cc View 1 2 3 1 chunk +0 lines, -11 lines 0 comments Download
M ui/ozone/platform/egltest/ozone_platform_egltest.cc View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M ui/ozone/platform/headless/ozone_platform_headless.cc View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M ui/ozone/platform/wayland/ozone_platform_wayland.cc View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M ui/ozone/platform/x11/ozone_platform_x11.cc View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M ui/ozone/public/client_native_pixmap_factory.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M ui/ozone/public/ozone_platform.h View 1 2 3 2 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 40 (13 generated)
spang
https://codereview.chromium.org/1262043002/diff/40001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc File ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc (right): https://codereview.chromium.org/1262043002/diff/40001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc#newcode65 ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc:65: switches::kOzoneUseDmaBufMmap)) Check the command line in the constructor or ...
4 years, 9 months ago (2016-03-21 23:24:20 UTC) #4
vignatti (out of this project)
PTAL again. https://codereview.chromium.org/1262043002/diff/40001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc File ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc (right): https://codereview.chromium.org/1262043002/diff/40001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc#newcode65 ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc:65: switches::kOzoneUseDmaBufMmap)) On 2016/03/21 23:24:20, spang wrote: > ...
4 years, 9 months ago (2016-03-22 20:24:30 UTC) #7
spang
lgtm
4 years, 9 months ago (2016-03-23 15:40:48 UTC) #8
reveman
lgtm have the kernel changes and the minigbm changes required for this landed already?
4 years, 9 months ago (2016-03-23 15:49:04 UTC) #9
dshwang
Great! lgtm with nits https://codereview.chromium.org/1262043002/diff/60001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc File ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc (right): https://codereview.chromium.org/1262043002/diff/60001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc#newcode50 ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc:50: return format == gfx::BufferFormat::BGRA_8888; After ...
4 years, 9 months ago (2016-03-23 15:52:51 UTC) #10
spang
https://codereview.chromium.org/1262043002/diff/60001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc File ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc (right): https://codereview.chromium.org/1262043002/diff/60001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc#newcode50 ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc:50: return format == gfx::BufferFormat::BGRA_8888; On 2016/03/23 15:52:51, dshwang wrote: ...
4 years, 9 months ago (2016-03-23 16:04:01 UTC) #11
dshwang
https://codereview.chromium.org/1262043002/diff/60001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc File ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc (right): https://codereview.chromium.org/1262043002/diff/60001/ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc#newcode50 ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc:50: return format == gfx::BufferFormat::BGRA_8888; On 2016/03/23 16:04:01, spang wrote: ...
4 years, 9 months ago (2016-03-23 16:31:11 UTC) #12
dshwang
On 2016/03/23 16:31:11, dshwang wrote: > Note: ozone-gbm with supported kernel will crash with > ...
4 years, 9 months ago (2016-03-23 16:32:00 UTC) #13
spang
On 2016/03/23 16:32:00, dshwang wrote: > On 2016/03/23 16:31:11, dshwang wrote: > > Note: ozone-gbm ...
4 years, 9 months ago (2016-03-23 16:35:04 UTC) #14
vignatti (out of this project)
On 2016/03/23 15:49:04, reveman wrote: > lgtm > > have the kernel changes and the ...
4 years, 9 months ago (2016-03-23 19:13:25 UTC) #15
vignatti (out of this project)
PTAL. https://codereview.chromium.org/1262043002/diff/60001/ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.h File ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.h (right): https://codereview.chromium.org/1262043002/diff/60001/ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.h#newcode10 ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.h:10: #include "base/file_descriptor_posix.h" On 2016/03/23 15:52:51, dshwang wrote: > ...
4 years, 9 months ago (2016-03-23 19:46:08 UTC) #16
vignatti (out of this project)
PTAL piman@ for content/
4 years, 9 months ago (2016-03-23 21:17:41 UTC) #18
piman
LGTM, but +mdempsky for content/common/sandbox_linux/
4 years, 9 months ago (2016-03-23 21:23:32 UTC) #20
piman
https://codereview.chromium.org/1262043002/diff/80001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc File content/common/sandbox_linux/bpf_renderer_policy_linux.cc (right): https://codereview.chromium.org/1262043002/diff/80001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc#newcode37 content/common/sandbox_linux/bpf_renderer_policy_linux.cc:37: DRM_IOCTL_PRIME_FD_TO_HANDLE), Actually, do we still need these in the ...
4 years, 9 months ago (2016-03-23 21:26:01 UTC) #21
marcheu1
On 2016/03/23 21:26:01, piman wrote: > https://codereview.chromium.org/1262043002/diff/80001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc > File content/common/sandbox_linux/bpf_renderer_policy_linux.cc (right): > > https://codereview.chromium.org/1262043002/diff/80001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc#newcode37 > ...
4 years, 9 months ago (2016-03-23 21:36:51 UTC) #22
vignatti (out of this project)
On 2016/03/23 21:36:51, marcheu1 wrote: > On 2016/03/23 21:26:01, piman wrote: > > > https://codereview.chromium.org/1262043002/diff/80001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc ...
4 years, 9 months ago (2016-03-23 21:51:30 UTC) #23
piman
https://codereview.chromium.org/1262043002/diff/100001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc File content/common/sandbox_linux/bpf_renderer_policy_linux.cc (right): https://codereview.chromium.org/1262043002/diff/100001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc#newcode36 content/common/sandbox_linux/bpf_renderer_policy_linux.cc:36: (static_cast<unsigned long>(DRM_IOCTL_GEM_CLOSE)), Same with this, right? The only other ...
4 years, 9 months ago (2016-03-23 22:51:20 UTC) #24
vignatti (out of this project)
On 2016/03/23 22:51:20, piman wrote: > https://codereview.chromium.org/1262043002/diff/100001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc > File content/common/sandbox_linux/bpf_renderer_policy_linux.cc (right): > > https://codereview.chromium.org/1262043002/diff/100001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc#newcode36 > ...
4 years, 9 months ago (2016-03-24 15:50:53 UTC) #25
vignatti (out of this project)
mkwst@ PTAL on content/common/child_process_messages.h
4 years, 9 months ago (2016-03-24 17:48:41 UTC) #27
piman
lgtm
4 years, 9 months ago (2016-03-24 18:44:57 UTC) #28
mdempsky
lgtm with nit for content/common/sandbox_linux/OWNERS https://codereview.chromium.org/1262043002/diff/120001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc File content/common/sandbox_linux/bpf_renderer_policy_linux.cc (right): https://codereview.chromium.org/1262043002/diff/120001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc#newcode8 content/common/sandbox_linux/bpf_renderer_policy_linux.cc:8: #include <libdrm/drm.h> Why is ...
4 years, 9 months ago (2016-03-24 19:18:14 UTC) #29
vignatti (out of this project)
https://codereview.chromium.org/1262043002/diff/120001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc File content/common/sandbox_linux/bpf_renderer_policy_linux.cc (right): https://codereview.chromium.org/1262043002/diff/120001/content/common/sandbox_linux/bpf_renderer_policy_linux.cc#newcode8 content/common/sandbox_linux/bpf_renderer_policy_linux.cc:8: #include <libdrm/drm.h> On 2016/03/24 19:18:14, mdempsky wrote: > Why ...
4 years, 9 months ago (2016-03-24 19:54:56 UTC) #30
vignatti (out of this project)
tsepez@ PTAL on content/common/child_process_messages.h
4 years, 8 months ago (2016-03-28 12:58:04 UTC) #32
Tom Sepez
RS LGTM on deleting code.
4 years, 8 months ago (2016-03-28 16:04:54 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1262043002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1262043002/140001
4 years, 8 months ago (2016-03-28 16:51:05 UTC) #36
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 8 months ago (2016-03-28 17:50:52 UTC) #38
commit-bot: I haz the power
4 years, 8 months ago (2016-03-28 17:52:05 UTC) #40
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/eb129a0286bf817ce4e2d182ec1ce8222d50a316
Cr-Commit-Position: refs/heads/master@{#383513}

Powered by Google App Engine
This is Rietveld 408576698