All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nathan-J. Hirschauer" <nathanhi@deepserve.info>
To: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: enable native backlight control on old macs
Date: Wed, 18 Feb 2015 02:51:16 +0100	[thread overview]
Message-ID: <54E3F014.40207@deepserve.info> (raw)

On Tue, 17 Feb 2015, Alex Deucher <alexdeucher_at_gmail.com> wrote:
 > Commit b7bc596ebbe0cddc97d76ef9309f64471bbf13eb accidently
 > broke backlight control on old mac laptops that use the
 > on-GPU backlight controller.
 >
 > Reported by nathanhi on IRC.
 >
 > Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
 > Cc: stable at vger.kernel.org
 > ---
 >  drivers/gpu/drm/radeon/radeon_encoders.c | 3 +++
 >  1 file changed, 3 insertions(+)
 >
 > diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c 
b/drivers/gpu/drm/radeon/radeon_encoders.c
 > index 6b670b0..275ed45 100644
 > --- a/drivers/gpu/drm/radeon/radeon_encoders.c
 > +++ b/drivers/gpu/drm/radeon/radeon_encoders.c
 > @@ -179,6 +179,9 @@ static void radeon_encoder_add_backlight(struct 
radeon_encoder *radeon_encoder,
 >              (rdev->pdev->subsystem_vendor == 0x1734) &&
 >              (rdev->pdev->subsystem_device == 0x1107))
 >              use_bl = false;
 > +        /* enable native backlight control on apple */
 > +        else if (rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE)
 > +            use_bl = true;
 >          /* disable native backlight control on older asics */
 >          else if (rdev->family < CHIP_R600)
 >              use_bl = false;
 > --
 > 1.8.3.1

Hi,
thanks for your patch. I've tested it but it didn't won't work as the 
graphics chip is (unfortunately) detected with PCI_VENDOR_ID_ATI instead 
of PCI_VENDOR_ID_APPLE. I therefore propose the following patch:


Commit b7bc596ebbe0 ("drm/radeon: disable native
backlight control on pre-r6xx asics (v2)") accidently
broke backlight control on old mac laptops that use the
on-GPU backlight controller.

Signed-off-by: Nathan-J. Hirschauer <nathanhi@deepserve.info>
---
  drivers/gpu/drm/radeon/radeon_encoders.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c 
b/drivers/gpu/drm/radeon/radeon_encoders.c
index 6b670b0..3a29703 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -179,9 +179,12 @@ static void radeon_encoder_add_backlight(struct 
radeon_encoder *radeon_encoder,
              (rdev->pdev->subsystem_vendor == 0x1734) &&
              (rdev->pdev->subsystem_device == 0x1107))
              use_bl = false;
+/* Older PPC macs use on-GPU backlight controller */
+#ifndef CONFIG_PPC_PMAC
          /* disable native backlight control on older asics */
          else if (rdev->family < CHIP_R600)
              use_bl = false;
+#endif
          else
              use_bl = true;
      }
-- 
2.1.4

BR,
Nathan

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2015-02-18  2:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18  1:51 Nathan-J. Hirschauer [this message]
2015-02-18  2:16 ` [PATCH] drm/radeon: enable native backlight control on old macs Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2015-02-17 22:45 Alex Deucher

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=54E3F014.40207@deepserve.info \
    --to=nathanhi@deepserve.info \
    --cc=dri-devel@lists.freedesktop.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.