[Mesa-dev] [PATCH mesa 0/3] Add VK_KHR_display and friends for radv

2017-12-21 Thread Keith Packard
Here's an implementation of a suite of extensions necessary to directly drive displays from the mesa Vulkan implementation: VK_KHR_display Provides basic enumeration, control and display to directly connected devices. VK_EXT_direct_mode_display VK_EXT_acquire_xlib_display

[Mesa-dev] [PATCH mesa 3/3] radv: add VK_EXT_display_control to radv [v2]

2017-12-21 Thread Keith Packard
NULL parameter to drmCrtcQueueSequence ioctl as we don't care what sequence the event was actually queued to. Signed-off-by: Keith Packard --- src/amd/vulkan/radv_extensions.py | 1 + src/amd/vulkan/radv_private.h | 11 +- src/amd/vulkan/radv_wsi_display.c | 108 +

[Mesa-dev] [PATCH mesa 1/3] radv: Add VK_KHR_display, VK_EXT_direct_mode_display and VK_EXT_acquire_xlib_display [v3]

2017-12-21 Thread Keith Packard
data structure. v3: Restructure to provide KMS access using the existing VK_EXT_acquire_xlib_display instead of creating a new extension. Rebase on more recent mesa master Signed-off-by: Keith Packard --- configure.ac| 12 + src

Re: [Mesa-dev] [PATCH] st/dri: Add an option to always request a front buffer from the loader

2017-09-18 Thread Keith Packard
Thomas Hellstrom writes: > When an application decides to read from the front buffer of a window, > typically a fake front is created and initialized with the real front window > contents. However, if there was a window manager reparenting operation between > the last swapbuffer and the read the

Re: [Mesa-dev] [PATCH mesa 01/21] vulkan: Add KHR_display extension using DRM [v4]

2018-06-11 Thread Keith Packard
Eric Engestrom writes: > I just pushed it; your `if (result != VK_SUCCESS)` should now just be > `goto fail;` :) Yup, I've update my drm-lease branch to match. -- -keith signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@li

Re: [Mesa-dev] [PATCH mesa 01/21] vulkan: Add KHR_display extension using DRM [v4]

2018-06-11 Thread Keith Packard
Jason Ekstrand writes: > I apologize for how nit-picky this is going to get but it's starting to > bother me... I'm glad you showed me what you wanted; always nice to have help! I've reformatted and restructured the code along the lines that you've suggested here for the entire series. In partic

Re: [Mesa-dev] [PATCH mesa 01/21] vulkan: Add KHR_display extension using DRM [v4]

2018-06-11 Thread Keith Packard
Jason Ekstrand writes: > If you move the VK_OUTARRAY_MAKE up higher, both of the "goto bail"s can be > "return vk_outarray_status(&conn)". Not a big deal though; what you have > is probably fine. I'll leave it then. >> +prop->currentStackIndex = stack_index++; >> > > In your branch

Re: [Mesa-dev] [PATCH mesa 01/21] vulkan: Add KHR_display extension using DRM [v4]

2018-06-11 Thread Keith Packard
Jason Ekstrand writes: > Sorry for the multitude of replies. :-( It's all the same to me; you've been busy! >>radv_wsi_proc_addr, >> - &physical_device->instance->alloc); >> + &physical_device->instance->a

Re: [Mesa-dev] [PATCH mesa 02/21] anv: Add KHR_display extension to anv [v4]

2018-06-11 Thread Keith Packard
Jason Ekstrand writes: >> +#define MM_PER_PIXEL (1.0/96.0 * 25.4) >> > > I don't think you need this. :-) Now you have me wondering when it was needed :-) > Other than that and the comment on patch 1 about stuff that should probably > go here, this looks good to me. Yeah, if you're not con

Re: [Mesa-dev] [PATCH mesa 04/21] vulkan: Add EXT_direct_mode_display

2018-06-11 Thread Keith Packard
Jason Ekstrand writes: > This seems a bit odd. Why is the FD not stored in the display? What if > you acquire multiple displays for two-player VR? If the master FD passed > in is not -1, we could just create a VkDisplayKHR object containing > it. You want to share the master_fd passed in at i

Re: [Mesa-dev] [PATCH mesa 05/21] anv: Add EXT_direct_mode_display to anv driver

2018-06-11 Thread Keith Packard
Jason Ekstrand writes: > Alphabetize, please. :-) They're not actually in alphabetical order; EXT comes after KHR? I've ordered the EXT extensions within the existing EXT list, and added the MESA and GOOGLE extensions at the end. -- -keith signature.asc Description: PGP signature __

Re: [Mesa-dev] [PATCH mesa 07/21] vulkan: Add EXT_acquire_xlib_display [v2]

