1. 09 3月, 2018 1 次提交
    • M
      drm/i915: Handle pipe CRC around enabling/disabling pipe. · 033b7a23
      Maarten Lankhorst 提交于
      This will get rid of the following error:
      [   74.730271] WARNING: CPU: 4 PID: 0 at drivers/gpu/drm/drm_vblank.c:614 drm_calc_vbltimestamp_from_scanoutpos+0x13e/0x2f0
      [   74.730311] Modules linked in: vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic i915 x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_intel crct10dif_pclmul snd_hda_codec crc32_pclmul snd_hwdep broadcom ghash_clmulni_intel snd_hda_core bcm_phy_lib snd_pcm tg3 lpc_ich mei_me mei prime_numbers
      [   74.730353] CPU: 4 PID: 0 Comm: swapper/4 Tainted: G     U           4.16.0-rc2-CI-CI_DRM_3822+ #1
      [   74.730355] Hardware name: Dell Inc. XPS 8300  /0Y2MRG, BIOS A06 10/17/2011
      [   74.730359] RIP: 0010:drm_calc_vbltimestamp_from_scanoutpos+0x13e/0x2f0
      [   74.730361] RSP: 0018:ffff88022fb03d10 EFLAGS: 00010086
      [   74.730365] RAX: ffffffffa0291d20 RBX: ffff88021a180000 RCX: 0000000000000001
      [   74.730367] RDX: ffffffff820e7db8 RSI: 0000000000000001 RDI: ffffffff82068cea
      [   74.730369] RBP: ffff88022fb03d70 R08: 0000000000000000 R09: ffffffff815d26d0
      [   74.730371] R10: 0000000000000000 R11: ffffffffa0161ca0 R12: 0000000000000001
      [   74.730373] R13: ffff880212448008 R14: ffff880212448330 R15: 0000000000000000
      [   74.730376] FS:  0000000000000000(0000) GS:ffff88022fb00000(0000) knlGS:0000000000000000
      [   74.730378] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   74.730380] CR2: 000055edcbec9000 CR3: 0000000002210001 CR4: 00000000000606e0
      [   74.730382] Call Trace:
      [   74.730385]  <IRQ>
      [   74.730397]  drm_get_last_vbltimestamp+0x36/0x50
      [   74.730401]  drm_update_vblank_count+0x64/0x240
      [   74.730409]  drm_crtc_accurate_vblank_count+0x41/0x90
      [   74.730453]  display_pipe_crc_irq_handler+0x176/0x220 [i915]
      [   74.730497]  i9xx_pipe_crc_irq_handler+0xfe/0x150 [i915]
      [   74.730537]  ironlake_irq_handler+0x618/0xa30 [i915]
      [   74.730548]  __handle_irq_event_percpu+0x3c/0x340
      [   74.730556]  handle_irq_event_percpu+0x1b/0x50
      [   74.730561]  handle_irq_event+0x2f/0x50
      [   74.730566]  handle_edge_irq+0xe4/0x1b0
      [   74.730572]  handle_irq+0x11/0x20
      [   74.730576]  do_IRQ+0x5e/0x120
      [   74.730584]  common_interrupt+0x84/0x84
      [   74.730586]  </IRQ>
      [   74.730591] RIP: 0010:cpuidle_enter_state+0xaa/0x350
      [   74.730593] RSP: 0018:ffffc9000008beb8 EFLAGS: 00000212 ORIG_RAX: ffffffffffffffde
      [   74.730597] RAX: ffff880226b80040 RBX: 000000000031fc3e RCX: 0000000000000001
      [   74.730599] RDX: 0000000000000000 RSI: ffffffff8210fb59 RDI: ffffffff820c02e7
      [   74.730601] RBP: 0000000000000004 R08: 00000000000040af R09: 0000000000000018
      [   74.730603] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000004
      [   74.730606] R13: ffffe8ffffd00430 R14: 0000001166120bf4 R15: ffffffff82294460
      [   74.730621]  ? cpuidle_enter_state+0xa6/0x350
      [   74.730629]  do_idle+0x188/0x1d0
      [   74.730636]  cpu_startup_entry+0x14/0x20
      [   74.730641]  start_secondary+0x129/0x160
      [   74.730646]  secondary_startup_64+0xa5/0xb0
      [   74.730660] Code: e1 48 c7 c2 b8 7d 0e 82 be 01 00 00 00 48 c7 c7 ea 8c 06 82 e8 64 ec ff ff 48 8b 83 c8 07 00 00 48 83 78 28 00 0f 84 e2 fe ff ff <0f> 0b 45 31 ed e9 db fe ff ff 41 b8 d3 4d 62 10 89 c8 6a 03 41
      [   74.730754] ---[ end trace 14b1345705b68565 ]---
      
      Changes since v1:
      - Don't try to apply CRC workaround when enabling pipe, it should already be enabled.
      Changes since v2:
      - Make crc functions for !DEBUGFS case inline.
      - Pass intel_crtc to crc functions.
      - Add comments to callsites.
      Changes since v3:
      - Cache selected source to pipe_crc->source.
      - Set pipe_crc->skipped to MIN_INT during disable to close a race condition.
      Changes since v4:
      - Handle fallout from setting pipe_crc->source in irq handler.
      
      Cc: Marta Löfstedt <marta.lofstedt@intel.com>
      Reported-by: NMarta Löfstedt <marta.lofstedt@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105185Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180308120202.52446-1-maarten.lankhorst@linux.intel.comReviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      033b7a23
  2. 05 3月, 2018 1 次提交
    • C
      drm/i915: Unwind vma pinning for intel_pin_and_fence_fb_obj error path · 7509702b
      Chris Wilson 提交于
      If we fail to acquire a fence when we must, we must unwind before
      reporting the error. Otherwise, we lose tracking of the vma pinning and
      eventually hit a bug like
      
      <3>[   46.163202] i915_vma_unpin:333 GEM_BUG_ON(!i915_vma_is_pinned(vma))
      <4>[   46.163424] ------------[ cut here ]------------
      <2>[   46.163429] kernel BUG at drivers/gpu/drm/i915/i915_vma.h:333!
      <4>[   46.163444] invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
      <0>[   46.163451] Dumping ftrace buffer:
      <0>[   46.163457] ---------------------------------
      <0>[   46.163630]    <...>-84      1.... 46260767us : i915_gem_object_unpin_from_display_plane: i915_vma_unpin:333 GEM_BUG_ON(!i915_vma_is_pinned(vma))
      <0>[   46.163635] ---------------------------------
      <4>[   46.163638] Modules linked in: vgem i915 snd_hda_codec_analog snd_hda_codec_generic coretemp snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm lpc_ich mei_me e1000e mei prime_numbers
      <4>[   46.163667] CPU: 1 PID: 84 Comm: kworker/u16:1 Tainted: G     U           4.16.0-rc3-gc07ef2c77d14-kasan_18+ #1
      <4>[   46.163671] Hardware name: Dell Inc. OptiPlex 755                 /0PU052, BIOS A08 02/19/2008
      <4>[   46.163743] Workqueue: events_unbound intel_atomic_commit_work [i915]
      <4>[   46.163809] RIP: 0010:i915_gem_object_unpin_from_display_plane+0x253/0x2f0 [i915]
      <4>[   46.163813] RSP: 0018:ffff8800624cfb48 EFLAGS: 00010286
      <4>[   46.163818] RAX: 000000000000000c RBX: ffff880064446c40 RCX: ffff8800653135b8
      <4>[   46.163822] RDX: dffffc0000000000 RSI: 0000000000000054 RDI: ffff8800651e30d0
      <4>[   46.163825] RBP: 00000000000003d0 R08: 0000000000000001 R09: ffff8800651e3158
      <4>[   46.163829] R10: 0000000000000000 R11: ffff8800651e30f0 R12: 0000000000000001
      <4>[   46.163832] R13: ffff880054c58620 R14: 0000000000000000 R15: dffffc0000000000
      <4>[   46.163836] FS:  0000000000000000(0000) GS:ffff880066040000(0000) knlGS:0000000000000000
      <4>[   46.163840] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4>[   46.163843] CR2: 00007f1fc6fb0000 CR3: 00000000526fe000 CR4: 00000000000006e0
      <4>[   46.163846] Call Trace:
      <4>[   46.163918]  intel_unpin_fb_vma+0xbd/0x300 [i915]
      <4>[   46.163990]  intel_cleanup_plane_fb+0x99/0xc0 [i915]
      <4>[   46.163998]  drm_atomic_helper_cleanup_planes+0x166/0x280
      <4>[   46.164071]  intel_atomic_commit_tail+0x1594/0x33a0 [i915]
      <4>[   46.164081]  ? process_one_work+0x66e/0x1460
      <4>[   46.164151]  ? skl_update_crtcs+0x9c0/0x9c0 [i915]
      <4>[   46.164157]  ? lock_acquire+0x13d/0x390
      <4>[   46.164161]  ? lock_acquire+0x13d/0x390
      <4>[   46.164169]  process_one_work+0x71a/0x1460
      <4>[   46.164175]  ? __schedule+0x838/0x1e50
      <4>[   46.164182]  ? pwq_dec_nr_in_flight+0x2b0/0x2b0
      <4>[   46.164188]  ? _raw_spin_lock_irq+0xa/0x40
      <4>[   46.164194]  worker_thread+0xdf/0xf60
      <4>[   46.164204]  ? process_one_work+0x1460/0x1460
      <4>[   46.164209]  kthread+0x2cf/0x3c0
      <4>[   46.164213]  ? _kthread_create_on_node+0xa0/0xa0
      <4>[   46.164218]  ret_from_fork+0x3a/0x50
      <4>[   46.164227] Code: e8 78 d9 cd e8 48 8b 35 cc 9e 47 00 49 c7 c0 c0 31 84 c0 b9 4d 01 00 00 48 c7 c2 e0 80 84 c0 48 c7 c7 0e bb 57 c0 e8 5d 4b df e8 <0f> 0b 48 c7 c1 c0 30 84 c0 ba 4e 01 00 00 48 c7 c6 e0 80 84 c0
      <1>[   46.164368] RIP: i915_gem_object_unpin_from_display_plane+0x253/0x2f0 [i915] RSP: ffff8800624cfb48
      
      Fixes: 85798ac9 ("drm/i915: Fail if we can't get a fence for gen2/3 tiled scanout")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180305103312.29492-1-chris@chris-wilson.co.uk
      7509702b
  3. 02 3月, 2018 1 次提交
  4. 23 2月, 2018 2 次提交
  5. 22 2月, 2018 4 次提交
  6. 21 2月, 2018 3 次提交
    • C
      drm/i915: Move the policy for placement of the GGTT vma into the caller · 5935485f
      Chris Wilson 提交于
      Currently we make the unilateral decision inside
      i915_gem_object_pin_to_display() where the VMA should resided (inside
      the fence and mappable region or above?). This is not our decision to
      make as it impacts on how the display engine can use the resulting
      scanout object, and it would rather instruct us where to place the VMA so
      that it can enable the features it wants. As such, make the pin flags an
      argument to i915_gem_object_pin_to_display() and control them from
      intel_pin_and_fence_fb_obj()
      
      Whilst taking control of the mapping for ourselves, start tracking how
      we use it to avoid trying to free a fence we never claimed:
      
      <3>[  227.151869] GEM_BUG_ON(vma->fence->pin_count <= 0)
      <4>[  227.152064] ------------[ cut here ]------------
      <2>[  227.152068] kernel BUG at drivers/gpu/drm/i915/i915_vma.h:391!
      <4>[  227.152084] invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
      <0>[  227.152092] Dumping ftrace buffer:
      <0>[  227.152099]    (ftrace buffer empty)
      <4>[  227.152102] Modules linked in: i915 snd_hda_codec_analog snd_hda_codec_generic coretemp snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm lpc_ich e1000e mei_me mei prime_numbers
      <4>[  227.152131] CPU: 1 PID: 1587 Comm: kworker/u16:49 Tainted: G     U           4.16.0-rc1-gbab67b2f6177-kasan_7+ #1
      <4>[  227.152134] Hardware name: Dell Inc. OptiPlex 755                 /0PU052, BIOS A08 02/19/2008
      <4>[  227.152236] Workqueue: events_unbound intel_atomic_commit_work [i915]
      <4>[  227.152292] RIP: 0010:intel_unpin_fb_vma+0x23a/0x2a0 [i915]
      <4>[  227.152295] RSP: 0018:ffff88005aad7b68 EFLAGS: 00010286
      <4>[  227.152300] RAX: 0000000000000026 RBX: ffff88005c359580 RCX: 0000000000000000
      <4>[  227.152304] RDX: 0000000000000026 RSI: ffffffff8707d840 RDI: ffffed000b55af63
      <4>[  227.152307] RBP: ffff880056817e58 R08: 0000000000000001 R09: 0000000000000000
      <4>[  227.152311] R10: ffff88005aad7b88 R11: 0000000000000000 R12: ffff8800568184d0
      <4>[  227.152314] R13: ffff880065b5ab08 R14: 0000000000000000 R15: dffffc0000000000
      <4>[  227.152318] FS:  0000000000000000(0000) GS:ffff88006ac40000(0000) knlGS:0000000000000000
      <4>[  227.152322] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4>[  227.152325] CR2: 00007f5fb25550a8 CR3: 0000000068c78000 CR4: 00000000000006e0
      <4>[  227.152328] Call Trace:
      <4>[  227.152385]  intel_cleanup_plane_fb+0x6b/0xd0 [i915]
      <4>[  227.152395]  drm_atomic_helper_cleanup_planes+0x166/0x280
      <4>[  227.152452]  intel_atomic_commit_tail+0x159d/0x3380 [i915]
      <4>[  227.152463]  ? process_one_work+0x66e/0x1460
      <4>[  227.152516]  ? skl_update_crtcs+0x9c0/0x9c0 [i915]
      <4>[  227.152523]  ? lock_acquire+0x13d/0x390
      <4>[  227.152527]  ? lock_acquire+0x13d/0x390
      <4>[  227.152534]  process_one_work+0x71a/0x1460
      <4>[  227.152540]  ? __schedule+0x815/0x1e20
      <4>[  227.152547]  ? pwq_dec_nr_in_flight+0x2b0/0x2b0
      <4>[  227.152553]  ? _raw_spin_lock_irq+0xa/0x40
      <4>[  227.152559]  worker_thread+0xdf/0xf60
      <4>[  227.152569]  ? process_one_work+0x1460/0x1460
      <4>[  227.152573]  kthread+0x2cf/0x3c0
      <4>[  227.152578]  ? _kthread_create_on_node+0xa0/0xa0
      <4>[  227.152583]  ret_from_fork+0x3a/0x50
      <4>[  227.152591] Code: c6 00 11 86 c0 48 c7 c7 e0 bd 85 c0 e8 60 e7 a9 c4 0f ff e9 1f fe ff ff 48 c7 c6 40 10 86 c0 48 c7 c7 e0 ca 85 c0 e8 2b 95 bd c4 <0f> 0b 48 89 ef e8 4c 44 e8 c4 e9 ef fd ff ff e8 42 44 e8 c4 e9
      <1>[  227.152720] RIP: intel_unpin_fb_vma+0x23a/0x2a0 [i915] RSP: ffff88005aad7b68
      
      v2: i915_vma_pin_fence() is a no-op if a fence isn't required, so check
      vma->fence as well.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180220134208.24988-2-chris@chris-wilson.co.uk
      5935485f
    • V
      drm/i915: Set the primary plane pipe select bits on gen4 · c154d1e0
      Ville Syrjälä 提交于
      i965 and g4x still have the pipe select bits in the plane control
      registers, they're just hardcoded to select a specific pipe. However
      plane C on i965 can still move between the pipes, thus we should
      program the pipe select bits on i965 if we want to expose plane C
      some day.
      
      Since there is no harm in programming the bits on any plane on
      i965/g4x let's just always set them. This will also make our
      pre-computed register value match what the hardware register
      would read, should we want to cross check the two.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180130203807.13721-2-ville.syrjala@linux.intel.comReviewed-by: NMika Kahola <mika.kahola@intel.com>
      c154d1e0
    • V
      drm/i915: Don't set cursor pipe select bits on g4x+ · 32ea06b6
      Ville Syrjälä 提交于
      G4x cursor control registers still allow us to write to the pipe select
      bits even though cursors are supposed to be fixed to a specific pipe.
      Bspec tells us that we should only ever write 0 to these bits. Let's
      follow that recommendation. On ilk+ the bits become hardwired to 0.
      
      Also looks like ICL repurposes these bits for some other use, so
      we had better stop setting them to bogus values there.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180130203807.13721-1-ville.syrjala@linux.intel.comReviewed-by: NMika Kahola <mika.kahola@intel.com>
      32ea06b6
  7. 19 2月, 2018 1 次提交
  8. 16 2月, 2018 1 次提交
  9. 14 2月, 2018 1 次提交
    • C
      drm/i915: Fixup kerneldoc · c38c1455
      Chris Wilson 提交于
      drivers/gpu/drm/i915/intel_display.c:569: warning: Function parameter or member 'dev_priv' not described in 'intel_PLL_is_valid'
      drivers/gpu/drm/i915/intel_display.c:569: warning: Function parameter or member 'limit' not described in 'intel_PLL_is_valid'
      drivers/gpu/drm/i915/intel_display.c:569: warning: Function parameter or member 'clock' not described in 'intel_PLL_is_valid'
      drivers/gpu/drm/i915/intel_display.c:4769: warning: Function parameter or member 'crtc_state' not described in 'skl_update_scaler_plane'
      drivers/gpu/drm/i915/intel_display.c:4769: warning: Excess function parameter 'state' description in 'skl_update_scaler_plane'
      drivers/gpu/drm/i915/intel_display.c:4967: warning: Function parameter or member 'new_crtc_state' not described in 'intel_post_enable_primary'
      drivers/gpu/drm/i915/intel_display.c:12650: warning: Function parameter or member 'new_state' not described in 'intel_prepare_plane_fb'
      drivers/gpu/drm/i915/intel_display.c:12650: warning: Excess function parameter 'fb' description in 'intel_prepare_plane_fb'
      drivers/gpu/drm/i915/intel_display.c:12763: warning: Function parameter or member 'old_state' not described in 'intel_cleanup_plane_fb'
      drivers/gpu/drm/i915/intel_display.c:12763: warning: Excess function parameter 'fb' description in 'intel_cleanup_plane_fb'
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180214134922.28761-2-chris@chris-wilson.co.uk
      c38c1455
  10. 13 2月, 2018 1 次提交
  11. 10 2月, 2018 2 次提交
  12. 06 2月, 2018 1 次提交
  13. 01 2月, 2018 2 次提交
  14. 31 1月, 2018 1 次提交
  15. 30 1月, 2018 3 次提交
  16. 25 1月, 2018 2 次提交
  17. 23 1月, 2018 2 次提交
  18. 19 1月, 2018 3 次提交
  19. 15 1月, 2018 3 次提交
  20. 09 1月, 2018 2 次提交
    • I
      drm/i915: Fix using BIT_ULL() vs. BIT() for power domain masks · 17bd6e66
      Imre Deak 提交于
      The power domain masks are 64 bit wide, so we need BIT_ULL() when
      setting bits in them, these ones were missed during converting from 32
      to 64 bit masks. All 3 enums are <32 atm, so this didn't cause a real
      problem.
      
      Fixes: d8fc70b7 ("drm/i915: Make power domain masks 64 bit long")
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180109122040.19425-1-imre.deak@intel.com
      17bd6e66
    • S
      drm/i915: Add HDCP framework + base implementation · ee5e5e7a
      Sean Paul 提交于
      This patch adds the framework required to add HDCP support to intel
      connectors. It implements Aksv loading from fuse, and parts 1/2/3
      of the HDCP authentication scheme.
      
      Note that without shim implementations, this does not actually implement
      HDCP. That will come in subsequent patches.
      
      Changes in v2:
      - Don't open code wait_fors (Chris)
      - drm_hdcp.c under MIT license (Daniel)
      - Move intel_hdcp_disable() call above ddi_disable (Ram)
      - Fix // comments (I wore a cone of shame for 12 hours to atone) (Daniel)
      - Justify intel_hdcp_shim with comments (Daniel)
      - Fixed async locking issues by adding hdcp_mutex (Daniel)
      - Don't alter connector_state in enable/disable (Daniel)
      Changes in v3:
      - Added hdcp_mutex/hdcp_value to make async reasonable
      - Added hdcp_prop_work to separate link checking & property setting
      - Added new helper for atomic_check state tracking (Daniel)
      - Moved enable/disable into atomic_commit with matching helpers
      - Moved intel_hdcp_check_link out of all locks when called from dp
      - Bumped up ksv_fifo timeout (noticed failure on one of my dongles)
      Changes in v4:
      - Remove SKL_ prefix from most register names (Daniel)
      - Move enable/disable back to modeset path (Daniel)
      - s/get_random_long/get_random_u32/ (Daniel)
      - Remove mode_config.mutex lock in prop_work (Daniel)
      - Add intel_hdcp_init to handle init of conn components (Daniel)
      - Actually check return value of attach_property
      - Check Bksv is valid before trying to authenticate (Ram)
      Changes in v5:
      - checkpatch whitespace changes
      - s/DRM_MODE_CONTENT_PROTECTION_OFF/DRM_MODE_CONTENT_PROTECTION_UNDESIRED/
      - Fix ksv list wait timeout (actually wait 5s)
      - Increase the R0 timeout to 300ms (Ram)
      Changes in v6:
      - SPDX license
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NRamalingam C <ramalingm.c@intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180108195545.218615-6-seanpaul@chromium.org
      ee5e5e7a
  21. 02 1月, 2018 1 次提交
  22. 22 12月, 2017 2 次提交