1. 30 3月, 2015 1 次提交
  2. 26 3月, 2015 3 次提交
    • D
      drm/i915: Fixup legacy plane->crtc link for initial fb config · 5f407751
      Daniel Vetter 提交于
      This is a very similar bug in the load detect code fixed in
      
      commit 9128b040
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Tue Mar 3 17:31:21 2015 +0100
      
          drm/i915: Fix modeset state confusion in the load detect code
      
      But this time around it was the initial fb code that forgot to update
      the plane->crtc pointer. Otherwise it's the exact same bug, with the
      exact same restrains (any set_config call/ioctl that doesn't disable
      the pipe papers over the bug for free, so fairly hard to hit in normal
      testing). So if you want the full explanation just go read that one
      over there - it's rather long ...
      
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Josh Boyer <jwboyer@fedoraproject.org>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Reported-and-tested-by: NJosh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      [Jani: backported to drm-intel-fixes for v4.0-rc]
      Reference: http://mid.gmane.org/CA+5PVA7ChbtJrknqws1qvZcbrg1CW2pQAFkSMURWWgyASRyGXg@mail.gmail.comSigned-off-by: NJani Nikula <jani.nikula@intel.com>
      5f407751
    • D
      drm/i915: Fix atomic state when reusing the firmware fb · 3164a803
      Damien Lespiau 提交于
      Right now, we get a warning when taking over the firmware fb:
      
        [drm:drm_atomic_plane_check] FB set but no CRTC
      
      with the following backtrace:
      
        [<ffffffffa010339d>] drm_atomic_check_only+0x35d/0x510 [drm]
        [<ffffffffa0103567>] drm_atomic_commit+0x17/0x60 [drm]
        [<ffffffffa00a6ccd>] drm_atomic_helper_plane_set_property+0x8d/0xd0 [drm_kms_helper]
        [<ffffffffa00f1fed>] drm_mode_plane_set_obj_prop+0x2d/0x90 [drm]
        [<ffffffffa00a8a1b>] restore_fbdev_mode+0x6b/0xf0 [drm_kms_helper]
        [<ffffffffa00aa969>] drm_fb_helper_restore_fbdev_mode_unlocked+0x29/0x80 [drm_kms_helper]
        [<ffffffffa00aa9e2>] drm_fb_helper_set_par+0x22/0x50 [drm_kms_helper]
        [<ffffffffa050a71a>] intel_fbdev_set_par+0x1a/0x60 [i915]
        [<ffffffff813ad444>] fbcon_init+0x4f4/0x580
      
      That's because we update the plane state with the fb from the firmware, but we
      never associate the plane to that CRTC.
      
      We don't quite have the full DRM take over from HW state just yet, so
      fake enough of the plane atomic state to pass the checks.
      
      v2: Fix the state on which we set the CRTC in the case we're sharing the
          initial fb with another pipe. (Matt)
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      [Jani: backported to drm-intel-fixes for v4.0-rc]
      Reference: http://mid.gmane.org/CA+5PVA7yXH=U757w8V=Zj2U1URG4nYNav20NpjtQ4svVueyPNw@mail.gmail.com
      Reference: http://lkml.kernel.org/r/CA+55aFweWR=nDzc2Y=rCtL_H8JfdprQiCimN5dwc+TgyD4Bjsg@mail.gmail.comSigned-off-by: NJani Nikula <jani.nikula@intel.com>
      3164a803
    • C
      drm/i915: Keep ring->active_list and ring->requests_list consistent · 832a3aad
      Chris Wilson 提交于
      If we retire requests last, we may use a later seqno and so clear
      the requests lists without clearing the active list, leading to
      confusion. Hence we should retire requests first for consistency with
      the early return. The order used to be important as the lifecycle for
      the object on the active list was determined by request->seqno. However,
      the requests themselves are now reference counted removing the
      constraint from the order of retirement.
      
      Fixes regression from
      
      commit 1b5a433a
      Author: John Harrison <John.C.Harrison@Intel.com>
      Date:   Mon Nov 24 18:49:42 2014 +0000
      
          drm/i915: Convert 'i915_seqno_passed' calls into 'i915_gem_request_completed
      '
      
      and a
      
      	WARNING: CPU: 0 PID: 1383 at drivers/gpu/drm/i915/i915_gem_evict.c:279 i915_gem_evict_vm+0x10c/0x140()
      	WARN_ON(!list_empty(&vm->active_list))
      
      Identified by updating WATCH_LISTS:
      
      	[drm:i915_verify_lists] *ERROR* blitter ring: active list not empty, but no requests
      	WARNING: CPU: 0 PID: 681 at drivers/gpu/drm/i915/i915_gem.c:2751 i915_gem_retire_requests_ring+0x149/0x230()
      	WARN_ON(i915_verify_lists(ring->dev))
      
      Note that this is only a problem in evict_vm where the following happens
      after a retire_request has cleaned out all requests, but not all active
      bo:
      - intel_ring_idle called from i915_gpu_idle notices that no requests are
        outstanding and immediately returns.
      - i915_gem_retire_requests_ring called from i915_gem_retire_requests also
        immediately returns when there's no request, still leaving the bo on the
        active list.
      - evict_vm hits the WARN_ON(!list_empty(&vm->active_list)) after evicting
        all active objects that there's still stuff left that shouldn't be
        there.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: John Harrison <John.C.Harrison@Intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      832a3aad
  3. 25 3月, 2015 1 次提交
    • D
      drm/i915: Don't try to reference the fb in get_initial_plane_config() · 59a58cb3
      Damien Lespiau 提交于
      Tvrtko noticed a new warning on boot:
      
        WARNING: CPU: 1 PID: 353 at include/linux/kref.h:47 drm_framebuffer_reference+0x6c/0x80 [drm]()
        Call Trace:
        [<ffffffff8161f10c>] dump_stack+0x4f/0x7b
        [<ffffffff81052caa>] warn_slowpath_common+0xaa/0xd0
        [<ffffffff81052d8a>] warn_slowpath_null+0x1a/0x20
        [<ffffffffa00d035c>] drm_framebuffer_reference+0x6c/0x80 [drm]
        [<ffffffffa01c0df7>] update_state_fb.isra.54+0x47/0x50 [i915]
        [<ffffffffa01ccd5c>] skylake_get_initial_plane_config+0x93c/0x950 [i915]
        [<ffffffffa01e8721>] intel_modeset_init+0x1551/0x17c0 [i915]
        [<ffffffffa02476e0>] i915_driver_load+0xed0/0x11e0 [i915]
        [<ffffffff81627aa1>] ? _raw_spin_unlock_irqrestore+0x51/0x70
        [<ffffffffa00ca8b7>] drm_dev_register+0x77/0x110 [drm]
        [<ffffffffa00cda3b>] drm_get_pci_dev+0x11b/0x1f0 [drm]
        [<ffffffff81098e3d>] ? trace_hardirqs_on+0xd/0x10
        [<ffffffff81627aa1>] ? _raw_spin_unlock_irqrestore+0x51/0x70
        [<ffffffffa0145276>] i915_pci_probe+0x56/0x60 [i915]
        [<ffffffff813ad59c>] pci_device_probe+0x7c/0x100
        [<ffffffff81466aad>] driver_probe_device+0x16d/0x380
      
      We cannot take a reference at this point, not before
      intel_framebuffer_init() and the underlying drm_framebuffer_init().
      
      Introduced in:
      
        commit 706dc7b549175e47f23e913b7f1e52874a7d0f56
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Tue Feb 3 13:10:04 2015 -0800
      
            drm/i915: Ensure plane->state->fb stays in sync with plane->fb
      
      v2: Don't move update_state_fb(). It was moved around because I
          originally put update_state_fb() in intel_alloc_plane_obj() before
          finding a better place. (Matt)
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Reported-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      From drm-next:
      (cherry picked from commit f55548b5)
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      59a58cb3
  4. 18 3月, 2015 1 次提交
  5. 16 3月, 2015 1 次提交
    • X
      drm/i915: Ensure plane->state->fb stays in sync with plane->fb · 319c1d42
      Xi Ruoyao 提交于
      plane->state->fb and plane->fb should always reference the same FB so
      that atomic and legacy codepaths have the same view of display state.
      However, there are some places in kernel code that directly set
      plane->fb and neglect to update plane->state->fb. If we never do a
      successful update through the atomic pipeline, the RmFB cleanup code
      will look at the plane->state->fb pointer, which has never actually
      been set to a legitimate value, and try to clean it up, leading to
      BUG's.
      
      Add a quick helper function to synchronize plane->state->fb with
      plane->fb and call it everywhere the driver tries to manually set
      plane->fb outside of the atomic pipeline. In this function, use
      drm_atomic_set_fb_for_plane instead of writing plane->state->fb
      directly to keep the reference count right.
      
      This is modified from Matt Roper's patch to drm-intel-nightly with
      commit id
      
      commit afd65eb4
      Author: Matt Roper <matthew.d.roper@intel.com>
      Date:   Tue Feb 3 13:10:04 2015 -0800
      
          drm/i915: Ensure plane->state->fb stays in sync with plane->fb
      
      However this bug exists in mainline kernel too, so I created this to fix
      it in mainline kernel.
      
      A minor change is to use drm_atomic_set_fb_for_plane instead of update
      reference count manually.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88909
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=93711Signed-off-by: NXi Ruoyao <xry111@outlook.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      [Jani: included the patch notes in the commit message]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      319c1d42
  6. 10 3月, 2015 4 次提交
  7. 05 3月, 2015 1 次提交
  8. 04 3月, 2015 3 次提交
    • I
      drm/i915: gen4: work around hang during hibernation · ab3be73f
      Imre Deak 提交于
      Bjørn reported that his machine hang during hibernation and eventually
      bisected the problem to the following commit:
      
      commit da2bc1b9
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Thu Oct 23 19:23:26 2014 +0300
      
          drm/i915: add poweroff_late handler
      
      The problem seems to be that after the kernel puts the device into D3
      the BIOS still tries to access it, or otherwise assumes that it's in D0.
      This is clearly bogus, since ACPI mandates that devices are put into D3
      by the OSPM if they are not wake-up sources. In the future we want to
      unify more of the driver's runtime and system suspend paths, for example
      by skipping all the system suspend/hibernation hooks if the device is
      runtime suspended already. Accordingly for all other platforms the goal
      is still to properly power down the device during hibernation.
      
      v2:
      - Another GEN4 Lenovo laptop had the same issue, while platforms from
        other vendors (including mobile and desktop, GEN4 and non-GEN4) seem
        to work fine. Based on this apply the workaround on all GEN4 Lenovo
        platforms.
      - add code comment about failing platforms (Ville)
      
      Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-February/060633.htmlReported-and-bisected-by: NBjørn Mork <bjorn@mork.no>
      Cc: stable@vger.kernel.org # v3.19
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Acked-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      ab3be73f
    • C
      drm/i915: Check for driver readyness before handling an underrun interrupt · 54fc7c1c
      Chris Wilson 提交于
      When we takeover from the BIOS and install our interrupt handler, the
      BIOS may have left us a few surprises in the form of spontaneous
      interrupts. (This is especially likely on hardware like 965gm where
      display fifo underruns are continuous and the GMCH cannot filter that
      interrupt souce.) As we enable our IRQ early so that we can use it
      during hardware probing, our interrupt handler must be prepared to
      handle a few sources prior to being fully configured. As such, we need
      to add a simple is-ready check prior to dereferencing our KMS state for
      reporting underruns.
      Reported-by: NRob Clark <rclark@redhat.com>
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1193972Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      [Jani: dropped the extra !]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      54fc7c1c
    • D
      drm/i915: Fix modeset state confusion in the load detect code · 9128b040
      Daniel Vetter 提交于
      This is a tricky story of the new atomic state handling and the legacy
      code fighting over each another. The bug at hand is an underrun of the
      framebuffer reference with subsequent hilarity caused by the load
      detect code. Which is peculiar since the the exact same code works
      fine as the implementation of the legacy setcrtc ioctl.
      
      Let's look at the ingredients:
      
      - Currently our code is a crazy mix of legacy modeset interfaces to
        set the parameters and half-baked atomic state tracking underneath.
        While this transition is going we're using the transitional plane
        helpers to update the atomic side (drm_plane_helper_disable/update
        and friends), i.e. plane->state->fb. Since the state structure owns
        the fb those functions take care of that themselves.
      
        The legacy state (specifically crtc->primary->fb) is still managed
        by the old code (and mostly by the drm core), with the fb reference
        counting done by callers (core drm for the ioctl or the i915 load
        detect code). The relevant commit is
      
        commit ea2c67bb
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Tue Dec 23 10:41:52 2014 -0800
      
            drm/i915: Move to atomic plane helpers (v9)
      
      - drm_plane_helper_disable has special code to handle multiple calls
        in a row - it checks plane->crtc == NULL and bails out. This is to
        match the proper atomic implementation which needs the crtc to get
        at the implied locking context atomic updates always need. See
      
        commit acf24a39
        Author: Daniel Vetter <daniel.vetter@ffwll.ch>
        Date:   Tue Jul 29 15:33:05 2014 +0200
      
            drm/plane-helper: transitional atomic plane helpers
      
      - The universal plane code split out the implicit primary plane from
        the CRTC into it's own full-blown drm_plane object. As part of that
        the setcrtc ioctl (which updated both the crtc mode and primary
        plane) learned to set crtc->primary->crtc on modeset to make sure
        the plane->crtc assignments statate up to date in
      
        commit e13161af
        Author: Matt Roper <matthew.d.roper@intel.com>
        Date:   Tue Apr 1 15:22:38 2014 -0700
      
            drm: Add drm_crtc_init_with_planes() (v2)
      
        Unfortunately we've forgotten to update the load detect code. Which
        wasn't a problem since the load detect modeset is temporary and
        always undone before we drop the locks.
      
      - Finally there is a organically grown history (i.e. don't ask) around
        who sets the legacy plane->fb for the various driver entry points.
        Originally updating that was the drivers duty, but for almost all
        places we've moved that (plus updating the refcounts) into the core.
        Again the exception is the load detect code.
      
      Taking all together the following happens:
      - The load detect code doesn't set crtc->primary->crtc. This is only
        really an issue on crtcs never before used or when userspace
        explicitly disabled the primary plane.
      
      - The plane helper glue code short-circuits because of that and leaves
        a non-NULL fb behind in plane->state->fb and plane->fb. The state
        fb isn't a real problem (it's properly refcounted on its own), it's
        just the canary.
      
      - Load detect code drops the reference for that fb, but doesn't set
        plane->fb = NULL. This is ok since it's still living in that old
        world where drivers had to clear the pointer but the core/callers
        handled the refcounting.
      
      - On the next modeset the drm core notices plane->fb and takes care of
        refcounting it properly by doing another unref. This drops the
        refcount to zero, leaving state->plane now pointing at freed memory.
      
      - intel_plane_duplicate_state still assume it owns a reference to that
        very state->fb and bad things start to happen.
      
      Fix this all by applying the same duct-tape as for the legacy setcrtc
      ioctl code and set crtc->primary->crtc properly.
      
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Paul Bolle <pebolle@tiscali.nl>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Paulo Zanoni <przanoni@gmail.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Reported-and-tested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9128b040
  9. 25 2月, 2015 1 次提交
    • R
      drm/i915: Fix frontbuffer false positve. · 62e537f8
      Rodrigo Vivi 提交于
      This return 0 without setting atomic bits on fb == crtc->cursor->fb
      where causing frontbuffer false positives.
      
      According to Daniel:
      
      The original regression seems to have been introduced in the original
      check/commit split:
      
      commit 757f9a3e
      Author: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Date:   Wed Sep 24 14:20:24 2014 -0300
      
          drm/i915: move check of intel_crtc_cursor_set_obj() out
      
      Which already cause other trouble, resulting in the check getting moved in
      
      commit e391ea88
      Author: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Date:   Wed Sep 24 14:20:25 2014 -0300
      
          drm/i915: Fix not checking cursor and object sizes
      
      The frontbuffer tracking itself only was broken when we shifted it into
      the check/commit logic with:
      
      commit 32b7eeec
      Author: Matt Roper <matthew.d.roper@intel.com>
      Date:   Wed Dec 24 07:59:06 2014 -0800
      
          drm/i915: Refactor work that can sleep out of commit (v7)
      
      v2: When putting more debug prints I notice the solution was simpler
      than I thought. AMS design is solid, just this return was wrong.
      Sorry for the noise.
      
      v3: Remove the entire chunck that would probably
          be removed by gcc anyway. (by Daniel)
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      62e537f8
  10. 24 2月, 2015 4 次提交
    • D
      drm/i915: Align initial plane backing objects correctly · f37b5c2b
      Daniel Vetter 提交于
      Some bios really like to joke and start the planes at an offset ...
      hooray!
      
      Align start and end to fix this.
      
      v2: Fixup calculation of size, spotted by Chris Wilson.
      
      v3: Fix serious fumble I've just spotted.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86883
      Cc: stable@vger.kernel.org
      Cc: Johannes W <jargon@molb.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Reported-and-tested-by: NJohannes W <jargon@molb.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      [Jani: split WARN_ONs, rebase on v4.0-rc1]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      f37b5c2b
    • I
      drm/i915: avoid processing spurious/shared interrupts in low-power states · 2dd2a883
      Imre Deak 提交于
      Atm, it's possible that the interrupt handler is called when the device
      is in D3 or some other low-power state. It can be due to another device
      that is still in D0 state and shares the interrupt line with i915, or on
      some platforms there could be spurious interrupts even without sharing
      the interrupt line. The latter case was reported by Klaus Ethgen using a
      Lenovo x61p machine (gen 4). He noticed this issue via a system
      suspend/resume hang and bisected it to the following commit:
      
      commit e11aa362
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Wed Jun 18 09:52:55 2014 -0700
      
          drm/i915: use runtime irq suspend/resume in freeze/thaw
      
      This is a problem, since in low-power states IIR will always read
      0xffffffff resulting in an endless IRQ servicing loop.
      
      Fix this by handling interrupts only when the driver explicitly enables
      them and so it's guaranteed that the interrupt registers return a valid
      value.
      
      Note that this issue existed even before the above commit, since during
      runtime suspend/resume we never unregistered the handler.
      
      v2:
      - clarify the purpose of smp_mb() vs. synchronize_irq() in the
        code comment (Chris)
      
      v3:
      - no need for an explicit smp_mb(), we can assume that synchronize_irq()
        and the mmio read/writes in the install hooks provide for this (Daniel)
      - remove code comment as the remaining synchronize_irq() is self
        explanatory (Daniel)
      
      v4:
      - drm_irq_uninstall() implies synchronize_irq(), so no need to call it
        explicitly (Daniel)
      
      Reference: https://lkml.org/lkml/2015/2/11/205Reported-and-bisected-by: NKlaus Ethgen <Klaus@Ethgen.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      2dd2a883
    • C
      drm/i915: Check obj->vma_list under the struct_mutex · 6c31a614
      Chris Wilson 提交于
      When we walk the list of vma, or even for protecting against concurrent
      framebuffer creation, we must hold the struct_mutex or else a second
      thread can corrupt the list as we walk it.
      
      Fixes regression from
      commit d7f46fc4
      Author: Ben Widawsky <benjamin.widawsky@intel.com>
      Date:   Fri Dec 6 14:10:55 2013 -0800
      
          drm/i915: Make pin count per VMA
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=89085Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      6c31a614
    • N
      drm/i915: Fix a use after free, and unbalanced refcounting · b3a38998
      Nick Hoath 提交于
      When converting from implicitly tracked execlist queue items to ref counted
      requests, not all frees of requests were replaced with unrefs, and extraneous
      refs/unrefs of contexts were added.
      Correct the unbalanced refcount & replace the frees.
      Remove a noisy warning when hitting the request creation path.
      
      drm_i915_gem_request and intel_context are both kref reference counted
      structures. Upon allocation, drm_i915_gem_request's ref count should be
      bumped using kref_init. When a context is assigned to the request,
      the context's reference count should be bumped using i915_gem_context_reference.
      i915_gem_request_reference will reduce the context reference count when
      the request is freed.
      
      Problem introduced in
      commit 6d3d8274
      Author:     Nick Hoath <nicholas.hoath@intel.com>
      AuthorDate: Thu Jan 15 13:10:39 2015 +0000
      
           drm/i915: Subsume intel_ctx_submit_request in to drm_i915_gem_request
      
      v2: Added comments explaining how the ctx pointer and the request object should
      be ref-counted. Removed noisy warning.
      
      v3: Cleaned up the language used in the commit & the header
      description (Thanks David Gordon)
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88652Signed-off-by: NNick Hoath <nicholas.hoath@intel.com>
      Reviewed-by: NThomas Daniel <thomas.daniel@intel.com>
      Reviewed-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      b3a38998
  11. 23 2月, 2015 3 次提交
  12. 11 2月, 2015 2 次提交
  13. 10 2月, 2015 3 次提交
  14. 09 2月, 2015 3 次提交
  15. 05 2月, 2015 1 次提交
  16. 04 2月, 2015 1 次提交
    • D
      drm/i915: Remove bogus locking check in the hangcheck code · b838cbee
      Daniel Vetter 提交于
      You can _never_ assert that a lock is not held, except in some very
      restricted corner cases where it's guranteed that your code is running
      single-threade (e.g. driver load before you've published any pointers
      leading to that lock).
      
      In addition the early return breaks a bunch of testcases since with
      highly concurrent hangcheck stress tests the reset fails to work and
      the test doesn't recover and time out.
      
      This regression has been introduced in
      
      commit b8d24a06
      Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Date:   Wed Jan 28 17:03:14 2015 +0200
      
          drm/i915: Remove nested work in gpu error handling
      
      Aside: It is possible to check whether a given task doesn't hold a
      lock, but only when lockdep is enabled, using the lockdep_assert_held
      stuff.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88908Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      b838cbee
  17. 31 1月, 2015 7 次提交