Bug 34165 - Arrandale,KMS:Massive Flicker/Distortion in Console/X11 Display
Summary: Arrandale,KMS:Massive Flicker/Distortion in Console/X11 Display
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 00:40 UTC by Thomas Schmid
Modified: 2017-07-24 23:06 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Very short video (AVI) of flicker problem (778.41 KB, application/x-zip-compressed)
2011-02-11 00:40 UTC, Thomas Schmid
no flags Details
Xorg log file (33.59 KB, text/plain)
2011-02-11 00:43 UTC, Thomas Schmid
no flags Details
dmesg output booting with KMS and "drm.debug=0xe" (116.64 KB, text/plain)
2011-02-11 00:44 UTC, Thomas Schmid
no flags Details
lspci of HP5320m iCore5 (Arrandale) (25 bytes, text/plain)
2011-02-11 00:45 UTC, Thomas Schmid
no flags Details
Probe the eDP device on init (1.51 KB, patch)
2011-02-12 02:41 UTC, Chris Wilson
no flags Details | Splinter Review
Screenshot of system crashing with eDP patch applied (1of2) (992.07 KB, image/jpeg)
2011-02-13 01:50 UTC, Thomas Schmid
no flags Details
Screenshot of system crashing with eDP patch applied (2of2) (994.83 KB, image/jpeg)
2011-02-13 01:51 UTC, Thomas Schmid
no flags Details
kernel 2.6.37.1 + "drm.debug=0xe", dmesg output (101.43 KB, text/plain)
2011-02-19 13:27 UTC, Thomas Schmid
no flags Details
Patch rejection eDP patch applied against 2.6.37.1 (694 bytes, text/plain)
2011-02-23 05:08 UTC, Thomas Schmid
no flags Details
Patched intel_dp-c source file, kernel 2.6.37.2 (50.16 KB, text/plain)
2011-03-01 13:28 UTC, Thomas Schmid
no flags Details

Description Thomas Schmid 2011-02-11 00:40:04 UTC
Created attachment 43236 [details]
Very short video (AVI) of flicker problem

Hi all, 
A bug with using KMS on a HP 5320m labtop, Arrandale chipset, iCore5 M450. OS is standard openSUSE 11.3, except I am using an openSuSE-provided kernel 2.6.37.6

X11 version: 7.5

1. Starting with KMS enabled gets me heavy flicker and massive display
distortions after start from GRUB, when the displayed is switched from what GRUB is using to framebuffer (a short blanking). 
These distortions are present in Console and later in X11/KDE environment.

2. If I disable KMS by using "nomodeset", I get a clear screen using either
X11 auto-configuration (which is using fbdev) or manual cX11 configuration using VESA driver.

Attached various logs, and a short video showing the effect.
Thomas
Comment 1 Thomas Schmid 2011-02-11 00:43:25 UTC
Created attachment 43237 [details]
Xorg log file

Xorg log file of booting HP 5320m (Arrandale) with KMS and "drm.debug=0xe" enabled
Comment 2 Thomas Schmid 2011-02-11 00:44:17 UTC
Created attachment 43238 [details]
dmesg output booting with KMS and "drm.debug=0xe"
Comment 3 Thomas Schmid 2011-02-11 00:45:09 UTC
Created attachment 43240 [details]
lspci of HP5320m iCore5 (Arrandale)
Comment 4 Chris Wilson 2011-02-12 02:41:08 UTC
Created attachment 43290 [details] [review]
Probe the eDP device on init

You hardware is very confused. It claims to be using both an eDP and and LVDS connection to the same panel.

One of those is a ghost, presumably the eDP since we have more severe sanity checking for false claims of an LVDS detection. Hopefully the attached should dissuade the claims of having an eDP.

