--- /dev/null
+From 6b8446859c971a5783a2cdc90adf32e64de3bd23 Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Wed, 1 Mar 2023 17:14:09 +0200
+Subject: drm/i915/dsi: fix DSS CTL register offsets for TGL+
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jani Nikula <jani.nikula@intel.com>
+
+commit 6b8446859c971a5783a2cdc90adf32e64de3bd23 upstream.
+
+On TGL+ the DSS control registers are at different offsets, and there's
+one per pipe. Fix the offsets to fix dual link DSI for TGL+.
+
+There would be helpers for this in the DSC code, but just do the quick
+fix now for DSI. Long term, we should probably move all the DSS handling
+into intel_vdsc.c, so exporting the helpers seems counter-productive.
+
+Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8232
+Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20230301151409.1581574-1-jani.nikula@intel.com
+(cherry picked from commit 1a62dd9895dca78bee28bba3a36f08836fdd143d)
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/i915/display/icl_dsi.c | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+--- a/drivers/gpu/drm/i915/display/icl_dsi.c
++++ b/drivers/gpu/drm/i915/display/icl_dsi.c
+@@ -300,9 +300,21 @@ static void configure_dual_link_mode(str
+ {
+ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+ struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
++ i915_reg_t dss_ctl1_reg, dss_ctl2_reg;
+ u32 dss_ctl1;
+
+- dss_ctl1 = intel_de_read(dev_priv, DSS_CTL1);
++ /* FIXME: Move all DSS handling to intel_vdsc.c */
++ if (DISPLAY_VER(dev_priv) >= 12) {
++ struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
++
++ dss_ctl1_reg = ICL_PIPE_DSS_CTL1(crtc->pipe);
++ dss_ctl2_reg = ICL_PIPE_DSS_CTL2(crtc->pipe);
++ } else {
++ dss_ctl1_reg = DSS_CTL1;
++ dss_ctl2_reg = DSS_CTL2;
++ }
++
++ dss_ctl1 = intel_de_read(dev_priv, dss_ctl1_reg);
+ dss_ctl1 |= SPLITTER_ENABLE;
+ dss_ctl1 &= ~OVERLAP_PIXELS_MASK;
+ dss_ctl1 |= OVERLAP_PIXELS(intel_dsi->pixel_overlap);
+@@ -323,16 +335,16 @@ static void configure_dual_link_mode(str
+
+ dss_ctl1 &= ~LEFT_DL_BUF_TARGET_DEPTH_MASK;
+ dss_ctl1 |= LEFT_DL_BUF_TARGET_DEPTH(dl_buffer_depth);
+- dss_ctl2 = intel_de_read(dev_priv, DSS_CTL2);
++ dss_ctl2 = intel_de_read(dev_priv, dss_ctl2_reg);
+ dss_ctl2 &= ~RIGHT_DL_BUF_TARGET_DEPTH_MASK;
+ dss_ctl2 |= RIGHT_DL_BUF_TARGET_DEPTH(dl_buffer_depth);
+- intel_de_write(dev_priv, DSS_CTL2, dss_ctl2);
++ intel_de_write(dev_priv, dss_ctl2_reg, dss_ctl2);
+ } else {
+ /* Interleave */
+ dss_ctl1 |= DUAL_LINK_MODE_INTERLEAVE;
+ }
+
+- intel_de_write(dev_priv, DSS_CTL1, dss_ctl1);
++ intel_de_write(dev_priv, dss_ctl1_reg, dss_ctl1);
+ }
+
+ /* aka DSI 8X clock */
--- /dev/null
+From edf79dd2172233452ff142dcc98b19d955fc8974 Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Wed, 12 Apr 2023 17:23:49 +0200
+Subject: fbcon: Fix error paths in set_con2fb_map
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit edf79dd2172233452ff142dcc98b19d955fc8974 upstream.
+
+This is a regressoin introduced in b07db3958485 ("fbcon: Ditch error
+handling for con2fb_release_oldinfo"). I failed to realize what the if
+(!err) checks. The mentioned commit was dropping the
+con2fb_release_oldinfo() return value but the if (!err) was also
+checking whether the con2fb_acquire_newinfo() function call above
+failed or not.
+
+Fix this with an early return statement.
+
+Note that there's still a difference compared to the orginal state of
+the code, the below lines are now also skipped on error:
+
+ if (!search_fb_in_map(info_idx))
+ info_idx = newidx;
+
+These are only needed when we've actually thrown out an old fb_info
+from the console mappings, which only happens later on.
+
+Also move the fbcon_add_cursor_work() call into the same if block,
+it's all protected by console_lock so doesn't matter when we set up
+the blinking cursor delayed work anyway. This further simplifies the
+control flow and allows us to ditch the found local variable.
+
+v2: Clarify commit message (Javier)
+
+Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
+Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
+Acked-by: Helge Deller <deller@gmx.de>
+Tested-by: Xingyuan Mo <hdthky0@gmail.com>
+Fixes: b07db3958485 ("fbcon: Ditch error handling for con2fb_release_oldinfo")
+Cc: Thomas Zimmermann <tzimmermann@suse.de>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Xingyuan Mo <hdthky0@gmail.com>
+Cc: Thomas Zimmermann <tzimmermann@suse.de>
+Cc: Helge Deller <deller@gmx.de>
+Cc: <stable@vger.kernel.org> # v5.19+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/video/fbdev/core/fbcon.c | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+--- a/drivers/video/fbdev/core/fbcon.c
++++ b/drivers/video/fbdev/core/fbcon.c
+@@ -823,7 +823,7 @@ static int set_con2fb_map(int unit, int
+ int oldidx = con2fb_map[unit];
+ struct fb_info *info = fbcon_registered_fb[newidx];
+ struct fb_info *oldinfo = NULL;
+- int found, err = 0, show_logo;
++ int err = 0, show_logo;
+
+ WARN_CONSOLE_UNLOCKED();
+
+@@ -841,26 +841,25 @@ static int set_con2fb_map(int unit, int
+ if (oldidx != -1)
+ oldinfo = fbcon_registered_fb[oldidx];
+
+- found = search_fb_in_map(newidx);
+-
+- if (!err && !found) {
++ if (!search_fb_in_map(newidx)) {
+ err = con2fb_acquire_newinfo(vc, info, unit);
+- if (!err)
+- con2fb_map[unit] = newidx;
++ if (err)
++ return err;
++
++ con2fb_map[unit] = newidx;
++ fbcon_add_cursor_work(info);
+ }
+
+ /*
+ * If old fb is not mapped to any of the consoles,
+ * fbcon should release it.
+ */
+- if (!err && oldinfo && !search_fb_in_map(oldidx))
++ if (oldinfo && !search_fb_in_map(oldidx))
+ con2fb_release_oldinfo(vc, oldinfo, info);
+
+ show_logo = (fg_console == 0 && !user &&
+ logo_shown != FBCON_LOGO_DONTSHOW);
+
+- if (!found)
+- fbcon_add_cursor_work(info);
+ con2fb_map_boot[unit] = newidx;
+ con2fb_init_display(vc, info, unit, show_logo);
+
--- /dev/null
+From fffb0b52d5258554c645c966c6cbef7de50b851d Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Wed, 12 Apr 2023 17:31:46 +0200
+Subject: fbcon: set_con2fb_map needs to set con2fb_map!
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit fffb0b52d5258554c645c966c6cbef7de50b851d upstream.
+
+I got really badly confused in d443d9386472 ("fbcon: move more common
+code into fb_open()") because we set the con2fb_map before the failure
+points, which didn't look good.
+
+But in trying to fix that I moved the assignment into the wrong path -
+we need to do it for _all_ vc we take over, not just the first one
+(which additionally requires the call to con2fb_acquire_newinfo).
+
+I've figured this out because of a KASAN bug report, where the
+fbcon_registered_fb and fbcon_display arrays went out of sync in
+fbcon_mode_deleted() because the con2fb_map pointed at the old
+fb_info, but the modes and everything was updated for the new one.
+
+Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
+Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
+Acked-by: Helge Deller <deller@gmx.de>
+Tested-by: Xingyuan Mo <hdthky0@gmail.com>
+Fixes: d443d9386472 ("fbcon: move more common code into fb_open()")
+Reported-by: Xingyuan Mo <hdthky0@gmail.com>
+Cc: Thomas Zimmermann <tzimmermann@suse.de>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Xingyuan Mo <hdthky0@gmail.com>
+Cc: Thomas Zimmermann <tzimmermann@suse.de>
+Cc: Helge Deller <deller@gmx.de>
+Cc: <stable@vger.kernel.org> # v5.19+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/video/fbdev/core/fbcon.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/video/fbdev/core/fbcon.c
++++ b/drivers/video/fbdev/core/fbcon.c
+@@ -846,10 +846,11 @@ static int set_con2fb_map(int unit, int
+ if (err)
+ return err;
+
+- con2fb_map[unit] = newidx;
+ fbcon_add_cursor_work(info);
+ }
+
++ con2fb_map[unit] = newidx;
++
+ /*
+ * If old fb is not mapped to any of the consoles,
+ * fbcon should release it.
--- /dev/null
+From 860e1c7f8b0b43fbf91b4d689adfaa13adb89452 Mon Sep 17 00:00:00 2001
+From: Ming Lei <ming.lei@redhat.com>
+Date: Fri, 14 Apr 2023 15:53:13 +0800
+Subject: io_uring: complete request via task work in case of DEFER_TASKRUN
+
+From: Ming Lei <ming.lei@redhat.com>
+
+commit 860e1c7f8b0b43fbf91b4d689adfaa13adb89452 upstream.
+
+So far io_req_complete_post() only covers DEFER_TASKRUN by completing
+request via task work when the request is completed from IOWQ.
+
+However, uring command could be completed from any context, and if io
+uring is setup with DEFER_TASKRUN, the command is required to be
+completed from current context, otherwise wait on IORING_ENTER_GETEVENTS
+can't be wakeup, and may hang forever.
+
+The issue can be observed on removing ublk device, but turns out it is
+one generic issue for uring command & DEFER_TASKRUN, so solve it in
+io_uring core code.
+
+Fixes: e6aeb2721d3b ("io_uring: complete all requests in task context")
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/linux-block/b3fc9991-4c53-9218-a8cc-5b4dd3952108@kernel.dk/
+Reported-by: Jens Axboe <axboe@kernel.dk>
+Cc: Kanchan Joshi <joshi.k@samsung.com>
+Signed-off-by: Ming Lei <ming.lei@redhat.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ io_uring/io_uring.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/io_uring/io_uring.c
++++ b/io_uring/io_uring.c
+@@ -962,7 +962,7 @@ static void __io_req_complete_post(struc
+
+ void io_req_complete_post(struct io_kiocb *req, unsigned issue_flags)
+ {
+- if (req->ctx->task_complete && (issue_flags & IO_URING_F_IOWQ)) {
++ if (req->ctx->task_complete && req->ctx->submitter_task != current) {
+ req->io_task_work.func = io_req_task_complete;
+ io_req_task_work_add(req);
+ } else if (!(issue_flags & IO_URING_F_UNLOCKED) ||
--- /dev/null
+From f9ea835e99bc8d049bf2a3ec8fa5a7cb4fcade23 Mon Sep 17 00:00:00 2001
+From: Reiji Watanabe <reijiw@google.com>
+Date: Tue, 28 Mar 2023 19:39:44 -0700
+Subject: KVM: arm64: PMU: Restore the guest's EL0 event counting after migration
+
+From: Reiji Watanabe <reijiw@google.com>
+
+commit f9ea835e99bc8d049bf2a3ec8fa5a7cb4fcade23 upstream.
+
+Currently, with VHE, KVM enables the EL0 event counting for the
+guest on vcpu_load() or KVM enables it as a part of the PMU
+register emulation process, when needed. However, in the migration
+case (with VHE), the same handling is lacking, as vPMU register
+values that were restored by userspace haven't been propagated yet
+(the PMU events haven't been created) at the vcpu load-time on the
+first KVM_RUN (kvm_vcpu_pmu_restore_guest() called from vcpu_load()
+on the first KVM_RUN won't do anything as events_{guest,host} of
+kvm_pmu_events are still zero).
+
+So, with VHE, enable the guest's EL0 event counting on the first
+KVM_RUN (after the migration) when needed. More specifically,
+have kvm_pmu_handle_pmcr() call kvm_vcpu_pmu_restore_guest()
+so that kvm_pmu_handle_pmcr() on the first KVM_RUN can take
+care of it.
+
+Fixes: d0c94c49792c ("KVM: arm64: Restore PMU configuration on first run")
+Cc: stable@vger.kernel.org
+Reviewed-by: Marc Zyngier <maz@kernel.org>
+Signed-off-by: Reiji Watanabe <reijiw@google.com>
+Link: https://lore.kernel.org/r/20230329023944.2488484-1-reijiw@google.com
+Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/kvm/pmu-emul.c | 1 +
+ arch/arm64/kvm/sys_regs.c | 1 -
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/kvm/pmu-emul.c
++++ b/arch/arm64/kvm/pmu-emul.c
+@@ -558,6 +558,7 @@ void kvm_pmu_handle_pmcr(struct kvm_vcpu
+ for_each_set_bit(i, &mask, 32)
+ kvm_pmu_set_pmc_value(kvm_vcpu_idx_to_pmc(vcpu, i), 0, true);
+ }
++ kvm_vcpu_pmu_restore_guest(vcpu);
+ }
+
+ static bool kvm_pmu_counter_is_enabled(struct kvm_pmc *pmc)
+--- a/arch/arm64/kvm/sys_regs.c
++++ b/arch/arm64/kvm/sys_regs.c
+@@ -703,7 +703,6 @@ static bool access_pmcr(struct kvm_vcpu
+ if (!kvm_supports_32bit_el0())
+ val |= ARMV8_PMU_PMCR_LC;
+ kvm_pmu_handle_pmcr(vcpu, val);
+- kvm_vcpu_pmu_restore_guest(vcpu);
+ } else {
+ /* PMCR.P & PMCR.C are RAZ */
+ val = __vcpu_sys_reg(vcpu, PMCR_EL0)
mtd-rawnand-meson-fix-bitmask-for-length-in-command-word.patch
mtd-rawnand-stm32_fmc2-remove-unsupported-edo-mode.patch
mtd-rawnand-stm32_fmc2-use-timings.mode-instead-of-checking-trc_min.patch
+kvm-arm64-pmu-restore-the-guest-s-el0-event-counting-after-migration.patch
+fbcon-fix-error-paths-in-set_con2fb_map.patch
+fbcon-set_con2fb_map-needs-to-set-con2fb_map.patch
+drm-i915-dsi-fix-dss-ctl-register-offsets-for-tgl.patch
+io_uring-complete-request-via-task-work-in-case-of-defer_taskrun.patch