All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Keith Packard" <keithp@keithp.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: ML mesa-dev <mesa-dev@lists.freedesktop.org>,
	ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [Mesa-dev] [PATCH 1/7] vulkan: Add KHR_display extension to anv and radv using DRM
Date: Mon, 12 Feb 2018 15:12:32 -0800	[thread overview]
Message-ID: <87y3jxajkv.fsf@keithp.com> (raw)
In-Reply-To: <CACvgo52AEBwZPZ9jz+StMAQh80DBcSH8cWMp7qmQf9UwtLZxUw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3382 bytes --]

Emil Velikov <emil.l.velikov@gmail.com> writes:

> A few top level comments:

Thanks much for looking over this code. I realize it's a large amount of
change and hence more work to review.

>  - using card/primary node and (missing) authentication
> Current code opens the primary node when VK_KHR_display is available.
> Thus running a platform=drm,x11,wayland build will fail, as the client
> is not authenticated with the X/WL server.

this is really mostly there to make it easy to test the KHR_display
backend without needing any further code. I added this only recently for
this purpose. I'm not sure how we should be selecting for opening the
primary device; perhaps another extension that adds a block in the pNext
chain to look for?

I don't know if you saw the first version of this series, but I had
specified a new extension which provided the device FD from the
application, letting you pass in whatever you could open (including a
leased FD from X or a primary opened from the application). That seems
like it could use some design ideas so we can make this do what we
want.

One option would be to remove the primary device code from the drivers
once the leasing code is added so that the only way to use KHR_display
is by leasing resources from the window system?

The radv driver goes a bit further and checks with the kernel to see if
rendering will work. For anv, the ioctls necessary for drawing are
permitting on a non-authenticated node. Both drivers work fine for
direct and X as-is, but I'm not very happy with having a random app with
the primary device open as that seems like a mistake waiting to happen.

>  - reuse "drm" as a shorthand for the "display"
> We've been using drm for egl/gbm, va/drm, etc, one less platform plus
> no equivalent in either of egl/va/...

Yeah, anything that supports drm can support display. I'll review the
build process and try to simplify it further.

>  - remove conditional compilation based on library version/features.
> Eg. checks like the following should be avoided.
> #if DRM_EVENT_CONTEXT_VERSION

Should I just have the build depend on a recent enough version of the library?

>  - use drmModeAddFB2 (or the withModifiers version even) over drmModeAddFB
> Might help with the XXX just above it ;-)

It won't help with that -- I just need more information from the
driver. However, that information could come back as a format instead of
depth/bpp, which would mean using drmModeAddFB2 instead of
drmModeAddFB. Thanks for reminding me of this XXX.  wsi_create_*_image
gets a VkSwapchainCreateInfoKHR which has a VkFormat inside. Is that
sufficient to compute a fourcc format for AddFB2? I think I could
probably guess depth/bpp from it and be right most of the time?

>  - the spec says we're at VK_KHR_display rev 21, while the code advertises rev1
>     Extension('VK_KHR_display',                           1,
> 'VK_USE_PLATFORM_DISPLAY_KHR'),

Thanks. The version of the spec I've got (1.0.49) says it's already at
rev 23!

>  - there are plenty of unnecessary of headers #include(d)

As is often the case. I can go trim things down.

>  - we could simplify the ifdef spaghetti by making
> wsi_*_{init,finish}_wsi empty stubs
> Definitely something that can be done, independently of your work.

That would be lovely.

-- 
-keith

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-02-12 23:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-10  4:45 [PATCH 0/7] vulkan: Add direct display extensions Keith Packard
2018-02-10  4:45 ` [PATCH 1/7] vulkan: Add KHR_display extension to anv and radv using DRM Keith Packard
2018-02-12 15:27   ` Eric Engestrom
2018-02-12 22:16     ` Keith Packard
2018-02-12 16:18   ` [Mesa-dev] " Emil Velikov
2018-02-12 23:12     ` Keith Packard [this message]
2018-02-14  1:10   ` Jason Ekstrand
2018-02-15 17:46     ` Keith Packard
2018-02-23 23:00       ` Jason Ekstrand
2018-02-23 23:43         ` Keith Packard
2018-02-24  0:51           ` Jason Ekstrand
2018-03-12 23:02             ` Keith Packard
2018-03-29  6:59   ` Mao, David
2018-03-29 15:05     ` Keith Packard
2018-02-10  4:45 ` [PATCH 2/7] vulkan: Add EXT_direct_mode_display Keith Packard
2018-02-10  4:45 ` [PATCH 3/7] vulkan: Add EXT_acquire_xlib_display Keith Packard
2018-02-13  0:16   ` Dylan Baker
2018-02-10  4:45 ` [PATCH 4/7] vulkan: Add VK_EXT_display_surface_counter [v4] Keith Packard
2018-02-10  4:45 ` [PATCH 5/7] vulkan: add VK_EXT_display_control [v4] Keith Packard
2018-02-10  4:45 ` [PATCH 6/7] vulkan: Add new VK_MESA_query_timestamp extension Keith Packard
2018-02-13  0:20   ` Dylan Baker
2018-02-13 10:49     ` [Mesa-dev] " Lionel Landwerlin
2018-02-13 21:11       ` Keith Packard
2018-02-10  4:45 ` [PATCH 7/7] vulkan: Add VK_GOOGLE_display_timing extension (x11 and display backends) Keith Packard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y3jxajkv.fsf@keithp.com \
    --to=keithp@keithp.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=mesa-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.