All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org>
Cc: xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	"Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: Proposal for RandR version 1.6, Leases and EDID-based output grabs
Date: Mon, 8 May 2017 13:47:55 +0300	[thread overview]
Message-ID: <20170508134755.4a34176b@eldfell> (raw)
In-Reply-To: <867f1v1iut.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>


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

On Fri, 05 May 2017 07:25:14 -0700
Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org> wrote:

> Pekka Paalanen <ppaalanen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> 
> > I disagree on the details, more below.  
> 
> > Such a RandR request is something I would not like to have to replicate
> > on Wayland. The display server contains the policy, it should not just
> > expose everything up for grabs. This is a fundamental difference
> > between X11 and Wayland architectures, and I think the output
> > information database should support both ways.  
> 
> Sounds like a good idea; if you want to work on how this should appear
> in Wayland, that would be great as it would provide two implementations,
> rather than just one.

Hi Keith,

I would want to, but unfortunately I have barely enough time for
this fly-by commenting currently. However, I do have a fairly clear
idea of how all this talked about so far would be implemented in a
Wayland server, except for potential window management issues in case a
VR app connects both directly for a normal window and via a VR
compositor.

I forget if I mentioned this to you personally yet:
https://gist.github.com/ppaalanen/e0d2744ff71188e9a294726a37ca83c2

I wrote that before I knew about your DRM leasing work, which means
it is well outdated. The biggest difference is that instead of
flipping through the Wayland compositor, one would use DRM leases.

> > I disagree. Wayland will likely have a special protocol extension
> > exclusively for advertising HMDs, so the display server will need to
> > know which ones are HMDs and which one are not, regardless whether the
> > desktop is extended there or not. This extension could also offer the
> > DRM leasing capabilities.  
> 
> What I was thinking that a display which the window system cannot drive
> natively should probably just be ignored entirely. An HMD which can
> natively handle a desktop (such as the PSVR system) might well be
> advertised as 'desktop capable', even though it is an HMD.
> 
> However, I also think you're right -- while the window system can't deal
> with it *today*, that doesn't mean the window system won't be able to do
> that in the future.
> 
> Hrm. I think the important distinction here is that the user installed
> an application which is designed to talk directly to this display. From
> that, we should probably infer that the user would like to use that
> application with the display.

Right.


> >> Thanks again; I'm sensing that a simple 'ignore this monitor for the
> >> desktop' might suffice for now, but that we'll end up wanting something
> >> more complicated in the future. I think the key is to try and avoid
> >> making that harder by what we do now, but I don't think we should be
> >> trying to implement a larger solution too soon.  
> >
> > Yes, that I agree with.  
> 
> I guess that's the question -- is a simple command to ignore a monitor
> for purposes of the desktop sufficient for now? Or do we need to worry
> about a possible future in which the window system implements native HMD
> support?

I believe my proposal at the end of the email solves this question
both ways.

