diff mbox series

[1/2] Input: synaptics-rmi4 - fill initial format

Message ID 20180920133124.29099-1-p.zabel@pengutronix.de (mailing list archive)
State Mainlined
Commit 9f6da5d42d1ecf7fcc042058a453fe65864fadb0
Headers show
Series [1/2] Input: synaptics-rmi4 - fill initial format | expand

Commit Message

Philipp Zabel Sept. 20, 2018, 1:31 p.m. UTC
The driver doesn't set an initial video format until s_input is called:

  $ v4l2-ctl -d /dev/v4l-touch0 --get-input
  Video input : 0 (Normalized 16-Bit Image: ok)
  $ v4l2-ctl -d /dev/v4l-touch0 --get-fmt-video
  	Width/Height      : 0/0
  	Pixel Format      : ''
  	[...]
  $ v4l2-ctl -d /dev/v4l-touch0 --set-input 0
  Video input set to 0 (Normalized 16-Bit Image: Touch, ok)
  $ v4l2-ctl -d /dev/v4l-touch0 --get-fmt-video
  	Width/Height      : 71/40
  	Pixel Format      : 'TD16'
  	[...]

To fix this, initialize the video format to input 0 during probe.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/input/rmi4/rmi_f54.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Lucas Stach April 26, 2019, 8:51 a.m. UTC | #1
Hi Dmitry,

it seems this series hasn't been applied. Are there any objections to
it?

Regards,
Lucas

Am Donnerstag, den 20.09.2018, 15:31 +0200 schrieb Philipp Zabel:
> The driver doesn't set an initial video format until s_input is
> called:
> 
>   $ v4l2-ctl -d /dev/v4l-touch0 --get-input
>   Video input : 0 (Normalized 16-Bit Image: ok)
>   $ v4l2-ctl -d /dev/v4l-touch0 --get-fmt-video
>   	Width/Height      : 0/0
>   	Pixel Format      : ''
>   	[...]
>   $ v4l2-ctl -d /dev/v4l-touch0 --set-input 0
>   Video input set to 0 (Normalized 16-Bit Image: Touch, ok)
>   $ v4l2-ctl -d /dev/v4l-touch0 --get-fmt-video
>   	Width/Height      : 71/40
>   	Pixel Format      : 'TD16'
>   	[...]
> 
> To fix this, initialize the video format to input 0 during probe.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
>  drivers/input/rmi4/rmi_f54.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/rmi4/rmi_f54.c
> b/drivers/input/rmi4/rmi_f54.c
> index a6f515bcab22..9ccf7ee0fc67 100644
> --- a/drivers/input/rmi4/rmi_f54.c
> +++ b/drivers/input/rmi4/rmi_f54.c
> @@ -692,6 +692,7 @@ static int rmi_f54_probe(struct rmi_function *fn)
>  		return -ENOMEM;
>  
>  	rmi_f54_create_input_map(f54);
> +	rmi_f54_set_input(f54, 0);
>  
>  	/* register video device */
>  	strlcpy(f54->v4l2.name, F54_NAME, sizeof(f54->v4l2.name));
Dmitry Torokhov April 27, 2019, 12:31 a.m. UTC | #2
On Thu, Sep 20, 2018 at 03:31:23PM +0200, Philipp Zabel wrote:
> The driver doesn't set an initial video format until s_input is called:
> 
>   $ v4l2-ctl -d /dev/v4l-touch0 --get-input
>   Video input : 0 (Normalized 16-Bit Image: ok)
>   $ v4l2-ctl -d /dev/v4l-touch0 --get-fmt-video
>   	Width/Height      : 0/0
>   	Pixel Format      : ''
>   	[...]
>   $ v4l2-ctl -d /dev/v4l-touch0 --set-input 0
>   Video input set to 0 (Normalized 16-Bit Image: Touch, ok)
>   $ v4l2-ctl -d /dev/v4l-touch0 --get-fmt-video
>   	Width/Height      : 71/40
>   	Pixel Format      : 'TD16'
>   	[...]
> 
> To fix this, initialize the video format to input 0 during probe.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

Applied, thank you.

> ---
>  drivers/input/rmi4/rmi_f54.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c
> index a6f515bcab22..9ccf7ee0fc67 100644
> --- a/drivers/input/rmi4/rmi_f54.c
> +++ b/drivers/input/rmi4/rmi_f54.c
> @@ -692,6 +692,7 @@ static int rmi_f54_probe(struct rmi_function *fn)
>  		return -ENOMEM;
>  
>  	rmi_f54_create_input_map(f54);
> +	rmi_f54_set_input(f54, 0);
>  
>  	/* register video device */
>  	strlcpy(f54->v4l2.name, F54_NAME, sizeof(f54->v4l2.name));
> -- 
> 2.19.0
>
Dmitry Torokhov April 27, 2019, 12:32 a.m. UTC | #3
On Fri, Apr 26, 2019 at 10:51:53AM +0200, Lucas Stach wrote:
> Hi Dmitry,
> 
> it seems this series hasn't been applied. Are there any objections to
> it?

Applied both, thanks for the nudge.

> 
> Regards,
> Lucas
> 
> Am Donnerstag, den 20.09.2018, 15:31 +0200 schrieb Philipp Zabel:
> > The driver doesn't set an initial video format until s_input is
> > called:
> > 
> >   $ v4l2-ctl -d /dev/v4l-touch0 --get-input
> >   Video input : 0 (Normalized 16-Bit Image: ok)
> >   $ v4l2-ctl -d /dev/v4l-touch0 --get-fmt-video
> >   	Width/Height      : 0/0
> >   	Pixel Format      : ''
> >   	[...]
> >   $ v4l2-ctl -d /dev/v4l-touch0 --set-input 0
> >   Video input set to 0 (Normalized 16-Bit Image: Touch, ok)
> >   $ v4l2-ctl -d /dev/v4l-touch0 --get-fmt-video
> >   	Width/Height      : 71/40
> >   	Pixel Format      : 'TD16'
> >   	[...]
> > 
> > To fix this, initialize the video format to input 0 during probe.
> > 
> > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> > ---
> >  drivers/input/rmi4/rmi_f54.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/input/rmi4/rmi_f54.c
> > b/drivers/input/rmi4/rmi_f54.c
> > index a6f515bcab22..9ccf7ee0fc67 100644
> > --- a/drivers/input/rmi4/rmi_f54.c
> > +++ b/drivers/input/rmi4/rmi_f54.c
> > @@ -692,6 +692,7 @@ static int rmi_f54_probe(struct rmi_function *fn)
> >  		return -ENOMEM;
> >  
> >  	rmi_f54_create_input_map(f54);
> > +	rmi_f54_set_input(f54, 0);
> >  
> >  	/* register video device */
> >  	strlcpy(f54->v4l2.name, F54_NAME, sizeof(f54->v4l2.name));
diff mbox series

Patch

diff --git a/drivers/input/rmi4/rmi_f54.c b/drivers/input/rmi4/rmi_f54.c
index a6f515bcab22..9ccf7ee0fc67 100644
--- a/drivers/input/rmi4/rmi_f54.c
+++ b/drivers/input/rmi4/rmi_f54.c
@@ -692,6 +692,7 @@  static int rmi_f54_probe(struct rmi_function *fn)
 		return -ENOMEM;
 
 	rmi_f54_create_input_map(f54);
+	rmi_f54_set_input(f54, 0);
 
 	/* register video device */
 	strlcpy(f54->v4l2.name, F54_NAME, sizeof(f54->v4l2.name));