* [PATCH v5 0/4] Lager/Koelsch board HDMI input support
@ 2016-07-06 15:39 Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 1/4] media: adv7604: automatic "default-input" selection Ulrich Hecht
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Ulrich Hecht @ 2016-07-06 15:39 UTC (permalink / raw)
To: hans.verkuil
Cc: niklas.soderlund, linux-media, linux-renesas-soc, magnus.damm,
laurent.pinchart, william.towle, Ulrich Hecht
Hi!
Sorry for the delay. This revision drops all patches that have since been
picked up. It amends the default input selection to fall back to input 0 if
nothing else is specified, and it replaces the hard-coded EDID blob with an
implementation of G_EDID and S_EDID in rcar-vin.
CU
Uli
Changes since v4:
- drop merged patches
- adv7604: always fall back to input 0 if nothing else is specified
- rcar-vin: implement G_EDID, S_EDID in place of hard-coded EDID blob
Changes since v3:
- rvin_enum_dv_timings(): use vin->src_pad_idx
- rvin_dv_timings_cap(): likewise
- rvin_s_dv_timings(): update vin->format
- add Koelsch support
Changes since v2:
- rebased on top of rcar-vin driver v4
- removed "adv7604: fix SPA register location for ADV7612" (picked up)
- changed prefix of dts patch to "ARM: dts: lager: "
Hans Verkuil (1):
ARM: dts: koelsch: add HDMI input
Ulrich Hecht (2):
media: adv7604: automatic "default-input" selection
rcar-vin: implement EDID control ioctls
William Towle (1):
ARM: dts: lager: Add entries for VIN HDMI input support
arch/arm/boot/dts/r8a7790-lager.dts | 41 ++++++++++++++++++++++++++++-
arch/arm/boot/dts/r8a7791-koelsch.dts | 41 +++++++++++++++++++++++++++++
drivers/media/i2c/adv7604.c | 5 +++-
drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 ++++++++++++
4 files changed, 102 insertions(+), 2 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v5 1/4] media: adv7604: automatic "default-input" selection
2016-07-06 15:39 [PATCH v5 0/4] Lager/Koelsch board HDMI input support Ulrich Hecht
@ 2016-07-06 15:39 ` Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 2/4] ARM: dts: lager: Add entries for VIN HDMI input support Ulrich Hecht
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Ulrich Hecht @ 2016-07-06 15:39 UTC (permalink / raw)
To: hans.verkuil
Cc: niklas.soderlund, linux-media, linux-renesas-soc, magnus.damm,
laurent.pinchart, william.towle, Ulrich Hecht
Fall back to input 0 if "default-input" property is not present.
Additionally, documentation in commit bf9c82278c34 ("[media]
media: adv7604: ability to read default input port from DT") states
that the "default-input" property should reside directly in the node
for adv7612. Hence, also adjust the parsing to make the implementation
consistent with this.
Based on patch by William Towle <william.towle@codethink.co.uk>.
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
drivers/media/i2c/adv7604.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 3f1ab49..2e8f036 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2830,10 +2830,13 @@ static int adv76xx_parse_dt(struct adv76xx_state *state)
if (!of_property_read_u32(endpoint, "default-input", &v))
state->pdata.default_input = v;
else
- state->pdata.default_input = -1;
+ state->pdata.default_input = 0;
of_node_put(endpoint);
+ if (!of_property_read_u32(np, "default-input", &v))
+ state->pdata.default_input = v;
+
flags = bus_cfg.bus.parallel.flags;
if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v5 2/4] ARM: dts: lager: Add entries for VIN HDMI input support
2016-07-06 15:39 [PATCH v5 0/4] Lager/Koelsch board HDMI input support Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 1/4] media: adv7604: automatic "default-input" selection Ulrich Hecht
@ 2016-07-06 15:39 ` Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 3/4] ARM: dts: koelsch: add HDMI input Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 4/4] rcar-vin: implement EDID control ioctls Ulrich Hecht
3 siblings, 0 replies; 11+ messages in thread
From: Ulrich Hecht @ 2016-07-06 15:39 UTC (permalink / raw)
To: hans.verkuil
Cc: niklas.soderlund, linux-media, linux-renesas-soc, magnus.damm,
laurent.pinchart, william.towle, Rob Taylor, Ulrich Hecht
From: William Towle <william.towle@codethink.co.uk>
Add DT entries for vin0, vin0_pins, and adv7612.
Sets the 'default-input' property for ADV7612, enabling image and video
capture without the need to have userspace specifying routing.
Signed-off-by: William Towle <william.towle@codethink.co.uk>
Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk>
[uli: added interrupt, renamed endpoint, merged default-input]
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
arch/arm/boot/dts/r8a7790-lager.dts | 41 ++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 5e43763..263c7b9 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -427,7 +427,12 @@
function = "usb2";
};
- vin1_pins: vin1 {
+ vin0_pins: vin0 {
+ groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
+ function = "vin0";
+ };
+
+ vin1_pins: vin {
groups = "vin1_data8", "vin1_clk";
function = "vin1";
};
@@ -608,6 +613,21 @@
reg = <0x12>;
};
+ hdmi-in@4c {
+ compatible = "adi,adv7612";
+ reg = <0x4c>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+ remote = <&vin0>;
+ default-input = <0>;
+
+ port {
+ adv7612: endpoint {
+ remote-endpoint = <&vin0ep0>;
+ };
+ };
+ };
+
composite-in@20 {
compatible = "adi,adv7180";
reg = <0x20>;
@@ -723,6 +743,25 @@
status = "okay";
};
+/* HDMI video input */
+&vin0 {
+ pinctrl-0 = <&vin0_pins>;
+ pinctrl-names = "default";
+
+ status = "ok";
+
+ port {
+ vin0ep0: endpoint {
+ remote-endpoint = <&adv7612>;
+ bus-width = <24>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ pclk-sample = <1>;
+ data-active = <1>;
+ };
+ };
+};
+
/* composite video input */
&vin1 {
pinctrl-0 = <&vin1_pins>;
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v5 3/4] ARM: dts: koelsch: add HDMI input
2016-07-06 15:39 [PATCH v5 0/4] Lager/Koelsch board HDMI input support Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 1/4] media: adv7604: automatic "default-input" selection Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 2/4] ARM: dts: lager: Add entries for VIN HDMI input support Ulrich Hecht
@ 2016-07-06 15:39 ` Ulrich Hecht
2016-07-09 17:46 ` Geert Uytterhoeven
2016-07-06 15:39 ` [PATCH v5 4/4] rcar-vin: implement EDID control ioctls Ulrich Hecht
3 siblings, 1 reply; 11+ messages in thread
From: Ulrich Hecht @ 2016-07-06 15:39 UTC (permalink / raw)
To: hans.verkuil
Cc: niklas.soderlund, linux-media, linux-renesas-soc, magnus.damm,
laurent.pinchart, william.towle, Hans Verkuil, Ulrich Hecht
From: Hans Verkuil <hverkuil@xs4all.nl>
Add support in the dts for the HDMI input. Based on the Lager dts
patch from Ultich Hecht.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[uli: removed "renesas," prefixes from pfc nodes]
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
arch/arm/boot/dts/r8a7791-koelsch.dts | 41 +++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
index f8a7d09..097322a 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -393,6 +393,11 @@
function = "usb1";
};
+ vin0_pins: vin0 {
+ groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
+ function = "vin0";
+ };
+
vin1_pins: vin1 {
groups = "vin1_data8", "vin1_clk";
function = "vin1";
@@ -551,6 +556,21 @@
reg = <0x12>;
};
+ hdmi-in@4c {
+ compatible = "adi,adv7612";
+ reg = <0x4c>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+ remote = <&vin0>;
+ default-input = <0>;
+
+ port {
+ adv7612: endpoint {
+ remote-endpoint = <&vin0ep>;
+ };
+ };
+ };
+
composite-in@20 {
compatible = "adi,adv7180";
reg = <0x20>;
@@ -672,6 +692,27 @@
cpu0-supply = <&vdd_dvfs>;
};
+/* HDMI video input */
+&vin0 {
+ status = "okay";
+ pinctrl-0 = <&vin0_pins>;
+ pinctrl-names = "default";
+
+ port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vin0ep: endpoint {
+ remote-endpoint = <&adv7612>;
+ bus-width = <24>;
+ hsync-active = <0>;
+ vsync-active = <0>;
+ pclk-sample = <1>;
+ data-active = <1>;
+ };
+ };
+};
+
/* composite video input */
&vin1 {
status = "okay";
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v5 4/4] rcar-vin: implement EDID control ioctls
2016-07-06 15:39 [PATCH v5 0/4] Lager/Koelsch board HDMI input support Ulrich Hecht
` (2 preceding siblings ...)
2016-07-06 15:39 ` [PATCH v5 3/4] ARM: dts: koelsch: add HDMI input Ulrich Hecht
@ 2016-07-06 15:39 ` Ulrich Hecht
2016-07-06 16:54 ` kbuild test robot
2016-07-07 0:16 ` Niklas Söderlund
3 siblings, 2 replies; 11+ messages in thread
From: Ulrich Hecht @ 2016-07-06 15:39 UTC (permalink / raw)
To: hans.verkuil
Cc: niklas.soderlund, linux-media, linux-renesas-soc, magnus.damm,
laurent.pinchart, william.towle, Ulrich Hecht
Adds G_EDID and S_EDID.
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
index 396eabc..bd8f14c 100644
--- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
+++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
@@ -661,6 +661,20 @@ static int rvin_dv_timings_cap(struct file *file, void *priv_fh,
return ret;
}
+static int rvin_g_edid(struct file *file, void *fh, struct v4l2_edid *edid)
+{
+ struct rvin_dev *vin = video_drvdata(file);
+
+ return rvin_subdev_call(vin, pad, get_edid, edid);
+}
+
+static int rvin_s_edid(struct file *file, void *fh, struct v4l2_edid *edid)
+{
+ struct rvin_dev *vin = video_drvdata(file);
+
+ return rvin_subdev_call(vin, pad, set_edid, edid);
+}
+
static const struct v4l2_ioctl_ops rvin_ioctl_ops = {
.vidioc_querycap = rvin_querycap,
.vidioc_try_fmt_vid_cap = rvin_try_fmt_vid_cap,
@@ -683,6 +697,9 @@ static const struct v4l2_ioctl_ops rvin_ioctl_ops = {
.vidioc_s_dv_timings = rvin_s_dv_timings,
.vidioc_query_dv_timings = rvin_query_dv_timings,
+ .vidioc_g_edid = rvin_g_edid,
+ .vidioc_s_edid = rvin_s_edid,
+
.vidioc_querystd = rvin_querystd,
.vidioc_g_std = rvin_g_std,
.vidioc_s_std = rvin_s_std,
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v5 4/4] rcar-vin: implement EDID control ioctls
2016-07-06 15:39 ` [PATCH v5 4/4] rcar-vin: implement EDID control ioctls Ulrich Hecht
@ 2016-07-06 16:54 ` kbuild test robot
2016-07-07 0:16 ` Niklas Söderlund
1 sibling, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2016-07-06 16:54 UTC (permalink / raw)
To: Ulrich Hecht
Cc: kbuild-all, hans.verkuil, niklas.soderlund, linux-media,
linux-renesas-soc, magnus.damm, laurent.pinchart, william.towle,
Ulrich Hecht
[-- Attachment #1: Type: text/plain, Size: 3160 bytes --]
Hi,
[auto build test ERROR on next-20160706]
[cannot apply to linuxtv-media/master renesas/next v4.7-rc6 v4.7-rc5 v4.7-rc4 v4.7-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ulrich-Hecht/media-adv7604-automatic-default-input-selection/20160706-234332
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (new ones prefixed by >>):
drivers/media/platform/rcar-vin/rcar-v4l2.c: In function 'rvin_g_edid':
>> drivers/media/platform/rcar-vin/rcar-v4l2.c:561:9: error: implicit declaration of function 'rvin_subdev_call' [-Werror=implicit-function-declaration]
return rvin_subdev_call(vin, pad, get_edid, edid);
^~~~~~~~~~~~~~~~
>> drivers/media/platform/rcar-vin/rcar-v4l2.c:561:31: error: 'pad' undeclared (first use in this function)
return rvin_subdev_call(vin, pad, get_edid, edid);
^~~
drivers/media/platform/rcar-vin/rcar-v4l2.c:561:31: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/media/platform/rcar-vin/rcar-v4l2.c:561:36: error: 'get_edid' undeclared (first use in this function)
return rvin_subdev_call(vin, pad, get_edid, edid);
^~~~~~~~
drivers/media/platform/rcar-vin/rcar-v4l2.c: In function 'rvin_s_edid':
drivers/media/platform/rcar-vin/rcar-v4l2.c:568:31: error: 'pad' undeclared (first use in this function)
return rvin_subdev_call(vin, pad, set_edid, edid);
^~~
>> drivers/media/platform/rcar-vin/rcar-v4l2.c:568:36: error: 'set_edid' undeclared (first use in this function)
return rvin_subdev_call(vin, pad, set_edid, edid);
^~~~~~~~
>> drivers/media/platform/rcar-vin/rcar-v4l2.c:569:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
drivers/media/platform/rcar-vin/rcar-v4l2.c: In function 'rvin_g_edid':
drivers/media/platform/rcar-vin/rcar-v4l2.c:562:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +/rvin_subdev_call +561 drivers/media/platform/rcar-vin/rcar-v4l2.c
555 }
556
557 static int rvin_g_edid(struct file *file, void *fh, struct v4l2_edid *edid)
558 {
559 struct rvin_dev *vin = video_drvdata(file);
560
> 561 return rvin_subdev_call(vin, pad, get_edid, edid);
562 }
563
564 static int rvin_s_edid(struct file *file, void *fh, struct v4l2_edid *edid)
565 {
566 struct rvin_dev *vin = video_drvdata(file);
567
> 568 return rvin_subdev_call(vin, pad, set_edid, edid);
> 569 }
570
571 static const struct v4l2_ioctl_ops rvin_ioctl_ops = {
572 .vidioc_querycap = rvin_querycap,
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 55571 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v5 4/4] rcar-vin: implement EDID control ioctls
2016-07-06 15:39 ` [PATCH v5 4/4] rcar-vin: implement EDID control ioctls Ulrich Hecht
@ 2016-07-07 0:16 ` Niklas Söderlund
2016-07-07 0:16 ` Niklas Söderlund
1 sibling, 0 replies; 11+ messages in thread
From: Niklas Söderlund @ 2016-07-07 0:16 UTC (permalink / raw)
To: Ulrich Hecht
Cc: hans.verkuil, linux-media, linux-renesas-soc, magnus.damm,
laurent.pinchart, william.towle
Hi Ulrich,
Thanks for your patch.
On 2016-07-06 17:39:36 +0200, Ulrich Hecht wrote:
> Adds G_EDID and S_EDID.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
> drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> index 396eabc..bd8f14c 100644
> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> @@ -661,6 +661,20 @@ static int rvin_dv_timings_cap(struct file *file, void *priv_fh,
> return ret;
> }
>
> +static int rvin_g_edid(struct file *file, void *fh, struct v4l2_edid *edid)
> +{
> + struct rvin_dev *vin = video_drvdata(file);
> +
> + return rvin_subdev_call(vin, pad, get_edid, edid);
You need to add a translation from the rcar-vin drivers view of it's
current input to the subdevices view of how it's pads are arranged. I
think something like this would work:
struct rvin_dev *vin = video_drvdata(file);
unsigned int input;
int ret;
input = edid->pad;
edid->pad = vin->inputs[input].sink_idx;
ret = vin_subdev_call(vin, pad, get_edid, edid);
edid->pad = input;
return ret;
I know it's not obvious you need this and I can't figure out a better
way to solve runtime switching of subdevices. Any ideas on how to
improve the situation are more then welcome :-)
> +}
> +
> +static int rvin_s_edid(struct file *file, void *fh, struct v4l2_edid *edid)
> +{
> + struct rvin_dev *vin = video_drvdata(file);
> +
> + return rvin_subdev_call(vin, pad, set_edid, edid);
Same comment as above.
> +}
> +
> static const struct v4l2_ioctl_ops rvin_ioctl_ops = {
> .vidioc_querycap = rvin_querycap,
> .vidioc_try_fmt_vid_cap = rvin_try_fmt_vid_cap,
> @@ -683,6 +697,9 @@ static const struct v4l2_ioctl_ops rvin_ioctl_ops = {
> .vidioc_s_dv_timings = rvin_s_dv_timings,
> .vidioc_query_dv_timings = rvin_query_dv_timings,
>
> + .vidioc_g_edid = rvin_g_edid,
> + .vidioc_s_edid = rvin_s_edid,
> +
> .vidioc_querystd = rvin_querystd,
> .vidioc_g_std = rvin_g_std,
> .vidioc_s_std = rvin_s_std,
> --
> 2.7.4
>
--
Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v5 4/4] rcar-vin: implement EDID control ioctls
@ 2016-07-07 0:16 ` Niklas Söderlund
0 siblings, 0 replies; 11+ messages in thread
From: Niklas Söderlund @ 2016-07-07 0:16 UTC (permalink / raw)
To: Ulrich Hecht
Cc: hans.verkuil, linux-media, linux-renesas-soc, magnus.damm,
laurent.pinchart, william.towle
Hi Ulrich,
Thanks for your patch.
On 2016-07-06 17:39:36 +0200, Ulrich Hecht wrote:
> Adds G_EDID and S_EDID.
>
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
> drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> index 396eabc..bd8f14c 100644
> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
> @@ -661,6 +661,20 @@ static int rvin_dv_timings_cap(struct file *file, void *priv_fh,
> return ret;
> }
>
> +static int rvin_g_edid(struct file *file, void *fh, struct v4l2_edid *edid)
> +{
> + struct rvin_dev *vin = video_drvdata(file);
> +
> + return rvin_subdev_call(vin, pad, get_edid, edid);
You need to add a translation from the rcar-vin drivers view of it's
current input to the subdevices view of how it's pads are arranged. I
think something like this would work:
struct rvin_dev *vin = video_drvdata(file);
unsigned int input;
int ret;
input = edid->pad;
edid->pad = vin->inputs[input].sink_idx;
ret = vin_subdev_call(vin, pad, get_edid, edid);
edid->pad = input;
return ret;
I know it's not obvious you need this and I can't figure out a better
way to solve runtime switching of subdevices. Any ideas on how to
improve the situation are more then welcome :-)
> +}
> +
> +static int rvin_s_edid(struct file *file, void *fh, struct v4l2_edid *edid)
> +{
> + struct rvin_dev *vin = video_drvdata(file);
> +
> + return rvin_subdev_call(vin, pad, set_edid, edid);
Same comment as above.
> +}
> +
> static const struct v4l2_ioctl_ops rvin_ioctl_ops = {
> .vidioc_querycap = rvin_querycap,
> .vidioc_try_fmt_vid_cap = rvin_try_fmt_vid_cap,
> @@ -683,6 +697,9 @@ static const struct v4l2_ioctl_ops rvin_ioctl_ops = {
> .vidioc_s_dv_timings = rvin_s_dv_timings,
> .vidioc_query_dv_timings = rvin_query_dv_timings,
>
> + .vidioc_g_edid = rvin_g_edid,
> + .vidioc_s_edid = rvin_s_edid,
> +
> .vidioc_querystd = rvin_querystd,
> .vidioc_g_std = rvin_g_std,
> .vidioc_s_std = rvin_s_std,
> --
> 2.7.4
>
--
Regards,
Niklas S�derlund
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v5 4/4] rcar-vin: implement EDID control ioctls
2016-07-07 0:16 ` Niklas Söderlund
@ 2016-07-07 6:39 ` Hans Verkuil
-1 siblings, 0 replies; 11+ messages in thread
From: Hans Verkuil @ 2016-07-07 6:39 UTC (permalink / raw)
To: Niklas Söderlund, Ulrich Hecht
Cc: hans.verkuil, linux-media, linux-renesas-soc, magnus.damm,
laurent.pinchart, william.towle
On 07/07/2016 02:16 AM, Niklas Söderlund wrote:
> Hi Ulrich,
>
> Thanks for your patch.
>
> On 2016-07-06 17:39:36 +0200, Ulrich Hecht wrote:
>> Adds G_EDID and S_EDID.
>>
>> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
>> ---
>> drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 +++++++++++++++++
>> 1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
>> index 396eabc..bd8f14c 100644
>> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
>> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
>> @@ -661,6 +661,20 @@ static int rvin_dv_timings_cap(struct file *file, void *priv_fh,
>> return ret;
>> }
>>
>> +static int rvin_g_edid(struct file *file, void *fh, struct v4l2_edid *edid)
>> +{
>> + struct rvin_dev *vin = video_drvdata(file);
>> +
>> + return rvin_subdev_call(vin, pad, get_edid, edid);
>
> You need to add a translation from the rcar-vin drivers view of it's
> current input to the subdevices view of how it's pads are arranged. I
> think something like this would work:
>
> struct rvin_dev *vin = video_drvdata(file);
> unsigned int input;
> int ret;
>
> input = edid->pad;
>
> edid->pad = vin->inputs[input].sink_idx;
>
> ret = vin_subdev_call(vin, pad, get_edid, edid);
>
> edid->pad = input;
>
> return ret;
>
> I know it's not obvious you need this and I can't figure out a better
> way to solve runtime switching of subdevices. Any ideas on how to
> improve the situation are more then welcome :-)
I agree it is ugly, but it isn't used often enough to warrant the extra
work. I am thinking that the pad should be an extra argument in the subdev
op instead of using edid->pad. That should simplify the code.
Regards,
Hans
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v5 4/4] rcar-vin: implement EDID control ioctls
@ 2016-07-07 6:39 ` Hans Verkuil
0 siblings, 0 replies; 11+ messages in thread
From: Hans Verkuil @ 2016-07-07 6:39 UTC (permalink / raw)
To: Niklas Söderlund, Ulrich Hecht
Cc: hans.verkuil, linux-media, linux-renesas-soc, magnus.damm,
laurent.pinchart, william.towle
On 07/07/2016 02:16 AM, Niklas S�derlund wrote:
> Hi Ulrich,
>
> Thanks for your patch.
>
> On 2016-07-06 17:39:36 +0200, Ulrich Hecht wrote:
>> Adds G_EDID and S_EDID.
>>
>> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
>> ---
>> drivers/media/platform/rcar-vin/rcar-v4l2.c | 17 +++++++++++++++++
>> 1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
>> index 396eabc..bd8f14c 100644
>> --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
>> +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
>> @@ -661,6 +661,20 @@ static int rvin_dv_timings_cap(struct file *file, void *priv_fh,
>> return ret;
>> }
>>
>> +static int rvin_g_edid(struct file *file, void *fh, struct v4l2_edid *edid)
>> +{
>> + struct rvin_dev *vin = video_drvdata(file);
>> +
>> + return rvin_subdev_call(vin, pad, get_edid, edid);
>
> You need to add a translation from the rcar-vin drivers view of it's
> current input to the subdevices view of how it's pads are arranged. I
> think something like this would work:
>
> struct rvin_dev *vin = video_drvdata(file);
> unsigned int input;
> int ret;
>
> input = edid->pad;
>
> edid->pad = vin->inputs[input].sink_idx;
>
> ret = vin_subdev_call(vin, pad, get_edid, edid);
>
> edid->pad = input;
>
> return ret;
>
> I know it's not obvious you need this and I can't figure out a better
> way to solve runtime switching of subdevices. Any ideas on how to
> improve the situation are more then welcome :-)
I agree it is ugly, but it isn't used often enough to warrant the extra
work. I am thinking that the pad should be an extra argument in the subdev
op instead of using edid->pad. That should simplify the code.
Regards,
Hans
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v5 3/4] ARM: dts: koelsch: add HDMI input
2016-07-06 15:39 ` [PATCH v5 3/4] ARM: dts: koelsch: add HDMI input Ulrich Hecht
@ 2016-07-09 17:46 ` Geert Uytterhoeven
0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2016-07-09 17:46 UTC (permalink / raw)
To: Ulrich Hecht
Cc: Hans Verkuil, Niklas Söderlund, Linux Media Mailing List,
Linux-Renesas, Magnus Damm, Laurent Pinchart, William Towle,
Hans Verkuil
On Wed, Jul 6, 2016 at 5:39 PM, Ulrich Hecht
<ulrich.hecht+renesas@gmail.com> wrote:
> From: Hans Verkuil <hverkuil@xs4all.nl>
>
> Add support in the dts for the HDMI input. Based on the Lager dts
> patch from Ultich Hecht.
I assume he's the third son in the Hecht family? ;-)
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> [uli: removed "renesas," prefixes from pfc nodes]
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-07-09 17:46 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-06 15:39 [PATCH v5 0/4] Lager/Koelsch board HDMI input support Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 1/4] media: adv7604: automatic "default-input" selection Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 2/4] ARM: dts: lager: Add entries for VIN HDMI input support Ulrich Hecht
2016-07-06 15:39 ` [PATCH v5 3/4] ARM: dts: koelsch: add HDMI input Ulrich Hecht
2016-07-09 17:46 ` Geert Uytterhoeven
2016-07-06 15:39 ` [PATCH v5 4/4] rcar-vin: implement EDID control ioctls Ulrich Hecht
2016-07-06 16:54 ` kbuild test robot
2016-07-07 0:16 ` Niklas Söderlund
2016-07-07 0:16 ` Niklas Söderlund
2016-07-07 6:39 ` Hans Verkuil
2016-07-07 6:39 ` Hans Verkuil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.