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

Issue 1311043016: Switch DRM platform to using a separate thread (Closed)

Created:
5 years, 3 months ago by dnicoara
Modified:
5 years, 2 months ago
CC:
chromium-reviews, kalyank, piman+watch_chromium.org, ozone-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@mv-drm-calls-on-thread2
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Switch DRM platform to using a separate thread All DRM operations are now performed on a separate thread. In order to facilitate simple communication between GPU main, and GPU IO and the DRM thread, proxy helpers were introduced. To minimize the surface between the threads the proxy was introduced at the DrmWindow and DrmGpuPlatformSupport level. For IPCs all messages arriving to the GPU IO are directly routed to the DRM thread via the DrmGpuPlatformSupportProxy. One benefit is that there is no need for special cases for the cursors since it is now set on the same thread as all other DRM operations. Since Ozone does not retain ownership of the SurfaceOzoneEGL & SurfaceOzoneCanvs, these objects are kept on the GPU main/IO for simplicity and to minimize the number of proxy objects. DrmWindow is then the entry point into the DRM thread. Thus DrmWindowProxy is a wrapper that abstracts sending of messages between threads. BUG=none Committed: https://crrev.com/14630e92ee1cba7bc76643434944b99272a1deff Cr-Commit-Position: refs/heads/master@{#353819}

Patch Set 1 #

Total comments: 8

Patch Set 2 : . #

Patch Set 3 : . #

Total comments: 10

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Patch Set 7 : . #

Total comments: 4

Patch Set 8 : fixed comments #

Patch Set 9 : added drm_thread_proxy #

Total comments: 8

Patch Set 10 : renamed MessageFilter to DrmThreadMessageProxy and rebased #

Patch Set 11 : . #

Total comments: 12

Patch Set 12 : . #

Patch Set 13 : update comment #

Patch Set 14 : update & fix clang #

