Skip to content
  1. Apr 17, 2021
  2. Apr 16, 2021
  3. Apr 15, 2021
  4. Apr 14, 2021
  5. Apr 13, 2021
  6. Apr 12, 2021
    • Catalin Marinas's avatar
      arm64: mte: Ensure TIF_MTE_ASYNC_FAULT is set atomically · 2decad92
      Catalin Marinas authored
      
      
      The entry from EL0 code checks the TFSRE0_EL1 register for any
      asynchronous tag check faults in user space and sets the
      TIF_MTE_ASYNC_FAULT flag. This is not done atomically, potentially
      racing with another CPU calling set_tsk_thread_flag().
      
      Replace the non-atomic ORR+STR with an STSET instruction. While STSET
      requires ARMv8.1 and an assembler that understands LSE atomics, the MTE
      feature is part of ARMv8.5 and already requires an updated assembler.
      
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Fixes: 637ec831
      
       ("arm64: mte: Handle synchronous and asynchronous tag check faults")
      Cc: <stable@vger.kernel.org> # 5.10.x
      Reported-by: default avatarWill Deacon <will@kernel.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Link: https://lore.kernel.org/r/20210409173710.18582-1-catalin.marinas@arm.com
      
      
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      2decad92
    • Hans de Goede's avatar
      drm/i915/display/vlv_dsi: Do not skip panel_pwr_cycle_delay when disabling the panel · aee6f25e
      Hans de Goede authored
      After the recently added commit fe0f1e3b ("drm/i915: Shut down
      displays gracefully on reboot"), the DSI panel on a Cherry Trail based
      Predia Basic tablet would no longer properly light up after reboot.
      
      I've managed to reproduce this without rebooting by doing:
      chvt 3; echo 1 > /sys/class/graphics/fb0/blank;\
      echo 0 > /sys/class/graphics/fb0/blank
      
      Which rapidly turns the panel off and back on again.
      
      The vlv_dsi.c code uses an intel_dsi_msleep() helper for the various delays
      used for panel on/off, since starting with MIPI-sequences version >= 3 the
      delays are already included inside the MIPI-sequences.
      
      The problems exposed by the "Shut down displays gracefully on reboot"
      change, show that using this helper for the panel_pwr_cycle_delay is
      not the right thing to do. This has not been noticed until now because
      normally the panel never is cycled off and directly on again in quick
      succession.
      
      Change the msleep for the panel_pwr_cycle_delay to a normal msleep()
      call to avoid the panel staying black after a quick off + on cycle.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Fixes: fe0f1e3b
      
       ("drm/i915: Shut down displays gracefully on reboot")
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210325114823.44922-1-hdegoede@redhat.com
      (cherry picked from commit 2878b29f
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      aee6f25e
    • Ville Syrjälä's avatar
      drm/i915: Don't zero out the Y plane's watermarks · bf52dc49
      Ville Syrjälä authored
      Don't zero out the watermarks for the Y plane since we've already
      computed them when computing the UV plane's watermarks (since the
      UV plane always appears before ethe Y plane when iterating through
      the planes).
      
      This leads to allocating no DDB for the Y plane since .min_ddb_alloc
      also gets zeroed. And that of course leads to underruns when scanning
      out planar formats.
      
      Cc: stable@vger.kernel.org
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Fixes: dbf71381
      
       ("drm/i915: Nuke intel_atomic_crtc_state_for_each_plane_state() from skl+ wm code")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210327005945.4929-1-ville.syrjala@linux.intel.com
      
      
      Reviewed-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      (cherry picked from commit f99b805f
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      bf52dc49
    • Lyude Paul's avatar
      drm/i915/dpcd_bl: Don't try vesa interface unless specified by VBT · 11664169
      Lyude Paul authored
      Looks like that there actually are another subset of laptops on the market
      that don't support the Intel HDR backlight interface, but do advertise
      support for the VESA DPCD backlight interface despite the fact it doesn't
      seem to work.
      
      Note though I'm not entirely clear on this - on one of the machines where
      this issue was observed, I also noticed that we appeared to be rejecting
      the VBT defined backlight frequency in
      intel_dp_aux_vesa_calc_max_backlight(). It's noted in this function that:
      
      /* Use highest possible value of Pn for more granularity of brightness
       * adjustment while satifying the conditions below.
       * ...
       * - FxP is within 25% of desired value.
       *   Note: 25% is arbitrary value and may need some tweak.
       */
      
      So it's possible that this value might just need to be tweaked, but for now
      let's just disable the VESA backlight interface unless it's specified in
      the VBT just to be safe. We might be able to try enabling this again by
      default in the future.
      
      Fixes: 2227816e ("drm/i915/dp: Allow forcing specific interfaces through enable_dpcd_backlight")
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/3169
      
      
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210318170204.513000-1-lyude@redhat.com
      (cherry picked from commit 9e2eb6d5
      
      )
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      11664169
    • Vasily Gorbik's avatar
      s390/entry: save the caller of psw_idle · a994eddb
      Vasily Gorbik authored
      
      
      Currently psw_idle does not allocate a stack frame and does not
      save its r14 and r15 into the save area. Even though this is valid from
      call ABI point of view, because psw_idle does not make any calls
      explicitly, in reality psw_idle is an entry point for controlled
      transition into serving interrupts. So, in practice, psw_idle stack
      frame is analyzed during stack unwinding. Depending on build options
      that r14 slot in the save area of psw_idle might either contain a value
      saved by previous sibling call or complete garbage.
      
        [task    0000038000003c28] do_ext_irq+0xd6/0x160
        [task    0000038000003c78] ext_int_handler+0xba/0xe8
        [task   *0000038000003dd8] psw_idle_exit+0x0/0x8 <-- pt_regs
       ([task    0000038000003dd8] 0x0)
        [task    0000038000003e10] default_idle_call+0x42/0x148
        [task    0000038000003e30] do_idle+0xce/0x160
        [task    0000038000003e70] cpu_startup_entry+0x36/0x40
        [task    0000038000003ea0] arch_call_rest_init+0x76/0x80
      
      So, to make a stacktrace nicer and actually point for the real caller of
      psw_idle in this frequently occurring case, make psw_idle save its r14.
      
        [task    0000038000003c28] do_ext_irq+0xd6/0x160
        [task    0000038000003c78] ext_int_handler+0xba/0xe8
        [task   *0000038000003dd8] psw_idle_exit+0x0/0x6 <-- pt_regs
       ([task    0000038000003dd8] arch_cpu_idle+0x3c/0xd0)
        [task    0000038000003e10] default_idle_call+0x42/0x148
        [task    0000038000003e30] do_idle+0xce/0x160
        [task    0000038000003e70] cpu_startup_entry+0x36/0x40
        [task    0000038000003ea0] arch_call_rest_init+0x76/0x80
      
      Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      a994eddb
    • Vasily Gorbik's avatar
      s390/entry: avoid setting up backchain in ext|io handlers · b74e409e
      Vasily Gorbik authored
      Currently when interrupt arrives to cpu while in kernel context
      INT_HANDLER macro (used for ext_int_handler and io_int_handler)
      allocates new stack frame and pt_regs on the kernel stack and
      sets up the backchain to jump over the pt_regs to the frame which has
      been interrupted. This is not ideal to two reasons:
      
      1. This hides the fact that kernel stack contains interrupt frame in it
         and hence breaks arch_stack_walk_reliable(), which needs to know that to
         guarantee "reliability" and checks that there are no pt_regs on the way.
      
      2. It breaks the backchain unwinder logic, which assumes that the next
         stack frame after an interrupt frame is reliable, while it is not.
         In some cases (when r14 contains garbage) this leads to early unwinding
         termination with an error, instead of marking frame as unreliable
         and continuing.
      
      To address that, only set backchain to 0.
      
      Fixes: 56e62a73
      
       ("s390: convert to generic entry")
      Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      b74e409e