Bug 58867 - [GM45 regression] blurred graphics in 3.8_rc1 at native display resolution -- panel fitter erroneously enabled
Summary: [GM45 regression] blurred graphics in 3.8_rc1 at native display resolution --...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-29 17:18 UTC by andreas.sturmlechner
Modified: 2017-07-24 22:59 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg_3.8git_extdvi.log (50.91 KB, text/plain)
2012-12-29 18:06 UTC, andreas.sturmlechner
no flags Details
Xorg_3.8git_extdvi.log (55.71 KB, text/plain)
2012-12-29 18:07 UTC, andreas.sturmlechner
no flags Details
xrandr_3.8git_extdvi.log (9.37 KB, text/plain)
2012-12-29 18:09 UTC, andreas.sturmlechner
no flags Details
dmesg_3.6.11_extdvi.log (48.46 KB, text/plain)
2012-12-29 18:15 UTC, andreas.sturmlechner
no flags Details
3.6.11 vs 3.8git (532.25 KB, image/jpeg)
2012-12-29 19:43 UTC, andreas.sturmlechner
no flags Details
intel-reg-dump-3.6.11.log (13.52 KB, text/plain)
2012-12-29 23:55 UTC, andreas.sturmlechner
no flags Details
intel-reg-dump-3.8git.log (13.54 KB, text/plain)
2012-12-29 23:55 UTC, andreas.sturmlechner
no flags Details
intel-reg-dump-3.6.11-v2.log (13.54 KB, text/plain)
2012-12-30 00:29 UTC, andreas.sturmlechner
no flags Details
intel-reg-dump-3.8git-v2.log (13.54 KB, text/plain)
2012-12-30 00:29 UTC, andreas.sturmlechner
no flags Details
dmesg_3.8git_extdvi-drmdebug.log (62.72 KB, text/plain)
2012-12-30 10:41 UTC, andreas.sturmlechner
no flags Details
dmesg_3.8git_extdvi-drmdebug-v2.log (217.61 KB, text/plain)
2012-12-30 10:54 UTC, andreas.sturmlechner
no flags Details
Sanitize LVDS upon KMS takeover (3.96 KB, patch)
2012-12-30 11:19 UTC, Chris Wilson
no flags Details | Splinter Review
disable shared panel fitter for pipe (1.31 KB, patch)
2013-02-06 13:15 UTC, Mika Kuoppala
no flags Details | Splinter Review
dmesg-error.log (2.12 KB, text/plain)
2013-02-07 23:42 UTC, andreas.sturmlechner
no flags Details

Description andreas.sturmlechner 2012-12-29 17:18:19 UTC
commit a726915cef1daab57aad4c5b5e4773822f0a4bf8 (drm/i915: resurrect panel lid handling) which is otherwise a relief (it finally makes my X200s detect native external display resolution correctly), seems to conflict with another change in drm code. 1920x1200 is still chosen as it should be, but looks in fact as if it were some badly scaled up non-native resolution, in terminal as well as X.

Test results so far:
3.6.11 +patch: all fine
3.7.1 vanilla: wrong std resolution, but sharp graphics once it is set up
3.7.1 +patch: correct std resolution, horrible looks
3.8_rc1-current git (contains the commit): same as above
Comment 1 andreas.sturmlechner 2012-12-29 17:27:00 UTC
I should add that this is strictly about the external display - the laptop's LVDS screen is fine in current git master.
Comment 2 Chris Wilson 2012-12-29 17:28:54 UTC
I thought you were going to add dmesg, Xorg.log and xrandr...
Comment 3 andreas.sturmlechner 2012-12-29 18:06:54 UTC
Created attachment 72267 [details]
dmesg_3.8git_extdvi.log

I was still putting together logs and rebuilding a kernel image, as some results were inconclusive - one time I didn't even get a terminal with 3.8_rc1 which is possibly unrelated.

Attaching logs from 3.8git with ext display connected.
Comment 4 andreas.sturmlechner 2012-12-29 18:07:52 UTC
Created attachment 72268 [details]
Xorg_3.8git_extdvi.log
Comment 5 andreas.sturmlechner 2012-12-29 18:09:29 UTC
Created attachment 72269 [details]
xrandr_3.8git_extdvi.log

