1. 02 4月, 2014 3 次提交
  2. 31 3月, 2014 2 次提交
  3. 29 3月, 2014 3 次提交
    • C
      drm/i915: Broadwell expands ACTHD to 64bit · 50877445
      Chris Wilson 提交于
      As Broadwell has an increased virtual address size, it requires more
      than 32 bits to store offsets into its address space. This includes the
      debug registers to track the current HEAD of the individual rings, which
      may be anywhere within the per-process address spaces. In order to find
      the full location, we need to read the high bits from a second register.
      We then also need to expand our storage to keep track of the larger
      address.
      
      v2: Carefully read the two registers to catch wraparound between
          the reads.
      v3: Use a WARN_ON rather than loop indefinitely on an unstable
          register read.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Cc: Timo Aaltonen <tjaalton@ubuntu.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      [danvet: Drop spurious hunk which conflicted.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      50877445
    • D
      drm/i915: Track the enabled PM interrupts in dev_priv. · a6706b45
      Deepak S 提交于
      When we use different rps events for different platforms or due to wa,
      we might end up needing this logic in a lot of places. Instead of
      this let's use a variable in dev_priv to track the enabled PM
      interrupts.
      
      v2: Initialize pm_rps_events in intel_irq_init() (Ville).
      Signed-off-by: NDeepak S <deepak.s@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Frob the commit message a bit since the English was a bit too
      garbled ;-) ]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a6706b45
    • D
      drm/i915: fix up semaphore_waits_for · 88fe429d
      Daniel Vetter 提交于
      There's an entire pile of issues in here:
      
      - Use the main RING_HEAD register, not ACTHD. ACTHD points at the gtt
        offset of the batch buffer when a batch is executed. Semaphores are
        always emitted to the main ring, so we always want to look at that.
      
      - Mask the obtained HEAD pointer with the actual ring size, which is
        much smaller. Together with the above issue this resulted us in
        trying to dereference a pointer way outside of the ring mmio
        mapping. The resulting invalid access in interrupt context
        (hangcheck is executed from timers) lead to a full blown kernel
        panic. The fbcon panic handler then tried to frob our driver harder,
        resulting in a full machine hang at least on my snb here where I've
        stumbled over this.
      
      - Handle ring wrapping correctly and be a bit more explicit about how
        many dwords we're scanning. We probably should also scan more than
        just 4 ...
      
      - Space out some of teh computations for readability.
      
      This reduces hard-hangs on my snb here. Mika and QA both say that it
      doesn't completel remove them, but at least for me it's a clear
      improvement in stability.
      
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      References: https://bugs.freedesktop.org/show_bug.cgi?id=74100Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88fe429d
  4. 20 3月, 2014 1 次提交
    • B
      drm/i915: Rename and comment all the RPS *stuff* · b39fb297
      Ben Widawsky 提交于
      The names of the struct members for RPS are stupid. Every time I need to
      do anything in this code I have to spend a significant amount of time to
      remember what it all means. By renaming the variables (and adding the
      comments) I hope to clear up the situation. Indeed doing this make some
      upcoming patches more readable.
      
      I've avoided ILK because it's possible that the naming used for Ironlake
      matches what is in the docs. I believe the ILK power docs were never
      published, and I am too lazy to dig them up.
      
      v2: leave rp0, and rp1 in the names. It is useful to have these limits
      available at times. min_freq and max_freq (which may be equal to rp0, or
      rp1 depending on the platform) represent the actual HW min and max.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b39fb297
  5. 19 3月, 2014 1 次提交
  6. 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
  7. 11 3月, 2014 1 次提交
  8. 08 3月, 2014 4 次提交
  9. 06 3月, 2014 2 次提交
  10. 03 3月, 2014 1 次提交
    • D
      drm/i915: sprinkle static · b5ea642a
      Daniel Vetter 提交于
      Apparently we've missed a few more than what Fengguang's 0-day tester
      recently reported in i915_irq.c ... Makes sparse happy again (ignore
      some spurious stuff about ksyms of exported functions).
      
      Cc: kbuild test robot <fengguang.wu@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b5ea642a
  11. 13 2月, 2014 5 次提交
    • D
      drm/i915: Some polish for the new pipestat_irq_handler · bbb5eebf
      Daniel Vetter 提交于
      Just a bit of polish which I hope will help me with massaging some
      internal patches to use Imre's reworked pipestat handling:
      - Don't check for underrun reporting or enable pipestat interrupts
        twice.
      - Frob the comments a bit.
      - Do the iir PIPE_EVENT to pipe mapping explicitly with a switch. We
        only have one place which does this, so better to make it explicit.
      
      v2: Ville noticed that I've broken the logic a bit with trying to
      avoid checking whether we're interested in a given pipe twice. push
      the PIPESTAT read down after we've computed the mask of interesting
      bits first to avoid that duplication properly.
      
      v3: Squash in fixups from Imre on irc.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bbb5eebf
    • I
      drm/i915: vlv: handle only enabled pipestat interrupt events · 91d181dd
      Imre Deak 提交于
      Atm we call the handlers for pending pipestat interrupt events even if
      they aren't explicitly enabled by i915_enable_pipestat(). This isn't an
      issue for events other than the vblank start event, since those are
      always enabled anyways. Otoh, we enable the vblank start event
      on-demand, so we'll end up calling the vblank handler at times when they
      are disabled.
      
      I haven't checked if this causes any real problem, but for consistency
      and to remove some overhead we should still fix this by clearing /
      handling only the enabled interrupt events. Also this is a dependency
      for the upcoming VLV power domain patchset where we need to disable all
      the pipestat interrupts whenever the display power well is off.
      
      v2:
      - inline the status->enable mask mapping (Ville)
      - don't check for invalid PSR bit on platforms other than VLV (Ville)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Frob conflict due to different merge order.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      91d181dd
    • I
      drm/i915: vlv: fix mapping of pipestat enable to status bits · 10c59c51
      Imre Deak 提交于
      At least on VLV we can't get at the pipestat status bits by simply right
      shifting the corresponding enable bits. The mapping between enable and
      status bits for the sprite0,1 flip done and the PSR events don't follow
      this rule, so we need to map them separately.
      
      The PSR enable for pipe A is DPFLIPSTAT[22], but I haven't added support
      for this, since there is no user of it atm. Until support is added WARN
      if someone tries to enable PSR interrupts, or tries to enable the same
      (1 << 6) bit on pipe B, which MBZ.
      
      v2:
      - inline the status->enable mask mapping (Ville)
      - fix bogus use of status bits in enable mask (Ville)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      10c59c51
    • I
      drm/i915: pass status instead of enable flags to i915_enable_pipestat · 755e9019
      Imre Deak 提交于
      There isn't any PSR interrupt enable bit for pipe A, so we couldn't
      enable it through the current API. Passing the corresponding status bits
      solves this and also makes the mapping between enable and status bits
      simpler on VLV (addressed in an upcoming patch).
      
      Except of checking for invalid status bit arguments, no functional
      change.
      
      v2: split out the low level parts of i915_enable_pipestat accepting
          separate enabled and status masks, to make the non-standard mapping
          between those masks stand out more (added in the next patch)
          (Jesse,Daniel)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      755e9019
    • D
      drm/i915: Always use INTEL_INFO() to access the device_info structure · 3d13ef2e
      Damien Lespiau 提交于
      If we make sure that all the dev_priv->info usages are wrapped by
      INTEL_INFO(), we can easily modify the ->info field to be structure and
      not a pointer while keeping the const protection in the INTEL_INFO()
      macro.
      
      v2: Rebased onto latest drm-nightly
      Suggested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3d13ef2e
  12. 11 2月, 2014 1 次提交
  13. 06 2月, 2014 4 次提交
  14. 04 2月, 2014 2 次提交
  15. 30 1月, 2014 1 次提交
  16. 28 1月, 2014 1 次提交
    • J
      drm/i915: move module parameters into a struct, in a new file · d330a953
      Jani Nikula 提交于
      With 20+ module parameters, I think referring to them via a struct
      improves clarity over just having a bunch of globals. While at it, move
      the parameter initialization and definitions into a new file
      i915_params.c to reduce clutter in i915_drv.c.
      
      Apart from the ill-named i915_enable_rc6, i915_enable_fbc and
      i915_enable_ppgtt parameters, for which we lose the "i915_" prefix
      internally, the module parameters now look the same both on the kernel
      command line and in code. For example, "i915.modeset".
      
      The downsides of the change are losing static on a couple of variables
      and not having the initialization and module_param_named() right next to
      each other. On the other hand, all module parameters are now defined in
      one place at i915_params.c. Plus you can do this to find all module
      parameter references:
      
      $ git grep "i915\." -- drivers/gpu/drm/i915
      
      v2:
      - move the definitions into a new file
      - s/i915_params/i915/
      - make i915_try_reset i915.reset, for consistency
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d330a953
  17. 26 1月, 2014 2 次提交
  18. 25 1月, 2014 3 次提交