2018-06-11 Thread Keith Packard
Jason Ekstrand writes: > As with patch 1, I've gone through and made a pile of style changes to > bring things back under 80 characters. You can find it on this > branch: I've adopted that style across the whole series. >> struct wsi_display { >> @@ -1414,5 +1421,468 @@ wsi_release_display(Vk

[Mesa-dev] [PATCH mesa 0/0] Vulkan: Add DRM lease support

2018-06-11 Thread Keith Packard
Here's an updated patch series for DRM lease support using KHR_display and other standard Vulkan extensions. This series incorporates review from Eric Engestrom and Jason Ekstrom. Thanks to both of them! -keith ___ mesa-dev mailing list mesa-dev@lists.

[Mesa-dev] [PATCH mesa 1/9] vulkan: Add KHR_display extension using DRM [v8]

2018-06-11 Thread Keith Packard
t call * Add wsi_init_pthread_cond_monotonic helper function to isolate pthread error handling from wsi_display_init_wsi Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/amd/vulkan/radv_device.c|8 + src/amd/vulkan/radv_private.h |1

[Mesa-dev] [PATCH mesa 9/9] radv: Add EXT_acquire_xlib_display to radv driver [v2]

2018-06-11 Thread Keith Packard
This extension adds the ability to borrow an X RandR output for temporary use directly by a Vulkan application to the radv driver. v2: Simplify addition of VK_USE_PLATFORM_XLIB_XRANDR_KHR to vulkan_wsi_args Suggested-by: Eric Engestrom Signed-off-by: Keith Packard

[Mesa-dev] [PATCH mesa 6/9] radv: Add EXT_direct_mode_display to radv driver

2018-06-11 Thread Keith Packard
Add support for the EXT_direct_mode_display extension. This just provides the vkReleaseDisplayEXT function. Signed-off-by: Keith Packard --- src/amd/vulkan/radv_extensions.py | 1 + src/amd/vulkan/radv_wsi_display.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/src/amd

[Mesa-dev] [PATCH mesa 4/9] vulkan: Add EXT_direct_mode_display [v2]

2018-06-11 Thread Keith Packard
lumns. Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/vulkan/wsi/wsi_common_display.c | 18 ++ src/vulkan/wsi/wsi_common_display.h | 5 + 2 files changed, 23 insertions(+) diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_disp

[Mesa-dev] [PATCH mesa 8/9] anv: Add EXT_acquire_xlib_display to anv driver [v3]

2018-06-11 Thread Keith Packard
in alphabetical order Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/intel/Makefile.vulkan.am| 7 ++ src/intel/vulkan/anv_entrypoints_gen.py | 5 - src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan/anv_extensions_gen.py | 10

[Mesa-dev] [PATCH mesa 5/9] anv: Add EXT_direct_mode_display to anv driver [v2]

2018-06-11 Thread Keith Packard
Add support for the EXT_direct_mode_display extension. This just provides the vkReleaseDisplayEXT function. v2: Add extension to list in alphabetical order Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan

[Mesa-dev] [PATCH mesa 3/9] radv: Add KHR_display extension to radv [v4]

2018-06-11 Thread Keith Packard
Wrap lines to 80 columns. Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/amd/vulkan/Makefile.am| 8 ++ src/amd/vulkan/Makefile.sources | 3 + src/amd/vulkan/meson.build| 5 + src/amd/vulkan/radv_device.c | 17 src/amd/v

[Mesa-dev] [PATCH mesa 2/9] anv: Add KHR_display extension to anv [v5]

2018-06-11 Thread Keith Packard
ce_init API v5: Adopt Jason Ekstrand's coding conventions Declare variables at first use, eliminate extra whitespace between types and names. Wrap lines to 80 columns. Remove spurious MM_PER_PIXEL define Suggested-by: Jason Ekstrand Signed-off-by: Keith Pack

[Mesa-dev] [PATCH mesa 7/9] vulkan: Add EXT_acquire_xlib_display [v3]

2018-06-11 Thread Keith Packard
ion. Convert at the public API (wsi_get_randr_output_display). Clean up check for usable active_crtc (possible when only the desired output is connected to the crtc). Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard fixup for acquire fixup for RROutput t

Re: [Mesa-dev] [PATCH mesa 1/9] vulkan: Add KHR_display extension using DRM [v8]

2018-06-14 Thread Keith Packard
Jason Ekstrand writes: > I'm trusting that not much changed other than what was explicitly called > out. I didn't want to re-read in *that* much detail again. :-) You are correct, all of the changes from the previous patch were listed in the commit message. > Reviewed-by: Jason Ekstrand Than

Re: [Mesa-dev] [PATCH mesa 2/9] anv: Add KHR_display extension to anv [v5]

2018-06-14 Thread Keith Packard
open the device slightly earlier in the function. Also, close the DRM master FD when the driver is being shut down. v2: Use anv_gem_get_param to detect working master_fd Signed-off-by: Keith Packard --- src/intel/vulkan/anv_device.c | 34 -- 1 file changed, 16 inser

Re: [Mesa-dev] [PATCH mesa 2/9] anv: Add KHR_display extension to anv [v5]

2018-06-14 Thread Keith Packard
Jason Ekstrand writes: >> Signed-off-by: Keith Packard >> >> fixup >> > > Did you mean to leave this in here? Nope; just rebasing/squashing noise. I noticed this in passing and have already removed it. -- -keith signature.

Re: [Mesa-dev] [PATCH mesa 7/9] vulkan: Add EXT_acquire_xlib_display [v3]

2018-06-14 Thread Keith Packard
Jason Ekstrand writes: >> Signed-off-by: Keith Packard >> >> fixup for acquire >> >> fixup for RROutput type >> >> Signed-off-by: Keith Packard >> >> fixup >> > > Lots of "fixup". Did you mean to actually comment on

[Mesa-dev] [PATCH] wsi_common_display: Deal with vscan values

2018-06-14 Thread Keith Packard
e don't need to deal with that separately, we can just compare flags normally. Signed-off-by: Keith Packard --- src/vulkan/wsi/wsi_common_display.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_co

Re: [Mesa-dev] [PATCH] wsi_common_display: Deal with vscan values

2018-06-14 Thread Keith Packard
Jason Ekstrand writes: > Looks good to me. With this properly sprinkled on the appropriate patches, > the entire series is > > Reviewed-by: Jason Ekstrand Thanks so much! I've rebased the series onto current master and pushed it back to my gitlab repo here https://gitlab.freedesktop.o

[Mesa-dev] [PATCH 2/7] anv: Add VK_EXT_display_surface_counter to anv driver [v2]

2018-06-14 Thread Keith Packard
This extension is required to support EXT_display_control as it offers a way to query whether the vblank counter is supported. v2: Add extension to list in alphabetical order Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/intel/vulkan/anv_extensions.py

[Mesa-dev] [PATCH 3/7] radv: Add VK_EXT_display_surface_counter to radv driver

2018-06-14 Thread Keith Packard
This extension is required to support EXT_display_control as it offers a way to query whether the vblank counter is supported. Signed-off-by: Keith Packard --- src/amd/vulkan/radv_extensions.py | 1 + src/amd/vulkan/radv_wsi.c | 12 2 files changed, 13 insertions(+) diff

[Mesa-dev] [PATCH 4/7] anv: Support wait for heterogeneous list of fences [v2]

2018-06-14 Thread Keith Packard
Jason Ekstrand Signed-off-by: Keith Packard --- src/intel/vulkan/anv_queue.c | 105 +-- 1 file changed, 88 insertions(+), 17 deletions(-) diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index 6fe04a0a19d..8df99c84549 100644 --- a/src/

[Mesa-dev] [PATCH 1/7] vulkan: Add VK_EXT_display_surface_counter [v4]

2018-06-14 Thread Keith Packard
xtra whitespace between types and names. Wrap lines to 80 columns. Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/vulkan/wsi/wsi_common.c | 12 src/vulkan/wsi/wsi_common.h | 6 ++ src/vulkan/wsi/wsi_common_display.c | 27 +

[Mesa-dev] [PATCH 0/7] vulkan: Add VK_EXT_display_control and VK_EXT_display_surface_counter

2018-06-14 Thread Keith Packard
Here's a couple of reasonably straightforward extensions implemented for both anv and radv drivers. VK_EXT_display_surface_counter is a very simple extension which adds an API, vkGetPhysicalSurfaceCapabilities2EXT, to extend the existing vkGetPhysicalDeviceSurfaceCapabilitiesKHR and vkGetPhysicalD

[Mesa-dev] [PATCH 5/7] vulkan: add VK_EXT_display_control [v5]

2018-06-14 Thread Keith Packard
Signed-off-by: Keith Packard --- src/vulkan/wsi/wsi_common.h | 10 + src/vulkan/wsi/wsi_common_display.c | 307 +++- src/vulkan/wsi/wsi_common_display.h | 29 +++ 3 files changed, 345 insertions(+), 1 deletion(-) diff --git a/src/vulkan/wsi/wsi_common.h b/src/

[Mesa-dev] [PATCH 6/7] anv: add VK_EXT_display_control to anv driver [v2]

2018-06-14 Thread Keith Packard
space between types and names. Wrap lines to 80 columns. Add extension to list in alphabetical order Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan/anv_private.h | 4 ++ src/intel/v

[Mesa-dev] [PATCH 7/7] radv: add VK_EXT_display_control to radv driver [v3]

2018-06-14 Thread Keith Packard
eliminate extra whitespace between types and names. Wrap lines to 80 columns. Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/amd/vulkan/radv_device.c | 68 +- src/amd/vulkan/radv_extensions.py | 1 + src/amd/vulkan/radv_private.h |

Re: [Mesa-dev] [PATCH 1/7] vulkan: Add VK_EXT_display_surface_counter [v4]

2018-06-16 Thread Keith Packard
Jason Ekstrand writes: > I really don't like adding a third get_capabilities hook. Yeah, but this new function takes a different struct parameter which has a different (but not strict superset) of contents from either of the existing functions. Annoying. > An alternative way to do this would be

Re: [Mesa-dev] [PATCH] wsi_common_display: Deal with vscan values

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > 1) We weren't setting planeReorderPossible at all and we were using 0 > instead of VK_FALSE (they're the same but we should use the enum) for > persistentContent > 2) We weren't advertising disconnected connectors via > GetPhysicalDeviceDisplayProperties but were return

