Skip to content

Commit 9e0ee0c

Browse files
committed
Merge tag 'media/v6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab: - some warning fixes - verisilicon: an excessive usage of stack fix and changes at reg access - amphion: use dev_err_probe - pulse8-cec: handle possible ping error - imx-jpeg: Support to assign slot for encoder/decoder - amphion: Fix firmware path to match linux-firmware - pci: cx23885: fix error handling for cx23885 ATSC boards - staging: atomisp: select V4L2_FWNODE - mediatek: vcodec: fix cancel_work_sync fail with fluster test * tag 'media/v6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: verisilicon: change confusingly named relaxed register access media: verisilicon: fix excessive stack usage media: mediatek: vcodec: fix cancel_work_sync fail with fluster test media: pci: cx23885: fix error handling for cx23885 ATSC boards media: pulse8-cec: handle possible ping error media: mtk_jpeg_core: avoid unused-variable warning media: imx-jpeg: Support to assign slot for encoder/decoder media: amphion: Fix firmware path to match linux-firmware media: amphion: use dev_err_probe media: staging: atomisp: select V4L2_FWNODE media: tc358746: Address compiler warnings
2 parents 0a9266b + 0cb1d9c commit 9e0ee0c

File tree

15 files changed

+116
-137
lines changed

15 files changed

+116
-137
lines changed

drivers/media/cec/usb/pulse8/pulse8-cec.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,11 @@ static void pulse8_ping_eeprom_work_handler(struct work_struct *work)
809809

810810
mutex_lock(&pulse8->lock);
811811
cmd = MSGCODE_PING;
812-
pulse8_send_and_wait(pulse8, &cmd, 1,
813-
MSGCODE_COMMAND_ACCEPTED, 0);
812+
if (pulse8_send_and_wait(pulse8, &cmd, 1,
813+
MSGCODE_COMMAND_ACCEPTED, 0)) {
814+
dev_warn(pulse8->dev, "failed to ping EEPROM\n");
815+
goto unlock;
816+
}
814817

815818
if (pulse8->vers < 2)
816819
goto unlock;

