From 53503ffc7b05cc6686ee070413e384a1189a112a Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Wed, 19 Oct 2022 11:33:46 +0000 Subject: [PATCH] linux (Allwinner): rebase patches for 6.0.3 --- ...psys-Fix-CEC-not-working-after-power.patch | 14 +++-- ...-cedrus--Fix-watchdog-race-condition.patch | 62 ------------------- 2 files changed, 10 insertions(+), 66 deletions(-) delete mode 100644 projects/Allwinner/patches/linux/0064-media--cedrus--Fix-watchdog-race-condition.patch diff --git a/projects/Allwinner/patches/linux/0060-WIP-drm-bridge-synopsys-Fix-CEC-not-working-after-power.patch b/projects/Allwinner/patches/linux/0060-WIP-drm-bridge-synopsys-Fix-CEC-not-working-after-power.patch index 078d74d2c6..c8fcbb7b20 100644 --- a/projects/Allwinner/patches/linux/0060-WIP-drm-bridge-synopsys-Fix-CEC-not-working-after-power.patch +++ b/projects/Allwinner/patches/linux/0060-WIP-drm-bridge-synopsys-Fix-CEC-not-working-after-power.patch @@ -20,7 +20,7 @@ diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/ index 84cc52858ffb..3c20ef3bd3c1 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c -@@ -3036,18 +3036,11 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id) +@@ -3036,24 +3036,11 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id) * ask the source to re-read the EDID. */ if (intr_stat & @@ -35,11 +35,17 @@ index 84cc52858ffb..3c20ef3bd3c1 100644 - cec_notifier_phys_addr_invalidate(hdmi->cec_notifier); - mutex_unlock(&hdmi->cec_notifier_mutex); - } +- +- if (phy_stat & HDMI_PHY_HPD) +- status = connector_status_connected; +- +- if (!(phy_stat & (HDMI_PHY_HPD | HDMI_PHY_RX_SENSE))) +- status = connector_status_disconnected; - } - - if (intr_stat & HDMI_IH_PHY_STAT0_HPD) { - enum drm_connector_status status = phy_int_pol & HDMI_PHY_HPD - ? connector_status_connected + if (status != connector_status_unknown) { + dev_dbg(hdmi->dev, "EVENT=%s\n", + status == connector_status_connected ? @@ -3061,6 +3054,14 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id) drm_helper_hpd_irq_event(hdmi->bridge.dev); drm_bridge_hpd_notify(&hdmi->bridge, status); diff --git a/projects/Allwinner/patches/linux/0064-media--cedrus--Fix-watchdog-race-condition.patch b/projects/Allwinner/patches/linux/0064-media--cedrus--Fix-watchdog-race-condition.patch deleted file mode 100644 index 9904bd7184..0000000000 --- a/projects/Allwinner/patches/linux/0064-media--cedrus--Fix-watchdog-race-condition.patch +++ /dev/null @@ -1,62 +0,0 @@ -From: Nicolas Dufresne -To: linux-media@vger.kernel.org, Maxime Ripard , - Paul Kocialkowski , - Mauro Carvalho Chehab , - Greg Kroah-Hartman , - Chen-Yu Tsai , - Jernej Skrabec , - Samuel Holland , - Ezequiel Garcia , - Hans Verkuil -Cc: kernel@collabora.com, - Nicolas Dufresne , - stable@vger.kernel.org, linux-staging@lists.linux.dev, - linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, - linux-kernel@vger.kernel.org -Subject: [PATCH v1 1/3] media: cedrus: Fix watchdog race condition -Date: Thu, 18 Aug 2022 16:33:06 -0400 -Message-Id: <20220818203308.439043-2-nicolas.dufresne@collabora.com> -X-Mailer: git-send-email 2.37.2 -In-Reply-To: <20220818203308.439043-1-nicolas.dufresne@collabora.com> -References: <20220818203308.439043-1-nicolas.dufresne@collabora.com> -MIME-Version: 1.0 - -The watchdog needs to be schedule before we trigger the decode -operation, otherwise there is a risk that the decoder IRQ will be -called before we have schedule the watchdog. As a side effect, the -watchdog would never be cancelled and its function would be called -at an inappropriate time. - -This was observed while running Fluster with GStreamer as a backend. -Some programming error would cause the decoder IRQ to be call very -quickly after the trigger. Later calls into the driver would deadlock -due to the unbalanced state. - -Cc: stable@vger.kernel.org -Fixes: 7c38a551bda1 ("media: cedrus: Add watchdog for job completion") -Signed-off-by: Nicolas Dufresne -Reviewed-by: Paul Kocialkowski -Reviewed-by: Jernej Skrabec ---- - drivers/staging/media/sunxi/cedrus/cedrus_dec.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_dec.c b/drivers/staging/media/sunxi/cedrus/cedrus_dec.c -index 3b6aa78a2985f..e7f7602a5ab40 100644 ---- a/drivers/staging/media/sunxi/cedrus/cedrus_dec.c -+++ b/drivers/staging/media/sunxi/cedrus/cedrus_dec.c -@@ -106,11 +106,11 @@ void cedrus_device_run(void *priv) - - /* Trigger decoding if setup went well, bail out otherwise. */ - if (!error) { -- dev->dec_ops[ctx->current_codec]->trigger(ctx); -- - /* Start the watchdog timer. */ - schedule_delayed_work(&dev->watchdog_work, - msecs_to_jiffies(2000)); -+ -+ dev->dec_ops[ctx->current_codec]->trigger(ctx); - } else { - v4l2_m2m_buf_done_and_job_finish(ctx->dev->m2m_dev, - ctx->fh.m2m_ctx, -