Re: [Mesa-dev] [PATCH] wsi_common_display: Deal with vscan values

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > Looks good. Passes the CTS. Push it! All done. Now just two more series to go in this set :-) -- -keith signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freed

[Mesa-dev] [PATCH mesa] vulkan: EXT_acquire_xlib_display requires libXrandr headers to build

2018-06-19 Thread Keith Packard
. We don't need to link against the library as we don't use any functions from there, so don't add the _LIBS value in the autotools build. Signed-off-by: Keith Packard --- configure.ac | 2 ++ meson.build | 2 ++ src/amd/vulkan/Makefile.am | 3 ++-

Re: [Mesa-dev] [PATCH] anv, radv: Add support for VK_KHR_get_display_properties2

2018-06-19 Thread Keith Packard
which style you pick, but I think they should be the same. I have a mild preference for the second style as I think it's easier to read the code without all of the conditionals. As for the actual implementation of each function, it looks good, so I'll actually mark this as Reviewed-by: Kei

Re: [Mesa-dev] [PATCH 1/2] vulkan/wsi: Get rid of the get_capabilities hook

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > Instead, we can just use get_capabilities2. This way back-ends only > have to implement one hook. Yeah, this looks nice. Are you going to remove the unused functions at some point? Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP sig

Re: [Mesa-dev] [counter-PATCH 2/2] Vulkan/wsi: Implement VK_EXT_display_surface_counter

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > Sometimes the best way to review a patch is with another patch. :-) I'm > not sure what you think of this approach but I didn't really relish the > idea of having 3 get_capabilities entrypoints. With these two patches, > we're now down to one. In order to implement VK_

