public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	"# v3 . 17+" <stable@vger.kernel.org>
Subject: Re: [PATCH] drm/i915: fix backlight invert for non-zero minimum brightness
Date: Fri, 04 Aug 2017 15:42:50 +0300	[thread overview]
Message-ID: <87shh7fqr9.fsf@nikula.org> (raw)
In-Reply-To: <20170531093258.hxtyu6aeh3vem4pi@phenom.ffwll.local>

On Wed, 31 May 2017, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, May 31, 2017 at 11:33:55AM +0300, Jani Nikula wrote:
>> When we started following the backlight minimum brightness in
>> 6dda730e55f4 ("drm/i915: respect the VBT minimum backlight brightness")
>> we overlooked the brightness invert quirk. Even if we invert the
>> brightness, we need to take the min limit into account. We probably
>> missed this because the invert has only been required on gen4 for proper
>> operation.
>> 
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101127
>> Fixes: 6dda730e55f4 ("drm/i915: respect the VBT minimum backlight brightness")
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: <stable@vger.kernel.org> # v3.17+
>
> Not sure the cc: stable is justified, but makes sense otherwise
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Had forgotten about this, pushed now, without cc: stable.

Thanks for the review.

BR,
Jani.


>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_panel.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
>> index cb50c527401f..bcde9f34527a 100644
>> --- a/drivers/gpu/drm/i915/intel_panel.c
>> +++ b/drivers/gpu/drm/i915/intel_panel.c
>> @@ -469,7 +469,7 @@ static u32 intel_panel_compute_brightness(struct intel_connector *connector,
>>  
>>  	if (i915.invert_brightness > 0 ||
>>  	    dev_priv->quirks & QUIRK_INVERT_BRIGHTNESS) {
>> -		return panel->backlight.max - val;
>> +		return panel->backlight.max - val + panel->backlight.min;
>>  	}
>>  
>>  	return val;
>> -- 
>> 2.11.0
>> 

-- 
Jani Nikula, Intel Open Source Technology Center

      reply	other threads:[~2017-08-04 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31  8:33 [PATCH] drm/i915: fix backlight invert for non-zero minimum brightness Jani Nikula
2017-05-31  8:48 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-05-31  9:32 ` [PATCH] " Daniel Vetter
2017-08-04 12:42   ` Jani Nikula [this message]

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=87shh7fqr9.fsf@nikula.org \
    --to=jani.nikula@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox