All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Jani Nikula" <jani.nikula@linux.intel.com>,
	"Stéphane Marchesin" <stephane.marchesin@gmail.com>
Cc: "Martin Gräßlin" <mgraesslin@kde.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: KMS backlight ABI proposition
Date: Fri, 24 Feb 2017 10:48:52 +0100	[thread overview]
Message-ID: <6eb297d8-ab57-2d73-a4d0-91b7c7785af4@redhat.com> (raw)
In-Reply-To: <6d2aa160-01f3-bce3-a696-9352f808ce2c@redhat.com>

Hi,

On 24-02-17 10:46, Hans de Goede wrote:
> Hi,
>
> On 24-02-17 10:34, Jani Nikula wrote:
>> On Fri, 24 Feb 2017, Hans de Goede <hdegoede@redhat.com> wrote:
>>> On 24-02-17 09:43, Jani Nikula wrote:
>>>> I don't think we have any good ideas how to solve the property max
>>>> changing on the fly. But based on the discussion so far, it's starting
>>>> to look like we'll need to study that more thoroughly.
>>>
>>> As I mentioned in another part of the thread, I think we can just return
>>> -EBUSY if udev tries to change the binding when a drm-node is open
>>> *and* the backlight/brightness property has been accessed (even if
>>> read only) through that drm-node. We can reset the busy flag when
>>> the (last open) drm-node gets closed.
>>
>> That's certainly easier than coming up with ways to notify the userspace
>> about property range changes. The obvious downside is that you have to
>> kill X to do the re-association. That's fine for when everything just
>> works (i.e. everything happens before the drm node is opened), but for
>> debugging it's a bit painful. Can we live with that?
>
> Sure, debugging udev rules is somewhat tricky in general (requires
> manually triggering udev). When asking users to test udev rule / hwdb
> patches I usually just ask them to reboot.
>
>>> I'm adding the *and* the backlight/brightness property has been accessed
>>> condition so that udev can still do its thing while a boot splash
>>> screen is active. This assumes that boot splash screens do not
>>> touch the brightness.
>>
>> I presume udev will have to do its job before the drm node is opened, I
>> think relying on the userspace not touching the brightness property is
>> going to be racy/flaky.
>
> Making sure that udev does its job before we show the splashscreen
> is tricky, note the idea is that the splashscreen *never* touches
> the brightness property and by the time regular X / wayland launches
> udev should have had plenty of time to complete its job.
>
> I do not know how hard it will be to add the code to detect triggering
> the property being touched, but that is the best I can come up with
> to still allow the bootsplash (e.g. plymouth) to use the drm-node.

p.s.

I realize this aint pretty, alternatively we could just document that
root may change the back-end of the property and that in that case
the max value may change and that it is up to userspace to make sure
that it deals with this (e.g. by not changing the backend at a bad
time).

Regards,

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

  reply	other threads:[~2017-02-24  9:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 12:58 KMS backlight ABI proposition Martin Peres
2017-02-20 12:46 ` Martin Peres
2017-02-20 14:11   ` Daniel Thompson
2017-02-22 15:05     ` Jani Nikula
2017-02-22 15:18       ` Martin Peres
2017-02-22 16:20       ` Hans de Goede
2017-02-23  8:55         ` Jani Nikula
2017-02-23 13:44           ` Hans de Goede
2017-02-20 16:25   ` Thierry Reding
2017-02-22 15:38     ` Jani Nikula
2017-02-20 19:27 ` Dave Airlie
2017-02-20 19:57   ` Hans de Goede
2017-02-22 15:08     ` Martin Peres
2017-02-20 22:40   ` Alex Deucher
2017-02-20 23:01     ` Jasper St. Pierre
2017-02-22 14:00       ` Jani Nikula
2017-02-22 16:35         ` Jasper St. Pierre
2017-02-22 15:48   ` Jani Nikula
2017-02-20 20:09 ` Hans de Goede
2017-02-22 14:14   ` Jani Nikula
2017-02-22 19:07 ` Stéphane Marchesin
2017-02-23  8:40   ` Jani Nikula
2017-02-23 13:38     ` Hans de Goede
2017-02-23 17:31     ` Stéphane Marchesin
2017-02-24  8:43       ` Jani Nikula
2017-02-24  8:55         ` Hans de Goede
2017-02-24  9:34           ` Jani Nikula
2017-02-24  9:46             ` Hans de Goede
2017-02-24  9:48               ` Hans de Goede [this message]
2017-02-24  9:59                 ` Hans de Goede
2017-02-24 10:23                   ` Martin Peres
2017-02-24 10:44                     ` Hans de Goede
2017-02-24 12:56                       ` Martin Peres
2017-02-24 11:16         ` Daniel Thompson
2017-02-24 11:41           ` Jani Nikula
2017-02-23 17:41     ` Jasper St. Pierre

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=6eb297d8-ab57-2d73-a4d0-91b7c7785af4@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=mgraesslin@kde.org \
    --cc=stephane.marchesin@gmail.com \
    /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.