(no difference to 3.6.11+patch xrandr log except for timestamps)
Comment 6 andreas.sturmlechner 2012-12-29 18:15:34 UTC
Created attachment 72270 [details]
dmesg_3.6.11_extdvi.log

dmesg output from my working 3.6.11 kernel image with the above mentioned commit included, which had fixed bug 27622 for me.
Comment 7 Chris Wilson 2012-12-29 18:38:13 UTC
Mode choice looks consistent with choosing the 1920x1200 native resolution. Can you please attach a photograph? My guess is that we've accidentally enabled (or left enabled) some pixel doubling or panel fitter...
Comment 8 andreas.sturmlechner 2012-12-29 19:43:46 UTC
Created attachment 72274 [details]
3.6.11 vs 3.8git

photographs taken and put together for comparison.
Comment 9 Chris Wilson 2012-12-29 23:47:39 UTC
Oh, didn't anticipate that difference. Hmm, I think the next step for us is to check the FDI links and see if they are being driven differently between the two kernels. Can you please grab intel-gpu-tools and run intel_reg_dump for 3.6.11/3.8?
Comment 10 andreas.sturmlechner 2012-12-29 23:55:16 UTC
Created attachment 72282 [details]
intel-reg-dump-3.6.11.log

here they are :)
Comment 11 andreas.sturmlechner 2012-12-29 23:55:45 UTC
Created attachment 72283 [details]
intel-reg-dump-3.8git.log
Comment 12 Chris Wilson 2012-12-30 00:09:04 UTC
Gah, that looks like an old version of i-g-t, and doesn't have all the registers I want to check. Can I trouble you to pull from http://cgit.freedesktop.org/xorg/app/intel-gpu-tools and attach again?
Comment 13 andreas.sturmlechner 2012-12-30 00:29:02 UTC
Created attachment 72284 [details]
intel-reg-dump-3.6.11-v2.log
Comment 14 andreas.sturmlechner 2012-12-30 00:29:31 UTC
Created attachment 72286 [details]
intel-reg-dump-3.8git-v2.log
Comment 15 Chris Wilson 2012-12-30 01:54:25 UTC
Ok, the issue is that the panel fiiter has been left enabled.
Comment 16 Chris Wilson 2012-12-30 10:20:19 UTC
Andreas, can you please append drm.debug=6 to your kernel commandline and attach a dmesg from booting 3.8? This may warrant some more debug for I cannot see how we do not clear the PFIT_CONTROL...
Comment 17 andreas.sturmlechner 2012-12-30 10:41:58 UTC
Created attachment 72292 [details]
dmesg_3.8git_extdvi-drmdebug.log

(In reply to comment #16)
> Andreas, can you please append drm.debug=6 to your kernel commandline and
> attach a dmesg from booting 3.8?

Done! That log btw also contains unrelated errors that lead to bug 58876.
Comment 18 Chris Wilson 2012-12-30 10:45:57 UTC
Hmm, we need the earliest pieces of dmesg to see what is happening as we detect the LVDS and then disable it. Any chance you can capture the dmesg earlier, or increase the dmesg log size?
Comment 19 andreas.sturmlechner 2012-12-30 10:54:54 UTC
Created attachment 72293 [details]
dmesg_3.8git_extdvi-drmdebug-v2.log

Sorry, I didn't notice the truncated log - new output with increased kernel log buffer.
Comment 20 Chris Wilson 2012-12-30 11:08:02 UTC
Ok, so upon booting the BIOS only enables the HDMI output, but notably also setups up the panel fitter on that pipe. As the LVDS is already disable, we forgo disabling it again, and that circumvents turning off the panel fitter.
Comment 21 andreas.sturmlechner 2012-12-30 11:11:53 UTC
That explains why booting with i915.panel_ignore_lid=1 and setting up the resolution only later with xrandr works.
Comment 22 Chris Wilson 2012-12-30 11:19:29 UTC
Created attachment 72298 [details] [review]
Sanitize LVDS upon KMS takeover
Comment 23 andreas.sturmlechner 2012-12-30 12:24:17 UTC
Thank you, this bug is fixed for me now. :) Patch applies at 3.7.1 and 3.8git master with only a small change. That leaves me with a new production 3.7.1 image and that other remaining 3.8_rc1+ fbcon bug.
Comment 24 Daniel Vetter 2013-01-07 10:21:05 UTC
Adding ->sanitize callbacks feels a bit like overkill, and somehow I think it'd be better to handle the pfit like a crtc property as we (somewhat) do on gen5+ already. So can't we just check whether the pfit is enabled on the to-be-disabled pipe in i9xx_crtc_disable and shut it up if it is? I think that'd would mesh better with the future we're heading towards with fastboot&friends ...
Comment 25 andreas.sturmlechner 2013-01-28 22:14:34 UTC
Overkill or not, without the patch I still can't use 3.8_rc5. Not a big deal, it's just going to replace the other one that I needed since 2.6.33, but still, I was hoping... :)
Comment 26 Mika Kuoppala 2013-02-06 13:15:40 UTC
Created attachment 74286 [details] [review]
disable shared panel fitter for pipe
Comment 27 Mika Kuoppala 2013-02-06 13:18:08 UTC
(In reply to comment #25)
> Overkill or not, without the patch I still can't use 3.8_rc5. Not a big
> deal, it's just going to replace the other one that I needed since 2.6.33,
> but still, I was hoping... :)

