All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: Matthew Garrett <mjg@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] backlight: Add support for exposing backlight types
Date: Wed, 17 Feb 2010 22:51:24 +0000	[thread overview]
Message-ID: <1266447084.6436.483.camel@rex> (raw)
In-Reply-To: <1266442785-3998-2-git-send-email-mjg@redhat.com>

On Wed, 2010-02-17 at 16:39 -0500, Matthew Garrett wrote:
> There may be multiple ways of controlling the backlight on a given
> machine. Allow drivers to expose the type of interface they are providing,
> making it possible for userspace to make appropriate policy decisions.

Firstly, I agree we need to solve this problem one way or another. I
want to make that clear. We also need to make sure whatever solution we
pick works for everyone and scales though.

What I'm interested in is how userspace is going to determine which
driver(s) it should use?

BACKLIGHT_GPU > BACKLIGHT_PLATFORM > BACKLIGHT_FIRMWARE ?

or something looking at the device names as well along with some kind of
"XXX is better than YYY"?

We should really have some indication of how these values can be
interpreted in the kernel as documentation.

> +		The type of interface controlled by <backlight>.
> +		"firmware": The driver uses a standard firmware interface
> +		"platform": The driver uses a platform-specific interface
> +		"gpu": The driver controls hardware registers directly

These descriptions really don't help me much. I can think of several
"platform" backlight drivers which control hardware registers directly.
When people see these described as "gpu", I can see bug reports coming
in. Would "raw" be a better description?

I'm also wondering how we associate backlights to displays. Lets say I
have a three output video card which has a backlight control for each
connected output. "gpu" isn't going to help me much and I suspect the
framebuffer association code already in the backlight class won't help
much either since nobody uses it and the framebuffer interfaces are
mostly replaced with drm on desktops/laptops? Do we have any plans on
how to handle this - its certainly a related problem.

As an aside for the patch itself, I'd like a note about the list of
strings in backlight.c needing to be in sync with the ENUM.

Cheers,

Richard


  reply	other threads:[~2010-02-17 22:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 21:39 [PATCH 1/2] backlight: Allow properties to be passed at registration Matthew Garrett
2010-02-17 21:39 ` [PATCH 2/2] backlight: Add support for exposing backlight types Matthew Garrett
2010-02-17 22:51   ` Richard Purdie [this message]
2010-02-17 23:08     ` Matthew Garrett
2010-02-18 18:05     ` [PATCH 2/2 v2] " Matthew Garrett

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=1266447084.6436.483.camel@rex \
    --to=rpurdie@rpsys.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.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.