mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
linux (Rockchip): drop and rebase upstreamed patches
This commit is contained in:
parent
a045445536
commit
4f64175a14
@ -128,39 +128,6 @@ index 5622f4c77252..943838d17f54 100644
|
||||
return 0;
|
||||
}
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 21:54:35 +0000
|
||||
Subject: [PATCH] media: rkvdec: h264: Fix bit depth wrap in pps packet
|
||||
|
||||
The luma and chroma bit depth fields in the pps packet is 3 bits wide.
|
||||
8 is wrongly added to the bit depth value written to these 3-bit fields.
|
||||
Because only the 3 LSB is written the hardware is configured correctly.
|
||||
|
||||
Correct this by not adding 8 to the luma and chroma bit depth value.
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
|
||||
---
|
||||
drivers/staging/media/rkvdec/rkvdec-h264.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
index cbaecdcd3def..bf632d45282b 100644
|
||||
--- a/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
+++ b/drivers/staging/media/rkvdec/rkvdec-h264.c
|
||||
@@ -661,8 +661,8 @@ static void assemble_hw_pps(struct rkvdec_ctx *ctx,
|
||||
WRITE_PPS(0xff, PROFILE_IDC);
|
||||
WRITE_PPS(1, CONSTRAINT_SET3_FLAG);
|
||||
WRITE_PPS(sps->chroma_format_idc, CHROMA_FORMAT_IDC);
|
||||
- WRITE_PPS(sps->bit_depth_luma_minus8 + 8, BIT_DEPTH_LUMA);
|
||||
- WRITE_PPS(sps->bit_depth_chroma_minus8 + 8, BIT_DEPTH_CHROMA);
|
||||
+ WRITE_PPS(sps->bit_depth_luma_minus8, BIT_DEPTH_LUMA);
|
||||
+ WRITE_PPS(sps->bit_depth_chroma_minus8, BIT_DEPTH_CHROMA);
|
||||
WRITE_PPS(0, QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG);
|
||||
WRITE_PPS(sps->log2_max_frame_num_minus4, LOG2_MAX_FRAME_NUM_MINUS4);
|
||||
WRITE_PPS(sps->max_num_ref_frames, MAX_NUM_REF_FRAMES);
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Mon, 6 Jul 2020 21:54:35 +0000
|
||||
|
@ -101,7 +101,7 @@ index c115cd362a7f..d9a2fd9386e2 100644
|
||||
@@ -763,19 +767,7 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,
|
||||
for (j = 0; j < RKVDEC_NUM_REFLIST; j++) {
|
||||
for (i = 0; i < h264_ctx->reflists.num_valid; i++) {
|
||||
u8 dpb_valid = 0;
|
||||
bool dpb_valid = run->ref_buf_idx[i] >= 0;
|
||||
- u8 idx = 0;
|
||||
-
|
||||
- switch (j) {
|
||||
@ -143,28 +143,24 @@ index d9a2fd9386e2..d4f27ef7addd 100644
|
||||
u16 *p = (u16 *)hw_rps;
|
||||
|
||||
memset(hw_rps, 0, sizeof(priv_tbl->rps));
|
||||
@@ -764,18 +764,71 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,
|
||||
@@ -764,16 +764,69 @@ static void assemble_hw_rps(struct rkvdec_ctx *ctx,
|
||||
p[i] = dpb[i].frame_num - max_frame_num;
|
||||
}
|
||||
|
||||
- for (j = 0; j < RKVDEC_NUM_REFLIST; j++) {
|
||||
- for (i = 0; i < h264_ctx->reflists.num_valid; i++) {
|
||||
- u8 dpb_valid = 0;
|
||||
- bool dpb_valid = run->ref_buf_idx[i] >= 0;
|
||||
- u8 idx = reflists[j][i];
|
||||
+ if (!(dec_params->flags & V4L2_H264_DECODE_PARAM_FLAG_FIELD_PIC)) {
|
||||
+ for (j = 0; j < RKVDEC_NUM_REFLIST; j++) {
|
||||
+ for (i = 0; i < h264_ctx->reflists.num_valid; i++) {
|
||||
+ u8 dpb_valid = 0;
|
||||
+ bool dpb_valid = run->ref_buf_idx[i] >= 0;
|
||||
+ u8 idx = reflists[j][i];
|
||||
|
||||
- if (idx >= ARRAY_SIZE(dec_params->dpb))
|
||||
- continue;
|
||||
- dpb_valid = !!(dpb[idx].flags &
|
||||
- V4L2_H264_DPB_ENTRY_FLAG_ACTIVE);
|
||||
+ if (idx >= ARRAY_SIZE(dec_params->dpb))
|
||||
+ continue;
|
||||
+ dpb_valid = !!(dpb[idx].flags &
|
||||
+ V4L2_H264_DPB_ENTRY_FLAG_ACTIVE);
|
||||
|
||||
- set_ps_field(hw_rps, DPB_INFO(i, j),
|
||||
- idx | dpb_valid << 4);
|
||||
|
@ -3429,10 +3429,10 @@ index 957a0eb23241..5a8714ef46b5 100644
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, of_rkvdec_match);
|
||||
@@ -1256,6 +1293,7 @@ static int rkvdec_probe(struct platform_device *pdev)
|
||||
@@ -1256,6 +1293,7 @@
|
||||
static int rkvdec_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct rkvdec_dev *rkvdec;
|
||||
struct resource *res;
|
||||
+ const struct rkvdec_variant *variant;
|
||||
unsigned int i;
|
||||
int ret, irq;
|
||||
|
Loading…
x
Reference in New Issue
Block a user