Hi Andreas,

Could you please test the if the patch

https://bugs.freedesktop.org/attachment.cgi?id=74286

works for you? It is replacement for 'Sanitize LVDS upon KMS takeover'
Comment 28 andreas.sturmlechner 2013-02-06 20:41:24 UTC
First boot into 3.8_rc6 with the new patch applied and there's sharp output. Also no side effects so far. :)
Comment 29 andreas.sturmlechner 2013-02-06 22:13:22 UTC
The unmodified patch also works fine with 3.7.6 in conjunction with the 'drm/i915: resurrect panel lid handling' patch.
Comment 30 Mika Kuoppala 2013-02-07 11:09:41 UTC
(In reply to comment #28)
> First boot into 3.8_rc6 with the new patch applied and there's sharp output.
> Also no side effects so far. :)

Thanks!. I will submit the patch for inclusion. May i add Tested-by from you?
Comment 31 andreas.sturmlechner 2013-02-07 23:42:30 UTC
Created attachment 74391 [details]
dmesg-error.log
Comment 32 andreas.sturmlechner 2013-02-07 23:47:24 UTC
(In reply to comment #30)
> (In reply to comment #28)
> > First boot into 3.8_rc6 with the new patch applied and there's sharp output.
> > Also no side effects so far. :)
> 
> Thanks!. I will submit the patch for inclusion. May i add Tested-by from you?

You may, but maybe not so fast - attached above one error I've seen in the morning after I had switched off the DP screen for a nightly emerge session and couldn't get X back up - terminal was fine. The function that is touched by the patch is inside the trace.
Comment 33 Daniel Vetter 2013-02-13 14:57:35 UTC
Fix merged into drm-intel-next, should land in 3.9 and then get backported:

commit 79958d2a682740268d505315fd5a33fb11598351
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Fri Feb 8 16:35:37 2013 +0200

    drm/i915: disable shared panel fitter for pipe
Comment 34 andreas.sturmlechner 2013-02-14 06:27:50 UTC
Thank you very much!

So far the patch has been working flawlessly on 3.8_rc7. The X lockup above happened in a patched 3.7.6, but that might not be related.
Comment 35 Daniel Vetter 2013-02-14 19:00:50 UTC
(In reply to comment #34)
> Thank you very much!
> 
> So far the patch has been working flawlessly on 3.8_rc7. The X lockup above
> happened in a patched 3.7.6, but that might not be related.

Yeah, the lookup is likely unrelated. If you hit it again on latest kernels (your box suffered through some bad regression in 3.7 kernels) please open a new bug with the i915_error_state attached.
Comment 36 Florian Mickler 2013-03-04 22:53:45 UTC
A patch referencing this bug report has been merged in Linux v3.9-rc1:

commit 24a1f16de97c4cf0029d9acd04be06db32208726
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Fri Feb 8 16:35:37 2013 +0200

    drm/i915: disable shared panel fitter for pipe


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.