Skip to content

Commit d384034

Browse files
jc-kynesimpelwell
authored andcommitted
hevc_d: Pick the fixes from the latest upstreaming reviews
Does NOT include the clock and IRQ changes. Signed-off-by: John Cox <jc@kynesim.co.uk>
1 parent b54d5f9 commit d384034

7 files changed

Lines changed: 172 additions & 196 deletions

File tree

drivers/media/platform/raspberrypi/hevc_dec/hevc_d.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
* Copyright (C) 2018 Bootlin
1212
*/
1313

14+
#include <linux/dma-mapping.h>
1415
#include <linux/platform_device.h>
1516
#include <linux/module.h>
16-
#include <linux/of.h>
1717

1818
#include <media/v4l2-device.h>
1919
#include <media/v4l2-ioctl.h>
@@ -208,15 +208,15 @@ static int hevc_d_probe(struct platform_device *pdev)
208208

209209
ret = hevc_d_hw_probe(dev);
210210
if (ret) {
211-
dev_err(&pdev->dev, "Failed to probe hardware - %d\n", ret);
211+
dev_err_probe(&pdev->dev, ret, "Failed to probe hardware\n");
212212
return ret;
213213
}
214214

215215
mutex_init(&dev->dev_mutex);
216216

217217
ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
218218
if (ret) {
219-
dev_err(&pdev->dev, "Failed to register V4L2 device\n");
219+
dev_err_probe(&pdev->dev, ret, "Failed to register V4L2 device\n");
220220
return ret;
221221
}
222222

@@ -318,7 +318,7 @@ static struct platform_driver hevc_d_driver = {
318318
.remove = hevc_d_remove,
319319
.driver = {
320320
.name = HEVC_D_NAME,
321-
.of_match_table = of_match_ptr(hevc_d_dt_match),
321+
.of_match_table = hevc_d_dt_match,
322322
},
323323
};
324324
module_platform_driver(hevc_d_driver);

drivers/media/platform/raspberrypi/hevc_dec/hevc_d.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,17 @@ struct hevc_d_ctx {
134134
struct hevc_d_hwbuf pu_bufs[HEVC_D_P2BUF_COUNT];
135135
struct hevc_d_hwbuf coeff_bufs[HEVC_D_P2BUF_COUNT];
136136

137-
/* Spinlock protecting aux_free */
138-
spinlock_t aux_lock;
137+
/* Aux structures only used in setup so no locking needed */
139138
struct hevc_d_q_aux *aux_free;
140-
141139
struct hevc_d_q_aux *aux_ents[HEVC_D_AUX_ENT_COUNT];
142140

141+
struct hevc_d_slot {
142+
u32 refybase;
143+
u32 refcbase;
144+
u32 colbase;
145+
u32 poc;
146+
} slots[HEVC_D_AUX_ENT_COUNT];
147+
143148
unsigned int colmv_stride;
144149
unsigned int colmv_picsize;
145150
};

0 commit comments

Comments
 (0)