This isn't an HP Probook 5320m, by any chance?
Comment 5 Thomas Schmid 2011-02-12 23:48:21 UTC
(In reply to comment #4)
> Created an attachment (id=43290) [details]
> Probe the eDP device on init
> 
> You hardware is very confused. It claims to be using both an eDP and and LVDS
> connection to the same panel.
> 
> One of those is a ghost, presumably the eDP since we have more severe sanity
> checking for false claims of an LVDS detection. Hopefully the attached should
> dissuade the claims of having an eDP.
> 
> This isn't an HP Probook 5320m, by any chance?

Oh yes, it is a HP 5320m Pro Book.
Comment 6 Thomas Schmid 2011-02-13 01:49:23 UTC
(In reply to comment #4)
> Created an attachment (id=43290) [details]
> Probe the eDP device on init
> 
> You hardware is very confused. It claims to be using both an eDP and and LVDS
> connection to the same panel.
> 
> One of those is a ghost, presumably the eDP since we have more severe sanity
> checking for false claims of an LVDS detection. Hopefully the attached should
> dissuade the claims of having an eDP.
> 
> This isn't an HP Probook 5320m, by any chance?

I have added your patch to my kernel, on top of 2.6.37.9 (provided by openSuSE kernel/stable/11.3 repository). But the system crashes now at startup, just after loading i915, KMS and friends. 
I have attached 2 screen shots of the crash, as it fills 2 pages of my frambuffer console:  ("chwilson_patch_kernel_panic_at_boot_page1.jpg", "chwilson_patch_kernel_panic_at_boot_page2.jpg")
Comment 7 Thomas Schmid 2011-02-13 01:50:42 UTC
Created attachment 43314 [details]
Screenshot of system crashing with eDP patch applied (1of2)
Comment 8 Thomas Schmid 2011-02-13 01:51:26 UTC
Created attachment 43315 [details]
Screenshot of system crashing with eDP patch applied (2of2)
Comment 9 Thomas Schmid 2011-02-19 13:24:14 UTC
Retested using kernel 2.6.37.1-1 (provided by openSUSE kernel/stable): Same results, heavy flicker and display distortion using KMS.

Also retried the eDP-Patch on this kernel 2.6.37.1; system panicked just after leaving GRUB.
Comment 10 Thomas Schmid 2011-02-19 13:27:27 UTC
Created attachment 43558 [details]
kernel 2.6.37.1 + "drm.debug=0xe", dmesg output
Comment 11 Thomas Schmid 2011-02-20 13:44:32 UTC
Chris,

Can you tell what's so special (or bad) about the HP 5320m ProBook ?

Thomas
Comment 12 Jesse Barnes 2011-02-22 11:43:15 UTC
Can you try this patch instead?  I think we were trying to read the DPCD too early in the other one.

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 7ffb324..e1b4c88 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1949,6 +1949,18 @@ intel_dp_init(struct drm_device *dev, int output_reg)
                ironlake_edp_panel_vdd_off(intel_dp);
        }
 
+       /* confirm the existence of the device with a simple probe */
+       if (intel_encoder->type == INTEL_OUTPUT_EDP &&
+           intel_dp_aux_native_read(intel_dp,
+                                    0x000, intel_dp->dpcd,
+                                    sizeof (intel_dp->dpcd))
+           != sizeof(intel_dp->dpcd)) {
+               kfree(intel_dp);
+               kfree(intel_connector);
+               return;
+       }
+
+
        intel_encoder->hot_plug = intel_dp_hot_plug;
 
        if (is_edp(intel_dp)) {
Comment 13 Thomas Schmid 2011-02-23 04:57:00 UTC
(In reply to comment #12)
> Can you try this patch instead?  I think we were trying to read the DPCD too
> early in the other one.
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 7ffb324..e1b4c88 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1949,6 +1949,18 @@ intel_dp_init(struct drm_device *dev, int output_reg)
>                 ironlake_edp_panel_vdd_off(intel_dp);
>         }
> 
> +       /* confirm the existence of the device with a simple probe */
> +       if (intel_encoder->type == INTEL_OUTPUT_EDP &&
> +           intel_dp_aux_native_read(intel_dp,
> +                                    0x000, intel_dp->dpcd,
> +                                    sizeof (intel_dp->dpcd))
> +           != sizeof(intel_dp->dpcd)) {
> +               kfree(intel_dp);
> +               kfree(intel_connector);
> +               return;
> +       }
> +
> +
>         intel_encoder->hot_plug = intel_dp_hot_plug;
> 
>         if (is_edp(intel_dp)) {

Sorry, the patch does not apply: Is this against 2.6.37.1 ? Because I cannot find the "ironlake_edp_panel_vdd_off()" in my drivers/gpu/drm/i915/intel_dp.c
Comment 14 Thomas Schmid 2011-02-23 05:08:51 UTC
Created attachment 43700 [details]
Patch rejection eDP patch applied against 2.6.37.1
Comment 15 Thomas Schmid 2011-03-01 06:28:18 UTC
Retried with kernel 2.6.37.2; same behaviour:
uname -a
Linux Kevin 2.6.37.2-1-desktop #1 SMP PREEMPT 2011-02-25 22:30:06 +0100 x86_64 x86_64 x86_64 GNU/Linux
Comment 16 Jesse Barnes 2011-03-01 08:28:43 UTC
You should be able to apply that code in the same place, the previous block with the vdd_off call won't be there though, but you can just put it above the assignment of intel_encoder->hot_plug = intel_dp_hot_plug;
Comment 17 Thomas Schmid 2011-03-01 13:26:57 UTC
(In reply to comment #16)
> You should be able to apply that code in the same place, the previous block
> with the vdd_off call won't be there though, but you can just put it above the
> assignment of intel_encoder->hot_plug = intel_dp_hot_plug;

I did this, but again the kernel panic'd shortly after starting from GRUB:

drm:intel_dp_init *ERROR* failed to retrieve link info
general protection fault: 0000 [#1] PREEMPT SMP

CPU 3
Modules linked in: i915(+) drm_kms_helper drm.....
RIP intel_modeset_init +0x576/0x1250 [i915]

Sorry, no camera to take a picture nearby...

Thomas
Comment 18 Thomas Schmid 2011-03-01 13:28:13 UTC
Created attachment 43987 [details]
Patched intel_dp-c source file, kernel 2.6.37.2
Comment 19 Chris Wilson 2011-03-16 05:22:06 UTC
kernel commit 3d3dc149eda48566619d165f6b34e5eeca00edf1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Feb 12 10:33:12 2011 +0000

    drm/i915/dp: Sanity check eDP existence
    
    Some hardware claims to have both an LVDS panel and an eDP output.
    Whilst this may be true in a rare case, more often it is just broken
    hardware. If we see an eDP device we know that it must be connected and
    so we can confirm its existence with a simple probe.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34165
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=24822
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


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.