> > Ultimately I would envision an output device database describing
> > what kind of a device it is (a normal monitor, a video projector, a
> > HMD, a TV, ...) and then the software that implements the desktop or UI
> > policy will decide how that will be used. Some policy examples:
> >
> > - A projector: do not extend desktop UI, but have the output normally
> >   available, so one can put regular windows there (presentation
> >   software). Turned on by default.
> >
> > - A HMD: Do not extend desktop, do not expose to normal apps, keep it
> >   off until special request.
> >
> > - A HMD with cinematic mode support: Extend desktop, turn on by
> >   default, allow special HMD requests.
> >
> > - A TV: Try to disable overscan or try to compensate for it by
> > default.  
> 
> Those all sound useful. I wonder how much we might be able to guess from
> EDID info and whether we want to programmatically do some of this
> (especially the TV thing; that's really annoying :-). In any case, a
> problem for the future.

Indeed for the future. In the worst case, users will need to match
their devices by serial number or some other individual way one by
one.

Thinking again, I believe we have to have a way to override
database entries somehow. If we ship catch-all entries for, say,
all Sony TVs, we are bound to get some assignment wrong for
someone who then wants to make a correction without breaking
everyone else.

We are moving away from configuring outputs in a display server by the
connector name and towards configuring outputs based the actual output
device identity and type.

> > I would suggest to have a "output device type" attribute in the
> > database, and support only one value for now: "HMD". Then all display
> > servers can encode the policy to hide all HMDs by default.
> > Implementationwise it is no different from your idea, but separating
> > device description from usage policy would be a good thing in my
> > opinion. You can still document suggested policies in the spec if you
> > wish, only the wording will be more of a recommendation than a
> > requirement.  
> 
> The only issue here is that now we're encoding policy in code, which is
> hard to change for the average user, rather than in a configuration
> file, which is easy to change. However, as we've defined it, these files
> are installed by the system and it would be nice if they weren't
> expected to be overridden by the user, so encoding policy there is
> almost worse than in the code.
> 
> Hrm. How about we adopt your design and encode the device type in the
> file, provide a fixed policy in the window system for now and consider
> the possibility of changing the window system in the future to support
> more advanced policy mechanisms. I don't think that shuts any doors
> permanently.

That sounds perfect and future-proof to me.

I would like the output database to strictly describe the hardware, not
set up any policy or usage patterns. It would be something like udev
rules adding tags that you can then use in the display server
configuration for matching, except for outputs which cannot be handled
by udev.

I believe we should not have the user poke around in the output device
database unless he has a piece of equipment that is either not
recognized at all or is recognized or tagged wrong. Seems we are in
agreement here.

The policy to deal with output categories and individual outputs would
be in the display server configuration. Something like:

Section "OutputClass"
	...
	
	MatchType "HMD"
	Option "HideFromRandR" "true"
	Option "DPMS" "off"
EndSection

Heh, I wasn't even aware there actually was OutputClass already, with
only MatchDriver. Wouldn't that be a good fit for static policy
configuration in Xorg?


Thanks,
pq

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

  parent reply	other threads:[~2017-05-08 10:47 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01 22:58 Proposal for RandR version 1.6, Leases and EDID-based output grabs "Keith Packard"
2017-04-02 15:43 ` Daniel Vetter
     [not found]   ` <20170402154302.zd7nmqf7vtcvgssu-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-02 19:58     ` Keith Packard
2017-04-03  7:45       ` Daniel Vetter
     [not found]         ` <20170403074528.c7vwoi3mg7yeojdr-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-03 16:41           ` Keith Packard
2017-04-03 22:07             ` Daniel Vetter
     [not found]               ` <20170403220749.5ujhdzuy6dnikwry-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-03 22:50                 ` Keith Packard
2017-04-04  7:02                   ` Daniel Vetter
     [not found]                     ` <20170404070242.rphtgg4yopek2sf7-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-04 15:53                       ` Keith Packard
2017-04-04 15:59                         ` Daniel Vetter
     [not found]                           ` <20170404155923.wllkgop2fyj7wydt-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2017-04-04 16:48                             ` Keith Packard
     [not found]                               ` <864ly4glvd.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-04-10 17:47                                 ` Mario Kleiner
2017-04-10 18:11                                   ` Keith Packard
2017-04-10 20:05                                     ` Mario Kleiner
     [not found]                                       ` <d6040e25-326c-90dd-bc47-d88e6823e9a3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-10 21:16                                         ` Keith Packard
2017-04-10 18:45                       ` Alex Deucher
2017-04-10 19:39                         ` Keith Packard
2017-04-07  0:17 ` Michel Dänzer
     [not found]   ` <4caa78af-7dc8-fbcf-d2ca-285d4554f5c9-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-04-07  3:02     ` Keith Packard
     [not found]       ` <86zifsyl6o.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-04-07  7:56         ` Pekka Paalanen
2017-04-09 17:27           ` Keith Packard
2017-04-10 11:35             ` Pekka Paalanen
2017-04-28 22:03               ` Keith Packard
     [not found]                 ` <86lgqkw5p6.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-02  7:39                   ` Pekka Paalanen
2017-05-02 14:45                     ` Keith Packard
     [not found]                       ` <868tmfl3lm.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-03  7:08                         ` Pekka Paalanen
2017-05-04  2:04                           ` Keith Packard
     [not found]                             ` <86tw5174y1.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-04  8:13                               ` Pekka Paalanen
2017-05-04 18:02                                 ` Keith Packard
     [not found]                                   ` <86inlg7b5n.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-05  8:20                                     ` Pekka Paalanen
2017-05-05 14:25                                       ` Keith Packard
2017-05-06 11:34                                         ` Mario Kleiner
     [not found]                                           ` <7f68d9fe-a40f-cfb2-3efd-1149d93bb5cb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-06 15:19                                             ` Keith Packard
2017-05-08  7:33                                             ` Pekka Paalanen
2017-05-10  0:29                                             ` Dave Airlie
     [not found]                                         ` <867f1v1iut.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-08 10:47                                           ` Pekka Paalanen [this message]
2017-05-08 15:29                                             ` Keith Packard
     [not found]                                               ` <86fugfxt7p.fsf-6d7jPg3SX/+z9DMzp4kqnw@public.gmane.org>
2017-05-09  7:08                                                 ` Pekka Paalanen
2017-04-29  5:52 ` Proposal for RandR version 1.6, Leases [v2] 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=20170508134755.4a34176b@eldfell \
    --to=ppaalanen-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=keithp-aN4HjG94KOLQT0dZR+AlfA@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
    --cc=xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.