All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 98897] Macbook pro 11,5 screen flicker when AC adapter plugged in
Date: Thu, 15 Dec 2016 05:46:52 +0000	[thread overview]
Message-ID: <bug-98897-502-IYPQoMzFXJ@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-98897-502@http.bugs.freedesktop.org/>


[-- Attachment #1.1: Type: text/plain, Size: 3334 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=98897

--- Comment #18 from berg <berglh@gmail.com> ---
(In reply to Cédric Le Goater from comment #17)
> so this is a CHIP_VERDE revision 0x83

(In reply to Cédric Le Goater from comment #14)
> (In reply to Michel Dänzer from comment #10)
> > If you can't or don't want to bisect, there are only 4 radeon driver commits
> > between 4.8.6 and 4.8.7, so it shouldn't take long to try manually reverting
> > each of those.
> > https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/
> > ?h=linux-4.8.y&id=e136de5d733161fdfd203f23b448434170d189ea seems like a good
> > candidate, since it's clock related and explicitly references your GPU in
> > the code.
> 
> Hi,
> 
> I have reverted this commit on a 4.8.14 and the flickering stopped.
> 
> C.

Having a looking at the diff; the new diff actually configures 


        } else if (rdev->family == CHIP_VERDE) {
+               if ((rdev->pdev->revision == 0x81) ||
+                   (rdev->pdev->revision == 0x83) ||
...
+                   (rdev->pdev->device == 0x6821) ||
...
+                   (rdev->pdev->device == 0x682B)) {
+                       max_sclk = 75000;
+                       max_mclk = 80000;
+               }

So on my MacBook Pro 11,5 - the device ID and revision are: 

  01:00.0 0300: 1002:6821 (rev 83)
  01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Venus XT [Radeon HD 8870M / R9 M270X/M370X] (rev 83)

So; since this commit, the max_sclk and max_mclk has been set for this GPU to
75000 and 80000. In previous version of this driver module, this specific GPU
was being skipped. I think these values have been incorrectly set for this CPU.

According to these specifications for the M370X Mac chip,
http://gpuboss.com/graphics-card/Radeon-R9-M370X-Mac, the two values max_sclk
and max_mclk are probably:

  Clock speed           775 MHz
  Turbo clock speed     800 MHz

So we are setting this stuff to run possibly 25 MHz out of sync with the actual
GPU clock. I'm guessing this would be subtle enough to cause the flickering
we're seeing, perhaps it should be something like this:

        } else if (rdev->family == CHIP_VERDE) {
                if (rdev->pdev->device == 0x6821 &&
                     rdev->pdev->revision == 0x83) {
                        max_sclk = 77500;
                        max_mclk = 80000;
                } else if other conditions

In general though, the new block of device and revisions are VERY loose and not
very well thought out. The OR conditionals are too far reaching. This GPU is
matched in two different sections and even the device ID or the revision alone
is enough to modify the aforementioned values.

I might make compile 4.9.0 tonight to try this theory out and set max_sclk to
77500. Perhaps the best actual solution is to not even include this device and
revision in the dpm quirks; as it was previously omitted and was never an
actual problem.

I haven't figured out how to determine the actual GPU frequency right now, but
if we can confirm it's running at a stock speed of 775 MHz, that would give me
greater confidence in testing this idea out.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 4577 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

  parent reply	other threads:[~2016-12-15  5:46 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-98897-502@http.bugs.freedesktop.org/>
2016-11-29 10:07 ` [Bug 98897] Macbook pro 11,5 screen flicker when AC adapter plugged in bugzilla-daemon
2016-11-29 11:19 ` bugzilla-daemon
2016-11-29 13:29 ` bugzilla-daemon
2016-11-29 13:30 ` bugzilla-daemon
2016-11-29 14:01 ` bugzilla-daemon
2016-11-29 14:02 ` bugzilla-daemon
2016-11-29 14:05 ` bugzilla-daemon
2016-11-30  3:29 ` bugzilla-daemon
2016-11-30  3:29 ` bugzilla-daemon
2016-11-30 12:10 ` bugzilla-daemon
2016-11-30 20:34 ` bugzilla-daemon
2016-12-01  6:47 ` bugzilla-daemon
2016-12-03 16:15 ` bugzilla-daemon
2016-12-03 16:44 ` bugzilla-daemon
2016-12-07  1:05 ` bugzilla-daemon
2016-12-14 16:26 ` bugzilla-daemon
2016-12-14 17:07 ` bugzilla-daemon
2016-12-14 18:16 ` bugzilla-daemon
2016-12-14 18:20 ` bugzilla-daemon
2016-12-15  5:46 ` bugzilla-daemon [this message]
2016-12-15  7:56 ` bugzilla-daemon
2016-12-15  8:58 ` bugzilla-daemon
2016-12-20 21:33 ` bugzilla-daemon
2017-01-05 18:20 ` bugzilla-daemon
2017-01-08 23:17 ` bugzilla-daemon
2017-01-09 22:11 ` bugzilla-daemon
2017-04-02 13:07 ` bugzilla-daemon
2017-04-02 14:11 ` bugzilla-daemon
2017-04-03  3:53 ` bugzilla-daemon
2019-11-19  9:20 ` bugzilla-daemon

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=bug-98897-502-IYPQoMzFXJ@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --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.