Skip to content

Commit 691e1ee

Browse files
committed
Merge tag 'media/v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab: - fix some unused-variable warning in mtk-mdp3 - ignore unused suspend operations in nxp - some driver fixes in rcar-vin * tag 'media/v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: platform: mtk-mdp3: work around unused-variable warning media: nxp: ignore unused suspend operations media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE media: rcar-vin: Fix NV12 size alignment media: rcar-vin: Gen3 can not scale NV12
2 parents 80e62bc + ae3c253 commit 691e1ee

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

drivers/media/platform/mediatek/mdp3/mtk-mdp3-comp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,6 @@ static int mdp_comp_sub_create(struct mdp_dev *mdp)
10351035
{
10361036
struct device *dev = &mdp->pdev->dev;
10371037
struct device_node *node, *parent;
1038-
const struct mtk_mdp_driver_data *data = mdp->mdp_data;
10391038

10401039
parent = dev->of_node->parent;
10411040

@@ -1045,7 +1044,7 @@ static int mdp_comp_sub_create(struct mdp_dev *mdp)
10451044
int id, alias_id;
10461045
struct mdp_comp *comp;
10471046

1048-
of_id = of_match_node(data->mdp_sub_comp_dt_ids, node);
1047+
of_id = of_match_node(mdp->mdp_data->mdp_sub_comp_dt_ids, node);
10491048
if (!of_id)
10501049
continue;
10511050
if (!of_device_is_available(node)) {

drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ static int mxc_isi_runtime_resume(struct device *dev)
378378
}
379379

380380
static const struct dev_pm_ops mxc_isi_pm_ops = {
381-
SET_SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume)
382-
SET_RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL)
381+
SYSTEM_SLEEP_PM_OPS(mxc_isi_pm_suspend, mxc_isi_pm_resume)
382+
RUNTIME_PM_OPS(mxc_isi_runtime_suspend, mxc_isi_runtime_resume, NULL)
383383
};
384384

385385
/* -----------------------------------------------------------------------------
@@ -528,7 +528,7 @@ static struct platform_driver mxc_isi_driver = {
528528
.driver = {
529529
.of_match_table = mxc_isi_of_match,
530530
.name = MXC_ISI_DRIVER_NAME,
531-
.pm = &mxc_isi_pm_ops,
531+
.pm = pm_ptr(&mxc_isi_pm_ops),
532532
}
533533
};
534534
module_platform_driver(mxc_isi_driver);

drivers/media/platform/renesas/rcar-vin/rcar-dma.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -728,11 +728,9 @@ static int rvin_setup(struct rvin_dev *vin)
728728
case V4L2_FIELD_SEQ_TB:
729729
case V4L2_FIELD_SEQ_BT:
730730
case V4L2_FIELD_NONE:
731-
vnmc = VNMC_IM_ODD_EVEN;
732-
progressive = true;
733-
break;
734731
case V4L2_FIELD_ALTERNATE:
735732
vnmc = VNMC_IM_ODD_EVEN;
733+
progressive = true;
736734
break;
737735
default:
738736
vnmc = VNMC_IM_ODD;
@@ -1312,12 +1310,23 @@ static int rvin_mc_validate_format(struct rvin_dev *vin, struct v4l2_subdev *sd,
13121310
}
13131311

13141312
if (rvin_scaler_needed(vin)) {
1313+
/* Gen3 can't scale NV12 */
1314+
if (vin->info->model == RCAR_GEN3 &&
1315+
vin->format.pixelformat == V4L2_PIX_FMT_NV12)
1316+
return -EPIPE;
1317+
13151318
if (!vin->scaler)
13161319
return -EPIPE;
13171320
} else {
1318-
if (fmt.format.width != vin->format.width ||
1319-
fmt.format.height != vin->format.height)
1320-
return -EPIPE;
1321+
if (vin->format.pixelformat == V4L2_PIX_FMT_NV12) {
1322+
if (ALIGN(fmt.format.width, 32) != vin->format.width ||
1323+
ALIGN(fmt.format.height, 32) != vin->format.height)
1324+
return -EPIPE;
1325+
} else {
1326+
if (fmt.format.width != vin->format.width ||
1327+
fmt.format.height != vin->format.height)
1328+
return -EPIPE;
1329+
}
13211330
}
13221331

13231332
if (fmt.format.code != vin->mbus_code)

0 commit comments

Comments
 (0)