All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jason Stubbs <jasonbstubbs@gmail.com>
Cc: Greg KH <gregkh@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform: fix samsung brightness min/max calculations
Date: Thu, 12 May 2011 09:44:02 -0700	[thread overview]
Message-ID: <20110512164402.GD26585@kroah.com> (raw)
In-Reply-To: <201105121214.00015.jasonbstubbs@gmail.com>

On Thu, May 12, 2011 at 12:13:59PM +1000, Jason Stubbs wrote:
> On Wed, 11 May 2011 23:51:14 Greg KH wrote:
> > On Wed, May 11, 2011 at 02:47:49PM +1000, Jason Stubbs wrote:
> > > On Wed, 11 May 2011 08:39:08 Greg KH wrote:
> > > > On Thu, Apr 28, 2011 at 06:55:50PM +1000, Jason Stubbs wrote:
> > > > > Not sure of the "bump" process, so I'll just go over each part of the
> > > > > patch.
> > > > > 
> > > > > Note that all the changes only affect the sabi_config where
> > > > > min_brightness is 1 so you might not see in difference on your
> > > > > hardware.
> > > > 
> > > > This isn't needed anymore due to your other patch superseeding it,
> > > > right?
> > > 
> > > Actually, this one is irrelevant to the nc210/nc110 support as that
> > > laptop uses the "SwSmi@" sabi. It was just something I noticed while
> > > learning the code. The miscalculations will only affect any laptops that
> > > use the "SECLINUX" sabi but I tested it by setting min_brightness to 2
> > > for my laptop.
> > 
> > That's wierd, as that is the type of laptop I have here and it seems to
> > work just fine for me as-is.
> 
> Throwing a printk of user_level into set_brightness when min_brightness = 1,
> I get the following behaviour:
> 
> # cd /sys/class/backlight/samsung
> # for x in 8 7 2 1 0; do echo $x > brightness; done
> # dmesg | tail -n6
> user_level is 0x07
> user_level is 0x06
> user_level is 0x01
> user_level is 0x00
> user_level is 0xff
> samsung_laptop: SABI set command 0x11 failed with completion flag 0xaa and data 0xff
> 
> Essentially, setting brightness to the maximum actually sets it one less and
> setting it to zero does bad thngs.

Ah, ok, nice catch, thanks, I've queued up your patch now.

> > > The patch doesn't apply cleanly on top of the nc210/nc110 patch though as
> > > they both modify set_brightness(). It might apply with a higher fuzz
> > > factor as the changes don't actually clash. Should I redo the patch?
> > 
> > Please do.
> 
> Will send seperately. Doing this though, I found a problem with the
> nc210/nc110 patch in that (user_level == read_brightness()) check should
> actually be (user_brightness == read_brightness()). What should I do about
> this?

I don't know, as you seem to understand this better than I do at this
point, I'll trust your changes :)

thanks,

greg k-h

  reply	other threads:[~2011-05-12 16:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20  3:58 [PATCH] platform: fix samsung brightness min/max calculations Jason Stubbs
2011-04-28  8:55 ` Jason Stubbs
2011-05-10 22:39   ` Greg KH
2011-05-11  4:47     ` Jason Stubbs
2011-05-11 13:51       ` Greg KH
2011-05-12  2:13         ` Jason Stubbs
2011-05-12 16:44           ` Greg KH [this message]
2011-05-13 10:44             ` Jason Stubbs
2011-05-13 10:47               ` [PATCH] platform: add support for samsung nc210/nc110 Jason Stubbs
2011-06-13 23:55               ` [PATCH] platform: fix samsung brightness min/max calculations Greg KH
2011-06-19 21:23                 ` [PATCH] platform: samsung_laptop: " Jason Stubbs
2011-06-19 21:36                 ` [PATCH] platform: " Jason Stubbs
2011-08-24 23:11                   ` Greg KH
2011-05-12  2:32         ` Jason Stubbs

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=20110512164402.GD26585@kroah.com \
    --to=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=jasonbstubbs@gmail.com \
    --cc=linux-kernel@vger.kernel.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.