Re: [Mesa-dev] [PATCH 4/7] anv: Support wait for heterogeneous list of fences [v2]

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > I still don't really like this but I agree that this code really should not > be getting hit very often so it's probably not too bad. Maybe one day > we'll be able to drop the non-syncobj paths entirely. Wouldn't that be > nice. I agree. What I want to have is kernel-s

Re: [Mesa-dev] [PATCH 4/7] anv: Support wait for heterogeneous list of fences [v2]

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > I suppose we probably shouldn't worry about current_time being greater than > INT64_MAX? I guess if that happens we have pretty big problems... Nope, we've already given up on that working -- it's a couple hundred years of system uptime. Neither of us have any concerns

Re: [Mesa-dev] [PATCH 5/7] vulkan: add VK_EXT_display_control [v5]

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: >> + if (!prop) >> + continue; >> + if (prop->flags & DRM_MODE_PROP_ENUM) { >> + if (!strcmp(prop->name, "DPMS")) >> +connector->dpms_property = drm_connector->props[p]; >> > > break? Not break; I need to free the property. However, a

Re: [Mesa-dev] [PATCH] anv, radv: Add support for VK_KHR_get_display_properties2

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > Thoughts? You've looked at the code more closely than I have; please feel free to leave it if you think it would seem worse as separate functions. -- -keith signature.asc Description: PGP signature ___ mesa-dev mailing list

Re: [Mesa-dev] [counter-PATCH 2/2] Vulkan/wsi: Implement VK_EXT_display_surface_counter

2018-06-19 Thread Keith Packard
you're good to go. With the addition of the explicit initialization, this patch is Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] vulkan/wsi: Get rid of the get_capabilities hook

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > They're being used as helpers and they're actually kind-of nice for > that. Sounds good. I hadn't actually looked at the details; just saw the functions going away in the initializers. -- -keith signature.asc Description: PGP signature ___

Re: [Mesa-dev] [PATCH 4/7] anv: Support wait for heterogeneous list of fences [v2]

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > I don't think I have any more comments on this patch. It's gross but I > think it should work. I'll mark you down as 'Acked-by' then. Neither of us loves the implementation; I'll see about creating the kernel infrastructure necessary to supplant it. -- -keith signat

Re: [Mesa-dev] [PATCH 6/7] anv: add VK_EXT_display_control to anv driver [v2]

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: >> + if (allocator) >> + alloc = allocator; >> + else >> + alloc = &device->instance->alloc; >> > > This is what vk_alloc2 is for. :-) ... > And vk_free2 ... > This isn't needed if you're using vk_alloc2 Yeah, but I need to pass the allocator down to the wsi co

Re: [Mesa-dev] [PATCH 4/7] anv: Support wait for heterogeneous list of fences [v2]

2018-06-19 Thread Keith Packard
Jason Ekstrand writes: > You can have a full reviewed-by You're too kind :-) -- -keith signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH mesa] vulkan: EXT_acquire_xlib_display requires libXrandr headers to build

