diff mbox series

[1/4] drm/bridge: sii902x: add input_bus_flags

Message ID 55145f406e698651b99bc7a35421cd38548c1d79.1551090126.git.jsarha@ti.com (mailing list archive)
State New, archived
Headers show
Series drm/bridge: sii902x: HDMI-audio support and some fixes | expand

Commit Message

Jyri Sarha Feb. 25, 2019, 11:23 a.m. UTC
From: Tomi Valkeinen <tomi.valkeinen@ti.com>

The driver always sets InputBusFmt:EDGE to 0 (falling edge).

Add drm_bridge_timings's input_bus_flags to reflect that the bridge
samples on falling edges.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 drivers/gpu/drm/bridge/sii902x.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Andrzej Hajda Feb. 25, 2019, 12:48 p.m. UTC | #1
On 25.02.2019 12:23, Jyri Sarha wrote:
> From: Tomi Valkeinen <tomi.valkeinen@ti.com>
>
> The driver always sets InputBusFmt:EDGE to 0 (falling edge).
>
> Add drm_bridge_timings's input_bus_flags to reflect that the bridge
> samples on falling edges.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>

 --
Regards
Andrzej
> ---
>  drivers/gpu/drm/bridge/sii902x.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index bfa902013aa4..1afa000141d5 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -459,6 +459,12 @@ static int sii902x_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
>  	return 0;
>  }
>  
> +static const struct drm_bridge_timings default_sii902x_timings = {
> +	.input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE
> +		 | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE
> +		 | DRM_BUS_FLAG_DE_HIGH,
> +};
> +
>  static int sii902x_probe(struct i2c_client *client,
>  			 const struct i2c_device_id *id)
>  {
> @@ -529,6 +535,7 @@ static int sii902x_probe(struct i2c_client *client,
>  
>  	sii902x->bridge.funcs = &sii902x_bridge_funcs;
>  	sii902x->bridge.of_node = dev->of_node;
> +	sii902x->bridge.timings = &default_sii902x_timings;
>  	drm_bridge_add(&sii902x->bridge);
>  
>  	i2c_set_clientdata(client, sii902x);
kernel test robot Feb. 25, 2019, 6:15 p.m. UTC | #2
Hi Tomi,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.0-rc8 next-20190225]
[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/Jyri-Sarha/drm-bridge-sii902x-HDMI-audio-support-and-some-fixes/20190226-014705
config: nds32-allyesconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 6.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=6.4.0 make.cross ARCH=nds32 

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/bridge/sii902x.c:463:2: error: unknown field 'input_bus_flags' specified in initializer
     .input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE
     ^
>> drivers/gpu/drm/bridge/sii902x.c:463:21: error: 'DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE' undeclared here (not in a function)
     .input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/bridge/sii902x.c:464:6: error: 'DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE' undeclared here (not in a function)
       | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/input_bus_flags +463 drivers/gpu/drm/bridge/sii902x.c

   461	
   462	static const struct drm_bridge_timings default_sii902x_timings = {
 > 463		.input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE
 > 464			 | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE
   465			 | DRM_BUS_FLAG_DE_HIGH,
   466	};
   467	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot Feb. 25, 2019, 6:22 p.m. UTC | #3
Hi Tomi,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.0-rc8 next-20190225]
[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/Jyri-Sarha/drm-bridge-sii902x-HDMI-audio-support-and-some-fixes/20190226-014705
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.2.0 make.cross ARCH=xtensa 

All errors (new ones prefixed by >>):

>> drivers/gpu//drm/bridge/sii902x.c:463:3: error: 'const struct drm_bridge_timings' has no member named 'input_bus_flags'
     .input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE
      ^~~~~~~~~~~~~~~
>> drivers/gpu//drm/bridge/sii902x.c:463:21: error: 'DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE' undeclared here (not in a function); did you mean 'DRM_BUS_FLAG_PIXDATA_NEGEDGE'?
     .input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        DRM_BUS_FLAG_PIXDATA_NEGEDGE
>> drivers/gpu//drm/bridge/sii902x.c:464:6: error: 'DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE' undeclared here (not in a function); did you mean 'DRM_BUS_FLAG_SYNC_NEGEDGE'?
       | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         DRM_BUS_FLAG_SYNC_NEGEDGE

vim +463 drivers/gpu//drm/bridge/sii902x.c

   461	
   462	static const struct drm_bridge_timings default_sii902x_timings = {
 > 463		.input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE
 > 464			 | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE
   465			 | DRM_BUS_FLAG_DE_HIGH,
   466	};
   467	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index bfa902013aa4..1afa000141d5 100644
--- a/drivers/gpu/drm/bridge/sii902x.c
+++ b/drivers/gpu/drm/bridge/sii902x.c
@@ -459,6 +459,12 @@  static int sii902x_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
 	return 0;
 }
 
+static const struct drm_bridge_timings default_sii902x_timings = {
+	.input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE
+		 | DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE
+		 | DRM_BUS_FLAG_DE_HIGH,
+};
+
 static int sii902x_probe(struct i2c_client *client,
 			 const struct i2c_device_id *id)
 {
@@ -529,6 +535,7 @@  static int sii902x_probe(struct i2c_client *client,
 
 	sii902x->bridge.funcs = &sii902x_bridge_funcs;
 	sii902x->bridge.of_node = dev->of_node;
+	sii902x->bridge.timings = &default_sii902x_timings;
 	drm_bridge_add(&sii902x->bridge);
 
 	i2c_set_clientdata(client, sii902x);