Bring up vulkan presentation on Chrome OS, initially in ozone_demo.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9e8614051ef12081ea601a00b002a8c229294525 commit 9e8614051ef12081ea601a00b002a8c229294525 Author: Michael Spang <spang@chromium.org> Date: Wed Jun 20 20:28:41 2018 gpu: vulkan: Fix destruction of vulkan instance Trying to unload a null library crashes in dlclose, so test for this case. Also, remove many duplicate calls to unload since destroying the instance does this automatically. Bug: 851997 Test: ozone_demo with vulkan on x11 & cros Change-Id: I327b332bfed6a5411c822f65a79ae4de21b83c86 Reviewed-on: https://chromium-review.googlesource.com/1104861 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Cr-Commit-Position: refs/heads/master@{#568986} [modify] https://crrev.com/9e8614051ef12081ea601a00b002a8c229294525/gpu/vulkan/vulkan_implementation_android.cc [modify] https://crrev.com/9e8614051ef12081ea601a00b002a8c229294525/gpu/vulkan/vulkan_instance.cc [modify] https://crrev.com/9e8614051ef12081ea601a00b002a8c229294525/gpu/vulkan/x/vulkan_implementation_x11.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/39ec4f7bd9f6d612d07fb494778a42783692ddaa commit 39ec4f7bd9f6d612d07fb494778a42783692ddaa Author: Michael Spang <spang@chromium.org> Date: Wed Jun 20 23:11:51 2018 gpu: vulkan: Make gpu::VulkanFunctionPointers independent of VK_USE_PLATFORM_* Since b9adeda820d91 ("Use function pointers in Vulkan") vulkan_tests crashes on my system. The reason is that gpu::VulkanFunctionPointers has a different definition in different compilation units due different VK_USE_PLATFORM_* defines. We could export those defines, but since portable code has no business calling these extension functions, this moves the extension functions out of the public bindings instead. Keeping platform extensions internal also means that most code won't get the namespace pollution that Xlib inflicts just by including <vulkan/vulkan.h> (global macros defined by X11.h actually break later inclusion of gtest.h, for example). In order to make encapsulation of the X bits work, this also fixes a typo where we include vulkan_factory.cc instead of vulkan_factory.h. Bug: 851997 Test: vulkan_tests on X11 Change-Id: I4ebde71c68528595a3eb21be72c50d65c357a7af Reviewed-on: https://chromium-review.googlesource.com/1108504 Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Chris Blume <cblume@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org> Cr-Commit-Position: refs/heads/master@{#569072} [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/content/browser/compositor/gpu_process_transport_factory.cc [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/BUILD.gn [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/generate_bindings.py [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/init/BUILD.gn [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/init/vulkan_factory.h [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/vulkan_function_pointers.h [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/vulkan_implementation_android.cc [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/vulkan_implementation_android.h [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/x/BUILD.gn [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/x/vulkan_implementation_x11.cc [modify] https://crrev.com/39ec4f7bd9f6d612d07fb494778a42783692ddaa/gpu/vulkan/x/vulkan_implementation_x11.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/be9d9eb6a789d340d7fefef43ee77f1e914a7781 commit be9d9eb6a789d340d7fefef43ee77f1e914a7781 Author: Michael Spang <spang@chromium.org> Date: Thu Jun 21 20:02:04 2018 ui: Move gl::ExtensionSet to gfx::ExtensionSet for use with vulkan This is a typedef of a flat set of string constants, plus a couple of helper functions. In order to allow use within //gpu/vulkan without needing a dependency on //ui/gl, move it to //ui/gfx. Bug: 851997 Test: compile TBR: vollick@chromium.org Change-Id: I0b2efe8240409bb525467f9d6d47ca01633bdde8 Reviewed-on: https://chromium-review.googlesource.com/1108505 Reviewed-by: Michael Thiessen <mthiesse@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org> Cr-Commit-Position: refs/heads/master@{#569362} [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/chrome/browser/vr/ganesh_surface_provider.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/feature_info.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/feature_info.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/feature_info_unittest.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/gl_context_virtual.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/gl_context_virtual.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/gles2_cmd_decoder.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/shader_translator_unittest.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/test_helper.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/service/test_helper.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/tests/gl_test_utils.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/command_buffer/tests/gl_test_utils.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/config/gpu_info_collector.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/gpu/config/gpu_util.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gfx/BUILD.gn [rename] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gfx/extension_set.cc [add] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gfx/extension_set.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/BUILD.gn [delete] https://crrev.com/a22cf312c60d6145f792e23113ef7bbc659d30c1/ui/gl/extension_set.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/generate_bindings.py [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_api_unittest.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_bindings.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_bindings_autogen_egl.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_bindings_autogen_gl.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_bindings_autogen_glx.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_bindings_autogen_osmesa.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_bindings_autogen_wgl.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_context.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_context.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_image_native_pixmap_unittest.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_implementation.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_implementation.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_version_info.cc [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_version_info.h [modify] https://crrev.com/be9d9eb6a789d340d7fefef43ee77f1e914a7781/ui/gl/gl_version_info_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4e46bc21135495d6748d525f2459846a60a589d7 commit 4e46bc21135495d6748d525f2459846a60a589d7 Author: Michael Spang <spang@chromium.org> Date: Thu Jun 21 23:07:51 2018 gpu: vulkan: Allow initializing without VK_KHR_surface Chrome OS does not have the VK_KHR_surface or VK_KHR_swapchain extensions. Move them to implementation specific code to allow initialization of vulkan on Chrome OS. Bug: 851997 Test: vulkan ozone_demo on linux x11 Change-Id: I5355a1f7e6d5215b98aba2defc8e4d631f6a964e Reviewed-on: https://chromium-review.googlesource.com/1104860 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Cr-Commit-Position: refs/heads/master@{#569416} [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/generate_bindings.py [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_device_queue.cc [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_device_queue.h [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_function_pointers.cc [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_function_pointers.h [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_implementation.cc [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_implementation.h [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_implementation_android.cc [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_implementation_android.h [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_instance.cc [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/vulkan_instance.h [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/x/vulkan_implementation_x11.cc [modify] https://crrev.com/4e46bc21135495d6748d525f2459846a60a589d7/gpu/vulkan/x/vulkan_implementation_x11.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3 commit ae9709396fd73299cf8c97d5d91c95a8a8bba7f3 Author: Michael Spang <spang@chromium.org> Date: Fri Jun 22 17:41:38 2018 ozone: drm: Move ui::OverlayPlane back into platform internals The OverlayPlane struct uses the ScanoutBuffer class, which was originally a DRM platform implementation detail. This struct was moved into common code with the intent to share it with other linux platforms. However, exposing ScanoutBuffer is probably not what we want to do - it contains several methods that are specific to DRM. Instead, a public ui::OverlayPlane should be using the gfx::NativePixmap interface, which is already public. Move ui::OverlayPlane back into DRM, and rename it to DrmOverlayPlane. A followup CL will add a new version of ui::OverlayPlane that uses gfx::NativePixmap instead. Bug: 851997 Test: compile Change-Id: I7d4c0c7633f06356be24642a9a26339a9fec284a Reviewed-on: https://chromium-review.googlesource.com/1104857 Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org> Cr-Commit-Position: refs/heads/master@{#569684} [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/common/BUILD.gn [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/BUILD.gn [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/crtc_controller.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/crtc_controller.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/drm_buffer.h [rename] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/drm_overlay_plane.cc [rename] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/drm_overlay_plane.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/drm_overlay_validator.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/drm_overlay_validator.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/drm_window.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/drm_window_proxy.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/drm_window_unittest.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/gbm_buffer.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/gbm_surfaceless.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/hardware_display_controller.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/mock_dumb_buffer_generator.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/mock_scanout_buffer.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/mock_scanout_buffer_generator.h [rename] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/scanout_buffer.h [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/screen_manager.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/gpu/screen_manager_unittest.cc [modify] https://crrev.com/ae9709396fd73299cf8c97d5d91c95a8a8bba7f3/ui/ozone/platform/drm/ozone_platform_gbm.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b069c93a150756d7e6f9dcc834dafd65bef6c48b commit b069c93a150756d7e6f9dcc834dafd65bef6c48b Author: Michael Spang <spang@chromium.org> Date: Fri Jun 22 18:26:44 2018 ozone: drm: Rename ui::OverlayPlane to ui::DrmOverlayPlane The OverlayPlane struct uses the ScanoutBuffer class, which was originally a DRM platform implementation detail. This struct was moved into common code with the intent to share it with other linux platforms. However, exposing ScanoutBuffer is probably not what we want to do - it contains several methods that are specific to DRM. Instead, a public ui::OverlayPlane should be using the gfx::NativePixmap interface, which is already public. Move ui::OverlayPlane back into DRM, and rename it to DrmOverlayPlane. A followup CL will add a new version of ui::OverlayPlane that uses gfx::NativePixmap instead. Bug: 851997 Test: compile Change-Id: I1f4dbc11419aaacabb2a63eb692eb6a3892a3be3 Reviewed-on: https://chromium-review.googlesource.com/1097208 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Cr-Commit-Position: refs/heads/master@{#569702} [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/crtc_controller.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/crtc_controller.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_overlay_plane.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_overlay_plane.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_overlay_validator.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_overlay_validator.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_thread.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_thread.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_window.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_window.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_window_proxy.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_window_proxy.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/drm_window_unittest.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/gbm_buffer.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/gbm_surfaceless.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_controller.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_controller.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_controller_unittest.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_unittest.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/screen_manager.cc [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/screen_manager.h [modify] https://crrev.com/b069c93a150756d7e6f9dcc834dafd65bef6c48b/ui/ozone/platform/drm/gpu/screen_manager_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf commit 6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf Author: Michael Spang <spang@chromium.org> Date: Mon Jun 25 04:41:27 2018 ozone: drm: Fix dangling fences (gfx::GpuFence*) after page flip There's a number of places that overlay stacks are copied inside the DRM code. Previously this was safe because overlay plane stacks were self-contained, but now they include unowned pointers to fences. Those fences are freed immediately after submitting a frame and left dangling in any copies of the overlay plane stack. Fix the code to duplicate the fences when copying planes. We should reduce the number of places we are copying overlay stacks, but that is not done here; this patch only makes copying safe again. It also makes copying an explicit call; the copy constructor is gone. TBR: dcastagna@chromium.org Bug: 851997 Test: Ran chrome & ozone_demo --use-gpu-fences on eve Change-Id: Ib21033aaf43a6765c3c46fce60991ada941ef343 Reviewed-on: https://chromium-review.googlesource.com/1097209 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Daniele Castagna <dcastagna@chromium.org> Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Daniel Nicoara <dnicoara@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Cr-Commit-Position: refs/heads/master@{#569965} [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/gpu/command_buffer/service/gl_stream_texture_image.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/gpu/command_buffer/service/gl_stream_texture_image_stub.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/gpu/command_buffer/service/gl_stream_texture_image_stub.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/gpu/command_buffer/service/texture_definition.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/gpu/command_buffer/tests/texture_image_factory.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/gpu/ipc/service/stream_texture_android.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/gpu/ipc/service/stream_texture_android.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/media/gpu/android/avda_codec_image.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/media/gpu/android/avda_codec_image.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/media/gpu/android/codec_image.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/media/gpu/android/codec_image.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/media/gpu/windows/dxva_picture_buffer_win.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gfx/linux/native_pixmap_dmabuf.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gfx/linux/native_pixmap_dmabuf.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gfx/native_pixmap.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_ahardwarebuffer.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_ahardwarebuffer.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_dxgi.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_dxgi.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_glx.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_glx.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_io_surface.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_io_surface.mm [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_memory.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_memory.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_native_pixmap.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_native_pixmap.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_stub.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_stub.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_surface_texture.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_image_surface_texture.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_surface_egl.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_surface_overlay.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/gl/gl_surface_overlay.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/cast/surface_factory_cast.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/crtc_controller.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_overlay_plane.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_overlay_plane.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_overlay_validator.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_thread.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_thread.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_window.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_window.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_window_proxy.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_window_proxy.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/drm_window_unittest.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/gbm_buffer.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/gbm_buffer.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/gbm_surface.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/gbm_surfaceless.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/hardware_display_controller.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/hardware_display_controller_unittest.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_unittest.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/screen_manager.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/drm/gpu/screen_manager_unittest.cc [modify] https://crrev.com/6bdc36e8a7b4fa8f9ba00e5ad851cfbb483d0acf/ui/ozone/platform/headless/headless_surface_factory.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/07be465d93f6688a6c9e239eccb481ca97397f8a commit 07be465d93f6688a6c9e239eccb481ca97397f8a Author: Michael Spang <spang@chromium.org> Date: Mon Jun 25 06:08:05 2018 ozone: drm: Remove incomplete support for cross-device mirroring Display configurator will not configure mirror pairs between devices (see AllDisplaysOnSameDevice() in ui/display), so remove code attempting to support this. Bug: 851997 Test: hardware mirroring on cros Change-Id: Ie2fdc9f42423be1cd8efe7c59d43001e6096e935 Reviewed-on: https://chromium-review.googlesource.com/1104858 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Daniel Nicoara <dnicoara@chromium.org> Cr-Commit-Position: refs/heads/master@{#569971} [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/crtc_controller.h [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/drm_overlay_validator.cc [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/drm_window.cc [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/hardware_display_controller.cc [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/hardware_display_controller.h [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/hardware_display_controller_unittest.cc [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/screen_manager.cc [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/screen_manager.h [modify] https://crrev.com/07be465d93f6688a6c9e239eccb481ca97397f8a/ui/ozone/platform/drm/gpu/screen_manager_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bb1059e537e6de55913f7c526f01fc46b4a5642d commit bb1059e537e6de55913f7c526f01fc46b4a5642d Author: Michael Spang <spang@chromium.org> Date: Mon Jun 25 06:49:55 2018 ozone: drm: Clean up error handling around page flips The page flip code mixes two error handling styles and in many cases returns the same status (or in some cases, inconsistent statuses) through the return value and also via the SwapCompletionCallback. The page flip code also supports two modes: real page flips and test page flips, which are used to validate configurations before use. Real page flips crash the GPU process if the return value indicates failure, but obviously this is not expected to occur so in practice those always return success, and pass status information through the SwapCompletionCallback. Test page flips are the opposite: they must return their status in the return value, and pass a dummy completion callback which ignores its arguments. There are actually no asynchronous failure cases, despite a fair amount of code trying to account for that possibility such as the coalescing of SwapResults in PageFlipRequest. We can take advantage of this to avoid passing the SwapCompletionCallback into most functions, and simply use the return value as the only status return. The only complication is that successful completion is always asynchronous, and may even require tracking multiple underlying page flip events, as in hardware mirroring scenarios. This patch handles that issue by registering PageFlipCallbacks for all of the individual page flip events as usual, but only passing ownership of the SwapCompletionCallback into the PageFlipRequest at the last minute, after all of the individual page flips have been submitted succesfully. After hiding the SwapCompletionCallback from most of the DRM internals, test page flips no longer need to construct a dummy SwapCompletionCallback. They also don't need to construct any PageFlipCallbacks, since they don't generate any page flip events - this simplifies that logic as well by moving construction of each PageFlipCallback to immediately after a successful page flip request. Moving creation of those callbacks later also removes any requirement to make manual calls to PageFlipRequest::Signal to fixup failure cases. Since failures of real page flips triggered by SchedulePageFlip() simply crash the process, there is no need for a return value. This patch moves the CHECK() which cause these crashes inside of SchedulePageFlip(), and removes the return value. As a result, TestPageFlip() and all of the internal methods called via ActualSchedulePageFlip() use return values exclusively for status information, and never see the SwapCompletionCallback. SchedulePageFlip(), on the other hand, receives the SwapCompletionCallack and uses it exclusively for its status, and returns void. Bug: 851997 Test: unit tests, various display configurations on cros Change-Id: I87408275b0958281ef79a6b5086a38b2c3c08ee1 Reviewed-on: https://chromium-review.googlesource.com/1104859 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Daniel Nicoara <dnicoara@chromium.org> Cr-Commit-Position: refs/heads/master@{#569973} [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/crtc_controller.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/crtc_controller.h [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/drm_device.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/drm_device.h [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/drm_overlay_validator_unittest.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/drm_thread.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/drm_window.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/drm_window.h [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/drm_window_unittest.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/hardware_display_controller.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/hardware_display_controller.h [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/hardware_display_controller_unittest.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_unittest.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/mock_drm_device.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/mock_drm_device.h [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/page_flip_request.cc [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/page_flip_request.h [modify] https://crrev.com/bb1059e537e6de55913f7c526f01fc46b4a5642d/ui/ozone/platform/drm/gpu/screen_manager_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ee7d914f2fef4bc7f03e7d2ffc4f2e9600f436d1 commit ee7d914f2fef4bc7f03e7d2ffc4f2e9600f436d1 Author: Michael Spang <spang@chromium.org> Date: Mon Jun 25 07:24:33 2018 ozone: drm: Add vulkan implementation This enables initializing vulkan and offscreen rendering but not presentation. Bug: 851997 Test: ozone_demo gets past vulkan instance creation on eve build with vulkan support Change-Id: I14f56fb4e22c0cdc275aaead3e734f59e18722a9 Reviewed-on: https://chromium-review.googlesource.com/1104862 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Daniel Nicoara <dnicoara@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Cr-Commit-Position: refs/heads/master@{#569976} [modify] https://crrev.com/ee7d914f2fef4bc7f03e7d2ffc4f2e9600f436d1/ui/ozone/demo/simple_renderer_factory.cc [modify] https://crrev.com/ee7d914f2fef4bc7f03e7d2ffc4f2e9600f436d1/ui/ozone/demo/vulkan_renderer.cc [modify] https://crrev.com/ee7d914f2fef4bc7f03e7d2ffc4f2e9600f436d1/ui/ozone/platform/drm/BUILD.gn [modify] https://crrev.com/ee7d914f2fef4bc7f03e7d2ffc4f2e9600f436d1/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc [modify] https://crrev.com/ee7d914f2fef4bc7f03e7d2ffc4f2e9600f436d1/ui/ozone/platform/drm/gpu/gbm_surface_factory.h [add] https://crrev.com/ee7d914f2fef4bc7f03e7d2ffc4f2e9600f436d1/ui/ozone/platform/drm/gpu/vulkan_implementation_gbm.cc [add] https://crrev.com/ee7d914f2fef4bc7f03e7d2ffc4f2e9600f436d1/ui/ozone/platform/drm/gpu/vulkan_implementation_gbm.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/17c8170749fce68f778d80034171f8a5a3adad39 commit 17c8170749fce68f778d80034171f8a5a3adad39 Author: Michael Spang <spang@chromium.org> Date: Mon Jun 25 16:46:43 2018 ozone: drm: Return page flip status right after submission Rather than waiting for the page flip event to return the status, return it right after it's determined, which is immediately after submitting the page flip to the kernel. This requires splitting the page flip callback into two callbacks, one that takes the status and one that takes the presentation feedback. This should be familiar as the GLSurface API has exactly the same separation. This does not actually change when GbmSurfaceless passes the ACK along, so there should be no visible change. Changing when the ACK is returned from GbmSurfacless can be done but would also require changes to viz::BufferQueue. Bug: 851997 Test: unit tests, CrOS still renders Change-Id: Ided422ca3065e431ca8c9a5909b3faae72d97cc5 Reviewed-on: https://chromium-review.googlesource.com/1104863 Reviewed-by: Daniel Nicoara <dnicoara@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org> Cr-Commit-Position: refs/heads/master@{#570067} [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/drm_thread.cc [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/drm_thread.h [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/drm_window.cc [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/drm_window.h [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/drm_window_proxy.cc [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/drm_window_proxy.h [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/drm_window_unittest.cc [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/gbm_surfaceless.cc [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/gbm_surfaceless.h [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/hardware_display_controller.cc [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/hardware_display_controller.h [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/hardware_display_controller_unittest.cc [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/page_flip_request.cc [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/page_flip_request.h [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/platform/drm/gpu/screen_manager_unittest.cc [modify] https://crrev.com/17c8170749fce68f778d80034171f8a5a3adad39/ui/ozone/public/swap_completion_callback.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/00dc392e7629e74ee2fb82c30355b10d823ac541 commit 00dc392e7629e74ee2fb82c30355b10d823ac541 Author: Michael Spang <spang@chromium.org> Date: Mon Jun 25 21:35:45 2018 ozone: drm: Add OverlaySurface implementation This adds an implementation of the OverlaySurface interface for DRM. Bug: 851997 Test: compile Change-Id: Ia5d2a9a8f7b334914635f3c15e6fb88d6d6c5e6f Reviewed-on: https://chromium-review.googlesource.com/1104865 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Reviewed-by: Alex Sakhartchouk <alexst@chromium.org> Cr-Commit-Position: refs/heads/master@{#570188} [modify] https://crrev.com/00dc392e7629e74ee2fb82c30355b10d823ac541/ui/ozone/platform/drm/BUILD.gn [add] https://crrev.com/00dc392e7629e74ee2fb82c30355b10d823ac541/ui/ozone/platform/drm/gpu/gbm_overlay_surface.cc [add] https://crrev.com/00dc392e7629e74ee2fb82c30355b10d823ac541/ui/ozone/platform/drm/gpu/gbm_overlay_surface.h [modify] https://crrev.com/00dc392e7629e74ee2fb82c30355b10d823ac541/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc [modify] https://crrev.com/00dc392e7629e74ee2fb82c30355b10d823ac541/ui/ozone/platform/drm/gpu/gbm_surface_factory.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cd5d9e0330dc65b2db77a75cecba8cd01283268c commit cd5d9e0330dc65b2db77a75cecba8cd01283268c Author: Michael Spang <spang@chromium.org> Date: Mon Jun 25 23:23:31 2018 ozone: drm: Allow creating vulkan-renderable scanout buffers Use vkCreateDmaBufImageINTEL until VK_EXT_image_drm_format_modifier is available. We can't import buffers created with modifiers using this method, so work around this for by adding a new flag to buffer creation. Bug: 851997 Test: ozone_demo --enable-vulkan on vulkan-enabled eve Change-Id: If91c678d7ee4ce52c610f55f9c7a2dbd561a4158 Reviewed-on: https://chromium-review.googlesource.com/1104866 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Daniel Nicoara <dnicoara@chromium.org> Cr-Commit-Position: refs/heads/master@{#570233} [modify] https://crrev.com/cd5d9e0330dc65b2db77a75cecba8cd01283268c/ui/ozone/platform/drm/gpu/drm_thread.cc [modify] https://crrev.com/cd5d9e0330dc65b2db77a75cecba8cd01283268c/ui/ozone/platform/drm/gpu/drm_thread.h [modify] https://crrev.com/cd5d9e0330dc65b2db77a75cecba8cd01283268c/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc [modify] https://crrev.com/cd5d9e0330dc65b2db77a75cecba8cd01283268c/ui/ozone/platform/drm/gpu/drm_thread_proxy.h [modify] https://crrev.com/cd5d9e0330dc65b2db77a75cecba8cd01283268c/ui/ozone/platform/drm/gpu/gbm_buffer.h [modify] https://crrev.com/cd5d9e0330dc65b2db77a75cecba8cd01283268c/ui/ozone/platform/drm/gpu/gbm_surface_factory.cc [modify] https://crrev.com/cd5d9e0330dc65b2db77a75cecba8cd01283268c/ui/ozone/platform/drm/gpu/gbm_surface_factory.h [modify] https://crrev.com/cd5d9e0330dc65b2db77a75cecba8cd01283268c/ui/ozone/public/surface_factory_ozone.cc [modify] https://crrev.com/cd5d9e0330dc65b2db77a75cecba8cd01283268c/ui/ozone/public/surface_factory_ozone.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7c52fbaac1c57ec1f596fa2d02f11f9413da12d2 commit 7c52fbaac1c57ec1f596fa2d02f11f9413da12d2 Author: Michael Spang <spang@chromium.org> Date: Mon Jun 25 23:42:37 2018 ozone: demo: Add support for overlay surfaces This adds a new renderer to ozone demo that presents to an OverlaySurface. Synchronization by submitting a gfx::GpuFence with the planes is not finished yet; instead we just wait after every queue submission. Bug: 851997 Test: ozone_demo --enable-vulkan on vulkan-enabled eve Change-Id: Icb4a6d2fdb8f74b68c801edc66c340ff2bd64df1 Reviewed-on: https://chromium-review.googlesource.com/1104867 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Cr-Commit-Position: refs/heads/master@{#570239} [modify] https://crrev.com/7c52fbaac1c57ec1f596fa2d02f11f9413da12d2/ui/ozone/demo/BUILD.gn [modify] https://crrev.com/7c52fbaac1c57ec1f596fa2d02f11f9413da12d2/ui/ozone/demo/simple_renderer_factory.cc [add] https://crrev.com/7c52fbaac1c57ec1f596fa2d02f11f9413da12d2/ui/ozone/demo/vulkan_overlay_renderer.cc [add] https://crrev.com/7c52fbaac1c57ec1f596fa2d02f11f9413da12d2/ui/ozone/demo/vulkan_overlay_renderer.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cb6508afbc6c160968df9019228433a24d788059 commit cb6508afbc6c160968df9019228433a24d788059 Author: Michael Spang <spang@chromium.org> Date: Tue Jun 26 23:16:43 2018 gpu: vulkan: Add vkDestroy{Image,Memory} to bindings Add some missing destruction functions to gpu::VulkanFunctionPointers so that we can cleanup imported images. Bug: 851997 Test: compile Change-Id: Ia93aada5909950f37af63d47eeff4b47af190f70 Reviewed-on: https://chromium-review.googlesource.com/1115568 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org> Cr-Commit-Position: refs/heads/master@{#570576} [modify] https://crrev.com/cb6508afbc6c160968df9019228433a24d788059/gpu/vulkan/generate_bindings.py [modify] https://crrev.com/cb6508afbc6c160968df9019228433a24d788059/gpu/vulkan/vulkan_function_pointers.cc [modify] https://crrev.com/cb6508afbc6c160968df9019228433a24d788059/gpu/vulkan/vulkan_function_pointers.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3a23edd1783cc1cf3b3e6636553c6c2e3e5cd4ee commit 3a23edd1783cc1cf3b3e6636553c6c2e3e5cd4ee Author: Michael Spang <spang@chromium.org> Date: Wed Jun 27 19:44:02 2018 ozone: demo: Add missing destruction of per-buffer vulkan objects Bug: 851997 Test: ozone_demo --enable-vulkan on vulkan-enabled eve Change-Id: I08164f47a83387e4d9311cf5271b410402c5f1ec Reviewed-on: https://chromium-review.googlesource.com/1115569 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Daniel Nicoara <dnicoara@chromium.org> Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Cr-Commit-Position: refs/heads/master@{#570868} [modify] https://crrev.com/3a23edd1783cc1cf3b3e6636553c6c2e3e5cd4ee/ui/ozone/demo/vulkan_overlay_renderer.cc [modify] https://crrev.com/3a23edd1783cc1cf3b3e6636553c6c2e3e5cd4ee/ui/ozone/demo/vulkan_overlay_renderer.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7b9bcca184d3ffcb00cd1617f1352bd3220134ca commit 7b9bcca184d3ffcb00cd1617f1352bd3220134ca Author: Michael Spang <spang@chromium.org> Date: Tue Jul 03 17:10:50 2018 ozone: drm: Implement VkFence export to sync_file Implement sync_file export for fences so we can submit fences with planes to DRM atomic. This does not work unless you have a fairly recent kernel (requires syncobj support, I915_EXEC_FENCE_ARRAY). Bug: 851997 Test: ozone_demo on eve with USE=vulkan and kernel 4.14 Change-Id: I5859b64690e9b45ccb95698a9ca096f0847ec51b Reviewed-on: https://chromium-review.googlesource.com/1115570 Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org> Cr-Commit-Position: refs/heads/master@{#572262} [modify] https://crrev.com/7b9bcca184d3ffcb00cd1617f1352bd3220134ca/gpu/vulkan/vulkan_implementation.h [modify] https://crrev.com/7b9bcca184d3ffcb00cd1617f1352bd3220134ca/gpu/vulkan/vulkan_implementation_android.cc [modify] https://crrev.com/7b9bcca184d3ffcb00cd1617f1352bd3220134ca/gpu/vulkan/vulkan_implementation_android.h [modify] https://crrev.com/7b9bcca184d3ffcb00cd1617f1352bd3220134ca/gpu/vulkan/x/BUILD.gn [modify] https://crrev.com/7b9bcca184d3ffcb00cd1617f1352bd3220134ca/gpu/vulkan/x/vulkan_implementation_x11.cc [modify] https://crrev.com/7b9bcca184d3ffcb00cd1617f1352bd3220134ca/gpu/vulkan/x/vulkan_implementation_x11.h [modify] https://crrev.com/7b9bcca184d3ffcb00cd1617f1352bd3220134ca/ui/ozone/platform/drm/gpu/vulkan_implementation_gbm.cc [modify] https://crrev.com/7b9bcca184d3ffcb00cd1617f1352bd3220134ca/ui/ozone/platform/drm/gpu/vulkan_implementation_gbm.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c53c6095ca8c16d2ef2cc0057fe91ae0828c0572 commit c53c6095ca8c16d2ef2cc0057fe91ae0828c0572 Author: Michael Spang <spang@chromium.org> Date: Thu Jul 05 19:07:13 2018 ozone: demo: Use fences for synchronizing presentation in OverlayRenderer This makes ozone_demo use exported fences to synchronize overlay planes submitted to the surface, instead of stalling the GPU by waiting for all submitted work to complete. Bug: 851997 Test: ozone_demo on eve with USE=vulkan and kernel 4.14 Change-Id: Ib9be530cf938802389d1842cfd289050353062b2 Reviewed-on: https://chromium-review.googlesource.com/1115571 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Alex Sakhartchouk <alexst@chromium.org> Cr-Commit-Position: refs/heads/master@{#572836} [modify] https://crrev.com/c53c6095ca8c16d2ef2cc0057fe91ae0828c0572/ui/ozone/demo/vulkan_overlay_renderer.cc [modify] https://crrev.com/c53c6095ca8c16d2ef2cc0057fe91ae0828c0572/ui/ozone/demo/vulkan_overlay_renderer.h
Comment 1 by bugdroid1@chromium.org
, Jun 20 2018