Skip to content
  1. Aug 01, 2019
  2. Jul 30, 2019
  3. Jul 29, 2019
    • Imre Deak's avatar
      drm/i915: Fix the TBT AUX power well enabling · 89f57523
      Imre Deak authored
      Fix the mapping from a TBT AUX power well index to the DP_AUX_CH_CTL
      register.
      
      Fixes: c7375d95
      
       ("drm/i915: Configure AUX_CH_CTL when enabling the AUX power domain")
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190628143635.22066-7-imre.deak@intel.com
      (cherry picked from commit 29ae36ab
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      89f57523
    • Tvrtko Ursulin's avatar
      drm/i915: Fix GEN8_MCR_SELECTOR programming · 0bbfdce3
      Tvrtko Ursulin authored
      
      
      fls returns bit positions starting from one for the lsb and the MCR
      register expects zero based (sub)slice addressing.
      
      Incorrent MCR programming can have the effect of directing MMIO reads of
      registers in the 0xb100-0xb3ff range to invalid subslice returning zeroes
      instead of actual content.
      
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Fixes: 1e40d4ae
      
       ("drm/i915/cnl: Implement WaProgramMgsrForCorrectSliceSpecificMmioReads")
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190717180624.20354-2-tvrtko.ursulin@linux.intel.com
      (cherry picked from commit 15160879
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      0bbfdce3
    • Dhinakaran Pandiyan's avatar
      drm/i915/vbt: Fix VBT parsing for the PSR section · 6d61f716
      Dhinakaran Pandiyan authored
      A single 32-bit PSR2 training pattern field follows the sixteen element
      array of PSR table entries in the VBT spec. But, we incorrectly define
      this PSR2 field for each of the PSR table entries. As a result, the PSR1
      training pattern duration for any panel_type != 0 will be parsed
      incorrectly. Secondly, PSR2 training pattern durations for VBTs with bdb
      version >= 226 will also be wrong.
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: stable@vger.kernel.org
      Cc: stable@vger.kernel.org #v5.2
      Fixes: 88a0d960
      
       ("drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111088
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204183
      Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Acked-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Tested-by: default avatarFrançois Guerraz <kubrick@fgv6.net>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190717223451.2595-1-dhinakaran.pandiyan@intel.com
      (cherry picked from commit b5ea9c93
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      6d61f716
    • Ville Syrjälä's avatar
      drm/i915: Make sure cdclk is high enough for DP audio on VLV/CHV · a8f196a0
      Ville Syrjälä authored
      
      
      On VLV/CHV there is some kind of linkage between the cdclk frequency
      and the DP link frequency. The spec says:
      "For DP audio configuration, cdclk frequency shall be set to
       meet the following requirements:
       DP Link Frequency(MHz) | Cdclk frequency(MHz)
       270                    | 320 or higher
       162                    | 200 or higher"
      
      I suspect that would more accurately be expressed as
      "cdclk >= DP link clock", and in any case we can express it like
      that in the code because of the limited set of cdclk (200, 266,
      320, 400 MHz) and link frequencies (162 and 270 MHz) we support.
      
      Without this we can end up in a situation where the cdclk
      is too low and enabling DP audio will kill the pipe. Happens
      eg. with 2560x1440 modes where the 266MHz cdclk is sufficient
      to pump the pixels (241.5 MHz dotclock) but is too low for
      the DP audio due to the link frequency being 270 MHz.
      
      v2: Spell out the cdclk and link frequencies we actually support
      
      Cc: stable@vger.kernel.org
      Tested-by: default avatarStefan Gottwald <gottwald@igel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111149
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190717114536.22937-1-ville.syrjala@linux.intel.com
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      (cherry picked from commit bffb31f7
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      a8f196a0
    • Chris Wilson's avatar
      drm/i915: Lock the engine while dumping the active request · 982b1d00
      Chris Wilson authored
      
      
      We cannot let the request be retired and freed while we are trying to
      dump it during error capture. It is not sufficient just to grab a
      reference to the request, as during retirement we may free the ring
      which we are also dumping. So take the engine lock to prevent retiring
      and freeing of the request.
      
      Reported-by: default avatarAlex Shumsky <alexthreed@gmail.com>
      Fixes: 83c31783
      
       ("drm/i915: Dump the ringbuffer of the active request for debugging")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Alex Shumsky <alexthreed@gmail.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190715080946.15593-6-chris@chris-wilson.co.uk
      (cherry picked from commit cfe7288c
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      982b1d00
    • Lionel Landwerlin's avatar
      drm/i915/perf: add missing delay for OA muxes configuration · 8f48de49
      Lionel Landwerlin authored
      
      
      This was dropped from the original patch series, we weren't sure
      whether it was needed at the time. More recent tests show it's
      definitely needed to have acurate performance data.
      
      Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Fixes: 19f81df2
      
       ("drm/i915/perf: Add OA unit support for Gen 8+")
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      [ickle: combine duplicate code and comments]
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190710105524.23017-1-chris@chris-wilson.co.uk
      (cherry picked from commit 14bfcd3e
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      8f48de49
    • Lionel Landwerlin's avatar
      drm/i915/perf: ensure we keep a reference on the driver · 06c12ae3
      Lionel Landwerlin authored
      
      
      The i915 perf stream has its own file descriptor and is tied to
      reference of the driver. We haven't taken care of keep the driver
      alive.
      
      Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Suggested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Fixes: eec688e1
      
       ("drm/i915: Add i915 perf infrastructure")
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190709123351.5645-2-lionel.g.landwerlin@intel.com
      (cherry picked from commit a5af1df7
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      06c12ae3
    • Chris Wilson's avatar
      drm/i915/userptr: Acquire the page lock around set_page_dirty() · aa56a292
      Chris Wilson authored
      set_page_dirty says:
      
      	For pages with a mapping this should be done under the page lock
      	for the benefit of asynchronous memory errors who prefer a
      	consistent dirty state. This rule can be broken in some special
      	cases, but should be better not to.
      
      Under those rules, it is only safe for us to use the plain set_page_dirty
      calls for shmemfs/anonymous memory. Userptr may be used with real
      mappings and so needs to use the locked version (set_page_dirty_lock).
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203317
      Fixes: 5cc9ed4b ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl")
      References: 6dcc693b
      
       ("ext4: warn when page is dirtied without buffers")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190708140327.26825-1-chris@chris-wilson.co.uk
      (cherry picked from commit cb6d7c7d
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      aa56a292
    • Chris Wilson's avatar
      drm/i915/gtt: Mark the freed page table entries with scratch · 5f4c82c8
      Chris Wilson authored
      On unwinding the allocation error path and having freed the page table
      entry, it is imperative that we mark it as scratch.
      
      <4> [416.075569] general protection fault: 0000 [#1] PREEMPT SMP PTI
      <4> [416.075801] CPU: 0 PID: 2385 Comm: kworker/u2:11 Tainted: G     U            5.2.0-rc7-CI-Patchwork_13534+ #1
      <4> [416.076162] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
      <4> [416.076522] Workqueue: i915 __i915_vm_release [i915]
      <4> [416.076754] RIP: 0010:gen8_ppgtt_cleanup_3lvl+0x58/0xb0 [i915]
      <4> [416.077023] Code: 81 e2 04 fe ff ff 81 c2 ff 01 00 00 4c 8d 74 d6 58 4d 8b 65 00 4d 3b a7 28 02 00 00 74 40 49 8d 5c 24 50 49 81 c4 50 10 00 00 <48> 8b 2b 49 3b af 20 02 00 00 74 13 4c 89 ff 48 89 ee e8 01 fb ff
      <4> [416.077445] RSP: 0018:ffffc9000046bd98 EFLAGS: 00010206
      <4> [416.077625] RAX: 0001000000000000 RBX: 6b6b6b6b6b6b6bbb RCX: 8b4b56d500000000
      <4> [416.077838] RDX: 00000000000001ff RSI: ffff88805a578008 RDI: ffff88805bd0efc8
      <4> [416.078167] RBP: ffff88805bd0efc8 R08: 0000000004e42b93 R09: 0000000000000001
      <4> [416.078381] R10: 0000000000000000 R11: ffff888077a1b0b8 R12: 6b6b6b6b6b6b7bbb
      <4> [416.078594] R13: ffff88805a578058 R14: ffff88805a579058 R15: ffff88805bd0efc8
      <4> [416.078815] FS:  0000000000000000(0000) GS:ffff88807da00000(0000) knlGS:0000000000000000
      <4> [416.079395] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4> [416.079851] CR2: 000056160fec2b14 CR3: 0000000071bbc003 CR4: 00000000003606f0
      <4> [416.080388] Call Trace:
      <4> [416.080828]  gen8_ppgtt_cleanup+0x64/0x100 [i915]
      <4> [416.081399]  __i915_vm_release+0xfc/0x1d0 [i915]
      
      Fixes: 1d1b5490
      
       ("drm/i915/gtt: Replace struct_mutex serialisation for allocation")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190704201656.15775-1-chris@chris-wilson.co.uk
      (cherry picked from commit e7539b79
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      5f4c82c8
    • Chris Wilson's avatar
      drm/i915/gtt: Defer the free for alloc error paths · f691eaa4
      Chris Wilson authored
      If we hit an error while allocating the page tables, we have to unwind
      the incomplete updates, and wish to free the unused pd. However, we are
      not allowed to be hoding the spinlock at that point, and so must use the
      later free to defer it until after we drop the lock.
      
      <3> [414.363795] BUG: sleeping function called from invalid context at drivers/gpu/drm/i915/i915_gem_gtt.c:472
      <3> [414.364167] in_atomic(): 1, irqs_disabled(): 0, pid: 3905, name: i915_selftest
      <4> [414.364406] 3 locks held by i915_selftest/3905:
      <4> [414.364408]  #0: 0000000034fe8aa8 (&dev->mutex){....}, at: device_driver_attach+0x18/0x50
      <4> [414.364415]  #1: 000000006bd8a560 (&dev->struct_mutex){+.+.}, at: igt_ctx_exec+0xb7/0x410 [i915]
      <4> [414.364476]  #2: 000000003dfdc766 (&(&pd->lock)->rlock){+.+.}, at: gen8_ppgtt_alloc_pdp+0x448/0x540 [i915]
      <3> [414.364529] Preemption disabled at:
      <4> [414.364530] [<0000000000000000>] 0x0
      <4> [414.364696] CPU: 0 PID: 3905 Comm: i915_selftest Tainted: G     U            5.2.0-rc7-CI-CI_DRM_6403+ #1
      <4> [414.364698] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
      <4> [414.364699] Call Trace:
      <4> [414.364704]  dump_stack+0x67/0x9b
      <4> [414.364708]  ___might_sleep+0x167/0x250
      <4> [414.364777]  vm_free_page+0x24/0xc0 [i915]
      <4> [414.364852]  free_pd+0xf/0x20 [i915]
      <4> [414.364897]  gen8_ppgtt_alloc_pdp+0x489/0x540 [i915]
      <4> [414.364946]  gen8_ppgtt_alloc_4lvl+0x8e/0x2e0 [i915]
      <4> [414.364992]  ppgtt_bind_vma+0x2e/0x60 [i915]
      <4> [414.365039]  i915_vma_bind+0xe8/0x2c0 [i915]
      <4> [414.365088]  __i915_vma_do_pin+0xa1/0xd20 [i915]
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111050
      Fixes: 1d1b5490
      
       ("drm/i915/gtt: Replace struct_mutex serialisation for allocation")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190703171913.16585-3-chris@chris-wilson.co.uk
      (cherry picked from commit 06861089
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      f691eaa4
    • Ville Syrjälä's avatar
      drm/i915: Deal with machines that expose less than three QGV points · d1b739f3
      Ville Syrjälä authored
      When SAGV is forced to disabled/min/med/max in the BIOS pcode will
      only hand us a single QGV point instead of the normal three. Fix
      the code to deal with that instead declaring the bandwidth limit
      to be 0 MB/s (and thus preventing any planes from being enabled).
      
      Also shrink the max_bw sturct a bit while at it, and change the
      deratedbw type to unsigned since the code returns the bw as
      an unsigned int.
      
      Since we now keep track of how many qgv points we got from pcode
      we can drop the earlier check added for the "pcode doesn't
      support the memory subsystem query" case.
      
      Cc: felix.j.degrood@intel.com
      Cc: Mark Janes <mark.a.janes@intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Clint Taylor <Clinton.A.Taylor@intel.com>
      Fixes: c457d9cf
      
       ("drm/i915: Make sure we have enough memory bandwidth on ICL")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110838
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190606124210.3482-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      (cherry picked from commit 56e9371b
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      d1b739f3
    • Mika Kuoppala's avatar
      drm/i915: Fix memleak in runtime wakeref tracking · fdcc789a
      Mika Kuoppala authored
      If we untrack wakerefs, the actual count may reach zero.
      However the krealloced owners array is still there and
      needs to be taken care of. Free the owners unconditionally
      to fix the leak.
      
      Fixes: bd780f37
      
       ("drm/i915: Track all held rpm wakerefs")
      Reported-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
      Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190701104442.9319-1-mika.kuoppala@linux.intel.com
      (cherry picked from commit c5f846ee
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      fdcc789a
    • Lionel Landwerlin's avatar
      drm/i915/icl: whitelist PS_(DEPTH|INVOCATION)_COUNT · cf8f9aa1
      Lionel Landwerlin authored
      
      
      The same tests failing on CFL+ platforms are also failing on ICL.
      Documentation doesn't list the
      WaAllowPMDepthAndInvocationCountAccessFromUMD workaround for ICL but
      applying it fixes the same tests as CFL.
      
      v2: Use only one whitelist entry (Lionel)
      
      Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Tested-by: default avatarAnuj Phogat <anuj.phogat@gmail.com>
      Cc: stable@vger.kernel.org # 6883eab27481: drm/i915: Support flags in whitlist WAs
      Cc: stable@vger.kernel.org
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190628120720.21682-4-lionel.g.landwerlin@intel.com
      (cherry picked from commit 3fe0107e
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      cf8f9aa1
    • Lionel Landwerlin's avatar
      drm/i915: whitelist PS_(DEPTH|INVOCATION)_COUNT · 6ce5bfe9
      Lionel Landwerlin authored
      
      
      CFL:C0+ changed the status of those registers which are now
      blacklisted by default.
      
      This is breaking a number of CTS tests on GL & Vulkan :
      
        KHR-GL45.pipeline_statistics_query_tests_ARB.functional_fragment_shader_invocations (GL)
      
        dEQP-VK.query_pool.statistics_query.fragment_shader_invocations.* (Vulkan)
      
      v2: Only use one whitelist entry (Lionel)
      
      Bspec: 14091
      Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Cc: stable@vger.kernel.org # 6883eab27481: drm/i915: Support flags in whitlist WAs
      Cc: stable@vger.kernel.org
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190628120720.21682-3-lionel.g.landwerlin@intel.com
      (cherry picked from commit 2c903da5
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      6ce5bfe9
    • Lionel Landwerlin's avatar
      drm/i915: fix whitelist selftests with readonly registers · c270cac4
      Lionel Landwerlin authored
      
      
      When a register is readonly there is not much we can tell about its
      value (apart from its default value?). This can be covered by tests
      exercising the value of the register from userspace.
      
      For PS_INVOCATION_COUNT we've got the following piglit tests :
      
         KHR-GL45.pipeline_statistics_query_tests_ARB.functional_fragment_shader_invocations
      
      Vulkan CTS tests :
      
         dEQP-VK.query_pool.statistics_query.fragment_shader_invocations.*
      
      v2: Use a local to shrink under 80cols.
      
      Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Fixes: 86554f48
      
       ("drm/i915/selftests: Verify whitelist of context registers")
      Tested-by: default avatarAnuj Phogat <anuj.phogat@gmail.com>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190629131350.31185-1-chris@chris-wilson.co.uk
      (cherry picked from commit 361b6905
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      c270cac4
    • Ville Syrjälä's avatar
      drm/i915: Fix various tracepoints for gen2 · 7d3cd662
      Ville Syrjälä authored
      Gen2 doesn't have a frame counter and apparently we no longer provide
      a fake .get_vblank_counter() hook for it. That means all tracepoints
      calling that hook will oops. Update the tracepoints to use
      intel_crtc_get_vblank_counter() which will gracefully fall back to
      using the software counter. This is actually a better approach since
      we now get (hopefully accurate) frame numbers in the traces.
      
      This also gets rid of the raw driver->get_vblank_counter() calls, which
      we need to do in order to switch to the per-crtc vblank vfuncs.
      
      v2: Deal with new tracepoints
      v3: Use a distinct variable name for the internal crtc iterator (Chris)
      
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Fixes: 967dd484
      
       ("drm: remove drm_vblank_no_hw_counter assignment from driver code")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190619170842.20579-2-ville.syrjala@linux.intel.com
      (cherry picked from commit 4c888e7b
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      7d3cd662
    • Lionel Landwerlin's avatar
      drm/i915/perf: fix ICL perf register offsets · 95eef14c
      Lionel Landwerlin authored
      
      
      We got the wrong offsets (could they have changed?). New values were
      computed off an error state by looking up the register offset in the
      context image as written by the HW.
      
      Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Fixes: 1de401c0
      
       ("drm/i915/perf: enable perf support on ICL")
      Cc: <stable@vger.kernel.org> # v4.18+
      Acked-by: default avatarKenneth Graunke <kenneth@whitecape.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190610081914.25428-1-lionel.g.landwerlin@intel.com
      (cherry picked from commit 8dcfdfb4
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      95eef14c
    • Kenneth Graunke's avatar
      drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings. · 248f883d
      Kenneth Graunke authored
      
      
      The Demand Prefetch workaround (binding table prefetching) only applies
      to Icelake A0/B0.  But the Sampler Prefetch workaround needs to be
      applied to all Gen11 steppings, according to a programming note in the
      SARCHKMD documentation.
      
      Using the Intel Gallium driver, I have seen intermittent failures in
      the dEQP-GLES31.functional.copy_image.non_compressed.* tests.  After
      applying this workaround, the tests reliably pass.
      
      v2: Remove the overlap with a pre-production w/a
      
      BSpec: 9663
      Signed-off-by: default avatarKenneth Graunke <kenneth@whitecape.org>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190625090655.19220-1-chris@chris-wilson.co.uk
      (cherry picked from commit f9a39387
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      248f883d
    • Chris Wilson's avatar
      drm/i915: Keep rings pinned while the context is active · ac65bdfe
      Chris Wilson authored
      Remember to keep the rings pinned as well as the context image until the
      GPU is no longer active.
      
      v2: Introduce a ring->pin_count primarily to hide the
      mock_ring that doesn't fit into the normal GGTT vma picture.
      
      v3: Order is important in teardown, ringbuffer submission needs to drop
      the pin count on the engine->kernel_context before it can gleefully free
      its ring.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110946
      Fixes: ce476c80
      
       ("drm/i915: Keep contexts pinned until after the next kernel context switch")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190619170135.15281-1-chris@chris-wilson.co.uk
      (cherry picked from commit 09c5ab38
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      ac65bdfe
    • Linus Torvalds's avatar
      Linux 5.3-rc2 · 609488bc
      Linus Torvalds authored
      609488bc
    • Linus Torvalds's avatar
      Merge tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · c622fc5f
      Linus Torvalds authored
      Pull structleak fix from Kees Cook:
       "Disable gcc-based stack variable auto-init under KASAN (Arnd
        Bergmann).
      
        This fixes a bunch of build warnings under KASAN and the
        gcc-plugin-based stack auto-initialization features (which are
        arguably redundant, so better to let KASAN control this)"
      
      * tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK
      c622fc5f
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.3' of... · 8e61ea11
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - add compile_commands.json to .gitignore
      
       - fix false-positive warning from gen_compile_commands.py after
         allnoconfig build
      
       - remove unused code
      
      * tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: remove unused single-used-m
        gen_compile_commands: lower the entry count threshold
        .gitignore: Add compilation database file
        kbuild: remove unused objectify macro
      8e61ea11
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 04ce9318
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char and misc driver fixes for 5.3-rc2 to resolve
        some reported issues.
      
        Nothing major at all, some binder bugfixes for issues found, some new
        mei device ids, firmware building warning fixes, habanalabs fixes, a
        few other build fixes, and a MAINTAINERS update.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        test_firmware: fix a memory leak bug
        hpet: Fix division by zero in hpet_time_div()
        eeprom: make older eeprom drivers select NVMEM_SYSFS
        vmw_balloon: Remove Julien from the maintainers list
        fpga-manager: altera-ps-spi: Fix build error
        mei: me: add mule creek canyon (EHL) device ids
        binder: prevent transactions to context manager from its own process.
        binder: Set end of SG buffer area properly.
        firmware: Fix missing inline
        firmware: fix build errors in paged buffer handling code
        habanalabs: don't reset device when getting VRHOT
        habanalabs: use %pad for printing a dma_addr_t
      04ce9318
    • Linus Torvalds's avatar
      Merge tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 572782b2
      Linus Torvalds authored
      Pull tty fixes from Greg KH:
       "Here are two tty/vt fixes:
      
         - delete the netx-serial driver as the arch has been removed, no need
           to keep the serial driver for it around either.
      
         - vt console_lock fix to resolve a reported noisy warning at runtime
      
        Both of these have been in linux-next with no reported issues"
      
      * tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        vt: Grab console_lock around con_is_bound in show_bind
        tty: serial: netx: Delete driver
      572782b2
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx · ad28fd1c
      Linus Torvalds authored
      Pull SPDX fixes from Greg KH:
       "Here are some small SPDX fixes for 5.3-rc2 for things that came in
        during the 5.3-rc1 merge window that we previously missed.
      
        Only three small patches here:
      
         - two uapi patches to resolve some SPDX tags that were not correct
      
         - fix an invalid SPDX tag in the iomap Makefile file
      
        All have been properly reviewed on the public mailing lists"
      
      * tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
        iomap: fix Invalid License ID
        treewide: remove SPDX "WITH Linux-syscall-note" from kernel-space headers again
        treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers
      ad28fd1c
    • Linus Torvalds's avatar
      Merge tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 29af915c
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small fixes for 5.3-rc2. All of these resolve some
        reported issues, some more than others :)
      
        Included in here is:
      
         - xhci fix for an annoying issue with odd devices
      
         - reversion of some usb251xb patches that should not have been merged
      
         - usb pci quirk additions and fixups
      
         - usb storage fix
      
         - usb host controller error test fix
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT).
        usb: usb251xb: Reallow swap-dx-lanes to apply to the upstream port
        Revert "usb: usb251xb: Add US port lanes inversion property"
        Revert "usb: usb251xb: Add US lanes inversion dts-bindings"
        usb: wusbcore: fix unbalanced get/put cluster_id
        usb/hcd: Fix a NULL vs IS_ERR() bug in usb_hcd_setup_local_mem()
        usb-storage: Add a limitation for blk_queue_max_hw_sectors()
        usb: pci-quirks: Minor cleanup for AMD PLL quirk
        usb: pci-quirks: Correct AMD PLL quirk detection
      29af915c
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 5bb575bc
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Here's the first batch of fixes for this release cycle.
      
        Main diffstat here is the re-deletion of netx. I messed up and most
        likely didn't remove the files from the index when I test-merged this
        and saw conflicts, and from there on out 'git rerere' remembered the
        mistake and I missed checking it. Here it's done again as expected.
      
        Besides that:
      
         - A defconfig refresh + enabling of new drivers for u8500
      
         - i.MX fixlets for i2c/SAI/pinmux
      
         - sleep.S build fix for Davinci
      
         - Broadcom devicetree build/warning fix"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: defconfig: u8500: Add new drivers
        ARM: defconfig: u8500: Refresh defconfig
        ARM: dts: bcm: bcm47094: add missing #cells for mdio-bus-mux
        ARM: davinci: fix sleep.S build error on ARMv4
        arm64: dts: imx8mq: fix SAI compatible
        arm64: dts: imx8mm: Correct SAI3 RXC/TXFS pin's mux option #1
        ARM: dts: imx6ul: fix clock frequency property name of I2C buses
        ARM: Delete netx a second time
        ARM: dts: imx7ulp: Fix usb-phy unit address format
      5bb575bc
  4. Jul 28, 2019
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a9815a4f
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of x86 fixes and functional updates:
      
         - Prevent stale huge I/O TLB mappings on 32bit. A long standing bug
           which got exposed by KPTI support for 32bit
      
         - Prevent bogus access_ok() warnings in arch_stack_walk_user()
      
         - Add display quirks for Lenovo devices which have height and width
           swapped
      
         - Add the missing CR2 fixup for 32 bit async pagefaults. Fallout of
           the CR2 bug fix series.
      
         - Unbreak handling of force enabled HPET by moving the 'is HPET
           counting' check back to the original place.
      
         - A more accurate check for running on a hypervisor platform in the
           MDS mitigation code. Not perfect, but more accurate than the
           previous one.
      
         - Update a stale and confusing comment vs. IRQ stacks"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/speculation/mds: Apply more accurate check on hypervisor platform
        x86/hpet: Undo the early counter is counting check
        x86/entry/32: Pass cr2 to do_async_page_fault()
        x86/irq/64: Update stale comment
        x86/sysfb_efi: Add quirks for some devices with swapped width and height
        x86/stacktrace: Prevent access_ok() warnings in arch_stack_walk_user()
        mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()
        x86/mm: Sync also unmappings in vmalloc_sync_all()
        x86/mm: Check for pfn instead of page in vmalloc_sync_one()
      a9815a4f
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e24ce84e
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "Two fixes for the fair scheduling class:
      
         - Prevent freeing memory which is accessible by concurrent readers
      
         - Make the RCU annotations for numa groups consistent"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Use RCU accessors consistently for ->numa_group
        sched/fair: Don't free p->numa_faults with concurrent readers
      e24ce84e
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 750991f9
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A pile of perf related fixes:
      
        Kernel:
         - Fix SLOTS PEBS event constraints for Icelake CPUs
      
         - Add the missing mask bit to allow counting hardware generated
           prefetches on L3 for Icelake CPUs
      
         - Make the test for hypervisor platforms more accurate (as far as
           possible)
      
         - Handle PMUs correctly which override event->cpu
      
         - Yet another missing fallthrough annotation
      
        Tools:
           perf.data:
              - Fix loading of compressed data split across adjacent records
              - Fix buffer size setting for processing CPU topology perf.data
                header.
      
           perf stat:
              - Fix segfault for event group in repeat mode
              - Always separate "stalled cycles per insn" line, it was being
                appended to the "instructions" line.
      
           perf script:
              - Fix --max-blocks man page description.
              - Improve man page description of metrics.
              - Fix off by one in brstackinsn IPC computation.
      
           perf probe:
              - Avoid calling freeing routine multiple times for same pointer.
      
           perf build:
              - Do not use -Wshadow on gcc < 4.8, avoiding too strict warnings
                treated as errors, breaking the build"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel: Mark expected switch fall-throughs
        perf/core: Fix creating kernel counters for PMUs that override event->cpu
        perf/x86: Apply more accurate check on hypervisor platform
        perf/x86/intel: Fix invalid Bit 13 for Icelake MSR_OFFCORE_RSP_x register
        perf/x86/intel: Fix SLOTS PEBS event constraint
        perf build: Do not use -Wshadow on gcc < 4.8
        perf probe: Avoid calling freeing routine multiple times for same pointer
        perf probe: Set pev->nargs to zero after freeing pev->args entries
        perf session: Fix loading of compressed data split across adjacent records
        perf stat: Always separate stalled cycles per insn
        perf stat: Fix segfault for event group in repeat mode
        perf tools: Fix proper buffer size for feature processing
        perf script: Fix off by one in brstackinsn IPC computation
        perf script: Improve man page description of metrics
        perf script: Fix --max-blocks man page description
      750991f9