Skip to content
  1. Apr 06, 2017
  2. Apr 01, 2017
  3. Mar 30, 2017
    • Changbin Du's avatar
      drm/i915/gvt: exclude cfg space from failsafe mode · f8572690
      Changbin Du authored
      When test GVTg as below scenario:
        VM boot --> failsafe --> kill qemu --> VM boot.
      Qemu report error at the second boot:
        ERROR: PCI region size must be pow2 type=0x0, size=0x1fa1000
      
      Qemu need access PCI_ROM_ADDRESS reg to determine the size of expansion
      PCI rom. The mechanism just like the BAR reg (write-read) and we should
      return the size 0 since we have no rom. If we reject the write to
      PCI_ROM_ADDRESS, Qemu cannot get the correct size of rom.
      
      Essentially, GVTg failsafe mode should not break PCI function. So we
      exclude cfg space from failsafe mode. This can fix above issue.
      
      v2: add Fixes and Bugzilla link.
      
      Fixes: fd64be63
      
       ("drm/i915/gvt: introduced failsafe mode into vgpu")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100296
      Signed-off-by: default avatarChangbin Du <changbin.du@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      f8572690
    • Zhi Wang's avatar
      drm/i915/gvt: Activate/de-activate vGPU in mdev ops. · b79c52ae
      Zhi Wang authored
      This patch introduces two functions for activating/de-activating vGPU in
      mdev ops.
      
      A racing condition was found between virtual vblank emulation and KVGMT
      mdev release path. V-blank emulation will emulate and inject V-blank
      interrupt for every active vGPU with holding gvt->lock, while in mdev
      release path, it will directly release hypervisor handle without changing
      vGPU status or taking gvt->lock, so a kernel oops is encountered when
      vblank emulation is injecting a interrupt with a invalid hypervisor
      handle. (Reported by Terrence)
      
      To solve this problem, we factor out vGPU activation/de-activation from
      vGPU creation/destruction path and let KVMGT mdev release ops de-activate
      the vGPU before release hypervisor handle. Once a vGPU is de-activated,
      GVT-g will not emulate v-blank for it or touch the hypervisor handle.
      
      Fixes: 659643f7
      
       ("drm/i915/gvt/kvmgt: add vfio/mdev support to KVMGT")
      Signed-off-by: default avatarZhi Wang <zhi.a.wang@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      b79c52ae
  4. Mar 22, 2017
    • Changbin Du's avatar
      drm/i915/gvt: Use force single submit flag to distinguish gvt request from i915 request · bc2d4b62
      Changbin Du authored
      
      
      In my previous Commit ab9da627906a ("drm/i915: make context status
      notifier head be per engine") rely on scheduler->current_workload[x]
      to distinguish gvt spacial request from i915 request. But this is
      not always true since no synchronization between workload_thread and
      lrc irq handler.
      
          lrc irq handler               workload_thread
               ----                          ----
        pick i915 requests;
                                      intel_vgpu_submit_execlist();
                                      current_workload[x] = xxx;
        shadow_context_status_change();
      
      Then current_workload[x] is not null but current request is of i915 self.
      So instead we check ctx flag CONTEXT_FORCE_SINGLE_SUBMISSION. Only gvt
      request set this flag and always set.
      
      v2: Reverse the order of multi-condition 'if' statement.
      
      Fixes: ab9da6279 ("drm/i915: make context status notifier head be per engine")
      Signed-off-by: default avatarChangbin Du <changbin.du@intel.com>
      Reviewed-by: default avatarYulei Zhang <yulei.zhang@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      bc2d4b62
  5. Mar 21, 2017
  6. Mar 20, 2017
    • Pei Zhang's avatar
      drm/i915/gvt: add write handler for mmio mbctl · 975629c3
      Pei Zhang authored
      
      
      Guest will write mmio mbctl which need a special handler in gvt to
      clear the bit 4 to inidcate the write operation success.
      
      V2: use bit definition macro to make code readable.
      
      Signed-off-by: default avatarPei Zhang <pei.zhang@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      975629c3
    • Alex Williamson's avatar
      drm/i915/kvmgt: Hold struct kvm reference · 93a15b58
      Alex Williamson authored
      
      
      The kvmgt code keeps a pointer to the struct kvm associated with the
      device, but doesn't actually hold a reference to it.  If we do unclean
      shutdown testing (ie. killing the user process), then we can see the
      kvm association to the device unset, which causes kvmgt to trigger a
      device release via a work queue.  Naturally we cannot guarantee that
      the cached struct kvm pointer is still valid at this point without
      holding a reference.  The observed failure in this case is a stuck
      cpu trying to acquire the spinlock from the invalid reference, but
      other failure modes are clearly possible.  Hold a reference to avoid
      this.
      
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Cc: stable@vger.kernel.org #v4.10
      Cc: Jike Song <jike.song@intel.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Cc: Zhi Wang <zhi.a.wang@intel.com>
      Reviewed-by: default avatarJike Song <jike.song@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      93a15b58
  7. Mar 17, 2017
  8. Mar 13, 2017
    • Tvrtko Ursulin's avatar
      drm/i915: Fix forcewake active domain tracking · 6aef6603
      Tvrtko Ursulin authored
      In commit 003342a5
      
       ("drm/i915: Keep track of active
      forcewake domains in a bitmask") I forgot to adjust the
      newly introduce fw_domains_active state across reset.
      
      This caused the assert_forcewakes_inactive to trigger
      during suspend and resume if there were user held
      forcewakes.
      
      v2: Bitmask checks are required since vfuncs are not
          always present.
      
      v3: Move bitmask tracking to get/put vfunc for simplicity.
          (Chris Wilson)
      
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Fixes: 003342a5
      
       ("drm/i915: Keep track of active forcewake domains in a bitmask")
      Testcase: igt/drv_suspend/forcewake
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: "Paneri, Praveen" <praveen.paneri@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: v4.10+ <stable@vger.kernel.org>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170310093249.4484-1-tvrtko.ursulin@linux.intel.com
      (cherry picked from commit b8473050
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      6aef6603
    • Maarten Lankhorst's avatar
      drm/i915: Nuke skl_update_plane debug message from the pipe update critical section · 3a0d137d
      Maarten Lankhorst authored
      printks are slow so we should not be doing them from the vblank evade
      critical section. These could explain why we sometimes seem to
      blow past our 100 usec deadline.
      
      The problem has been there ever since commit c331879c ("drm/i915:
      skylake sprite plane scaling using shared scalers.") but it may not have
      been readily visible until commit e1edbd44
      
       ("drm/i915: Complain
      if we take too long under vblank evasion.") increased our chances
      of noticing it.
      
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1488974407-25175-1-git-send-email-maarten.lankhorst@linux.intel.com
      Fixes: c331879c
      
       ("drm/i915: skylake sprite plane scaling using shared scalers")
      Cc: <stable@vger.kernel.org> # v4.2+
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      [mlankhorst: Add missing tags, point to the correct offending commit]
      (cherry picked from commit d38146b9
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      3a0d137d
    • Matthew Auld's avatar
      drm/i915: use correct node for handling cache domain eviction · aac66bf5
      Matthew Auld authored
      It looks like we were incorrectly comparing vma->node against itself
      instead of the target node, when evicting for a node on systems where we
      need guard pages between regions with different cache domains. As a
      consequence we can end up trying to needlessly evict neighbouring nodes,
      even if they have the same cache domain, and if they were pinned we
      would fail the eviction.
      
      Fixes: 625d988a
      
       ("drm/i915: Extract reserving space in the GTT to a helper")
      Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170306235414.23407-3-matthew.auld@intel.com
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      (cherry picked from commit fe65cbdb
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      aac66bf5
  9. Mar 09, 2017
    • Chris Wilson's avatar
      drm/i915: Drain the freed state from the tail of the next commit · 5a8cf90d
      Chris Wilson authored
      If we have any residual freed atomic state from earlier commits, flush
      the freed list after performing the current modeset. This prevents the
      freed list from ever-growing if userspace manages to starve the kernel
      threads (i.e. we are never able to run our free state worker and
      eventually the system may even oom).
      
      Fixes: 6f0f02dc
      
       ("drm/i915: Move atomic state free from out of fence release")
      Testcase: igt/kms_cursor/legacy/all-pipes-single-bo
      Reported-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170202204741.18231-1-chris@chris-wilson.co.uk
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      (cherry picked from commit ba318c61
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      5a8cf90d
    • Ville Syrjälä's avatar
      drm/i915: Nuke debug messages from the pipe update critical section · edd06b83
      Ville Syrjälä authored
      printks are slow so we should not be doing them from the vblank evade
      critical section. These could explain why we sometimes seem to
      blow past our 100 usec deadline.
      
      The problem has been there ever since commit bfd16b2a ("drm/i915:
      Make updating pipe without modeset atomic.") but it may not have
      been readily visible until commit e1edbd44 ("drm/i915: Complain
      if we take too long under vblank evasion.") increased our chances
      of noticing it.
      
      Cc: stable@vger.kernel.org
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Fixes: bfd16b2a
      
       ("drm/i915: Make updating pipe without modeset atomic.")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170307205419.19447-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      (cherry picked from commit c3f8ad57
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      edd06b83
    • Chris Wilson's avatar
      drm/i915: Use pagecache write to prepopulate shmemfs from pwrite-ioctl · 4e6fdafa
      Chris Wilson authored
      Before we instantiate/pin the backing store for our use, we
      can prepopulate the shmemfs filp efficiently using a write into the
      pagecache. We avoid the penalty of instantiating all the pages, important
      if the user is just writing to a few and never uses the object on the GPU,
      and using a direct write into shmemfs allows it to avoid the cost of
      retrieving a page (mostly the clear-before-use, but in theory we could
      curtail swapin) before it is overwritten.
      
      This can be extended later to provide additional specialisation for
      other backends (other than shmemfs). For now it provides a defense
      against very large write-only allocations from exhausting all of system
      memory.
      
      v2: Smelling fixes.
      
      Fixes: fe115628
      
       ("drm/i915: Implement pwrite without struct-mutex")
      References: https://bugs.freedesktop.org/show_bug.cgi?id=99107
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.william.auld@gmail.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v4.10+
      Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170307120338.7277-2-chris@chris-wilson.co.uk
      (cherry picked from commit 7c55e2c5
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      4e6fdafa
    • Chris Wilson's avatar
      drm/i915: Store a permanent error in obj->mm.pages · 0d9dc306
      Chris Wilson authored
      Once the object has been truncated, it is unrecoverable. To facilitate
      detection of this state store the error in obj->mm.pages.
      
      This is required for the next patch which should be applied to v4.10
      (via stable), so we also need to mark this patch for backporting. In
      that regard, let's consider this to be a fix/improvement too.
      
      v2: Avoid dereferencing the ERR_PTR when freeing the object.
      
      Fixes: 1233e2db
      
       ("drm/i915: Move object backing storage manipulation to its own locking")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v4.10+
      Link: http://patchwork.freedesktop.org/patch/msgid/20170307132031.32461-1-chris@chris-wilson.co.uk
      Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      (cherry picked from commit 4e5462ee
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      0d9dc306
    • Maarten Lankhorst's avatar
      drm/i915: Move updating color management to before vblank evasion · 38230243
      Maarten Lankhorst authored
      
      
      This cannot be done reliably during vblank evasasion
      since the color management registers are not double buffered.
      
      The original commit that moved it always during vblank evasion was
      wrong, so revert it to before vblank evasion again.
      
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Fixes: 20a34e78
      
       ("drm/i915: Update color management during vblank evasion.")
      Cc: stable@vger.kernel.org # v4.7+
      Link: http://patchwork.freedesktop.org/patch/msgid/1488292128-14540-1-git-send-email-maarten.lankhorst@linux.intel.com
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      (cherry picked from commit 567f0792
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      38230243
    • Imre Deak's avatar
      drm/i915/gen9: Increase PCODE request timeout to 50ms · d253371c
      Imre Deak authored
      After
      commit 2c7d0602
      
      
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Mon Dec 5 18:27:37 2016 +0200
      
          drm/i915/gen9: Fix PCODE polling during CDCLK change notification
      
      there is still one report of the CDCLK-change request timing out on a
      KBL machine, see the Reference link. On that machine the maximum time
      the request took to succeed was 34ms, so increase the timeout to 50ms.
      
      v2:
      - Change timeout from 100 to 50 ms to maintain the current 50 ms limit
        for atomic waits in the driver. (Chris, Tvrtko)
      
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=99345
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/1487946730-17162-1-git-send-email-imre.deak@intel.com
      (cherry picked from commit 0129936d
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      d253371c
    • Mika Kuoppala's avatar
      drm/i915: Avoid tweaking evaluation thresholds on Baytrail v3 · 34dc8993
      Mika Kuoppala authored
      Certain Baytrails, namely the 4 cpu core variants, have been
      plaqued by spurious system hangs, mostly occurring with light loads.
      
      Multiple bisects by various people point to a commit which changes the
      reclocking strategy for Baytrail to follow its bigger brethen:
      commit 8fb55197
      
       ("drm/i915: Agressive downclocking on Baytrail")
      
      There is also a review comment attached to this commit from Deepak S
      on avoiding punit access on Cherryview and thus it was excluded on
      common reclocking path. By taking the same approach and omitting
      the punit access by not tweaking the thresholds when the hardware
      has been asked to move into different frequency, considerable gains
      in stability have been observed.
      
      With J1900 box, light render/video load would end up in system hang
      in usually less than 12 hours. With this patch applied, the cumulative
      uptime has now been 34 days without issues. To provoke system hang,
      light loads on both render and bsd engines in parallel have been used:
      glxgears >/dev/null 2>/dev/null &
      mpv --vo=vaapi --hwdec=vaapi --loop=inf vid.mp4
      
      So far, author has not witnessed system hang with above load
      and this patch applied. Reports from the tenacious people at
      kernel bugzilla are also promising.
      
      Considering that the punit access frequency with this patch is
      considerably less, there is a possibility that this will push
      the, still unknown, root cause past the triggering point on most loads.
      
      But as we now can reliably reproduce the hang independently,
      we can reduce the pain that users are having and use a
      static thresholds until a root cause is found.
      
      v3: don't break debugfs and simplification (Chris Wilson)
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=109051
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: fritsch@xbmc.org
      Cc: miku@iki.fi
      Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
      CC: Michal Feix <michal@feix.cz>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Deepak S <deepak.s@linux.intel.com>
      Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v4.2+
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1487166779-26945-1-git-send-email-mika.kuoppala@intel.com
      (cherry picked from commit 6067a27d
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      34dc8993
    • Chris Wilson's avatar
      drm/i915: Remove the vma from the drm_mm if binding fails · 8c992370
      Chris Wilson authored
      As we track whether a vma has been inserted into the drm_mm using the
      vma->flags, if we fail to bind the vma into the GTT we do not update
      those bits and will attempt to reinsert the vma into the drm_mm on
      future passes. To prevent that, we want to unwind i915_vma_insert() if
      we fail in our attempt to bind.
      
      Fixes: 59bfa124
      
       ("drm/i915: Start passing around i915_vma from execbuffer")
      Testcase: igt/drv_selftest/live_gtt
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.william.auld@gmail.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: <stable@vger.kernel.org> # v4.9+
      Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170227122654.27651-3-chris@chris-wilson.co.uk
      (cherry picked from commit 31c7effa
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      8c992370
    • Chris Wilson's avatar
      drm/i915/fbdev: Stop repeating tile configuration on stagnation · b717a039
      Chris Wilson authored
      If we cease making progress in finding matching outputs for a tiled
      configuration, stop looping over the remaining unconfigured outputs.
      
      v2: Use conn_seq (instead of pass) to only apply tile configuration on
      first pass.
      
      Fixes: b0ee9e7f
      
       ("drm/fb: add support for tiled monitor configurations. (v2)")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tomasz Lis <tomasz.lis@intel.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: <stable@vger.kernel.org> # v3.19+
      Reviewed-by: default avatarTomasz Lis <tomasz.lis@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170224114306.4400-1-chris@chris-wilson.co.uk
      (cherry picked from commit 754a7659
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      b717a039
    • Ander Conselvan de Oliveira's avatar
      drm/i915/glk: Fix watermark computations for third sprite plane · 1d972d60
      Ander Conselvan de Oliveira authored
      Geminilake has a third sprite plane (or fourth universal plane) that is
      independent from the cursor. Make sure that for_each_plane_id_on_crtc()
      is aware of that extra plane so that the watermark code takes it into
      account.
      
      Fixes: e9c98825
      
       ("drm/i915/glk: Configure number of sprite planes properly")
      Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: <drm-intel-fixes@lists.freedesktop.org>
      Signed-off-by: default avatarAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170223071600.14356-2-ander.conselvan.de.oliveira@intel.com
      (cherry picked from commit 19c3164d
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      1d972d60
    • Chris Wilson's avatar
      drm/i915: Squelch any ktime/jiffie rounding errors for wait-ioctl · 89cf83d4
      Chris Wilson authored
      We wait upon jiffies, but report the time elapsed using a
      high-resolution timer. This discrepancy can lead to us timing out the
      wait prior to us reporting the elapsed time as complete.
      
      This restores the squelching lost in commit e95433c7 ("drm/i915:
      Rearrange i915_wait_request() accounting with callers").
      
      Fixes: e95433c7
      
       ("drm/i915: Rearrange i915_wait_request() accounting with callers")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.william.auld@gmail.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+
      Cc: stable@vger.kernel.org
      Link: http://patchwork.freedesktop.org/patch/msgid/20170216125441.30923-1-chris@chris-wilson.co.uk
      Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      (cherry picked from commit c1d2061b
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      89cf83d4
  10. Mar 08, 2017
  11. Mar 06, 2017
    • Changbin Du's avatar
      drm/i915/gvt: protect RO and Rsvd bits of virtual vgpu configuration space · c2e04fda
      Changbin Du authored
      
      
      Per PCI specification, Configuration Register has different types (RO,
      RW, RW1C, Rsvd). For RO Register bits are read-only and cannot be
      altered by software. For RW1C Register bits indicate status when read.
      A Set bit indicates a status event which is Cleared by writing a 1b.
      Writing a 0b to RW1C bits has no effect. Reserved Register is for future
      implementations, and they are read-only and must return zero when read.
      
      Current vGPU configuration write emulation just copy the value as it is.
      So we haven't emulated RO, RW1C and Rsvd Registers correctly. This patch
      is following the Spec to correct emulation logic. We add a function
      vgpu_cfg_mem_write to wrap the access to vGPU configuration memory.
      The write function uses a RW Register bitmap to avoid RO bits be
      overwritten, and emulate RW1C behavior for the particular status Register.
      
      v2:
        new = src[i] --> new = src[i] & mask (zhenyu)
      
      Signed-off-by: default avatarChangbin Du <changbin.du@intel.com>
      Cc: Xiaoguang Chen <xiaoguang.chen@intel.com>
      Cc: Zhiyuan Lv <zhiyuan.lv@intel.com>
      Cc: Min He <min.he@intel.com>
      Reviewed-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      c2e04fda
    • Chuanxiao Dong's avatar
      drm/i915/gvt: handle workload lifecycle properly · 8f1117ab
      Chuanxiao Dong authored
      
      
      Currently i915 has a request replay mechanism which can make sure
      the request can be replayed after a GPU reset. With this mechanism,
      gvt should wait until the GVT request seqno passed before complete
      the current workload. So that there should be a context switch interrupt
      come before gvt free the workload. In this way, workload lifecylce
      matches with the i915 request lifecycle. The workload can only be freed
      after the request is completed.
      
      v2: use gvt_dbg_sched instead of gvt_err to print when wait again
      
      Signed-off-by: default avatarChuanxiao Dong <chuanxiao.dong@intel.com>
      Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
      8f1117ab
    • Linus Torvalds's avatar
      Linux 4.11-rc1 · c1ae3cfa
      Linus Torvalds authored
      c1ae3cfa
  12. Mar 05, 2017
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 8d70eeb8
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix double-free in batman-adv, from Sven Eckelmann.
      
       2) Fix packet stats for fast-RX path, from Joannes Berg.
      
       3) Netfilter's ip_route_me_harder() doesn't handle request sockets
          properly, fix from Florian Westphal.
      
       4) Fix sendmsg deadlock in rxrpc, from David Howells.
      
       5) Add missing RCU locking to transport hashtable scan, from Xin Long.
      
       6) Fix potential packet loss in mlxsw driver, from Ido Schimmel.
      
       7) Fix race in NAPI handling between poll handlers and busy polling,
          from Eric Dumazet.
      
       8) TX path in vxlan and geneve need proper RCU locking, from Jakub
          Kicinski.
      
       9) SYN processing in DCCP and TCP need to disable BH, from Eric
          Dumazet.
      
      10) Properly handle net_enable_timestamp() being invoked from IRQ
          context, also from Eric Dumazet.
      
      11) Fix crash on device-tree systems in xgene driver, from Alban Bedel.
      
      12) Do not call sk_free() on a locked socket, from Arnaldo Carvalho de
          Melo.
      
      13) Fix use-after-free in netvsc driver, from Dexuan Cui.
      
      14) Fix max MTU setting in bonding driver, from WANG Cong.
      
      15) xen-netback hash table can be allocated from softirq context, so use
          GFP_ATOMIC. From Anoob Soman.
      
      16) Fix MAC address change bug in bgmac driver, from Hari Vyas.
      
      17) strparser needs to destroy strp_wq on module exit, from WANG Cong.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (69 commits)
        strparser: destroy workqueue on module exit
        sfc: fix IPID endianness in TSOv2
        sfc: avoid max() in array size
        rds: remove unnecessary returned value check
        rxrpc: Fix potential NULL-pointer exception
        nfp: correct DMA direction in XDP DMA sync
        nfp: don't tell FW about the reserved buffer space
        net: ethernet: bgmac: mac address change bug
        net: ethernet: bgmac: init sequence bug
        xen-netback: don't vfree() queues under spinlock
        xen-netback: keep a local pointer for vif in backend_disconnect()
        netfilter: nf_tables: don't call nfnetlink_set_err() if nfnetlink_send() fails
        netfilter: nft_set_rbtree: incorrect assumption on lower interval lookups
        netfilter: nf_conntrack_sip: fix wrong memory initialisation
        can: flexcan: fix typo in comment
        can: usb_8dev: Fix memory leak of priv->cmd_msg_buffer
        can: gs_usb: fix coding style
        can: gs_usb: Don't use stack memory for USB transfers
        ixgbe: Limit use of 2K buffers on architectures with 256B or larger cache lines
        ixgbe: update the rss key on h/w, when ethtool ask for it
        ...
      8d70eeb8