1. 30 1月, 2016 9 次提交
  2. 29 1月, 2016 5 次提交
  3. 21 1月, 2016 1 次提交
    • D
      drm/i915: simplify allocation of driver-internal requests · 26827088
      Dave Gordon 提交于
      There are a number of places where the driver needs a request, but isn't
      working on behalf of any specific user or in a specific context. At
      present, we associate them with the per-engine default context. A future
      patch will abolish those per-engine context pointers; but we can already
      eliminate a lot of the references to them, just by making the allocator
      allow NULL as a shorthand for "an appropriate context for this ring",
      which will mean that the callers don't need to know anything about how
      the "appropriate context" is found (e.g. per-ring vs per-device, etc).
      
      So this patch renames the existing i915_gem_request_alloc(), and makes
      it local (static inline), and replaces it with a wrapper that provides
      a default if the context is NULL, and also has a nicer calling
      convention (doesn't require a pointer to an output parameter). Then we
      change all callers to use the new convention:
      OLD:
      	err = i915_gem_request_alloc(ring, user_ctx, &req);
      	if (err) ...
      NEW:
      	req = i915_gem_request_alloc(ring, user_ctx);
      	if (IS_ERR(req)) ...
      OLD:
      	err = i915_gem_request_alloc(ring, ring->default_context, &req);
      	if (err) ...
      NEW:
      	req = i915_gem_request_alloc(ring, NULL);
      	if (IS_ERR(req)) ...
      
      v4:	Rebased
      Signed-off-by: NDave Gordon <david.s.gordon@intel.com>
      Reviewed-by: NNick Hoath <nicholas.hoath@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453230175-19330-2-git-send-email-david.s.gordon@intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      26827088
  4. 20 1月, 2016 3 次提交
    • V
      drm/i915: Fix NULL plane->fb oops on SKL · e7941294
      Ville Syrjälä 提交于
      In this atomic age, we can't trust the plane->fb pointer anymore.
      It might get update too late. Instead we are supposed to use the
      plane_state->fb pointer instead. Let's do that in
      intel_plane_obj_offset() and avoid problems from dereferencing the
      potentially stale plane->fb pointer.
      
      Paulo found this with 'kms_frontbuffer_tracking --show-hidden --run-subtest nop-1p-rte'
      but it can be reproduced with just plain old kms_setplane.
      
      I was too lazy to bisect this, so not sure exactly when it broke. The
      most obvious candidate
      commit ce7f1728 ("drm/i915: Fix i915_ggtt_view_equal to handle rotation correctly")
      was actually still fine, so it must have broken some time after that.
      
      Here's the resulting fireworks:
      BUG: unable to handle kernel NULL pointer dereference at           (null)
      IP: [<ffffffffa02d2d9a>] intel_fill_fb_ggtt_view+0x1b/0x15a [i915]
      PGD 8a5f6067 PUD 8a5f5067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP
      Modules linked in: i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_gtt agpgart netconsole mousedev hid_generic psmouse usbhid atkbd libps2 coretemp hwmon efi_pstore intel_rapl iosf_mbi x86_pkg_temp_thermal efivars pcspkr e1000e sdhci_pci ptp pps_core sdhci i2c_i801 mmc_core i2c_hid hid i8042 serio evdev sch_fq_codel ip_tables x_tables ipv6 autofs4
      CPU: 1 PID: 260 Comm: kms_plane Not tainted 4.4.0-skl+ #171
      Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.R00.B104.B00.1511030553 11/03/2015
      task: ffff88008bde2d80 ti: ffff88008a6ec000 task.ti: ffff88008a6ec000
      RIP: 0010:[<ffffffffa02d2d9a>]  [<ffffffffa02d2d9a>] intel_fill_fb_ggtt_view+0x1b/0x15a [i915]
      RSP: 0018:ffff88008a6efa10  EFLAGS: 00010086
      RAX: 0000000000000001 RBX: ffff8801674f4240 RCX: 0000000000000014
      RDX: ffff88008a7440c0 RSI: 0000000000000000 RDI: ffff88008a6efa40
      RBP: ffff88008a6efa30 R08: ffff88008bde3598 R09: 0000000000000001
      R10: ffff88008b782000 R11: 0000000000000000 R12: 0000000000000000
      R13: ffff88008a7440c0 R14: 0000000000000000 R15: ffff88008a7449c0
      FS:  00007fa0c07a28c0(0000) GS:ffff88016ec40000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000000 CR3: 000000008a6ff000 CR4: 00000000003406e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Stack:
       ffff8801674f4240 0000000000000000 ffff88008a7440c0 0000000000000000
       ffff88008a6efaa0 ffffffffa02daf25 ffffffff814ec80e 0000000000070298
       ffff8800850d0000 ffff88008a6efaa0 ffffffffa02c49c2 0000000000000002
      Call Trace:
       [<ffffffffa02daf25>] intel_plane_obj_offset+0x2d/0xa9 [i915]
       [<ffffffff814ec80e>] ? _raw_spin_unlock_irqrestore+0x4b/0x60
       [<ffffffffa02c49c2>] ? gen9_write32+0x2e8/0x3b8 [i915]
       [<ffffffffa02eecfc>] skl_update_plane+0x203/0x4c5 [i915]
       [<ffffffffa02ca1ab>] intel_plane_atomic_update+0x53/0x6a [i915]
       [<ffffffffa02494a4>] drm_atomic_helper_commit_planes_on_crtc+0x142/0x1d5 [drm_kms_helper]
       [<ffffffffa02de44b>] intel_atomic_commit+0x1262/0x1350 [i915]
       [<ffffffffa024a0ee>] ? __drm_atomic_helper_crtc_duplicate_state+0x2f/0x41 [drm_kms_helper]
       [<ffffffffa01ef089>] ? drm_atomic_check_only+0x3e3/0x552 [drm]
       [<ffffffffa01ef245>] drm_atomic_commit+0x4d/0x52 [drm]
       [<ffffffffa024996b>] drm_atomic_helper_update_plane+0xcb/0x118 [drm_kms_helper]
       [<ffffffffa01e42e8>] __setplane_internal+0x1c8/0x224 [drm]
       [<ffffffffa01e477f>] drm_mode_setplane+0x14e/0x172 [drm]
       [<ffffffffa01d8117>] drm_ioctl+0x265/0x3ad [drm]
       [<ffffffffa01e4631>] ? drm_mode_cursor_common+0x158/0x158 [drm]
       [<ffffffff810d00ab>] ? current_kernel_time64+0x5e/0x98
       [<ffffffff810a76ea>] ? trace_hardirqs_on_caller+0x17a/0x196
       [<ffffffff8119880f>] do_vfs_ioctl+0x42b/0x4ea
       [<ffffffff811a2b72>] ? __fget_light+0x4d/0x71
       [<ffffffff81198911>] SyS_ioctl+0x43/0x61
       [<ffffffff814ed057>] entry_SYSCALL_64_fastpath+0x12/0x6f
      
      Cc: drm-intel-fixes@lists.freedesktop.org
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Testcase: igt/kms_plane
      Reported-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453220597-28973-1-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e7941294
    • T
      drm/i915: Do not put big intel_crtc_state on the stack · 3f36b937
      Tvrtko Ursulin 提交于
      Having this on stack triggers the -Wframe-larger-than=1024 and
      is not nice to put such big things on the kernel stack anyway.
      
      This required a little bit of refactoring to handle the new
      failure path from vlv_force_pll_on.
      
      v2: Corrected some whitespace.
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: John Harrison <john.c.harrison@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453217117-26125-1-git-send-email-tvrtko.ursulin@linux.intel.com
      3f36b937
    • M
      Revert "drm/i915: Add two-stage ILK-style watermark programming (v10)" · bf220452
      Matt Roper 提交于
      This reverts commit 396e33ae.
      
      This commit was triggering some FIFO underrun warnings on ILK-IVB
      platforms (but surprisingly not on HSW/BDW that share more or less the
      same codepaths).  These underruns were caught by the continuous
      integration (CI) system and could be reproduced consistently when
      running the basic acceptance tests (BAT) on the affected platforms.
      
      Note that this revert will cause a visible regression for some
      end-users; the "flicker when mouse moves between monitors in X" issue
      that was reported before this patch was merged will now return.  However
      regressions that are visible to CI have higher priority since they
      prevent proper testing of future patches on those platforms.  Hopefully
      we'll be able to figure out the cause of the underruns quickly and
      remerge an improved version of this patch to fix the regression.
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93640Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NDaniel Vetter <daniel@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1453232584-8543-1-git-send-email-matthew.d.roper@intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bf220452
  5. 18 1月, 2016 2 次提交
  6. 16 1月, 2016 1 次提交
  7. 15 1月, 2016 1 次提交
  8. 14 1月, 2016 8 次提交
  9. 13 1月, 2016 3 次提交
  10. 12 1月, 2016 2 次提交
  11. 11 1月, 2016 1 次提交
  12. 08 1月, 2016 1 次提交
  13. 07 1月, 2016 3 次提交