mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 07:27:49 +00:00
linux (Allwinner): remove upstream patches
This commit is contained in:
parent
9837aee172
commit
f32d65267f
@ -436,48 +436,6 @@ index eb379cd402ac..2557cc6c8d50 100644
|
||||
--
|
||||
2.23.0
|
||||
|
||||
From fadfee3f9d8f114435a8a3e9f83a227600d89de7 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kurtz <djkurtz@chromium.org>
|
||||
Date: Tue, 8 Oct 2019 18:21:45 +0800
|
||||
Subject: [PATCH] drm/bridge: dw-hdmi: Restore audio when setting a mode
|
||||
|
||||
When setting a new display mode, dw_hdmi_setup() calls
|
||||
dw_hdmi_enable_video_path(), which disables all hdmi clocks, including
|
||||
the audio clock.
|
||||
|
||||
We should only (re-)enable the audio clock if audio was already enabled
|
||||
when setting the new mode.
|
||||
|
||||
Without this patch, on RK3288, there will be HDMI audio on some monitors
|
||||
if i2s was played to headphone when the monitor was plugged.
|
||||
ACER H277HU and ASUS PB278 are two of the monitors showing this issue.
|
||||
|
||||
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
|
||||
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
|
||||
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
|
||||
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Link: https://patchwork.freedesktop.org/patch/msgid/20191008102145.55134-1-cychiang@chromium.org
|
||||
---
|
||||
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
index fdc29869d75a..dbe38a54870b 100644
|
||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
|
||||
@@ -2090,7 +2090,7 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
|
||||
|
||||
/* HDMI Initialization Step E - Configure audio */
|
||||
hdmi_clk_regenerator_update_pixel_clock(hdmi);
|
||||
- hdmi_enable_audio_clk(hdmi, true);
|
||||
+ hdmi_enable_audio_clk(hdmi, hdmi->audio_enable);
|
||||
}
|
||||
|
||||
/* not for DVI mode */
|
||||
--
|
||||
2.23.0
|
||||
|
||||
From 8ae3a0862993c09a8ef0f9abb379553370c517e3 Mon Sep 17 00:00:00 2001
|
||||
From: Ricardo Ribalda Delgado <ribalda@kernel.org>
|
||||
Date: Mon, 7 Oct 2019 12:06:32 -0300
|
||||
@ -2301,54 +2259,6 @@ index 3d9e48ed8817..1d85e24791e4 100644
|
||||
--
|
||||
2.23.0
|
||||
|
||||
From ae0688f659adb17ae6ae5710c886b20b5406e5c4 Mon Sep 17 00:00:00 2001
|
||||
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
Date: Fri, 30 Aug 2019 06:26:22 -0300
|
||||
Subject: [PATCH] media: cedrus: fill in bus_info for media device
|
||||
|
||||
Fixes this compliance warning:
|
||||
|
||||
$ v4l2-compliance -m0
|
||||
v4l2-compliance SHA: b514d615166bdc0901a4c71261b87db31e89f464, 32 bits
|
||||
|
||||
Compliance test for cedrus device /dev/media0:
|
||||
|
||||
Media Driver Info:
|
||||
Driver name : cedrus
|
||||
Model : cedrus
|
||||
Serial :
|
||||
Bus info :
|
||||
Media version : 5.3.0
|
||||
Hardware revision: 0x00000000 (0)
|
||||
Driver version : 5.3.0
|
||||
|
||||
Required ioctls:
|
||||
warn: v4l2-test-media.cpp(51): empty bus_info
|
||||
test MEDIA_IOC_DEVICE_INFO: OK
|
||||
|
||||
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
||||
---
|
||||
drivers/staging/media/sunxi/cedrus/cedrus.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.c b/drivers/staging/media/sunxi/cedrus/cedrus.c
|
||||
index 2d3ea8b74dfd..3439f6ad6338 100644
|
||||
--- a/drivers/staging/media/sunxi/cedrus/cedrus.c
|
||||
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.c
|
||||
@@ -357,6 +357,8 @@ static int cedrus_probe(struct platform_device *pdev)
|
||||
|
||||
dev->mdev.dev = &pdev->dev;
|
||||
strscpy(dev->mdev.model, CEDRUS_NAME, sizeof(dev->mdev.model));
|
||||
+ strscpy(dev->mdev.bus_info, "platform:" CEDRUS_NAME,
|
||||
+ sizeof(dev->mdev.bus_info));
|
||||
|
||||
media_device_init(&dev->mdev);
|
||||
dev->mdev.ops = &cedrus_m2m_media_ops;
|
||||
--
|
||||
2.23.0
|
||||
|
||||
From dec555256f2cb61ee94975727ec2d4a8d592ac92 Mon Sep 17 00:00:00 2001
|
||||
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
Date: Fri, 30 Aug 2019 06:26:23 -0300
|
||||
@ -2750,121 +2660,6 @@ index 3ec3a2db790c..f745f66c4440 100644
|
||||
--
|
||||
2.23.0
|
||||
|
||||
From 06eff2150d4db991ca236f3d05a9dc0101475aea Mon Sep 17 00:00:00 2001
|
||||
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
||||
Date: Tue, 22 Oct 2019 12:26:50 -0300
|
||||
Subject: [PATCH] media: cedrus: Fix undefined shift with a SHIFT_AND_MASK_BITS
|
||||
macro
|
||||
|
||||
We need to shift and mask values at different occasions to fill up
|
||||
cedrus registers. This was done using macros that don't explicitly
|
||||
treat arguments as unsigned, leading to possibly undefined behavior.
|
||||
|
||||
Introduce the SHIFT_AND_MASK_BITS macro and use it where possible.
|
||||
In cases where it doesn't apply as-is, explicitly cast to unsigned
|
||||
instead.
|
||||
|
||||
This macro should be moved to include/linux/bits.h eventually.
|
||||
|
||||
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
||||
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
|
||||
---
|
||||
.../staging/media/sunxi/cedrus/cedrus_regs.h | 31 ++++++++++---------
|
||||
1 file changed, 17 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
|
||||
index ddd29788d685..f9dd8cbf3458 100644
|
||||
--- a/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
|
||||
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_regs.h
|
||||
@@ -10,6 +10,9 @@
|
||||
#ifndef _CEDRUS_REGS_H_
|
||||
#define _CEDRUS_REGS_H_
|
||||
|
||||
+#define SHIFT_AND_MASK_BITS(v, h, l) \
|
||||
+ (((unsigned long)(v) << (l)) & GENMASK(h, l))
|
||||
+
|
||||
/*
|
||||
* Common acronyms and contractions used in register descriptions:
|
||||
* * VLD : Variable-Length Decoder
|
||||
@@ -37,8 +40,8 @@
|
||||
#define VE_PRIMARY_CHROMA_BUF_LEN 0xc4
|
||||
#define VE_PRIMARY_FB_LINE_STRIDE 0xc8
|
||||
|
||||
-#define VE_PRIMARY_FB_LINE_STRIDE_CHROMA(s) (((s) << 16) & GENMASK(31, 16))
|
||||
-#define VE_PRIMARY_FB_LINE_STRIDE_LUMA(s) (((s) << 0) & GENMASK(15, 0))
|
||||
+#define VE_PRIMARY_FB_LINE_STRIDE_CHROMA(s) SHIFT_AND_MASK_BITS(s, 31, 16)
|
||||
+#define VE_PRIMARY_FB_LINE_STRIDE_LUMA(s) SHIFT_AND_MASK_BITS(s, 15, 0)
|
||||
|
||||
#define VE_CHROMA_BUF_LEN 0xe8
|
||||
|
||||
@@ -46,7 +49,7 @@
|
||||
#define VE_SECONDARY_OUT_FMT_EXT (0x01 << 30)
|
||||
#define VE_SECONDARY_OUT_FMT_YU12 (0x02 << 30)
|
||||
#define VE_SECONDARY_OUT_FMT_YV12 (0x03 << 30)
|
||||
-#define VE_CHROMA_BUF_LEN_SDRT(l) ((l) & GENMASK(27, 0))
|
||||
+#define VE_CHROMA_BUF_LEN_SDRT(l) SHIFT_AND_MASK_BITS(l, 27, 0)
|
||||
|
||||
#define VE_PRIMARY_OUT_FMT 0xec
|
||||
|
||||
@@ -69,15 +72,15 @@
|
||||
|
||||
#define VE_DEC_MPEG_MP12HDR (VE_ENGINE_DEC_MPEG + 0x00)
|
||||
|
||||
-#define VE_DEC_MPEG_MP12HDR_SLICE_TYPE(t) (((t) << 28) & GENMASK(30, 28))
|
||||
+#define VE_DEC_MPEG_MP12HDR_SLICE_TYPE(t) SHIFT_AND_MASK_BITS(t, 30, 28)
|
||||
#define VE_DEC_MPEG_MP12HDR_F_CODE_SHIFT(x, y) (24 - 4 * (y) - 8 * (x))
|
||||
#define VE_DEC_MPEG_MP12HDR_F_CODE(__x, __y, __v) \
|
||||
- (((__v) & GENMASK(3, 0)) << VE_DEC_MPEG_MP12HDR_F_CODE_SHIFT(__x, __y))
|
||||
+ (((unsigned long)(__v) & GENMASK(3, 0)) << VE_DEC_MPEG_MP12HDR_F_CODE_SHIFT(__x, __y))
|
||||
|
||||
#define VE_DEC_MPEG_MP12HDR_INTRA_DC_PRECISION(p) \
|
||||
- (((p) << 10) & GENMASK(11, 10))
|
||||
+ SHIFT_AND_MASK_BITS(p, 11, 10)
|
||||
#define VE_DEC_MPEG_MP12HDR_INTRA_PICTURE_STRUCTURE(s) \
|
||||
- (((s) << 8) & GENMASK(9, 8))
|
||||
+ SHIFT_AND_MASK_BITS(s, 9, 8)
|
||||
#define VE_DEC_MPEG_MP12HDR_TOP_FIELD_FIRST(v) \
|
||||
((v) ? BIT(7) : 0)
|
||||
#define VE_DEC_MPEG_MP12HDR_FRAME_PRED_FRAME_DCT(v) \
|
||||
@@ -98,19 +101,19 @@
|
||||
#define VE_DEC_MPEG_PICCODEDSIZE (VE_ENGINE_DEC_MPEG + 0x08)
|
||||
|
||||
#define VE_DEC_MPEG_PICCODEDSIZE_WIDTH(w) \
|
||||
- ((DIV_ROUND_UP((w), 16) << 8) & GENMASK(15, 8))
|
||||
+ SHIFT_AND_MASK_BITS(DIV_ROUND_UP((w), 16), 15, 8)
|
||||
#define VE_DEC_MPEG_PICCODEDSIZE_HEIGHT(h) \
|
||||
- ((DIV_ROUND_UP((h), 16) << 0) & GENMASK(7, 0))
|
||||
+ SHIFT_AND_MASK_BITS(DIV_ROUND_UP((h), 16), 7, 0)
|
||||
|
||||
#define VE_DEC_MPEG_PICBOUNDSIZE (VE_ENGINE_DEC_MPEG + 0x0c)
|
||||
|
||||
-#define VE_DEC_MPEG_PICBOUNDSIZE_WIDTH(w) (((w) << 16) & GENMASK(27, 16))
|
||||
-#define VE_DEC_MPEG_PICBOUNDSIZE_HEIGHT(h) (((h) << 0) & GENMASK(11, 0))
|
||||
+#define VE_DEC_MPEG_PICBOUNDSIZE_WIDTH(w) SHIFT_AND_MASK_BITS(w, 27, 16)
|
||||
+#define VE_DEC_MPEG_PICBOUNDSIZE_HEIGHT(h) SHIFT_AND_MASK_BITS(h, 11, 0)
|
||||
|
||||
#define VE_DEC_MPEG_MBADDR (VE_ENGINE_DEC_MPEG + 0x10)
|
||||
|
||||
-#define VE_DEC_MPEG_MBADDR_X(w) (((w) << 8) & GENMASK(15, 8))
|
||||
-#define VE_DEC_MPEG_MBADDR_Y(h) (((h) << 0) & GENMASK(7, 0))
|
||||
+#define VE_DEC_MPEG_MBADDR_X(w) SHIFT_AND_MASK_BITS(w, 15, 8)
|
||||
+#define VE_DEC_MPEG_MBADDR_Y(h) SHIFT_AND_MASK_BITS(h, 7, 0)
|
||||
|
||||
#define VE_DEC_MPEG_CTRL (VE_ENGINE_DEC_MPEG + 0x14)
|
||||
|
||||
@@ -225,7 +228,7 @@
|
||||
#define VE_DEC_MPEG_IQMINPUT_FLAG_INTRA (0x01 << 14)
|
||||
#define VE_DEC_MPEG_IQMINPUT_FLAG_NON_INTRA (0x00 << 14)
|
||||
#define VE_DEC_MPEG_IQMINPUT_WEIGHT(i, v) \
|
||||
- (((v) & GENMASK(7, 0)) | (((i) << 8) & GENMASK(13, 8)))
|
||||
+ (SHIFT_AND_MASK_BITS(i, 13, 8) | SHIFT_AND_MASK_BITS(v, 7, 0))
|
||||
|
||||
#define VE_DEC_MPEG_ERROR (VE_ENGINE_DEC_MPEG + 0xc4)
|
||||
#define VE_DEC_MPEG_CRTMBADDR (VE_ENGINE_DEC_MPEG + 0xc8)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
From c3b32900fbf5178473c6b39260e891e19067edc2 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
||||
Date: Tue, 22 Oct 2019 12:26:51 -0300
|
||||
@ -4504,86 +4299,6 @@ index 6fc28d21a6c7..4275a307d282 100644
|
||||
--
|
||||
2.24.0
|
||||
|
||||
From 1d1d982e52956f07221d1229bcc6fbc564121da3 Mon Sep 17 00:00:00 2001
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Date: Sat, 26 Oct 2019 09:27:52 +0200
|
||||
Subject: [PATCH] media: cedrus: Use helpers to access capture queue
|
||||
|
||||
Accessing capture queue structue directly is not safe. Use helpers for
|
||||
that.
|
||||
|
||||
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
||||
---
|
||||
drivers/staging/media/sunxi/cedrus/cedrus.h | 8 ++++++--
|
||||
drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 8 ++++++--
|
||||
2 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus.h b/drivers/staging/media/sunxi/cedrus/cedrus.h
|
||||
index 986e059e3202..c45fb9a7ad07 100644
|
||||
--- a/drivers/staging/media/sunxi/cedrus/cedrus.h
|
||||
+++ b/drivers/staging/media/sunxi/cedrus/cedrus.h
|
||||
@@ -197,12 +197,16 @@ static inline dma_addr_t cedrus_buf_addr(struct vb2_buffer *buf,
|
||||
static inline dma_addr_t cedrus_dst_buf_addr(struct cedrus_ctx *ctx,
|
||||
int index, unsigned int plane)
|
||||
{
|
||||
- struct vb2_buffer *buf;
|
||||
+ struct vb2_buffer *buf = NULL;
|
||||
+ struct vb2_queue *vq;
|
||||
|
||||
if (index < 0)
|
||||
return 0;
|
||||
|
||||
- buf = ctx->fh.m2m_ctx->cap_q_ctx.q.bufs[index];
|
||||
+ vq = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE);
|
||||
+ if (vq)
|
||||
+ buf = vb2_get_buffer(vq, index);
|
||||
+
|
||||
return buf ? cedrus_buf_addr(buf, &ctx->dst_fmt, plane) : 0;
|
||||
}
|
||||
|
||||
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
|
||||
index db336449c4f2..7487f6ab7576 100644
|
||||
--- a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
|
||||
+++ b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c
|
||||
@@ -97,7 +97,7 @@ static void cedrus_write_frame_list(struct cedrus_ctx *ctx,
|
||||
const struct v4l2_ctrl_h264_decode_params *decode = run->h264.decode_params;
|
||||
const struct v4l2_ctrl_h264_slice_params *slice = run->h264.slice_params;
|
||||
const struct v4l2_ctrl_h264_sps *sps = run->h264.sps;
|
||||
- struct vb2_queue *cap_q = &ctx->fh.m2m_ctx->cap_q_ctx.q;
|
||||
+ struct vb2_queue *cap_q;
|
||||
struct cedrus_buffer *output_buf;
|
||||
struct cedrus_dev *dev = ctx->dev;
|
||||
unsigned long used_dpbs = 0;
|
||||
@@ -105,6 +105,8 @@ static void cedrus_write_frame_list(struct cedrus_ctx *ctx,
|
||||
unsigned int output = 0;
|
||||
unsigned int i;
|
||||
|
||||
+ cap_q = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE);
|
||||
+
|
||||
memset(pic_list, 0, sizeof(pic_list));
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(decode->dpb); i++) {
|
||||
@@ -168,12 +170,14 @@ static void _cedrus_write_ref_list(struct cedrus_ctx *ctx,
|
||||
enum cedrus_h264_sram_off sram)
|
||||
{
|
||||
const struct v4l2_ctrl_h264_decode_params *decode = run->h264.decode_params;
|
||||
- struct vb2_queue *cap_q = &ctx->fh.m2m_ctx->cap_q_ctx.q;
|
||||
+ struct vb2_queue *cap_q;
|
||||
struct cedrus_dev *dev = ctx->dev;
|
||||
u8 sram_array[CEDRUS_MAX_REF_IDX];
|
||||
unsigned int i;
|
||||
size_t size;
|
||||
|
||||
+ cap_q = v4l2_m2m_get_vq(ctx->fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE);
|
||||
+
|
||||
memset(sram_array, 0, sizeof(sram_array));
|
||||
|
||||
for (i = 0; i < num_ref; i++) {
|
||||
--
|
||||
2.24.0
|
||||
|
||||
From e2c02ba9bd0068b00628d7874d8a8d1eb5168177 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Tue, 29 Oct 2019 00:00:52 +0000
|
||||
|
Loading…
x
Reference in New Issue
Block a user