1. 12 Dec, 2013 3 commits
    • Paulo Zanoni's avatar
      drm/i915: touch VGA MSR after we enable the power well · f9dcb0df
      Paulo Zanoni authored
      Fixes regression introduced by:
          commit bf51d5e2
          Author: Paulo Zanoni <paulo.r.zanoni at intel.com>
          Date:   Wed Jul 3 17:12:13 2013 -0300
              drm/i915: switch disable_power_well default value to 1
      
      The bug I'm seeing can be reproduced with:
        - Have vgacon configured/enabled
        - Make sure the power well gets disabled, then enabled. You can
          check this by seeing the messages print by hsw_set_power_well
        - Stop your display manager
        - echo 0 > /sys/class/vtconsole/vtcon1/bind
      
      I can easily reproduce this by blacklising snd_hda_intel and booting
      with eDP+HDMI.
      
      If you do this and then look at dmesg, you'll see we're printing
      infinite "Unclaimed register" messages. This is happening because
      we're stuck on an infinite loop inside console_unlock(), which is
      calling many functions from vgacon.c. And the code that's triggering
      the error messages is from vgacon_set_cursor_size().
      
      After we re-enable the power well, every time we read/write the VGA
      address 0x3d5 we get an "unclaimed register" interrupt (ERR_INT) and
      print error messages. If we write anything to the VGA MSR register (it
      doesn't really matter which value you write to bit 0), any
      reads/writes to 0x3d5 _don't_ trigger the "unclaimed register" errors
      anymore (even if MSR bit 0 is zero). So what happens with the current
      code is that when we unbind i915 and bind vgacon, we call
      console_unlock(). Function console_unlock() is responsible for
      printing any messages that were supposed to be print when the console
      was locked, so it calls the TTY layer, which calls the console layer,
      which calls vgacon to print the messages. At this point, vgacon
      eventually calls vgacon_set_cursor_size(), which touches 0x3d5, which
      triggers unclaimed register interrupts. The problem is that when we
      get these interrupts, we print the error messages, so we add more work
      to console_unlock(), which will try to print it again, and then call
      vgacon again, trigger a new interrupt, which will put more stuff to
      the buffer, and then we'll be stuck at console_unlock() forever.
      
      If you patch intel_uncore.c to not print anything when we detect
      unclaimed registers, we won't get into the console_unlock() infinite
      loop and the driver unbind will work just fine. We will still be
      getting interrupts every time vgacon touches those registers, but we
      will survive. This is a valid experiment, but IMHO it's not the real
      fix: if we don't print any error messages we will still keep getting
      the interrupts, and if we disable ERR_INT we won't get the interrupt
      anymore, but we will also stop getting all the other error interrupts.
      
      I talked about this problem with the HW engineer and his
      recommendation is "So don't do any VGA I/O or memory access while the
      power well is disabled, and make to re-program MSR after enabling the
      power well and before using VGA I/O or memory accesses.".
      
      Notice that this is just a partial fix to fd.o #67813. This fixes the
      case where the power well is already enabled when we unbind, not when
      it's disabled when we unbind.
      
      V2: - Rebase (first version was sent in September).
      V3: - Complete rewrite of the same fix: smaller implementation,
            improved commit message.
      
      Testcase: igt/drv_module_reload
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67813Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f9dcb0df
    • Paulo Zanoni's avatar
      drm/i915: extract hsw_power_well_post_{enable, disable} · d5e8fdc8
      Paulo Zanoni authored
      I want to add more code to the post_enable function.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d5e8fdc8
    • Paulo Zanoni's avatar
      drm/i915: remove i915_disable_vga_mem declaration · b6646074
      Paulo Zanoni authored
      It was supposed to have been killed on the same commit that killed the
      function, e1264ebe, but I guess the
      intel_drv.h reorganization accidentally brought it back.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      b6646074
  2. 11 Dec, 2013 16 commits
  3. 10 Dec, 2013 14 commits
  4. 09 Dec, 2013 2 commits
    • Deepak S's avatar
      drm/i915: Remove duplicate intel_uncore_forcewake_reset. · c461562e
      Deepak S authored
      Since early sanitize and uncore sanitize are called one after the other,
      I think, we can remove second forcewake reset which was are calling
      twice in both the functions.
      
      Note that this is merge fallout between
      
      commit ef46e0d2
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sat Nov 16 16:00:09 2013 +0100
      
          drm/i915: restore the early forcewake cleanup
      
      and
      
      commit 521198a2
      Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Date:   Fri Aug 23 16:52:30 2013 +0300
      
          drm/i915: sanitize forcewake registers on reset
      Signed-off-by: default avatarDeepak S <deepak.s@intel.com>
      [danvet: Explain how this came to be.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      c461562e
    • Daniel Vetter's avatar
      Merge tag 'v3.13-rc3' into drm-intel-next-queued · f7698ba7
      Daniel Vetter authored
      Linux 3.13-rc3
      
      I need a backmerge for two reasons:
      - For merging the ppgtt patches from Ben I need to pull in the bdw
        support.
      - We now have duplicated calls to intel_uncore_forcewake_reset in the
        setup code to due 2 different patches merged into -next and 3.13.
        The conflict is silen so I need the merge to be able to apply
        Deepak's fixup patch.
      
      Conflicts:
      	drivers/gpu/drm/i915/intel_display.c
      
      Trivial conflict, it doesn't even show up in the merge diff.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f7698ba7
  5. 06 Dec, 2013 5 commits
    • Paulo Zanoni's avatar
      drm/i915: change CRTC assertion on LCPLL disable · 798183c5
      Paulo Zanoni authored
      Currently, PC8 is enabled at modeset_global_resources, which is called
      after intel_modeset_update_state. Due to this, there's a small race
      condition on the case where we start enabling PC8, then do a modeset
      while PC8 is still being enabled. The racing condition triggers a WARN
      because intel_modeset_update_state will mark the CRTC as enabled, then
      the thread that's still enabling PC8 might look at the data structure
      and think that PC8 is being enabled while a pipe is enabled. Despite
      the WARN, this is not really a bug since we'll wait for the
      PC8-enabling thread to finish when we call modeset_global_resources.
      
      The spec says the CRTC cannot be enabled when we disable LCPLL, so we
      had a check for crtc->base.enabled. If we change to crtc->active we
      will still prevent disabling LCPLL while the CRTC is enabled, and we
      will also prevent the WARN above.
      
      This is a replacement for the previous patch named
          "drm/i915: get/put PC8 when we get/put a CRTC"
      
      Testcase: igt/pm_pc8/modeset-lpsp-stress-no-wait
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      798183c5
    • Linus Torvalds's avatar
      Linux 3.13-rc3 · 374b1057
      Linus Torvalds authored
      374b1057
    • Linus Torvalds's avatar
      Merge tag 'trace-fixes-3.13-rc2' of... · 843f4f4b
      Linus Torvalds authored
      Merge tag 'trace-fixes-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull tracing fix from Steven Rostedt:
       "A regression showed up that there's a large delay when enabling all
        events.  This was prevalent when FTRACE_SELFTEST was enabled which
        enables all events several times, and caused the system bootup to
        pause for over a minute.
      
        This was tracked down to an addition of a synchronize_sched()
        performed when system call tracepoints are unregistered.
      
        The synchronize_sched() is needed between the unregistering of the
        system call tracepoint and a deletion of a tracing instance buffer.
        But placing the synchronize_sched() in the unreg of *every* system
        call tracepoint is a bit overboard.  A single synchronize_sched()
        before the deletion of the instance is sufficient"
      
      * tag 'trace-fixes-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Only run synchronize_sched() at instance deletion time
      843f4f4b
    • Linus Torvalds's avatar
      Merge git://git.kvack.org/~bcrl/aio-next · c537aba0
      Linus Torvalds authored
      Pull aio fix from Benjamin LaHaise:
       "AIO fix from Gu Zheng that fixes a GPF that Dave Jones uncovered with
        trinity"
      
      * git://git.kvack.org/~bcrl/aio-next:
        aio: clean up aio ring in the fail path
      c537aba0
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 7adfff58
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of nine fixes (and one author update).
      
        The libsas one should fix discovery in eSATA devices, the WRITE_SAME
        one is the largest, but it should fix a lot of problems we've been
        getting with the emulated RAID devices (they've been effectively lying
        about support and then firmware has been choking on the commands).
      
        The rest are various crash, hang or warn driver fixes"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] bfa: Fix crash when symb name set for offline vport
        [SCSI] enclosure: fix WARN_ON in dual path device removing
        [SCSI] pm80xx: Tasklets synchronization fix.
        [SCSI] pm80xx: Resetting the phy state.
        [SCSI] pm80xx: Fix for direct attached device.
        [SCSI] pm80xx: Module author addition
        [SCSI] hpsa: return 0 from driver probe function on success, not 1
        [SCSI] hpsa: do not discard scsi status on aborted commands
        [SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers
        [SCSI] libsas: fix usage of ata_tf_to_fis
      7adfff58