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

Issue 2459973002: Expedite discovery of primary DRM device. (Closed)

Created:
4 years, 1 month ago by hshi1
Modified:
4 years, 1 month ago
CC:
chromium-reviews, ozone-reviews_chromium.org, jam, darin-cc_chromium.org, kalyank, piman+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Expedite discovery of primary DRM device. Previously the DrmDeviceHandle and fd for the primary device is sent to the GPU process on the UI thread in DrmDisplayHostManager::OnGpuThreadReady(), which is invoked from the constructor of GpuProcessHostUIShim. If a buffer allocation call arrives immediately after a GPU process crash, it is possible that primary DRM device has not yet been sent to the new GPU process by the time the allocation occurs. This CL moves part of the logic in DrmDisplayHostManager::OnGpuThreadReady() that sends the primary DRM device into a separate function, to be invoked directly by GpuProcessHost constructor on the IO thread. BUG=chromium:608839 TEST=kill GPU process and confirm no crash in GbmBuffer::CreateBuffer(). Committed: https://crrev.com/5798066b00f2b7824ba0c476cc12736dfbce87f1 Cr-Commit-Position: refs/heads/master@{#429173}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Special-case the AddGraphicsDevice message but require OnChannelEstablished for all other messages. #

Patch Set 3 : Fix unused-function warning on non-ozone platforms. #

Total comments: 5

Patch Set 4 : Move OnGpuProcessLaunched to GpuProcessHost::Init #

Patch Set 5 : Send the first AddGraphicsDevice IPC synchronously on IO thread. #

Total comments: 7

Patch Set 6 : Explicitly document the thread on which each method is expected to be called. #

Total comments: 11

Patch Set 7 : Add one more comment per rjkroege #

