1. 19 3月, 2014 2 次提交
  2. 12 3月, 2014 3 次提交
    • D
      drm/i915: Don't enable display error interrupts from the start · 5c673b60
      Daniel Vetter 提交于
      We need to enable interrupt processing before all the modeset
      state is set up. But that means we can fall over when we get a pipe
      underrun. This shouldn't happen as long as the bios works correctly
      but as usual this turns out to be wishful thinking.
      
      So disable error interrupts at irq install time and rely on the
      re-enabling code in the modeset functions to take care of this.
      
      Note that due to the SDE interrupt handling race we must
      uncondtionally enable all interrupt sources in SDEIER, hence no need
      to enable the SERR bit specifically.
      
      On gmch platforms we don't have an explicit enable/mask bit for fifo
      underruns. Fixing this up would require a bit of software tracking,
      hence is material for a separate patch. To make this possible we need
      to switch all gmch platforms to the new pipestat interrupt handling
      scheme Imre implemented for vlv, and then also add a safe form of sw
      state checking to __cpu_fifo_underrun_reporting_enabled a bit.
      
      v2: Also handle the ilk/snb cpu fifo underrun bits accordingly.
      Spotted by Ville.
      
      v3: Also handle the south interrupt underrun bits on ibx. Again
      spotted by Ville.
      Reported-by: NRob Clark <robdclark@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: stable@vger.kernel.org
      Tested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      5c673b60
    • V
      drm/i915: Fix scanline counter fixup on BDW · 24302624
      Ville Syrjälä 提交于
      The display interrupts changed on BDW, so the current ILK-HSW specific
      code in ilk_pipe_in_vblank_locked() doesn't work there. Add the required
      bits for BDW, and while at it, change the existing code to use nicer
      looking vblank status bit macros.
      
      Also remove the now stale __raw_i915_read16() definition which was
      left over from the failed gen2 ISR experiment.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73962Tested-by: NLu Hua <huax.lu@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      24302624
    • V
      drm/i915: Add a workaround for HSW scanline counter weirdness · fcb81823
      Ville Syrjälä 提交于
      On HSW the scanline counter seems to behave differently depending on
      the output type. eDP on port A does what you would expect an the normal
      +1 fixup is sufficient to cover it. But on HDMI outputs we seem to need
      a +2 fixup. Just assume we always need the +2 fixup and accept the
      slight inaccuracy on eDP.
      
      This fixes a regression introduced in:
       commit 8072bfa6
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Mon Oct 28 21:22:52 2013 +0200
      
          drm/radeon: Move the early vblank IRQ fixup to radeon_get_crtc_scanoutpos()
      
      That commit removed the heuristic that tried to fix up the timestamps
      for vblank interrupts that fire a bit too early. Since then the vblank
      timestamp code would treat some vblank interrupts as spurious since the
      scanline counter would indicate that vblank_start wasn't reached yet.
      That in turn lead to incorrect vblank event sequence numbers being
      reported to userspace, which lead to unsteady framerate in applications
      such as XBMC which uses them for timing purposes.
      
      v2: Remember to call ilk_pipe_in_vblank_locked() on HSW too (Mika)
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75725
      Tested-by: bugzilla1@gmx.com
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      fcb81823
  3. 06 3月, 2014 1 次提交
    • B
      drm/i915: Fix PSR programming · 24bd9bf5
      Ben Widawsky 提交于
      | has a higher precedence than ?. Therefore, the calculation doesn't do
      at all what you would expect. Thanks to Ken for convincing me that this
      was indeed the issue. Send me back to C programmer school, please.
      
      I'm sort of surprised PSR was continuing to work for people. It should
      be broken IMO (and it was broken for me, but I had assumed it never
      worked).
      
      Regression from:
      commit ed8546ac
      Author: Ben Widawsky <benjamin.widawsky@intel.com>
      Date:   Mon Nov 4 22:45:05 2013 -0800
      
          drm/i915/bdw: Support eDP PSR
      
      Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
      Cc: Kenneth Graunke <kenneth.w.graunke@intel.com>
      Cc: Art Runyan <arthur.j.runyan@intel.com>
      Reported-by: N"Kumar, Kiran S" <kiran.s.kumar@intel.com>
      Cc: stable@vger.kernel.org [v3.13+]
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      24bd9bf5
  4. 04 3月, 2014 3 次提交
  5. 03 3月, 2014 3 次提交
    • I
      drm/i915: fix pch pci device enumeration · bcdb72ac
      Imre Deak 提交于
      pci_get_class(class, from) drops the refcount for 'from', so the
      extra pci_dev_put we do on it will result in a use after free bug
      starting with the WARN below.
      
      Regression introduced in
      
      commit 6a9c4b35
      Author: Rui Guo <firemeteor@users.sourceforge.net>
      Date:   Wed Jun 19 21:10:23 2013 +0800
      
          drm/i915: Fix PCH detect with multiple ISA bridges in VM
      
      [  164.338460] WARNING: CPU: 1 PID: 2094 at include/linux/kref.h:47 klist_next+0xae/0x110()
      [  164.347731] CPU: 1 PID: 2094 Comm: modprobe Tainted: G           O 3.13.0-imre+ #354
      [  164.356468] Hardware name: Intel Corp. VALLEYVIEW B0 PLATFORM/NOTEBOOK, BIOS BYTICRB1.X64.0062.R70.1310112051 10/11/2013
      [  164.368796] Call Trace:
      [  164.371609]  [<ffffffff816a32a6>] dump_stack+0x4e/0x7a
      [  164.377447]  [<ffffffff8104f75d>] warn_slowpath_common+0x7d/0xa0
      [  164.384238]  [<ffffffff8104f83a>] warn_slowpath_null+0x1a/0x20
      [  164.390851]  [<ffffffff8169aeae>] klist_next+0xae/0x110
      [  164.396777]  [<ffffffff8130a110>] ? pci_do_find_bus+0x70/0x70
      [  164.403286]  [<ffffffff813cb4a9>] bus_find_device+0x89/0xc0
      [  164.409719]  [<ffffffff8130a373>] pci_get_dev_by_id+0x63/0xa0
      [  164.416238]  [<ffffffff8130a4e4>] pci_get_class+0x44/0x50
      [  164.422433]  [<ffffffffa034821f>] intel_dsm_detect+0x16f/0x1f0 [i915]
      [  164.429801]  [<ffffffffa03482ae>] intel_register_dsm_handler+0xe/0x10 [i915]
      [  164.437831]  [<ffffffffa02d30fe>] i915_driver_load+0xafe/0xf30 [i915]
      [  164.445126]  [<ffffffff8158a150>] ? intel_alloc_coherent+0x110/0x110
      [  164.452340]  [<ffffffffa0148c07>] drm_dev_register+0xc7/0x150 [drm]
      [  164.459462]  [<ffffffffa014b23f>] drm_get_pci_dev+0x11f/0x1f0 [drm]
      [  164.466554]  [<ffffffff816abb81>] ? _raw_spin_unlock_irqrestore+0x51/0x70
      [  164.474287]  [<ffffffffa02cf7a6>] i915_pci_probe+0x56/0x60 [i915]
      [  164.481185]  [<ffffffff8130a028>] pci_device_probe+0x78/0xf0
      [  164.487603]  [<ffffffff813cd495>] driver_probe_device+0x155/0x350
      [  164.494505]  [<ffffffff813cd74e>] __driver_attach+0x6e/0xa0
      [  164.500826]  [<ffffffff813cd6e0>] ? __device_attach+0x50/0x50
      [  164.507333]  [<ffffffff813cb2be>] bus_for_each_dev+0x6e/0xc0
      [  164.513752]  [<ffffffff813ccefe>] driver_attach+0x1e/0x20
      [  164.519870]  [<ffffffff813cc958>] bus_add_driver+0x138/0x260
      [  164.526289]  [<ffffffffa0188000>] ? 0xffffffffa0187fff
      [  164.532116]  [<ffffffff813cde78>] driver_register+0x98/0xe0
      [  164.538558]  [<ffffffffa0188000>] ? 0xffffffffa0187fff
      [  164.544389]  [<ffffffff813087b0>] __pci_register_driver+0x60/0x70
      [  164.551336]  [<ffffffffa014b37d>] drm_pci_init+0x6d/0x120 [drm]
      [  164.558040]  [<ffffffffa0188000>] ? 0xffffffffa0187fff
      [  164.563928]  [<ffffffffa018806a>] i915_init+0x6a/0x6c [i915]
      [  164.570363]  [<ffffffff810002da>] do_one_initcall+0xaa/0x160
      [  164.576783]  [<ffffffff8103b140>] ? set_memory_nx+0x40/0x50
      [  164.583100]  [<ffffffff810ce7f5>] load_module+0x1fb5/0x2550
      [  164.589410]  [<ffffffff810caab0>] ? store_uevent+0x40/0x40
      [  164.595628]  [<ffffffff810cee7d>] SyS_init_module+0xed/0x100
      [  164.602048]  [<ffffffff816b3c52>] system_call_fastpath+0x16/0x1b
      
      v2: simplify the loop further (Chris)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Reported-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65652
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74161Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      bcdb72ac
    • A
      drm/i915: Resolving the memory region conflict for Stolen area · 3617dc96
      Akash Goel 提交于
      There is a conflict seen when requesting the kernel to reserve
      the physical space used for the stolen area. This is because
      some BIOS are wrapping the stolen area in the root PCI bus, but have
      an off-by-one error. As a workaround we retry the reservation with an
      offset of 1 instead of 0.
      
      v2: updated commit message & the comment in source file (Daniel)
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Tested-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      3617dc96
    • J
      drm/i915: use backlight legacy combination mode also for i915gm/i945gm · b6ab66aa
      Jani Nikula 提交于
      i915gm and i945gm also seem to use and need the legacy combination mode
      bit in BLC_PWM_CTL.
      
      v2: Also do this for i915gm (Ville).
      Reported-and-tested-by: NLuis Ortega <luiorpe1@gmail.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75001Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      b6ab66aa
  6. 13 2月, 2014 2 次提交
  7. 12 2月, 2014 2 次提交
  8. 11 2月, 2014 2 次提交
  9. 07 2月, 2014 1 次提交
    • D
      drm/i915: Disable dp aux irq on g4x · 4e6b788c
      Daniel Vetter 提交于
      Apparently it's broken in the exact same way as the gmbus irq. For
      reference of the full story see
      
      commit c12aba5a
      Author: Jiri Kosina <jkosina@suse.cz>
      Date:   Tue Mar 19 09:56:57 2013 +0100
      
          drm/i915: stop using GMBUS IRQs on Gen4 chips
      
      The effect is that we have a storm of unclaimed interrupts on the
      legacy irq line. If that one is used by a different device then the
      kernel will complain and rather quickly kill the irq source. Which
      breaks any device trying to actually use the legacy irq line.
      
      This regression has been introduced
      
      commit 4aeebd74
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Oct 31 09:53:36 2013 +0100
      
          drm/i915: dp aux irq support for g4x/vlv
      
      Note that disabling MSI works around the issue, but we can't do that
      since apparently then the hw will miss interrupts. At least if
      relevant comments in i915_irq.c are accurate.
      
      v2: Cross-reference dp aux and gmbus gen4 comments.
      
      v3: Consolidate harder into i915_drv.h as suggested by Chris.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reported-and-tested-by: NJiri Kosina <jkosina@suse.cz>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4e6b788c
  10. 05 2月, 2014 1 次提交
  11. 31 1月, 2014 1 次提交
    • I
      drm/i915: vlv: fix DP PHY lockup due to invalid PP sequencer setup · 2cac613b
      Imre Deak 提交于
      Atm we setup the HW panel power sequencer logic both for eDP and DP
      ports. On eDP we then go on and start the power on sequence and commence
      with link training when it's ready. On DP we don't do the power on
      sequencing but do the link training immediately. At this point the DP
      PHY block gets stuck, since - supposedly - it is waiting for the power
      on sequence to finish. The actual register write that seems to hold off
      the PHY is PIPEX_PP_ON_DELAYS[Panel Control Port Select]. Writing here
      a non-0 value eventually sets PIPEX_PP_STATUS[Require Asset Status] to
      1 and blocks the PHY until the panel power on is ready.
      
      Fix this by not doing any PP sequencing setup for DP ports.
      
      Thanks to Ville Syrjälä, Jesse Barnes and Todd Previte for the help in
      tracking this down.
      
      Note that on older gmch platforms (where we have lvds instead of edp)
      we've hacked around this by writing the magic ABCD unlock key to PP
      registers, which disables the hw sanity checks.
      
      For edp all platforms thus far had the pch split, with the edp port in
      the north display complex and the PP registers on the pch the hw
      sanity checks (expressed through the "Require Asset Status" bit) was
      never functional, hence never a real issue.
      
      This regression has been introduce in
      
      commit bf13e81b
      Author: Jani Nikula <jani.nikula@intel.com>
      Date:   Fri Sep 6 07:40:05 2013 +0300
      
          drm/i915: add support for per-pipe power sequencing on vlv
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      [danvet: Add note about the bigger story here.]
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2cac613b
  12. 28 1月, 2014 2 次提交
  13. 25 1月, 2014 2 次提交
    • S
      i915: remove pm_qos request on error · 22accca0
      Stanislaw Gruszka 提交于
      Not removing pm qos request and free memory for it can cause crash,
      when some other driver use pm qos. For example, this oops:
      
      BUG: unable to handle kernel paging request at fffffffffffffff8
      IP: [<ffffffff81307a6b>] plist_add+0x5b/0xd0
      Call Trace:
       [<ffffffff810acf25>] pm_qos_update_target+0x125/0x1e0
       [<ffffffff810ad071>] pm_qos_add_request+0x91/0x100
       [<ffffffffa053ec14>] e1000_open+0xe4/0x5b0 [e1000e]
      
      was caused by earlier i915 probe failure:
      
      [drm:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
      [drm:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head 00003004 tail 00000000 start 00003000
      [drm:i915_driver_load] *ERROR* failed to init modeset
      i915: probe of 0000:00:02.0 failed with error -5
      
      Bug report:
      http://bugzilla.redhat.com/show_bug.cgi?id=1057533Reported-by: NGiandomenico De Tullio <ghisha@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      [danvet: Drop unnecessary code movement.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      22accca0
    • D
      Revert "drm/i915: Mask reserved bits in display/sprite address registers" · 85ba7b7d
      Daniel Vetter 提交于
      This reverts commit 446f2545.
      
      I've left the masking in the pageflip code since that seems to be some
      useful piece of preemptive robustness.
      
      Iirc I've merged this patch under the assumption that the BIOS leaves
      some random gunk in the lower bits and gets unhappy if we trample on
      them. We have quite a few case like this, so this made sense.
      
      Now I've just learned that there's actual hardware features bits in
      the low 12 bits, and the kernel needs to preserve them to allow a
      userspace blob to do its job. Given Dave Airlie's clear stance on
      userspace blob drivers I've quickly chatted with him and he doesn't
      seem too happy. So let's revert this.
      
      If there are indeed bits that we must preserve in this range then we
      can ressurrect this patch, but with proper documentation for those
      bits supplied. And we probably also need to think a bit about
      interactions with our driver.
      
      Cc: Armin Reese <armin.c.reese@intel.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Dave Airlie <airlied@linux.ie>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      85ba7b7d
  14. 23 1月, 2014 1 次提交
  15. 22 1月, 2014 14 次提交