drivers/media/i2c/tc358746.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,8 +813,8 @@ static unsigned long tc358746_find_pll_settings(struct tc358746 *tc358746,
813813
u32 min_delta = 0xffffffff;
814814
u16 prediv_max = 17;
815815
u16 prediv_min = 1;
816-
u16 m_best, mul;
817-
u16 p_best, p;
816+
u16 m_best = 0, mul;
817+
u16 p_best = 1, p;
818818
u8 postdiv;
819819

820820
if (fout > 1000 * HZ_PER_MHZ) {

drivers/media/pci/cx23885/cx23885-dvb.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,16 +2459,10 @@ static int dvb_register(struct cx23885_tsport *port)
24592459
request_module("%s", info.type);
24602460
client_tuner = i2c_new_client_device(&dev->i2c_bus[1].i2c_adap, &info);
24612461
if (!i2c_client_has_driver(client_tuner)) {
2462-
module_put(client_demod->dev.driver->owner);
2463-
i2c_unregister_device(client_demod);
2464-
port->i2c_client_demod = NULL;
24652462
goto frontend_detach;
24662463
}
24672464
if (!try_module_get(client_tuner->dev.driver->owner)) {
24682465
i2c_unregister_device(client_tuner);
2469-
module_put(client_demod->dev.driver->owner);
2470-
i2c_unregister_device(client_demod);
2471-
port->i2c_client_demod = NULL;
24722466
goto frontend_detach;
24732467
}
24742468
port->i2c_client_tuner = client_tuner;
@@ -2505,16 +2499,10 @@ static int dvb_register(struct cx23885_tsport *port)
25052499
request_module("%s", info.type);
25062500
client_tuner = i2c_new_client_device(&dev->i2c_bus[1].i2c_adap, &info);
25072501
if (!i2c_client_has_driver(client_tuner)) {
2508-
module_put(client_demod->dev.driver->owner);
2509-
i2c_unregister_device(client_demod);
2510-
port->i2c_client_demod = NULL;
25112502
goto frontend_detach;
25122503
}
25132504
if (!try_module_get(client_tuner->dev.driver->owner)) {
25142505
i2c_unregister_device(client_tuner);
2515-
module_put(client_demod->dev.driver->owner);
2516-
i2c_unregister_device(client_demod);
2517-
port->i2c_client_demod = NULL;
25182506
goto frontend_detach;
25192507
}
25202508
port->i2c_client_tuner = client_tuner;

drivers/media/platform/amphion/vpu_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ static const struct dev_pm_ops vpu_core_pm_ops = {
826826

827827
static struct vpu_core_resources imx8q_enc = {
828828
.type = VPU_CORE_TYPE_ENC,
829-
.fwname = "vpu/vpu_fw_imx8_enc.bin",
829+
.fwname = "amphion/vpu/vpu_fw_imx8_enc.bin",
830830
.stride = 16,
831831
.max_width = 1920,
832832
.max_height = 1920,
@@ -841,7 +841,7 @@ static struct vpu_core_resources imx8q_enc = {
841841

842842
static struct vpu_core_resources imx8q_dec = {
843843
.type = VPU_CORE_TYPE_DEC,
844-
.fwname = "vpu/vpu_fw_imx8_dec.bin",
844+
.fwname = "amphion/vpu/vpu_fw_imx8_dec.bin",
845845
.stride = 256,
846846
.max_width = 8188,
847847
.max_height = 8188,

drivers/media/platform/amphion/vpu_mbox.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ static int vpu_mbox_request_channel(struct device *dev, struct vpu_mbox *mbox)
4646
cl->rx_callback = vpu_mbox_rx_callback;
4747

4848
ch = mbox_request_channel_byname(cl, mbox->name);
49-
if (IS_ERR(ch)) {
50-
dev_err(dev, "Failed to request mbox chan %s, ret : %ld\n",
51-
mbox->name, PTR_ERR(ch));
52-
return PTR_ERR(ch);
53-
}
49+
if (IS_ERR(ch))
50+
return dev_err_probe(dev, PTR_ERR(ch),
51+
"Failed to request mbox chan %s\n",
52+
mbox->name);
5453

5554
mbox->ch = ch;
5655
return 0;

drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "mtk_jpeg_core.h"
2929
#include "mtk_jpeg_dec_parse.h"
3030

31-
#if defined(CONFIG_OF)
3231
static struct mtk_jpeg_fmt mtk_jpeg_enc_formats[] = {
3332
{
3433
.fourcc = V4L2_PIX_FMT_JPEG,
@@ -102,7 +101,6 @@ static struct mtk_jpeg_fmt mtk_jpeg_dec_formats[] = {
102101
.flags = MTK_JPEG_FMT_FLAG_CAPTURE,
103102
},
104103
};
105-
#endif
106104

107105
#define MTK_JPEG_ENC_NUM_FORMATS ARRAY_SIZE(mtk_jpeg_enc_formats)
108106
#define MTK_JPEG_DEC_NUM_FORMATS ARRAY_SIZE(mtk_jpeg_dec_formats)
@@ -1455,7 +1453,6 @@ static const struct dev_pm_ops mtk_jpeg_pm_ops = {
14551453
SET_RUNTIME_PM_OPS(mtk_jpeg_pm_suspend, mtk_jpeg_pm_resume, NULL)
14561454
};
14571455

1458-
#if defined(CONFIG_OF)
14591456
static int mtk_jpegenc_get_hw(struct mtk_jpeg_ctx *ctx)
14601457
{
14611458
struct mtk_jpegenc_comp_dev *comp_jpeg;
@@ -1951,14 +1948,13 @@ static const struct of_device_id mtk_jpeg_match[] = {
19511948
};
19521949

19531950
MODULE_DEVICE_TABLE(of, mtk_jpeg_match);
1954-
#endif
19551951

19561952
static struct platform_driver mtk_jpeg_driver = {
19571953
.probe = mtk_jpeg_probe,
19581954
.remove_new = mtk_jpeg_remove,
19591955
.driver = {
19601956
.name = MTK_JPEG_NAME,
1961-
.of_match_table = of_match_ptr(mtk_jpeg_match),
1957+
.of_match_table = mtk_jpeg_match,
19621958
.pm = &mtk_jpeg_pm_ops,
19631959
},
19641960
};

drivers/media/platform/mediatek/jpeg/mtk_jpeg_dec_hw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,13 @@ enum mtk_jpeg_color {
3939
MTK_JPEG_COLOR_400 = 0x00110000
4040
};
4141

42-
#if defined(CONFIG_OF)
4342
static const struct of_device_id mtk_jpegdec_hw_ids[] = {
4443
{
4544
.compatible = "mediatek,mt8195-jpgdec-hw",
4645
},
4746
{},
4847
};
4948
MODULE_DEVICE_TABLE(of, mtk_jpegdec_hw_ids);
50-
#endif
5149

5250
static inline int mtk_jpeg_verify_align(u32 val, int align, u32 reg)
5351
{
@@ -653,7 +651,7 @@ static struct platform_driver mtk_jpegdec_hw_driver = {
653651
.probe = mtk_jpegdec_hw_probe,
654652
.driver = {
655653
.name = "mtk-jpegdec-hw",
656-
.of_match_table = of_match_ptr(mtk_jpegdec_hw_ids),
654+
.of_match_table = mtk_jpegdec_hw_ids,
657655
},
658656
};
659657

drivers/media/platform/mediatek/jpeg/mtk_jpeg_enc_hw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@ static const struct mtk_jpeg_enc_qlt mtk_jpeg_enc_quality[] = {
4646
{.quality_param = 97, .hardware_value = JPEG_ENC_QUALITY_Q97},
4747
};
4848

49-
#if defined(CONFIG_OF)
5049
static const struct of_device_id mtk_jpegenc_drv_ids[] = {
5150
{
5251
.compatible = "mediatek,mt8195-jpgenc-hw",
5352
},
5453
{},
5554
};
5655
MODULE_DEVICE_TABLE(of, mtk_jpegenc_drv_ids);
57-
#endif
5856

5957
void mtk_jpeg_enc_reset(void __iomem *base)
6058
{
@@ -377,7 +375,7 @@ static struct platform_driver mtk_jpegenc_hw_driver = {
377375
.probe = mtk_jpegenc_hw_probe,
378376
.driver = {
379377
.name = "mtk-jpegenc-hw",
380-
.of_match_table = of_match_ptr(mtk_jpegenc_drv_ids),
378+
.of_match_table = mtk_jpegenc_drv_ids,
381379
},
382380
};
383381

drivers/media/platform/mediatek/vcodec/vdec_msg_queue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ void vdec_msg_queue_deinit(struct vdec_msg_queue *msg_queue,
233233
kfree(lat_buf->private_data);
234234
}
235235

236-
cancel_work_sync(&msg_queue->core_work);
236+
if (msg_queue->wdma_addr.size)
237+
cancel_work_sync(&msg_queue->core_work);
237238
}
238239

239240
static void vdec_msg_queue_core_work(struct work_struct *work)

drivers/media/platform/nxp/imx-jpeg/mxc-jpeg-hw.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
#define CAST_OFBSIZE_LO CAST_STATUS18
5959
#define CAST_OFBSIZE_HI CAST_STATUS19
6060

61-
#define MXC_MAX_SLOTS 1 /* TODO use all 4 slots*/
6261
/* JPEG-Decoder Wrapper Slot Registers 0..3 */
6362
#define SLOT_BASE 0x10000
6463
#define SLOT_STATUS 0x0

0 commit comments

Comments
 (0)