2018-06-20 Thread Keith Packard
Eric Engestrom writes: > On Tuesday, 2018-06-19 16:06:14 -0700, Keith Packard wrote: >> When VK_USE_PLATFORM_XLIB_XRANDR_EXT is defined, vulkan.h includes >> X11/extensions/Xrandr.h for the RROutput typedef which is used in >> the vkGetRandROutputDisplayEXT interface. >

Re: [Mesa-dev] [PATCH v2] anv, radv: Add support for VK_KHR_get_display_properties2

2018-06-20 Thread Keith Packard
Jason Ekstrand writes: All looks good to me. Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] anv, radv: Add support for VK_KHR_get_display_properties2

2018-06-20 Thread Keith Packard
Jason Ekstrand writes: > I just sent a v2 which allocates a temporary array, calls properties2, and > then copies it back over. It doesn't duplicate the iteration code and > instead just leverages propertie2. On the down side, it's a bit more > allocation and data motion but, compared to the io

Re: [Mesa-dev] [PATCH 6/7] anv: add VK_EXT_display_control to anv driver [v2]

2018-06-20 Thread Keith Packard
Jason Ekstrand writes: > I believe that the WSI common code should be capable of fishing the > instance allocator out of the wsi_display so we need only pass the > allocator argument unmodified through to the core WSI code. Make sense? Thanks, I think I've sorted it out. I've pushed an updated

Re: [Mesa-dev] [PATCH 5/7] vulkan: add VK_EXT_display_control [v5]

2018-06-20 Thread Keith Packard
Jason Ekstrand writes: > That seems good to me. Unless, of course, DPMS is something we expect to > change over time somehow. Then again, we don't handle that at all right > now so meh. Let's go with what you wrote above for now. It's not even the dpms value, it's the dpms property itself, wh

[Mesa-dev] [PATCH mesa 0/4] Add EXT_display_control [v8]

2018-06-20 Thread Keith Packard
Here's the latest version of this series with only a few minor changes. It adapts to the API changes for surface_get_capabilities and changes how the allocator is found for fences. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.f

[Mesa-dev] [PATCH mesa 4/4] radv: add VK_EXT_display_control to radv driver [v5]

2018-06-20 Thread Keith Packard
_event and wsi_register_device_event now use the default allocator when NULL is provided, so remove the computation of 'alloc' here. Signed-off-by: Keith Packard --- src/amd/vulkan/radv_device.c | 70 - src/amd/vulkan/radv_extensions.py | 1 + src/amd/vulkan/radv

[Mesa-dev] [PATCH mesa 1/4] anv: Support wait for heterogeneous list of fences [v3]

2018-06-20 Thread Keith Packard
assed. Signed-off-by: Keith Packard Reviewed-by: Jason Ekstrand --- src/intel/vulkan/anv_queue.c | 108 +-- 1 file changed, 90 insertions(+), 18 deletions(-) diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c index 6fe04a0a19d..6e275629e14 1

[Mesa-dev] [PATCH mesa 2/4] vulkan: add VK_EXT_display_control [v8]

2018-06-20 Thread Keith Packard
Rearrange the event handler function order in the file to place routines in an easier to find order. Suggested-by: Jason Ekstrand v7: Adapt to API changes for surface_get_capabilities v8: Use wsi->alloc in register_display_event so that callers don't have to dig out an a

[Mesa-dev] [PATCH mesa 3/4] anv: add VK_EXT_display_control to anv driver [v4]

2018-06-20 Thread Keith Packard
. v4: wsi_register_display_event and wsi_register_device_event now use the default allocator when NULL is provided, so remove the computation of 'alloc' here. Signed-off-by: Keith Packard --- src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan/anv_private.h | 4 ++ s

Re: [Mesa-dev] [PATCH mesa 2/4] vulkan: add VK_EXT_display_control [v8]

