linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, rpurdie@rpsys.net,
	nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org, linux-acpi@vger.kernel.org,
	lenb@kernel.org
Subject: Re: [PATCH 1/5] Backlight: Add backlight type
Date: Fri, 19 Nov 2010 20:25:59 +0000	[thread overview]
Message-ID: <20101119202558.GA10898@srcf.ucam.org> (raw)
In-Reply-To: <20101119120523.15bc341c.akpm@linux-foundation.org>

On Fri, Nov 19, 2010 at 12:05:23PM -0800, Andrew Morton wrote:
> On Fri, 19 Nov 2010 10:53:52 -0500
> Matthew Garrett <mjg@redhat.com> 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.
> > 
> > ...
> >
> >  60 files changed, 102 insertions(+), 0 deletions(-)
> 
> This patch has a pretty short half-life.

Well, ideally it would have landed in the backlight tree when I sent it 
months ago. Then we'd have the opportunity to ensure that everything was 
fixed up before it went in in the merge window.

> > @@ -62,6 +68,8 @@ struct backlight_properties {
> >  	/* FB Blanking active? (values as for power) */
> >  	/* Due to be removed, please use (state & BL_CORE_FBBLANK) */
> >  	int fb_blank;
> > +	/* Backlight type */
> > +	enum backlight_type type;
> >  	/* Flags used to signal drivers of state changes */
> >  	/* Upper 4 bits are reserved for driver internal use */
> >  	unsigned int state;
> 
> And if/when the half-life expires, we'll have drivers in-tree which
> forget to set backlight_properties.type.  I haven't checked, but if
> we're lucky they will default to "0".

Depends entirely on whether they kzalloc the structure or not before
calling backlight_device_register(). 

> What will be the runtime effects upon such unconverted drivers? 
> Ideally we'd like them to continue to work OK, and to emit a runtime
> warning.  In which case you'll need BACKLIGHT_RAW=1 so the unconverted
> driver can be detected, warned about and fixed up by the core code.

The worst case I can think of is that we walk off the array - I guess 
there's an argument for sanity checking that in backlight_show_type().

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2010-11-19 20:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-19 15:53 [PATCH 1/5] Backlight: Add backlight type Matthew Garrett
2010-11-19 15:53 ` [PATCH 2/5] i915: Add native backlight control Matthew Garrett
2010-11-19 15:53 ` [PATCH 3/5] radeon: Expose backlight class device for legacy LVDS encoder Matthew Garrett
2010-11-19 15:53 ` [PATCH 4/5] nouveau: Change the backlight parent device to the connector, not the PCI dev Matthew Garrett
2010-11-19 15:53 ` [PATCH 5/5] ACPI: Tie ACPI backlight devices to PCI devices if possible Matthew Garrett
2010-11-19 20:05 ` [PATCH 1/5] Backlight: Add backlight type Andrew Morton
2010-11-19 20:25   ` Matthew Garrett [this message]
2010-11-19 20:35     ` Andrew Morton
2010-11-22 10:17     ` Richard Purdie
2010-11-22 12:30       ` Matthew Garrett
2010-11-22 13:35         ` Richard Purdie
2010-11-22 13:40           ` Matthew Garrett
  -- strict thread matches above, loose matches on Subject: below --
2011-01-14 19:24 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=20101119202558.GA10898@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=akpm@linux-foundation.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rpurdie@rpsys.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).