mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
linux (Allwinner): rebase patches for 6.0.3
This commit is contained in:
parent
d9715327e4
commit
53503ffc7b
@ -20,7 +20,7 @@ diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/
|
|||||||
index 84cc52858ffb..3c20ef3bd3c1 100644
|
index 84cc52858ffb..3c20ef3bd3c1 100644
|
||||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||||
+++ b/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.
|
* ask the source to re-read the EDID.
|
||||||
*/
|
*/
|
||||||
if (intr_stat &
|
if (intr_stat &
|
||||||
@ -35,11 +35,17 @@ index 84cc52858ffb..3c20ef3bd3c1 100644
|
|||||||
- cec_notifier_phys_addr_invalidate(hdmi->cec_notifier);
|
- cec_notifier_phys_addr_invalidate(hdmi->cec_notifier);
|
||||||
- mutex_unlock(&hdmi->cec_notifier_mutex);
|
- 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) {
|
if (status != connector_status_unknown) {
|
||||||
enum drm_connector_status status = phy_int_pol & HDMI_PHY_HPD
|
dev_dbg(hdmi->dev, "EVENT=%s\n",
|
||||||
? connector_status_connected
|
status == connector_status_connected ?
|
||||||
@@ -3061,6 +3054,14 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
|
@@ -3061,6 +3054,14 @@ static irqreturn_t dw_hdmi_irq(int irq, void *dev_id)
|
||||||
drm_helper_hpd_irq_event(hdmi->bridge.dev);
|
drm_helper_hpd_irq_event(hdmi->bridge.dev);
|
||||||
drm_bridge_hpd_notify(&hdmi->bridge, status);
|
drm_bridge_hpd_notify(&hdmi->bridge, status);
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
|
|
||||||
To: linux-media@vger.kernel.org, Maxime Ripard <mripard@kernel.org>,
|
|
||||||
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
|
|
||||||
Mauro Carvalho Chehab <mchehab@kernel.org>,
|
|
||||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
|
|
||||||
Chen-Yu Tsai <wens@csie.org>,
|
|
||||||
Jernej Skrabec <jernej.skrabec@gmail.com>,
|
|
||||||
Samuel Holland <samuel@sholland.org>,
|
|
||||||
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
|
|
||||||
Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
||||||
Cc: kernel@collabora.com,
|
|
||||||
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
|
|
||||||
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 <nicolas.dufresne@collabora.com>
|
|
||||||
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
|
||||||
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
|
|
||||||
---
|
|
||||||
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,
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user