2018-06-20 Thread Keith Packard
Jason Ekstrand writes: >> + /* Look for a DPMS property if we haven't already found one */ >> + for (int p = 0; connector->dpms_property == 0 && p < >> drm_connector->count_props; p++) { > > I'm guessing this is well over 80 characters Sorry I missed this -- I haven't managed to configure m

Re: [Mesa-dev] [PATCH mesa 3/4] anv: add VK_EXT_display_control to anv driver [v4]

2018-06-20 Thread Keith Packard
Jason Ekstrand writes: >> + fence = vk_alloc2(&device->instance->alloc, allocator, sizeof (*fence), >> 8, >> + VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); > > zalloc? Yes, definitely. Thanks for catching this. Updated and pushed the series. -- -keith signature.asc Description:

Re: [Mesa-dev] [PATCH mesa 2/4] vulkan: add VK_EXT_display_control [v8]

2018-06-21 Thread Keith Packard
Jason Ekstrand writes: >> + if (!ret) >> + return VK_SUCCESS; >> + >> + if (errno != ENOMEM) { > > This strikes me as a bit odd. What does ENOMEM mean if not "out of > memory"? ENOMEM means that the queue is full and that we should drain it and try again; that's what the wait_f

Re: [Mesa-dev] [PATCH mesa 2/4] vulkan: add VK_EXT_display_control [v8]

2018-06-21 Thread Keith Packard
Jason Ekstrand writes: >> Looks good. With that, patches 1-3 are > > Reviewed-by: Jason Ekstrand Thanks. > I'll let Dave or Bas review your fence hackery in radv. Sounds fine. I'll prod them if I don't get any response in the next day or so. -- -keith signature.asc Description: PGP signa

Re: [Mesa-dev] [PATCH mesa 4/4] radv: add VK_EXT_display_control to radv driver [v5]

2018-06-23 Thread Keith Packard
Bas Nieuwenhuizen writes: > Reviewed-by: Bas Nieuwenhuizen > > Thanks! Thanks to you as well; I've rebased and pushed to master. Two down, two to go (extensions that is) -- -keith signature.asc Description: PGP signature ___ mesa-dev mailing list

[Mesa-dev] [PATCH 3/3] radv: Add new VK_MESA_query_timestamp extension to radv driver

2018-06-23 Thread Keith Packard
This extension adds a single function to query the current GPU timestamp, just like glGetInteger64v(GL_TIMESTAMP, ×tamp). This function is needed to complete the implementation of GOOGLE_display_timing, which needs to be able to correlate GPU and CPU timestamps. Signed-off-by: Keith Packard

[Mesa-dev] [PATCH 0/3] Add (internal) MESA_query_timestamp extension to anv/radv

2018-06-23 Thread Keith Packard
This extension fetches the current GPU timestamp from the hardware, just like the OpenGL API glGetInteger64v(GL_TIMESTAMP, ×tamp) function. I need this to correlate GPU and CPU timestamps for the GOOGLE_display_timing extension, but I think it will be useful for applications as well. I'm not sure

[Mesa-dev] [PATCH 2/3] anv: Add new VK_MESA_query_timestamp extension to anv driver [v2]

2018-06-23 Thread Keith Packard
x27;s coding conventions Declare variables at first use, eliminate extra whitespace between types and names. Wrap lines to 80 columns. Add extension to list in alphabetical order Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- src/intel/v

[Mesa-dev] [PATCH 1/3] vulkan: Define new VK_MESA_query_timestamp extension [v2]

2018-06-23 Thread Keith Packard
x27;s coding conventions Declare variables at first use, eliminate extra whitespace between types and names. Wrap lines to 80 columns. Add extension to list in alphabetical order Suggested-by: Jason Ekstrand Signed-off-by: Keith Packard --- include/v

Re: [Mesa-dev] [PATCH mesa 2/4] vulkan: add VK_EXT_display_control [v8]

2018-06-25 Thread Keith Packard
Danylo Piliaiev writes: > Hello Keith, > > I am not able to build Mesa after this patch: > > wsi/wsi_common_display.c:991:4: error: unknown field ‘sequence_handler’ > specified in initializer >     .sequence_handler = wsi_display_sequence_handler, Sounds like you need a newer libdrm that inclu

Re: [Mesa-dev] [PATCH mesa 2/4] vulkan: add VK_EXT_display_control [v8]

2018-06-25 Thread Keith Packard
Danylo Piliaiev writes: > Thanks, then should this dependency be expressed in autoconf and > meson? Yup; looks like we missed a step. -- -keith signature.asc Description: PGP signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https:

[Mesa-dev] [PATCH mesa] vulkan/wsi_common_display: Return SURFACE_LOST for fatal DRM errors

2018-06-26 Thread Keith Packard
to get another lease and create a new surface for that. Signed-off-by: Keith Packard Cc: Jason Ekstrand --- src/vulkan/wsi/wsi_common_display.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi

Re: [Mesa-dev] [PATCH mesa] vulkan/wsi_common_display: Return SURFACE_LOST for fatal DRM errors

2018-06-27 Thread Keith Packard
Jason Ekstrand writes: > Is this the same thing that happens on VT switch? If so, we may want to > return SURFACE_LOST for leases and OUT_OF_DATE for things running directly > on the display. No, on VT switch, my code currently sits in the driver and waits for the VT to return. The errors here

[Mesa-dev] [PATCH mesa 2/3] anv: Add new VK_MESA_query_timestamp extension to anv driver [v3]

2018-06-27 Thread Keith Packard
both device and surface timestamps. Signed-off-by: Keith Packard --- src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan/anv_gem.c | 13 + src/intel/vulkan/anv_private.h | 3 +++ src/intel/vulkan/genX_query.c | 30 ++ 4

[Mesa-dev] [PATCH mesa 3/3] radv: Add new VK_MESA_query_timestamp extension to radv driver [v2]

2018-06-27 Thread Keith Packard
This extension adds a single function to query the current GPU timestamp, just like glGetInteger64v(GL_TIMESTAMP, ×tamp). This function is needed to complete the implementation of GOOGLE_display_timing, which needs to be able to correlate GPU and CPU timestamps. Signed-off-by: Keith Packard v2

[Mesa-dev] [PATCH mesa 1/3] vulkan: Define new VK_MESA_query_timestamp extension [v3]

2018-06-27 Thread Keith Packard
, all of our backends use CLOCK_MONOTONIC, so there's nothing actually doing conversions, but it seemed best to put the infrastructure in place so that I could validate the extension interface would work if that became necessary. Signed-off-by: Keith Packard --

[Mesa-dev] [PATCH 0/3] vulkan: Define new VK_MESA_query_timestamp extension [v3]

2018-06-27 Thread Keith Packard
Jason Ekstrand writes: > I haven't thought through this comment all that hard but would it make > sense to have three timestamps, CPU, GPU, CPU so that you have error bars > on the GPU timestamp? At the very least, two timestamps would be better > than one so that, when we pull it into the ke

Re: [Mesa-dev] [PATCH mesa 1/6] vulkan/wsi/display: setup the connector earlier

2018-09-26 Thread Keith Packard
Eric Engestrom writes: > Instead of setting it up when the swapchain is presented, set it up when > creating the swapchain. This means that multiple swapchains might use > the same crtc, but only one can be active at a time, and the connectors > are now refcounted. > > This is necessary for the n

Re: [Mesa-dev] [PATCH mesa 2/6] vulkan/wsi/display: also select a plane when selecting a crtc

2018-09-26 Thread Keith Packard
Eric Engestrom writes: > + /* if there's a plane is active on the connector's crtc, pick it */ > + for (size_t i = 0; i < plane_res->count_planes; i++) { > + drmModePlane *plane = drmModeGetPlane(wsi->fd, plane_res->planes[i]); > + if (!plane) > + continue; I think you can

Re: [Mesa-dev] [PATCH mesa 3/6] vulkan/wsi/display: pass the plane's modifiers to the image

2018-09-26 Thread Keith Packard
Eric Engestrom writes: > Signed-off-by: Eric Engestrom (I'll have to let someone familiar with the formats and modifiers stuff review this one; I'm not comfortable with that at all). -- -keith signature.asc Description: PGP signature ___ mesa-dev

Re: [Mesa-dev] [PATCH mesa 4/6] vulkan/wsi/display: add comment

2018-09-26 Thread Keith Packard
Eric Engestrom writes: > - struct list_head connectors; > + struct list_head connectors; /* list of all discovered > connectors */ Yeah, definitely not the list of all connectors. Reviewed-by: Keith Packard -- -keith signature.asc Description: PGP

Re: [Mesa-dev] [PATCH mesa] wsi/display: fix mem leak when freeing swapchains

2018-11-27 Thread Keith Packard
Eric Engestrom writes: > Fixes: da997ebec92942193955 "vulkan: Add KHR_display extension using DRM > [v10]" > Cc: Keith Packard > Signed-off-by: Eric Engestrom Reviewed-by: Keith Packard I checked to ensure that this is sufficient to clean all allocated objects:

Re: [Mesa-dev] [PATCH 1/7] vulkan: Add KHR_display extension to anv and radv using DRM

2018-02-23 Thread Keith Packard
Jason Ekstrand writes: > I think I like option 1 (KEITHP_kms_display). If the client knows the > difference between render and primary for 2, then they are most likely > already opening the master node themselves or at least have access to > the FD. Ok, I'll work on cleaning up that extension a

Re: [Mesa-dev] [PATCH 01/21] vulkan: Add KHR_display extension using DRM

2018-03-07 Thread Keith Packard
Jason Ekstrand writes: Thanks a million for the intense review. I've pushed 15 tiny patches that address individual questions in this message. If you want to look at those separately, that would be great. When we're done, I'll merge them back into the giant patch. Sorry for the delay in answerin

Re: [Mesa-dev] [PATCH 01/21] vulkan: Add KHR_display extension using DRM

2018-03-07 Thread Keith Packard
Daniel Stone writes: > Or better, just use drmModeAddFB2 and pass the format directly. That > landed back in 3.2 or so, and I don't think there's anyone trying to > use Vulkan on a kernel from 2011. Yeah, that's probably a better plan. I've pushed a patch that does this on top of the long list o

[Mesa-dev] [PATCH mesa 06/21] radv: Add EXT_direct_mode_display to radv driver

2018-03-07 Thread Keith Packard
Add support for the EXT_direct_mode_display extension. This just provides the vkReleaseDisplayEXT function. Signed-off-by: Keith Packard --- src/amd/vulkan/radv_extensions.py | 1 + src/amd/vulkan/radv_wsi_display.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/src/amd

[Mesa-dev] [PATCH mesa 03/21] radv: Add KHR_display extension to radv [v3]

2018-03-07 Thread Keith Packard
VK_USE_PLATFORM_DISPLAY_KHR to vulkan_wsi_args Suggested-by: Eric Engestrom v3: Adapt to new wsi_device_init API (added display_fd) Signed-off-by: Keith Packard --- src/amd/vulkan/Makefile.am| 8 +++ src/amd/vulkan/Makefile.sources | 3 + src/amd/vulkan/meson.build

[Mesa-dev] [PATCH mesa 04/21] vulkan: Add EXT_direct_mode_display

2018-03-07 Thread Keith Packard
Add support for the EXT_direct_mode_display extension. This just provides the vkReleaseDisplayEXT function. Signed-off-by: Keith Packard --- src/vulkan/wsi/wsi_common_display.c | 17 + src/vulkan/wsi/wsi_common_display.h | 5 + 2 files changed, 22 insertions(+) diff --git

[Mesa-dev] [PATCH mesa 11/21] anv: Add VK_EXT_display_surface_counter to anv driver [v4]

2018-03-07 Thread Keith Packard
This extension is required to support EXT_display_control as it offers a way to query whether the vblank counter is supported. v4: Add anv support Signed-off-by: Keith Packard --- src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan/anv_wsi.c | 12 2 files changed

[Mesa-dev] [PATCH mesa 16/21] vulkan: Define new VK_MESA_query_timestamp extension

2018-03-07 Thread Keith Packard
This extension adds a single function to query the current GPU timestamp, just like glGetInteger64v(GL_TIMESTAMP, ×tamp). This function is needed to complete the implementation of GOOGLE_display_timing, which needs to be able to correlate GPU and CPU timestamps. Signed-off-by: Keith Packard

[Mesa-dev] [PATCH mesa 19/21] vulkan: Add VK_GOOGLE_display_timing extension (x11 and display backends) [v2]

2018-03-07 Thread Keith Packard
x27;t underestimate the amount of work done in the frame. Signed-off-by: Keith Packard --- src/vulkan/wsi/wsi_common.c | 276 +++- src/vulkan/wsi/wsi_common.h | 25 src/vulkan/wsi/wsi_common_display.c | 147 +-- src/vulka

[Mesa-dev] [PATCH mesa 09/21] radv: Add EXT_acquire_xlib_display to radv driver [v2]

2018-03-07 Thread Keith Packard
This extension adds the ability to borrow an X RandR output for temporary use directly by a Vulkan application to the radv driver. v2: Simplify addition of VK_USE_PLATFORM_XLIB_XRANDR_KHR to vulkan_wsi_args Suggested-by: Eric Engestrom Signed-off-by: Keith Packard

[Mesa-dev] [PATCH mesa 20/21] anv: Add VK_GOOGLE_display_timing extension to anv driver

2018-03-07 Thread Keith Packard
This adds support for the VK_GOOGLE_display timing extension. Signed-off-by: Keith Packard --- src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan/anv_wsi.c | 29 + 2 files changed, 30 insertions(+) diff --git a/src/intel/vulkan/anv_extensions.py b

[Mesa-dev] [PATCH mesa 10/21] vulkan: Add VK_EXT_display_surface_counter [v3]

2018-03-07 Thread Keith Packard
VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT v3: Fix wayland WSI, regularize spelling Misspelled 'surface' in get_capabilities2ext Remove extra _ from get_capabilities_2ext in a couple of places Signed-off-by: Keith Packard --- src/vulkan/wsi/wsi_common.c | 11 +++ src/

[Mesa-dev] [PATCH mesa 02/21] anv: Add KHR_display extension to anv [v4]

2018-03-07 Thread Keith Packard
Signed-off-by: Keith Packard --- src/intel/Makefile.sources | 3 + src/intel/Makefile.vulkan.am | 7 ++ src/intel/vulkan/anv_device.c | 21 ++ src/intel/vulkan/anv_extensions.py | 1 + src/intel/vulkan/anv_extensions_gen.py | 5 +- s

[Mesa-dev] [PATCH mesa 18/21] radv: Add new VK_MESA_query_timestamp extension to radv driver

2018-03-07 Thread Keith Packard
This extension adds a single function to query the current GPU timestamp, just like glGetInteger64v(GL_TIMESTAMP, ×tamp). This function is needed to complete the implementation of GOOGLE_display_timing, which needs to be able to correlate GPU and CPU timestamps. Signed-off-by: Keith Packard

[Mesa-dev] [PATCH mesa 01/21] vulkan: Add KHR_display extension using DRM [v4]

2018-03-07 Thread Keith Packard
ed this value, so remove it from the API and from the internal wsi_display structure. Use drmModeAddFB2 in wsi_display_image_init. This takes a drm format instead of depth/bpp, which provides more control over the format of the data. Signed-off-by: Keith P

[Mesa-dev] [PATCH mesa 00/21] Add direct display extensions [update]

2018-03-07 Thread Keith Packard
Here's a new clean version of all of the direct display patches with fixes suggested by Jason integrated, instead of being made on top of the patch series. I've also rebased all of these patches on current master, which includes the WSI changes to support multiple buffers per image, but I'm not su

<    1   2   3   >