Patch Set 8 : Add more comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -34 lines) Patch
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 3 chunks +23 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_process_host_ui_shim.cc View 1 chunk +1 line, -3 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_display_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_display_host.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_display_host_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_display_host_manager.cc View 2 chunks +24 lines, -22 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc View 1 2 3 4 5 6 7 3 chunks +27 lines, -4 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_window_host.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_window_host.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/host/gpu_thread_observer.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M ui/ozone/public/gpu_platform_support_host.h View 1 2 3 4 5 1 chunk +8 lines, -2 lines 0 comments Download
M ui/ozone/public/gpu_platform_support_host.cc View 1 chunk +3 lines, -1 line 0 comments Download
M ui/ozone/public/ozone_gpu_test_helper.cc View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 58 (33 generated)
hshi1
dnicoara@ -- per our offline chat, I've uploaded this patch which adds an "OnGpuProcessLaunched" method ...
4 years, 1 month ago (2016-10-28 21:03:10 UTC) #2
dnicoara
Here's a couple of things I've noticed. Hopefully they help. https://codereview.chromium.org/2459973002/diff/1/ui/ozone/platform/drm/host/drm_display_host_manager.cc File ui/ozone/platform/drm/host/drm_display_host_manager.cc (right): https://codereview.chromium.org/2459973002/diff/1/ui/ozone/platform/drm/host/drm_display_host_manager.cc#newcode316 ...
4 years, 1 month ago (2016-10-28 21:42:54 UTC) #3
hshi1
On 2016/10/28 21:42:54, dnicoara wrote: > Here's a couple of things I've noticed. Hopefully they ...
4 years, 1 month ago (2016-10-28 23:40:22 UTC) #4
dnicoara
https://codereview.chromium.org/2459973002/diff/1/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc File ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc (right): https://codereview.chromium.org/2459973002/diff/1/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc#newcode112 ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc:112: host_id_ = host_id; On 2016/10/28 21:42:54, dnicoara wrote: > ...
4 years, 1 month ago (2016-10-31 22:01:25 UTC) #5
hshi1
Can you PTAL patch set #2? I propose that we special-case sending AddGraphicsDevice message by ...
4 years, 1 month ago (2016-10-31 22:29:46 UTC) #8
hshi1
+kbr@, +piman@ (OWNERS content/browser/gpu) thanks
4 years, 1 month ago (2016-10-31 23:26:46 UTC) #16
piman
https://codereview.chromium.org/2459973002/diff/40001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc (right): https://codereview.chromium.org/2459973002/diff/40001/content/browser/gpu/gpu_process_host.cc#newcode474 content/browser/gpu/gpu_process_host.cc:474: ->OnGpuProcessLaunched( The GPU process hasn't been launched yet, though... ...
4 years, 1 month ago (2016-10-31 23:41:49 UTC) #17
piman
https://codereview.chromium.org/2459973002/diff/40001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc File ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc (right): https://codereview.chromium.org/2459973002/diff/40001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc#newcode165 ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc:165: send_runner_->PostTask(FROM_HERE, base::Bind(send_callback_, message))) Note, because you use PostTask here, ...
4 years, 1 month ago (2016-10-31 23:45:46 UTC) #18
hshi1
https://codereview.chromium.org/2459973002/diff/40001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc (right): https://codereview.chromium.org/2459973002/diff/40001/content/browser/gpu/gpu_process_host.cc#newcode474 content/browser/gpu/gpu_process_host.cc:474: ->OnGpuProcessLaunched( On 2016/10/31 23:41:49, piman wrote: > The GPU ...
4 years, 1 month ago (2016-11-01 01:00:48 UTC) #21
hshi1
https://codereview.chromium.org/2459973002/diff/40001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc File ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc (right): https://codereview.chromium.org/2459973002/diff/40001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc#newcode165 ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc:165: send_runner_->PostTask(FROM_HERE, base::Bind(send_callback_, message))) To further clarify on this: at ...
4 years, 1 month ago (2016-11-01 01:04:41 UTC) #22
hshi1
https://codereview.chromium.org/2459973002/diff/80001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc File ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc (right): https://codereview.chromium.org/2459973002/diff/80001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc#newcode246 ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc:246: send_callback_.Run(message); Done (addressing the comment on posting the Send). ...
4 years, 1 month ago (2016-11-01 01:47:50 UTC) #27
hshi1
+rjkroege@ (OWNERS ui/ozone)
4 years, 1 month ago (2016-11-01 18:44:02 UTC) #31
piman
lgtm
4 years, 1 month ago (2016-11-01 18:57:16 UTC) #32
dnicoara
https://codereview.chromium.org/2459973002/diff/80001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc (right): https://codereview.chromium.org/2459973002/diff/80001/content/browser/gpu/gpu_process_host.cc#newcode613 content/browser/gpu/gpu_process_host.cc:613: ui::OzonePlatform::GetInstance() Is this guaranteed to run before GpuProcessHostUiShim is ...
4 years, 1 month ago (2016-11-01 19:00:40 UTC) #33
hshi1
https://codereview.chromium.org/2459973002/diff/80001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc (right): https://codereview.chromium.org/2459973002/diff/80001/content/browser/gpu/gpu_process_host.cc#newcode613 content/browser/gpu/gpu_process_host.cc:613: ui::OzonePlatform::GetInstance() On 2016/11/01 19:00:40, dnicoara wrote: > Is this ...
4 years, 1 month ago (2016-11-01 19:06:01 UTC) #34
dnicoara
On 2016/11/01 19:06:01, hshi1 wrote: > https://codereview.chromium.org/2459973002/diff/80001/content/browser/gpu/gpu_process_host.cc > File content/browser/gpu/gpu_process_host.cc (right): > > https://codereview.chromium.org/2459973002/diff/80001/content/browser/gpu/gpu_process_host.cc#newcode613 > ...
4 years, 1 month ago (2016-11-01 19:26:58 UTC) #35
hshi1
https://codereview.chromium.org/2459973002/diff/80001/ui/ozone/platform/drm/host/gpu_thread_observer.h File ui/ozone/platform/drm/host/gpu_thread_observer.h (right): https://codereview.chromium.org/2459973002/diff/80001/ui/ozone/platform/drm/host/gpu_thread_observer.h#newcode16 ui/ozone/platform/drm/host/gpu_thread_observer.h:16: virtual void OnGpuProcessLaunched() = 0; On 2016/11/01 19:00:40, dnicoara ...
4 years, 1 month ago (2016-11-01 19:31:47 UTC) #37
rjkroege
https://codereview.chromium.org/2459973002/diff/100001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc (right): https://codereview.chromium.org/2459973002/diff/100001/content/browser/gpu/gpu_process_host.cc#newcode191 content/browser/gpu/gpu_process_host.cc:191: void SendGpuProcessMessageByHostId(int host_id, IPC::Message* message) { This is used ...
4 years, 1 month ago (2016-11-01 22:54:54 UTC) #43
hshi1
https://codereview.chromium.org/2459973002/diff/100001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc (right): https://codereview.chromium.org/2459973002/diff/100001/content/browser/gpu/gpu_process_host.cc#newcode191 content/browser/gpu/gpu_process_host.cc:191: void SendGpuProcessMessageByHostId(int host_id, IPC::Message* message) { On 2016/11/01 22:54:54, ...
4 years, 1 month ago (2016-11-01 23:02:32 UTC) #44
hshi1
https://codereview.chromium.org/2459973002/diff/100001/content/browser/gpu/gpu_process_host.cc File content/browser/gpu/gpu_process_host.cc (right): https://codereview.chromium.org/2459973002/diff/100001/content/browser/gpu/gpu_process_host.cc#newcode612 content/browser/gpu/gpu_process_host.cc:612: #if defined(USE_OZONE) On 2016/11/01 22:54:54, rjkroege wrote: > For ...
4 years, 1 month ago (2016-11-01 23:18:46 UTC) #45
rjkroege
lgtm https://codereview.chromium.org/2459973002/diff/100001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc File ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc (right): https://codereview.chromium.org/2459973002/diff/100001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc#newcode244 ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc:244: // Synchronously send IPC if we are on ...
4 years, 1 month ago (2016-11-01 23:41:08 UTC) #48
hshi1
https://codereview.chromium.org/2459973002/diff/100001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc File ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc (right): https://codereview.chromium.org/2459973002/diff/100001/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc#newcode244 ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc:244: // Synchronously send IPC if we are on the ...
4 years, 1 month ago (2016-11-02 00:18:56 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2459973002/140001
4 years, 1 month ago (2016-11-02 00:19:40 UTC) #54
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 1 month ago (2016-11-02 01:15:08 UTC) #56
commit-bot: I haz the power
4 years, 1 month ago (2016-11-02 01:17:26 UTC) #58
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/5798066b00f2b7824ba0c476cc12736dfbce87f1
Cr-Commit-Position: refs/heads/master@{#429173}

Powered by Google App Engine
This is Rietveld 408576698