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

Issue 1124063003: drm: GPU process manages VGEM fd. (Closed)

Created:
5 years, 7 months ago by dshwang
Modified:
5 years, 6 months ago
CC:
chromium-reviews, ozone-reviews_chromium.org, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

drm: GPU process manages VGEM fd. Browser process clarifies which is vgem fd to GPU process, and then GPU process manages VGEM fd and DRM fd separately. Currently GPU process handles VGEM fd as DRM fd, so VGEM is corrupted. Introduce DrmDeviceBase to abstract both DrmDevice and VgemDevice. It's part of "native GpuMemoryBuffer on ChromeOS Freon" implementation. * Design doc: https://docs.google.com/document/d/1qpLLo4mBkzHBh5cuBtBjJZAzXK2X9BgBJtpESh-mNn8 * dependent CLs: vgem fd is used in https://codereview.chromium.org/1124063003/ vgem fd is transferred to Renderer in https://codereview.chromium.org/1128113011/ TEST=Run chromeos using amd64-generic_freon image BUG=475633

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix crash #

Total comments: 6

Patch Set 3 : io code is moved to io thread #

Total comments: 22

Patch Set 4 : use LazyInstance #

Total comments: 8

Patch Set 5 : GemDevice abstract both drm and vgem devices #

Patch Set 6 : rebase to ToT based on Patch Set 5 #

Patch Set 7 : add new IPC msgs for vgem #

Patch Set 8 : rebase to ToT based on Patch Set 7 #

Patch Set 9 : remove OzoneGpuMsg_RemoveVgemDevice message #

Patch Set 10 : rebase to ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -57 lines) Patch
M ui/ozone/common/gpu/ozone_gpu_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 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 4 chunks +36 lines, -25 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_device.cc View 1 2 3 4 5 6 7 8 9 2 chunks +10 lines, -11 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_device_manager.h View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -2 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_device_manager.cc View 1 2 3 4 5 6 7 8 4 chunks +59 lines, -3 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_gpu_display_manager.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/drm_gpu_platform_support.cc View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_device.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/gpu/gbm_device.cc View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_device_handle.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M ui/ozone/platform/drm/host/drm_device_handle.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -2 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_display_host_manager.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M ui/ozone/platform/drm/host/drm_display_host_manager.cc View 1 2 3 4 5 6 7 8 9 9 chunks +36 lines, -5 lines 0 comments Download

Messages

