1. 09 3月, 2018 7 次提交
    • C
      drm/i915: Finish the wait-for-wedge by retiring all the inflight requests · 2d4ecace
      Chris Wilson 提交于
      Before we reset the GPU after marking the device as wedged, we wait for
      all the remaining requests to be completed (and marked as EIO).
      Afterwards, we should flush the request lists so the next batch start
      with the driver in an idle state.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180307134226.25492-1-chris@chris-wilson.co.uk
      2d4ecace
    • J
      drm/i915/icl: do not save DDI A/E sharing bit for ICL · 1e6aa7e5
      Jani Nikula 提交于
      We don't want to preserve the DDI A 4 lane bit on ICL.
      
      Fixes: 3d2011cf ("drm/i915/icl: remove port A/E lane sharing limitation.")
      Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180306104155.3526-1-jani.nikula@intel.com
      1e6aa7e5
    • C
      drm/i915: Push irq_shift from gen8_cs_irq_handler() to caller · 51f6b0f9
      Chris Wilson 提交于
      Originally we were inlining gen8_cs_irq_handler() and so expected the
      compiler to constant-fold away the irq_shift (so we had hardcoded it as
      opposed to use engine->irq_shift). However, we dropped the inline given
      the proliferation of gen8_cs_irq_handler()s. If we pull the shifting
      of the iir into the caller, we can shrink the code still further:
      
      add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-34 (-34)
      Function                                     old     new   delta
      gen8_cs_irq_handler                          123     118      -5
      gen8_gt_irq_handler                          261     248     -13
      gen11_irq_handler                            722     706     -16
      
      v2: Drop gen11_cs_irq_handler now that it is a simple
      stub around gen8_cs_irq_handler (Daniele)
      
      References: 5d3d69d5 ("drm/i915: Stop inlining the execlists IRQ handler")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Reviewed-by: NDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180309010808.11921-1-chris@chris-wilson.co.uk
      51f6b0f9
    • C
      drm/i915: Index the ring frequency table by HW frequency range · d586b5f4
      Chris Wilson 提交于
      When reporting the frequency table stored in the punit, report the full
      range and not just the user restricted frequency range. In the process
      keep the code to set the frequency table and read it the same.
      
      v3: As we haven't separated the sb_lock from the pcu_lock yet, there's a
      cycle between the pcu_lock and intel_runtime_pm_get.
      
      References: f936ec34 ("drm/i915/skl: Updated the i915_ring_freq_table debugfs function")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> #v1
      Link: https://patchwork.freedesktop.org/patch/msgid/20180308142648.4016-2-chris@chris-wilson.co.uk
      d586b5f4
    • C
      drm/i915: Kick the rps worker when changing the boost frequency · 59cd31f1
      Chris Wilson 提交于
      The boost frequency is only applied from the RPS worker while someone is
      waiting on a request and requested a boost. As such, when the user
      wishes to change the frequency, we have to kick the worker in order to
      re-evaluate whether to apply the boost frequency.
      
      v2: Check num_waiters to decide if we should kick the worker to handle
      boosting.
      
      Fixes: 29ecd78d ("drm/i915: Define a separate variable and control for RPS waitboost frequency")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180308142648.4016-1-chris@chris-wilson.co.uk
      59cd31f1
    • 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
    • C
      drm/i915: Only prune fences after wait-for-all · fa73055b
      Chris Wilson 提交于
      Currently, we only allow ourselves to prune the fences so long as
      all the waits completed (i.e. all the fences we checked were signaled),
      and that the reservation snapshot did not change across the wait.
      However, if we only waited for a subset of the reservation object, i.e.
      just waiting for the last writer to complete as opposed to all readers
      as well, then we would erroneously conclude we could prune the fences as
      indeed although all of our waits were successful, they did not represent
      the totality of the reservation object.
      
      v2: We only need to check the shared fences due to construction (i.e.
      all of the shared fences will be later than the exclusive fence, if
      any).
      
      Fixes: e54ca977 ("drm/i915: Remove completed fences after a wait")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180307171303.29466-1-chris@chris-wilson.co.uk
      fa73055b
  2. 08 3月, 2018 10 次提交
  3. 07 3月, 2018 17 次提交
  4. 06 3月, 2018 6 次提交