From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Zhang Rui <rui.zhang@intel.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
linux-acpi <linux-acpi@vger.kernel.org>,
Len Brown <lenb@kernel.org>
Subject: Re: [PATCH 1/2] video: always update the brightness when poking "brightness"
Date: Wed, 31 Dec 2008 03:14:02 +0000 [thread overview]
Message-ID: <20081231031402.GA25503@srcf.ucam.org> (raw)
In-Reply-To: <1230692328.562.289.camel@rzhang-dt>
On Wed, Dec 31, 2008 at 10:58:48AM +0800, Zhang Rui wrote:
> On Wed, 2008-12-31 at 10:01 +0800, Matthew Garrett wrote:
> > If you want the actual brightness, why aren't you reading
> > actual_brightness?
> >
> right, that's the problem.
> because IMO, we don't need the actual_brightness any more. :)
> And if you agree that bd->props.brightness doesn't reflect the actual
> brightness, we can see that
Brightness and actual_brightness have different semantics, and
maintaining that difference is worthwhile.
> if (bd->props.brightness != brightness) {
> bd->props.brightness = brightness;
> backlight_update_status(bd);
> }
> doesn't make sense because "bd->props.brightness != brightness" doesn't
> mean anything.
I agree that this doesn't seem like a meaningful check. For setups where
brightness change is an expensive operation, this could be done in the
driver rather than the core?
> But if bd->props.brightness does reflect the actual brightness, then do
> we need "actual_brightness" any more?
I think maintaining "brightness" as "user requested brightness" is
sensible, for situations like Richard described.
Patch looks good to me.
--
Matthew Garrett | mjg59@srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-12-31 3:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-24 3:07 [PATCH 1/2] video: always update the brightness when poking "brightness" Zhang Rui
2008-12-30 10:34 ` Richard Purdie
2008-12-31 1:22 ` Zhao Yakui
2008-12-31 1:21 ` Matthew Garrett
2008-12-31 1:43 ` Zhang Rui
2008-12-31 2:01 ` Matthew Garrett
2008-12-31 2:58 ` Zhang Rui
2008-12-31 3:11 ` Zhang Rui
2008-12-31 3:24 ` Matthew Garrett
2008-12-31 3:14 ` Matthew Garrett [this message]
2008-12-31 13:41 ` Matthew Garrett
2008-12-31 14:16 ` Richard Purdie
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=20081231031402.GA25503@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=rui.zhang@intel.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.