LinuxTV Patchwork media: tda1997: fix get-edid

login
register
mail settings
Submitter Tim Harvey
Date Feb. 5, 2019, 4:23 p.m.
Message ID <20190205162336.13490-1-tharvey@gateworks.com>
Download mbox | patch
Permalink /patch/54305/
State Accepted
Delegated to: Hans Verkuil
Headers show

Comments

Tim Harvey - Feb. 5, 2019, 4:23 p.m.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 drivers/media/i2c/tda1997x.c | 4 ++++
 1 file changed, 4 insertions(+)
Hans Verkuil - Feb. 15, 2019, 12:16 p.m.
Hi Tim,

On 2/5/19 5:23 PM, Tim Harvey wrote:

I merged this patch and added my own commit log message.

Just remember to provide it in the future...

Regards,

	Hans

> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
>  drivers/media/i2c/tda1997x.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
> index c4c2a6134e1e..73451e9bbc41 100644
> --- a/drivers/media/i2c/tda1997x.c
> +++ b/drivers/media/i2c/tda1997x.c
> @@ -1884,6 +1884,10 @@ static int tda1997x_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
>  	for (i = 0; i < 128; i++)
>  		io_write(sd, REG_EDID_IN_BYTE128 + i, edid->edid[i+128]);
>  
> +	/* store state */
> +	memcpy(state->edid.edid, edid->edid, 256);
> +	state->edid.blocks = edid->blocks;
> +
>  	tda1997x_enable_edid(sd);
>  
>  	return 0;
>

Patch

diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
index c4c2a6134e1e..73451e9bbc41 100644
--- a/drivers/media/i2c/tda1997x.c
+++ b/drivers/media/i2c/tda1997x.c
@@ -1884,6 +1884,10 @@  static int tda1997x_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
 	for (i = 0; i < 128; i++)
 		io_write(sd, REG_EDID_IN_BYTE128 + i, edid->edid[i+128]);
 
+	/* store state */
+	memcpy(state->edid.edid, edid->edid, 256);
+	state->edid.blocks = edid->blocks;
+
 	tda1997x_enable_edid(sd);
 
 	return 0;

Privacy Policy