Unified diffs Side-by-side diffs Delta from patch set Stats (+991 lines, -664 lines) Patch
M ui/ozone/platform/drm/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gbm.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_device.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -9 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_device.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +17 lines, -56 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_device_manager.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +0 lines, -18 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_device_manager.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +0 lines, -19 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -70 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_gpu_platform_support.cc View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -305 lines 0 comments Download
A ui/ozone/platform/drm/gpu/drm_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +118 lines, -0 lines 0 comments Download
A ui/ozone/platform/drm/gpu/drm_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +226 lines, -0 lines 0 comments Download
A + ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +33 lines, -38 lines 0 comments Download
A ui/ozone/platform/drm/gpu/drm_thread_message_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +263 lines, -0 lines 0 comments Download
A ui/ozone/platform/drm/gpu/drm_thread_proxy.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +43 lines, -0 lines 0 comments Download
A ui/ozone/platform/drm/gpu/drm_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +42 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_vsync_provider.h View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_vsync_provider.cc View 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_window.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/drm_window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -2 lines 0 comments Download
A ui/ozone/platform/drm/gpu/drm_window_proxy.h View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
A ui/ozone/platform/drm/gpu/drm_window_proxy.cc View 1 2 3 4 1 chunk +36 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_window_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -4 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_buffer.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_surface_factory.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -13 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_surface_factory.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +7 lines, -23 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_surfaceless.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -4 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_surfaceless.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -24 lines 0 comments Download
A ui/ozone/platform/drm/gpu/proxy_helpers.h View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A ui/ozone/platform/drm/gpu/proxy_helpers.cc View 1 chunk +31 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/screen_manager.cc View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/screen_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +6 lines, -6 lines 0 comments Download
M ui/ozone/platform/drm/ozone_platform_gbm.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +13 lines, -64 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 34 (8 generated)
dnicoara
This is the change to move the DRM calls onto a separate thread. I still ...
5 years, 3 months ago (2015-09-09 16:21:40 UTC) #2
spang
https://codereview.chromium.org/1311043016/diff/1/ui/ozone/platform/drm/gpu/drm_surface_factory.h File ui/ozone/platform/drm/gpu/drm_surface_factory.h (right): https://codereview.chromium.org/1311043016/diff/1/ui/ozone/platform/drm/gpu/drm_surface_factory.h#newcode22 ui/ozone/platform/drm/gpu/drm_surface_factory.h:22: public base::SupportsWeakPtr<DrmSurfaceFactory> { use WeakPtrFactory instead https://codereview.chromium.org/1311043016/diff/1/ui/ozone/platform/drm/gpu/drm_window_proxy.cc File ui/ozone/platform/drm/gpu/drm_window_proxy.cc ...
5 years, 3 months ago (2015-09-14 18:41:43 UTC) #3
dnicoara
https://codereview.chromium.org/1311043016/diff/1/ui/ozone/platform/drm/gpu/drm_surface_factory.h File ui/ozone/platform/drm/gpu/drm_surface_factory.h (right): https://codereview.chromium.org/1311043016/diff/1/ui/ozone/platform/drm/gpu/drm_surface_factory.h#newcode22 ui/ozone/platform/drm/gpu/drm_surface_factory.h:22: public base::SupportsWeakPtr<DrmSurfaceFactory> { On 2015/09/14 18:41:43, spang wrote: > ...
5 years, 3 months ago (2015-09-17 21:58:21 UTC) #4
spang
https://codereview.chromium.org/1311043016/diff/40001/ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h File ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h (right): https://codereview.chromium.org/1311043016/diff/40001/ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h#newcode43 ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h:43: : public base::SupportsWeakPtr<DrmGpuPlatformSupport> { Please only use WeakPtrFactory for ...
5 years, 3 months ago (2015-09-18 00:46:25 UTC) #5
dnicoara
https://codereview.chromium.org/1311043016/diff/40001/ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h File ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h (right): https://codereview.chromium.org/1311043016/diff/40001/ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h#newcode43 ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h:43: : public base::SupportsWeakPtr<DrmGpuPlatformSupport> { On 2015/09/18 00:46:25, spang wrote: ...
5 years, 3 months ago (2015-09-18 17:43:08 UTC) #6
spang
https://codereview.chromium.org/1311043016/diff/40001/ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h File ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h (right): https://codereview.chromium.org/1311043016/diff/40001/ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h#newcode43 ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h:43: : public base::SupportsWeakPtr<DrmGpuPlatformSupport> { On 2015/09/18 17:43:07, dnicoara wrote: ...
5 years, 3 months ago (2015-09-18 20:49:55 UTC) #7
dnicoara
+ alexst@ so we can discuss buffer creation on GPU IO. (This is the create ...
5 years, 2 months ago (2015-09-29 17:57:05 UTC) #9
spang
I'm happy without the DrmThreadProxy if you want to delete it. I do think it ...
5 years, 2 months ago (2015-09-29 22:55:37 UTC) #10
dnicoara
https://codereview.chromium.org/1311043016/diff/120001/ui/ozone/platform/drm/gpu/drm_thread.cc File ui/ozone/platform/drm/gpu/drm_thread.cc (right): https://codereview.chromium.org/1311043016/diff/120001/ui/ozone/platform/drm/gpu/drm_thread.cc#newcode93 ui/ozone/platform/drm/gpu/drm_thread.cc:93: scoped_ptr<DrmWindowProxy> DrmThread::CreateWindowProxy( On 2015/09/29 22:55:37, spang wrote: > I ...
5 years, 2 months ago (2015-09-30 15:17:57 UTC) #11
dnicoara
On 2015/09/29 22:55:37, spang wrote: > I'm happy without the DrmThreadProxy if you want to ...
5 years, 2 months ago (2015-09-30 15:31:10 UTC) #12
spang
On 2015/09/30 15:31:10, dnicoara wrote: > On 2015/09/29 22:55:37, spang wrote: > > I'm happy ...
5 years, 2 months ago (2015-09-30 15:43:44 UTC) #13
dnicoara
On 2015/09/30 15:43:44, spang wrote: > On 2015/09/30 15:31:10, dnicoara wrote: > > On 2015/09/29 ...
5 years, 2 months ago (2015-09-30 18:06:41 UTC) #14
spang
https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/drm_thread_proxy.h File ui/ozone/platform/drm/gpu/drm_thread_proxy.h (right): https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/drm_thread_proxy.h#newcode30 ui/ozone/platform/drm/gpu/drm_thread_proxy.h:30: scoped_refptr<MessageFilterProxy> CreateMessageFilterProxy(); Do we need to refcount? https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/message_filter_proxy.h File ...
5 years, 2 months ago (2015-09-30 18:17:35 UTC) #15
spang
https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc File ui/ozone/platform/drm/gpu/drm_thread_proxy.cc (right): https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc#newcode29 ui/ozone/platform/drm/gpu/drm_thread_proxy.cc:29: PostSyncTask(drm_thread_.task_runner(), base::Bind(&base::DoNothing)); Can you do the sync post in ...
5 years, 2 months ago (2015-09-30 18:47:31 UTC) #16
spang
https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc File ui/ozone/platform/drm/gpu/gbm_surfaceless.cc (right): https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc#newcode60 ui/ozone/platform/drm/gpu/gbm_surfaceless.cc:60: device_manager_->GetDrmDevice(window_->widget()); For this part, let's add a bool GbmBuffer::ShouldFinishBeforeSwap() ...
5 years, 2 months ago (2015-09-30 19:24:43 UTC) #17
dnicoara
https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc File ui/ozone/platform/drm/gpu/drm_thread_proxy.cc (right): https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc#newcode29 ui/ozone/platform/drm/gpu/drm_thread_proxy.cc:29: PostSyncTask(drm_thread_.task_runner(), base::Bind(&base::DoNothing)); On 2015/09/30 18:47:31, spang wrote: > Can ...
5 years, 2 months ago (2015-10-01 14:36:15 UTC) #18
spang
On 2015/10/01 14:36:15, dnicoara wrote: > https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc > File ui/ozone/platform/drm/gpu/drm_thread_proxy.cc (right): > > https://codereview.chromium.org/1311043016/diff/160001/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc#newcode29 > ...
5 years, 2 months ago (2015-10-01 17:33:52 UTC) #19
spang
lgtm https://codereview.chromium.org/1311043016/diff/200001/ui/ozone/platform/drm/gpu/drm_thread.cc File ui/ozone/platform/drm/gpu/drm_thread.cc (right): https://codereview.chromium.org/1311043016/diff/200001/ui/ozone/platform/drm/gpu/drm_thread.cc#newcode111 ui/ozone/platform/drm/gpu/drm_thread.cc:111: window->SchedulePageFlip(planes, callback); Should this call the callback if ...
5 years, 2 months ago (2015-10-05 18:08:26 UTC) #20
dnicoara
https://codereview.chromium.org/1311043016/diff/200001/ui/ozone/platform/drm/gpu/drm_thread.cc File ui/ozone/platform/drm/gpu/drm_thread.cc (right): https://codereview.chromium.org/1311043016/diff/200001/ui/ozone/platform/drm/gpu/drm_thread.cc#newcode111 ui/ozone/platform/drm/gpu/drm_thread.cc:111: window->SchedulePageFlip(planes, callback); On 2015/10/05 18:08:26, spang wrote: > Should ...
5 years, 2 months ago (2015-10-05 18:57:12 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311043016/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311043016/240001
5 years, 2 months ago (2015-10-09 15:32:47 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/42571)
5 years, 2 months ago (2015-10-09 15:53:45 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311043016/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311043016/260001
5 years, 2 months ago (2015-10-09 16:07:23 UTC) #27
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 2 months ago (2015-10-09 16:44:31 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311043016/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311043016/260001
5 years, 2 months ago (2015-10-13 18:42:27 UTC) #32
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 2 months ago (2015-10-13 19:19:38 UTC) #33
commit-bot: I haz the power
5 years, 2 months ago (2015-10-13 19:20:27 UTC) #34
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/14630e92ee1cba7bc76643434944b99272a1deff
Cr-Commit-Position: refs/heads/master@{#353819}

Powered by Google App Engine
This is Rietveld 408576698