1. 03 4月, 2016 1 次提交
    • C
      drm/i915: Add struct_mutex locking for debugs/i915_gem_framebuffer · 188c1ab7
      Chris Wilson 提交于
      Since describe_obj() looks at state guarded by the struct_mutex, we need
      to be holding it.
      
      [  580.201054] drv_suspend: starting subtest debugfs-reader
      [  580.239652] ------------[ cut here ]------------
      [  580.239696] WARNING: CPU: 0 PID: 920 at include/linux/list_check.h:25 describe_obj+0x419/0x440()
      [  580.239725] CPU: 0 PID: 920 Comm: cat Not tainted 4.5.0-rc6+ #835
      [  580.239745] Hardware name:                  /NUC5CPYB, BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015
      [  580.239767]  0000000000000000 ffff88027554fcf8 ffffffff812c1135 0000000000000000
      [  580.239815]  ffffffff8193dc42 ffff88027554fd30 ffffffff8107419d ffff880071727c00
      [  580.239858]  ffff8802757d8000 ffffffff818f693c ffffffff818f693c ffff8802757b9048
      [  580.239896] Call Trace:
      [  580.239917]  [<ffffffff812c1135>] dump_stack+0x67/0x92
      [  580.239939]  [<ffffffff8107419d>] warn_slowpath_common+0x7d/0xb0
      [  580.239959]  [<ffffffff810742ba>] warn_slowpath_null+0x1a/0x20
      [  580.239981]  [<ffffffff813ce579>] describe_obj+0x419/0x440
      [  580.240006]  [<ffffffff813ced22>] i915_gem_framebuffer_info+0xa2/0x100
      [  580.240033]  [<ffffffff811a9286>] seq_read+0xe6/0x3b0
      [  580.240059]  [<ffffffff81182288>] __vfs_read+0x28/0xd0
      [  580.240085]  [<ffffffff81173378>] ? SyS_fadvise64+0x228/0x2c0
      [  580.240112]  [<ffffffff811823b2>] vfs_read+0x82/0x110
      [  580.240137]  [<ffffffff811827d9>] SyS_read+0x49/0xa0
      [  580.240162]  [<ffffffff815bac57>] entry_SYSCALL_64_fastpath+0x12/0x6b
      [  580.240187] ---[ end trace 3e2cbf34576c9878 ]---
      [  580.281900] ------------[ cut here ]------------
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1459689261-7920-1-git-send-email-chris@chris-wilson.co.uk
      188c1ab7
  2. 31 3月, 2016 1 次提交
    • J
      drm/i915: Refer to GGTT {,VM} consistently · 72e96d64
      Joonas Lahtinen 提交于
      Refer to the GGTT VM consistently as "ggtt->base" instead of just "ggtt",
      "vm" or indirectly through other variables like "dev_priv->ggtt.base"
      to avoid confusion with the i915_ggtt object itself and PPGTT VMs.
      
      Refer to the GGTT as "ggtt" instead of indirectly through chaining.
      
      As a bonus gets rid of the long-standing i915_obj_to_ggtt vs.
      i915_gem_obj_to_ggtt conflict, due to removal of i915_obj_to_ggtt!
      
      v2:
      - Added some more after grepping sources with Chris
      
      v3:
      - Refer to GGTT VM through ggtt->base consistently instead of ggtt_vm
        (Chris)
      
      v4:
      - Convert all dev_priv->ggtt->foo accesses to ggtt->foo.
      
      v5:
      - Make patch checker happy
      
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      72e96d64
  3. 24 3月, 2016 2 次提交
  4. 18 3月, 2016 1 次提交
  5. 17 3月, 2016 1 次提交
  6. 16 3月, 2016 5 次提交
  7. 04 3月, 2016 1 次提交
  8. 26 2月, 2016 2 次提交
  9. 22 2月, 2016 1 次提交
  10. 17 2月, 2016 1 次提交
  11. 02 2月, 2016 1 次提交
    • R
      drm/i915: Add PSR main link standby support back · 60e5ffe3
      Rodrigo Vivi 提交于
      Link standby support has been deprecated with 'commit 89251b17
      ("drm/i915: PSR: deprecate link_standby support for core platforms.")'
      
      The reason for that is that main link in full off offers more power
      savings and on HSW and BDW implementations on source side had known
      bugs with link standby.
      
      However that same HSD report only mentions BDW and HSW and tells that
      a fix was going to new platforms. Since on Skylake link standby
      didn't cause the bad blank flickering screens seen on HSW and BDW
      let's respect VBT again for this and future platforms.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      60e5ffe3
  12. 25 1月, 2016 2 次提交
    • A
      drm/i915/gen9: Add framework to whitelist specific GPU registers · 33136b06
      Arun Siluvery 提交于
      Some of the HW registers are privileged and cannot be written to from
      non-privileged batch buffers coming from userspace unless they are added to
      the HW whitelist. This whitelist is maintained by HW and it is different from
      SW whitelist. Userspace need write access to them to implement preemption
      related WA.
      
      The reason for using this approach is, the register bits that control
      preemption granularity at the HW level are not context save/restored; so even
      if we set these bits always in kernel they are going to change once the
      context is switched out.  We can consider making them non-privileged by
      default but these registers also contain other chicken bits which should not
      be allowed to be modified.
      
      In the later revisions controlling bits are save/restored at context level but
      in the existing revisions these are exported via other debug registers and
      should be on the whitelist. This patch adds changes to provide HW with a list
      of registers to be whitelisted. HW checks this list during execution and
      provides access accordingly.
      
      HW imposes a limit on the number of registers on whitelist and it is
      per-engine.  At this point we are only enabling whitelist for RCS and we don't
      foresee any requirement for other engines.
      
      The registers to be whitelisted are added using generic workaround list
      mechanism, even these are only enablers for userspace workarounds. But by
      sharing this mechanism we get some test assets without additional cost (Mika).
      
      v2: rebase
      
      v3: parameterize RING_FORCE_TO_NONPRIV() as _MMIO() should be limited to
      i915_reg.h (Ville), drop inline for wa_ring_whitelist_reg (Mika).
      
      v4: improvements suggested by Chris Wilson.
      Clarify that this is HW whitelist and different from the one maintained in
      driver. This list is engine specific but it gets initialized along with other
      WA which is RCS specific thing, so make it clear that we are not doing any
      cross engine setup during initialization.
      Make HW whitelist count of each engine available in debugfs.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NArun Siluvery <arun.siluvery@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453412634-29238-2-git-send-email-arun.siluvery@linux.intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      33136b06
    • A
      drm/i915/guc: Decouple GuC engine id from ring id · 397097b0
      Alex Dai 提交于
      Previously GuC uses ring id as engine id because of same definition.
      But this is not true since this commit:
      
      commit de1add36
      Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Date:   Fri Jan 15 15:12:50 2016 +0000
      
          drm/i915: Decouple execbuf uAPI from internal implementation
      
      Added GuC engine id into GuC interface to decouple it from ring id used
      by driver.
      
      v2: Keep ring name print out in debugfs; using for_each_ring() where
          possible to keep driver consistent. (Chris W.)
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453579094-29860-1-git-send-email-yu.dai@intel.com
      397097b0
  13. 21 1月, 2016 2 次提交
  14. 18 1月, 2016 1 次提交
    • T
      drm/i915: Do not call API requiring struct_mutex where it is not available · ca82580c
      Tvrtko Ursulin 提交于
      LRC code was calling GEM API like i915_gem_obj_ggtt_offset from
      places where the struct_mutex cannot be grabbed (irq handlers).
      
      To avoid that this patch caches some interesting bits and values
      in the engine and context structures.
      
      Some usages are also removed where they are not needed like a
      few asserts which are either impossible or have been checked
      already during engine initialization.
      
      Side benefit is also that interrupt handlers and command
      submission stop evaluating invariant conditionals, like what
      Gen we are running on, on every interrupt and every command
      submitted.
      
      This patch deals with logical ring context id and descriptors
      while subsequent patches will deal with the remaining issues.
      
      v2:
       * Cache the VMA instead of the address. (Chris Wilson)
       * Incorporate Dave Gordon's good comments and function name.
      
      v3:
       * Extract ctx descriptor template to a function and group
         functions dealing with ctx descriptor & co together near
         top of the file. (Dave Gordon)
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dave Gordon <david.s.gordon@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1452870629-13830-1-git-send-email-tvrtko.ursulin@linux.intel.com
      ca82580c
  15. 08 1月, 2016 1 次提交
    • M
      drm/i915: Inspect subunit states on hangcheck · 61642ff0
      Mika Kuoppala 提交于
      If head seems stuck and engine in question is rcs,
      inspect subunit state transitions from undone to done,
      before deciding that this really is a hang instead of limited
      progress. Only account the transitions of subunits from
      undone to done once, to prevent unstable subunit states
      to keep us falsely active.
      
      As this adds one extra steps to hangcheck heuristics,
      before hang is declared, it adds 1500ms to to detect hang
      for render ring to a total of 7500ms. We could sample
      the subunit states on first head stuck condition but
      decide not to do so only in order to mimic old behaviour. This
      way the check order of promotion from seqno > atchd > instdone
      is consistently done.
      
      v2: Deal with unstable done states (Arun)
          Clear instdone progress on head and seqno movement (Chris)
          Report raw and accumulated instdone's in in debugfs (Chris)
          Return HANGCHECK_ACTIVE on undone->done
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=93029
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Dave Gordon <david.s.gordon@intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1448985372-19535-1-git-send-email-mika.kuoppala@intel.com
      61642ff0
  16. 07 1月, 2016 1 次提交
  17. 16 12月, 2015 2 次提交
  18. 10 12月, 2015 2 次提交
  19. 03 12月, 2015 2 次提交
    • A
      drm/i915/guc: Clean up locks in GuC · 5a843307
      Alex Dai 提交于
      For now, remove the spinlocks that protected the GuC's
      statistics block and work queue; they are only accessed
      by code that already holds the global struct_mutex, and
      so are redundant (until the big struct_mutex rewrite!).
      
      The specific problem that the spinlocks caused was that
      if the work queue was full, the driver would try to
      spinwait for one jiffy, but with interrupts disabled the
      jiffy count would not advance, leading to a system hang.
      The issue was found using test case igt/gem_close_race.
      
      The new version will usleep() instead, still holding
      the struct_mutex but without any spinlocks.
      
      v4: Reorganize commit message (Dave Gordon)
      v3: Remove unnecessary whitespace churn
      v2: Clean up wq_lock too
      v1: Clean up host2guc lock as well
      Signed-off-by: NAlex Dai <yu.dai@intel.com>
      Reviewed-by: NDave Gordon <david.s.gordon@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1449104189-27591-1-git-send-email-yu.dai@intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5a843307
    • P
      drm/i915: introduce is_active/activate/deactivate to the FBC terminology · 0e631adc
      Paulo Zanoni 提交于
      The long term goal is to have enable/disable as the higher level
      functions and activate/deactivate as the lower level functions, just
      like we do for PSR and for the CRTC. This way, we'll run enable and
      disable once per modeset, while update, activate and deactivate will
      be run many times. With this, we can move the checks and code that
      need to run only once per modeset to enable(), making the code simpler
      and possibly a little faster.
      
      This patch is just the first step on the conversion: it starts by
      converting the current low level functions from enable/disable to
      activate/deactivate. This patch by itself has no benefits other than
      making review and rebase easier. Please see the next patches for more
      details on the conversion.
      
      v2:
        - Rebase.
        - Improve commit message (Chris).
      v3: Rebase after changing the patch order.
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/
      0e631adc
  20. 02 12月, 2015 1 次提交
  21. 30 11月, 2015 1 次提交
  22. 24 11月, 2015 1 次提交
    • R
      drm/i915: Remove PSR Perf Counter for SKL+ · 05eec3c2
      Rodrigo Vivi 提交于
      Whenever DMC firmware put the HW into DC State a bunch
      of registers including this perf counter is reset to 0.
      
      Even with PSR active and working we could still read
      "Performance_Counter: 0" what will misslead people to believe
      PSR is broken. For instance on SKL we can only see PC10
      residency with screen on if PSR is working properly.
      However Performance_Counter was showing 0.
      
      Even if it restored properly on DC6 exit we don't want to
      give users the wrong impression that PSR is not working
      while we know for sure it is.
      
      So, it is better to remove this counter information while
      we don't have a better way to track PSR residency.
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      05eec3c2
  23. 23 11月, 2015 1 次提交
  24. 20 11月, 2015 1 次提交
    • L
      drm/i915: Fix oops caused by fbdev initialization failure · 54632abe
      Lukas Wunner 提交于
      intelfb_create() is called once on driver initialization. If it fails,
      ifbdev->helper.fbdev, ifbdev->fb or ifbdev->fb->obj may be NULL.
      
      Further up in the call stack, intel_fbdev_initial_config() calls
      intel_fbdev_fini() to tear down the ifbdev on failure. This calls
      intel_fbdev_destroy() which dereferences ifbdev->fb. Fix the ensuing
      oops.
      
      Also check in these functions if ifbdev is not NULL to avoid oops:
      
      i915_gem_framebuffer_info() is called on access to debugfs file
      "i915_gem_framebuffer" and dereferences ifbdev, ifbdev->helper.fb
      and ifbdev->helper.fb->obj.
      
      intel_connector_add_to_fbdev() / intel_connector_remove_from_fbdev()
      are called when registering / unregistering an mst connector and
      dereference ifbdev.
      
      v3: Drop additional null pointer checks in intel_fbdev_set_suspend(),
          intel_fbdev_output_poll_changed() and intel_fbdev_restore_mode()
          since they already check if ifbdev is not NULL, which is sufficient
          now that intel_fbdev_fini() is called on initialization failure.
          (Requested by Daniel Vetter <daniel.vetter@ffwll.ch>)
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Link: http://patchwork.freedesktop.org/patch/msgid/d05f0edf121264a9d0adb8ca713fd8cc4ae068bf.1447938059.git.lukas@wunner.deSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      54632abe
  25. 18 11月, 2015 4 次提交
  26. 16 11月, 2015 1 次提交