Bug 95301 - On boot to console get trace on i915 module load
Summary: On boot to console get trace on i915 module load
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - Intel) (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: intel-gfx-bugs@lists.freedesktop.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-23 12:50 UTC by William
Modified: 2015-03-27 07:49 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.0-rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg output under kernel 4.0-rc5. (37.59 KB, text/plain)
2015-03-23 12:50 UTC, William
Details
dmesg output (61.13 KB, text/plain)
2015-03-25 20:27 UTC, Ivan Bulatovic
Details

Description William 2015-03-23 12:50:14 UTC
Created attachment 171781 [details]
dmesg output under kernel 4.0-rc5.

Under kernel 4.0-rc5 get a warning and trace in syslog on boot to console
only at (I presume) i915 module load, and just before console switch from
vga to i915 driver.

So far no other adverse effects are apparent, and can carry on to start X,
etc ok.

Was last OK under kernel 4.0-rc4.

See also BUG ID 94251.

------------------------------------

Hardware:
  Asus P7H55-M SI with Intel Core i5 processor
  and Integrated Graphics [i915 driver].
  The board has 3 physical graphics connectors :-
    VGA    = VGA1
    DVI-D  = HDMI1 in use.
    HDMI   = HDMI2

Distro: Slackware-14.1, but with newer kernel.

------------------------------------

See trace in attached dmesg output produced on boot up to console only
under kernel 4.0-rc5.
Comment 1 Ivan Bulatovic 2015-03-25 20:27:52 UTC
Created attachment 172381 [details]
dmesg output

+1
Can't tell if it's the same issue, bisecting now...
Comment 2 Ivan Bulatovic 2015-03-25 21:51:04 UTC
Got it:

319c1d420a0b62d9dbb88104afebaabc968cdbfa is the first bad commit
commit 319c1d420a0b62d9dbb88104afebaabc968cdbfa
Author: Xi Ruoyao <xry111@outlook.com>
Date:   Thu Mar 12 20:16:32 2015 +0800

    drm/i915: Ensure plane->state->fb stays in sync with plane->fb
    
    plane->state->fb and plane->fb should always reference the same FB so
    that atomic and legacy codepaths have the same view of display state.
    However, there are some places in kernel code that directly set
    plane->fb and neglect to update plane->state->fb. If we never do a
    successful update through the atomic pipeline, the RmFB cleanup code
    will look at the plane->state->fb pointer, which has never actually
    been set to a legitimate value, and try to clean it up, leading to
    BUG's.
    
    Add a quick helper function to synchronize plane->state->fb with
    plane->fb and call it everywhere the driver tries to manually set
    plane->fb outside of the atomic pipeline. In this function, use
    drm_atomic_set_fb_for_plane instead of writing plane->state->fb
    directly to keep the reference count right.
    
    This is modified from Matt Roper's patch to drm-intel-nightly with
    commit id
    
    commit afd65eb4cc0578a9c07d621acdb8a570e2782bf7
    Author: Matt Roper <matthew.d.roper@intel.com>
    Date:   Tue Feb 3 13:10:04 2015 -0800
    
        drm/i915: Ensure plane->state->fb stays in sync with plane->fb
    
    However this bug exists in mainline kernel too, so I created this to fix
    it in mainline kernel.
    
    A minor change is to use drm_atomic_set_fb_for_plane instead of update
    reference count manually.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88909
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=93711
    Signed-off-by: Xi Ruoyao <xry111@outlook.com>
    Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
    [Jani: included the patch notes in the commit message]
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

:040000 040000 baa4beae6b27f959570b3507f3c1237c6d9181bf d451c8e6ea1e02fc7779518c90c9d87a14786a39 M	drivers
Comment 3 Jani Nikula 2015-03-26 13:51:48 UTC
Please try drm-intel-fixes branch of http://cgit.freedesktop.org/drm-intel.
Comment 4 Ivan Bulatovic 2015-03-26 16:51:34 UTC
Yep, drm-intel-fixes-2015-03-26 is clean, no warnings...

I didn't have to bisect last night, only two relevant commits, :facepalm :)
Comment 5 Jani Nikula 2015-03-26 17:01:27 UTC
Thanks for the report and testing; hopefully this will make it to v4.0-rc6.
Comment 6 William 2015-03-26 18:16:18 UTC
Applied patches from drm-intel-fixes-2015-03-26 to kernel 4.0-rc5

patch-8218c3f4df3bb1c637c17552405039a6dd3c1ee1
patch-59a58cb34d3fe73e6c899cc5d9a87428ca662925
patch-32a3aad1e2927b1684e7369c9f36a370e0b95da
patch-3164a803416832d61268b758112e8dfd7e35cdf7
patch-5f407751b0ca9bd876fe8f15ff28153661c6ba0a

Now does the console switch cleanly for me too - thanks.
Comment 7 Jani Nikula 2015-03-27 07:49:49 UTC
(In reply to William from comment #6)
> Now does the console switch cleanly for me too - thanks.

Thanks for the additional testing. The commits are now in Linus' master.

Note You need to log in before you can comment on or make changes to this bug.