Total messages: 47 (5 generated)
dshwang
dnicoara, could you review this CL, in which browser process clarifies to gpu process which ...
5 years, 7 months ago (2015-05-11 13:23:39 UTC) #2
dshwang
https://codereview.chromium.org/1124063003/diff/1/ui/ozone/platform/drm/gpu/drm_device_manager.h File ui/ozone/platform/drm/gpu/drm_device_manager.h (right): https://codereview.chromium.org/1124063003/diff/1/ui/ozone/platform/drm/gpu/drm_device_manager.h#newcode63 ui/ozone/platform/drm/gpu/drm_device_manager.h:63: int GetVgemDevice() const; This method is needed to implement ...
5 years, 7 months ago (2015-05-11 13:25:33 UTC) #3
dnicoara
I'll need to go over https://codereview.chromium.org/1134993003/ to understand how this is used, but I thought ...
5 years, 7 months ago (2015-05-11 20:04:29 UTC) #5
mcasas
i concur. https://codereview.chromium.org/1124063003/diff/20001/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/1124063003/diff/20001/ui/ozone/platform/drm/host/drm_display_host_manager.cc#newcode259 ui/ozone/platform/drm/host/drm_display_host_manager.cc:259: continue; I wouldn't use stat() nor a ...
5 years, 7 months ago (2015-05-12 00:02:15 UTC) #6
dshwang
thx for reviewing. I address your concern. could you review again? https://codereview.chromium.org/1124063003/diff/20001/ui/ozone/platform/drm/host/drm_display_host_manager.cc File ui/ozone/platform/drm/host/drm_display_host_manager.cc (right): ...
5 years, 7 months ago (2015-05-12 12:55:54 UTC) #7
reveman
I'm failing to see why this is needed. Can you please explain a bit more ...
5 years, 7 months ago (2015-05-12 13:47:02 UTC) #8
dshwang
On 2015/05/12 13:47:02, reveman wrote: > I'm failing to see why this is needed. Can ...
5 years, 7 months ago (2015-05-12 14:11:42 UTC) #9
dnicoara
https://codereview.chromium.org/1124063003/diff/60001/ui/ozone/platform/drm/gpu/drm_device_manager.cc File ui/ozone/platform/drm/gpu/drm_device_manager.cc (right): https://codereview.chromium.org/1124063003/diff/60001/ui/ozone/platform/drm/gpu/drm_device_manager.cc#newcode78 ui/ozone/platform/drm/gpu/drm_device_manager.cc:78: if (vgem_path_ == path) { Should it be possible ...
5 years, 7 months ago (2015-05-12 15:41:22 UTC) #11
reveman
https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc File ui/ozone/platform/drm/gpu/drm_device_manager.cc (right): https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc#newcode46 ui/ozone/platform/drm/gpu/drm_device_manager.cc:46: if (is_vgem) { On 2015/05/12 14:11:42, dshwang wrote: > ...
5 years, 7 months ago (2015-05-12 15:49:24 UTC) #12
dshwang
thx for great feedback. https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc File ui/ozone/platform/drm/gpu/drm_device_manager.cc (right): https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc#newcode46 ui/ozone/platform/drm/gpu/drm_device_manager.cc:46: if (is_vgem) { On 2015/05/12 ...
5 years, 7 months ago (2015-05-12 16:18:57 UTC) #13
reveman
https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc File ui/ozone/platform/drm/gpu/drm_device_manager.cc (right): https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc#newcode44 ui/ozone/platform/drm/gpu/drm_device_manager.cc:44: DCHECK(fd.auto_close); On 2015/05/12 14:11:42, dshwang wrote: > On 2015/05/12 ...
5 years, 7 months ago (2015-05-12 17:19:00 UTC) #14
spang
https://codereview.chromium.org/1124063003/diff/60001/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/1124063003/diff/60001/ui/ozone/platform/drm/host/drm_display_host_manager.cc#newcode36 ui/ozone/platform/drm/host/drm_display_host_manager.cc:36: base::LazyInstance<std::string> kVgemCardPath; Please don't add state to the global ...
5 years, 7 months ago (2015-05-12 17:20:38 UTC) #16
dshwang
zachr, could you feedback in below comment? https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc File ui/ozone/platform/drm/gpu/drm_device_manager.cc (right): https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc#newcode46 ui/ozone/platform/drm/gpu/drm_device_manager.cc:46: if (is_vgem) ...
5 years, 7 months ago (2015-05-12 17:48:02 UTC) #17
zachr
https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc File ui/ozone/platform/drm/gpu/drm_device_manager.cc (right): https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc#newcode46 ui/ozone/platform/drm/gpu/drm_device_manager.cc:46: if (is_vgem) { On 2015/05/12 17:48:02, dshwang wrote: > ...
5 years, 7 months ago (2015-05-12 18:24:37 UTC) #18
dshwang
https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc File ui/ozone/platform/drm/gpu/drm_device_manager.cc (right): https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc#newcode46 ui/ozone/platform/drm/gpu/drm_device_manager.cc:46: if (is_vgem) { On 2015/05/12 18:24:37, zachr wrote: > ...
5 years, 7 months ago (2015-05-12 18:36:20 UTC) #19
dshwang
I handles vgem device in DrmDevice abstraction. Could you review again? https://codereview.chromium.org/1124063003/diff/40001/ui/ozone/platform/drm/gpu/drm_device_manager.cc File ui/ozone/platform/drm/gpu/drm_device_manager.cc (right): ...
5 years, 7 months ago (2015-05-13 13:09:00 UTC) #20
reveman
when using vgem, will we have both drm and vgem devices at the same time?
5 years, 7 months ago (2015-05-13 19:47:02 UTC) #21
zachr
On 2015/05/13 19:47:02, reveman wrote: > when using vgem, will we have both drm and ...
5 years, 7 months ago (2015-05-13 19:58:04 UTC) #22
reveman
On 2015/05/13 at 19:58:04, zachr wrote: > On 2015/05/13 19:47:02, reveman wrote: > > when ...
5 years, 7 months ago (2015-05-13 20:44:46 UTC) #23
spang
On 2015/05/13 20:44:46, reveman wrote: > On 2015/05/13 at 19:58:04, zachr wrote: > > On ...
5 years, 7 months ago (2015-05-13 20:50:36 UTC) #24
zachr
On 2015/05/13 20:50:36, spang wrote: > On 2015/05/13 20:44:46, reveman wrote: > > On 2015/05/13 ...
5 years, 7 months ago (2015-05-13 20:55:53 UTC) #25
reveman
On 2015/05/13 at 20:55:53, zachr wrote: > On 2015/05/13 20:50:36, spang wrote: > > On ...
5 years, 7 months ago (2015-05-13 21:22:35 UTC) #26
spang
On 2015/05/13 21:22:35, reveman wrote: > On 2015/05/13 at 20:55:53, zachr wrote: > > On ...
5 years, 7 months ago (2015-05-13 21:28:41 UTC) #27
dshwang
Thank you for nice discussion. I couldn't participate due to different time zone. I add ...
5 years, 7 months ago (2015-05-14 13:19:55 UTC) #28
spang
On 2015/05/14 13:19:55, dshwang wrote: > Thank you for nice discussion. I couldn't participate due ...
5 years, 7 months ago (2015-05-14 16:24:26 UTC) #29
spang
On 2015/05/14 13:19:55, dshwang wrote: > Thank you for nice discussion. I couldn't participate due ...
5 years, 7 months ago (2015-05-14 16:24:29 UTC) #30
dshwang
On 2015/05/14 16:24:29, spang wrote: > On 2015/05/14 13:19:55, dshwang wrote: > > > > ...
5 years, 7 months ago (2015-05-14 18:21:40 UTC) #31
dshwang
hi dnicoara, spang, could you review again?
5 years, 7 months ago (2015-05-18 07:46:36 UTC) #33
reveman
Do we need to involve DrmDeviceManager and DrmDevice in this?
5 years, 7 months ago (2015-05-18 20:10:32 UTC) #34
dshwang
On 2015/05/18 20:10:32, reveman wrote: > Do we need to involve DrmDeviceManager and DrmDevice in ...
5 years, 7 months ago (2015-05-19 10:35:47 UTC) #35
reveman
On 2015/05/19 at 10:35:47, dongseong.hwang wrote: > On 2015/05/18 20:10:32, reveman wrote: > > Do ...
5 years, 7 months ago (2015-05-19 14:47:18 UTC) #36
dshwang
On 2015/05/19 14:47:18, reveman wrote: > On 2015/05/19 at 10:35:47, dongseong.hwang wrote: > > On ...
5 years, 7 months ago (2015-05-19 15:17:41 UTC) #37
reveman
On 2015/05/19 at 15:17:41, dongseong.hwang wrote: > On 2015/05/19 14:47:18, reveman wrote: > > On ...
5 years, 7 months ago (2015-05-19 15:21:34 UTC) #38
dshwang
On 2015/05/19 15:21:34, reveman wrote: > On 2015/05/19 at 15:17:41, dongseong.hwang wrote: > > On ...
5 years, 7 months ago (2015-05-19 15:38:17 UTC) #39
reveman
On 2015/05/19 at 15:38:17, dongseong.hwang wrote: > On 2015/05/19 15:21:34, reveman wrote: > > On ...
5 years, 7 months ago (2015-05-19 15:59:20 UTC) #40
dshwang
On 2015/05/19 15:59:20, reveman wrote: > On 2015/05/19 at 15:38:17, dongseong.hwang wrote: > > On ...
5 years, 7 months ago (2015-05-19 16:05:00 UTC) #41
kalyank
> > > > I'm having a hard time seeing how all this fits together. ...
5 years, 7 months ago (2015-05-19 16:33:07 UTC) #42
dnicoara
On 2015/05/19 15:38:17, dshwang wrote: > On 2015/05/19 15:21:34, reveman wrote: > > On 2015/05/19 ...
5 years, 7 months ago (2015-05-19 17:33:04 UTC) #43
vignatti (out of this project)
On 2015/05/19 17:33:04, dnicoara wrote: > IMO, I think we're spending too much time in ...
5 years, 7 months ago (2015-05-19 17:49:04 UTC) #44
dshwang
On 2015/05/19 15:59:20, reveman wrote: > I'm having a hard time seeing how all this ...
5 years, 7 months ago (2015-05-19 18:06:44 UTC) #45
dshwang
On 2015/05/19 18:06:44, dshwang wrote: > On 2015/05/19 15:59:20, reveman wrote: > > I'm having ...
5 years, 7 months ago (2015-05-20 14:07:17 UTC) #46
dshwang
5 years, 6 months ago (2015-06-03 14:15:20 UTC) #47
close it because https://codereview.chromium.org/1151533002/ is more viable
solution.

Powered by Google App Engine
This is Rietveld 408576698