mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
2e715fb4fc
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
71 lines
2.4 KiB
Diff
71 lines
2.4 KiB
Diff
From 0eeb351222adbc5b534c86f7815ee787babc3485 Mon Sep 17 00:00:00 2001
|
|
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
Date: Tue, 3 Oct 2023 14:34:43 +0300
|
|
Subject: [PATCH] media: rp1: fe: Use standard link_validate
|
|
|
|
The current pisp_fe_link_validate() skips some important checks. Let's
|
|
rather use the standard v4l2_subdev_link_validate_default() as the
|
|
link_validate hook.
|
|
|
|
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
|
|
---
|
|
.../platform/raspberrypi/rp1_cfe/pisp_fe.c | 36 +------------------
|
|
1 file changed, 1 insertion(+), 35 deletions(-)
|
|
|
|
--- a/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c
|
|
+++ b/drivers/media/platform/raspberrypi/rp1_cfe/pisp_fe.c
|
|
@@ -388,11 +388,6 @@ void pisp_fe_stop(struct pisp_fe_device
|
|
pisp_fe_reg_write(fe, FE_INT_STATUS, ~0);
|
|
}
|
|
|
|
-static struct pisp_fe_device *to_pisp_fe_device(struct v4l2_subdev *subdev)
|
|
-{
|
|
- return container_of(subdev, struct pisp_fe_device, sd);
|
|
-}
|
|
-
|
|
static int pisp_fe_init_cfg(struct v4l2_subdev *sd,
|
|
struct v4l2_subdev_state *state)
|
|
{
|
|
@@ -492,40 +487,11 @@ static int pisp_fe_pad_set_fmt(struct v4
|
|
}
|
|
}
|
|
|
|
-static int pisp_fe_link_validate(struct v4l2_subdev *sd,
|
|
- struct media_link *link,
|
|
- struct v4l2_subdev_format *source_fmt,
|
|
- struct v4l2_subdev_format *sink_fmt)
|
|
-{
|
|
- struct pisp_fe_device *fe = to_pisp_fe_device(sd);
|
|
-
|
|
- pisp_fe_dbg("%s: link \"%s\":%u -> \"%s\":%u\n", __func__,
|
|
- link->source->entity->name, link->source->index,
|
|
- link->sink->entity->name, link->sink->index);
|
|
-
|
|
- /* The width, height and code must match. */
|
|
- if (source_fmt->format.width != sink_fmt->format.width ||
|
|
- source_fmt->format.width != sink_fmt->format.width ||
|
|
- source_fmt->format.code != sink_fmt->format.code) {
|
|
- pisp_fe_err("%s: format does not match (source %ux%u 0x%x, sink %ux%u 0x%x)\n",
|
|
- __func__,
|
|
- source_fmt->format.width,
|
|
- source_fmt->format.height,
|
|
- source_fmt->format.code,
|
|
- sink_fmt->format.width,
|
|
- sink_fmt->format.height,
|
|
- sink_fmt->format.code);
|
|
- return -EPIPE;
|
|
- }
|
|
-
|
|
- return 0;
|
|
-}
|
|
-
|
|
static const struct v4l2_subdev_pad_ops pisp_fe_subdev_pad_ops = {
|
|
.init_cfg = pisp_fe_init_cfg,
|
|
.get_fmt = v4l2_subdev_get_fmt,
|
|
.set_fmt = pisp_fe_pad_set_fmt,
|
|
- .link_validate = pisp_fe_link_validate,
|
|
+ .link_validate = v4l2_subdev_link_validate_default,
|
|
};
|
|
|
|
static const struct media_entity_operations pisp_fe_entity_ops = {
|