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

Issue 225023009: Add Intel DRM backed GpuMemoryBuffer implementation.

Created:
6 years, 8 months ago by reveman
Modified:
6 years, 8 months ago
Reviewers:
fjhenigman
CC:
chromium-reviews, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org
Visibility:
Public.

Description

Add Intel DRM backed GpuMemoryBuffer implementation. NOT FOR REVIEW BUG=356871

Patch Set 1 #

Total comments: 2

Patch Set 2 : fd and overflow fix #

Patch Set 3 : fix GpuChannelHost::IsValidGpuMemoryBuffer #

Patch Set 4 : Fix GpuChannelHost::ShareGpuMemoryBufferToGpuProcess #

Total comments: 4

Patch Set 5 : fix typos #

Total comments: 2

Patch Set 6 : improve stride calculations and attempt to fix fd leak #

Patch Set 7 : rebase and add gl implementation checks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+469 lines, -4 lines) Patch
M build/install-build-deps.sh View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/gpu/browser_gpu_channel_host_factory.cc View 1 2 3 4 5 6 2 chunks +27 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 4 5 6 2 chunks +21 lines, -0 lines 0 comments Download
M content/common/gpu/client/gpu_channel_host.cc View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
A content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.h View 1 2 3 4 5 1 chunk +48 lines, -0 lines 0 comments Download
A content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc View 1 2 3 4 5 1 chunk +325 lines, -0 lines 0 comments Download
M content/common/gpu/client/gpu_memory_buffer_impl_linux.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M ui/gfx/gpu_memory_buffer.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/gl/gl_image_x11.cc View 1 2 3 4 5 6 2 chunks +15 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
reveman
This is based on https://codereview.chromium.org/186123006/ and https://codereview.chromium.org/211133005/ It's really just that some code refactored into ...
6 years, 8 months ago (2014-04-04 17:00:37 UTC) #1
fjhenigman
https://codereview.chromium.org/225023009/diff/1/content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc File content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc (right): https://codereview.chromium.org/225023009/diff/1/content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc#newcode189 content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc:189: if (buffer_size > std::numeric_limits<int32>::max()) should be uint32
6 years, 8 months ago (2014-04-09 16:33:51 UTC) #2
reveman
https://codereview.chromium.org/225023009/diff/1/content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc File content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc (right): https://codereview.chromium.org/225023009/diff/1/content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc#newcode189 content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc:189: if (buffer_size > std::numeric_limits<int32>::max()) On 2014/04/09 16:33:52, fjhenigman wrote: ...
6 years, 8 months ago (2014-04-09 18:22:22 UTC) #3
fjhenigman
With the two tests corrected (see inline comments) zero copy seems to work in the ...
6 years, 8 months ago (2014-04-10 16:26:00 UTC) #4
reveman
https://codereview.chromium.org/225023009/diff/60001/content/browser/gpu/browser_gpu_channel_host_factory.cc File content/browser/gpu/browser_gpu_channel_host_factory.cc (right): https://codereview.chromium.org/225023009/diff/60001/content/browser/gpu/browser_gpu_channel_host_factory.cc#newcode390 content/browser/gpu/browser_gpu_channel_host_factory.cc:390: if (!GpuMemoryBufferImplIntelDRM::IsFormatSupported(internalformat)) { On 2014/04/10 16:26:01, fjhenigman wrote: > ...
6 years, 8 months ago (2014-04-10 17:48:28 UTC) #5
fjhenigman
https://codereview.chromium.org/225023009/diff/80001/content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc File content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc (right): https://codereview.chromium.org/225023009/diff/80001/content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc#newcode293 content/common/gpu/client/gpu_memory_buffer_impl_intel_drm.cc:293: ExportBufferObject(buffer_object_, &handle.handle); GetHandle() should cache the result of drm_intel_bo_gem_export_to_prime() ...
6 years, 8 months ago (2014-04-11 02:45:28 UTC) #6
reveman
I think this latest patch might fix the file descriptor leakage you were seeing. Please ...
6 years, 8 months ago (2014-04-11 05:54:26 UTC) #7
reveman
Note: you'll need to need to update to latest version of https://codereview.chromium.org/215143002/ for this patch ...
6 years, 8 months ago (2014-04-11 07:15:51 UTC) #8
fjhenigman
6 years, 8 months ago (2014-04-11 16:45:00 UTC) #9
On 2014/04/11 07:15:51, reveman wrote:
> Note: you'll need to need to update to latest version of
> https://codereview.chromium.org/215143002/ for this patch to work.

To test on chrome os edit the mesa ebuild:
-               $(use gbm && echo "--with-egl-platforms=drm")
+               $(use gbm && echo "--with-egl-platforms=drm,x11")
and rebuild mesa with USE="gbm egl gles1 gles2 shared-glapi" (maybe don't need
gles1).

And run chrome with:
  export EGL_PLATFORM=x11
  --use-gl=egl --no-sandbox

To test the browser compositor add --ui-enable-map-image
--ui-enable-impl-side-painting

To test the renderer compositor add --enable-map-image   
--enable-impl-side-painting

For more debug output add
  export EGL_LOG_LEVEL=debug

To change file descriptor limit: ulimit -n 8192

Powered by Google App Engine
This is Rietveld 408576698