Bug 43005 - [gm45] Screen blanks on start, stays blank (too early plane?)
Summary: [gm45] Screen blanks on start, stays blank (too early plane?)
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Chris Wilson
QA Contact:
URL:
Whiteboard:
Keywords:
: 48944 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-16 16:05 UTC by russell bell
Modified: 2017-07-24 23:03 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log (18.62 KB, text/plain)
2011-12-07 22:19 UTC, russell bell
no flags Details
dmesg (30.32 KB, text/plain)
2011-12-07 22:20 UTC, russell bell
no flags Details
Remove too-early-plane enable. (898 bytes, patch)
2012-04-19 15:11 UTC, Chris Wilson
no flags Details | Splinter Review

Description russell bell 2011-11-16 16:05:05 UTC
Beginning with kernel 3.1.0 the screen blanks when X starts and stays blank no matter what.  The computer hasn't crashed, I can run programs blind and quit X.
I don't have this problem with 3.0.9.  I had it with some previous versions of the kernel and built my own X for a year or so.

Video chip:  Intel i915
System architecture:  i686
Computer:  eMachines e725-4250 laptop
Slackware distribution, updated daily
libdrm_intel 2.4.25
Comment 1 russell bell 2011-12-06 21:42:18 UTC
I solved the problem by using the drivers/gpu/drm/drm_crtc_helper.c from kernel 3.0. The drm_crtc_helper.c for version 3.1 has these additional lines:

562a563,567
> } else if (set->fb->depth != set->crtc->fb->depth) {
> mode_changed = true;
> } else if (set->fb->bits_per_pixel !=
> set->crtc->fb->bits_per_pixel) {
> mode_changed = true;

which are in the drm_crtc_helper_set_config routine.
Comment 2 Chris Wilson 2011-12-07 00:54:29 UTC
Sorry for not noticing before and thanks for delving into the issue! So it sounds like X causes a change in fb depth which necessitates a mode switch. Can you please attach dmesg with drm.debug=0xe and your Xorg.0.log?
Comment 3 russell bell 2011-12-07 22:19:17 UTC
Created attachment 54210 [details]
Xorg.0.log
Comment 4 russell bell 2011-12-07 22:20:19 UTC
Created attachment 54211 [details]
dmesg
Comment 5 Chris Wilson 2012-04-19 15:10:46 UTC
[drm:drm_crtc_helper_set_config], [CONNECTOR:5:LVDS-1] to [CRTC:4]
[drm:drm_crtc_helper_set_config], attempting to set mode from userspace
[drm:drm_mode_debug_printmodeline], Modeline 8:"1366x768" 60 72300 1366 1414 1446 1526 768 771 776 790 0x48 0xa
[drm:drm_crtc_helper_set_mode], [CRTC:4]
[drm:intel_panel_actually_set_backlight], set backlight PWM = 0
[drm:intel_panel_get_max_backlight], max backlight PWM = 736950
[drm] capturing error event; look for more information in /debug/dri/0/i915_error_state
[drm:i9xx_crtc_mode_set], using SSC reference clock of 96 MHz
[drm:i9xx_crtc_mode_set], Mode for pipe B:
[drm:drm_mode_debug_printmodeline], Modeline 8:"1366x768" 60 72300 1366 1414 1446 1526 768 771 776 790 0x48 0xa
[drm:i9xx_crtc_mode_set], disabling CxSR downclocking
render error detected, EIR: 0x00000010
  IPEIR: 0x00000000
  IPEHR: 0x00000000
  INSTDONE: 0xfffffffe
  INSTPS: 0x00000000
  INSTDONE1: 0xffffffff
  ACTHD: 0x00000000
page table error
  PGTBL_ER: 0x00000001
[drm:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
[drm:i9xx_update_plane], Writing base 00042000 00000000 0 0 5504


Notice how the display engine explodes with a bad pointer dereference just prior to use setting the scanout...
Comment 6 Chris Wilson 2012-04-19 15:11:45 UTC
Created attachment 60339 [details] [review]
Remove too-early-plane enable.
Comment 7 Chris Wilson 2012-04-20 00:47:57 UTC
*** Bug 48944 has been marked as a duplicate of this bug. ***
Comment 8 russell bell 2012-04-20 21:26:49 UTC
(In reply to comment #7)
> *** Bug 48944 has been marked as a duplicate of this bug. ***

By mistake.  That patch solves the blanking-on-boot problem but doesn't affect the render error.
Comment 9 russell bell 2012-04-20 21:29:45 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > *** Bug 48944 has been marked as a duplicate of this bug. ***
> 
> By mistake.  That patch solves the blanking-on-boot problem but doesn't affect
> the render error.

Whoops!  I meant blanking on starting X.
Comment 10 Chris Wilson 2012-05-09 02:06:53 UTC
commit c7bd4c25650704d4d065eb4ce2a122d2a80ce804
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 24 16:36:50 2012 +0100

    drm/i915: Remove too early plane enable on pre-PCH hardware
    
    Enabling the plane before we have assigned valid address means that it
    will access random PTE (often with conflicting memory types) and cause
    GPU lockups. However, enabling the plane too early appears to workaround
    a number of bugs in our modesetting code.
    
    Cc: Franz Melchior <melchior.franz@gmail.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=39947
    References: https://bugs.freedesktop.org/show_bug.cgi?id=41091
    References: https://bugs.freedesktop.org/show_bug.cgi?id=49041
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>


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.