* [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-09 11:07 ` Jean-Francois Moine 0 siblings, 0 replies; 15+ messages in thread From: Jean-Francois Moine @ 2014-01-09 11:07 UTC (permalink / raw) To: linux-arm-kernel This patch reduces the number of I2C exchanges by setting many bits in one write and removing a useless write. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> --- drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 6b4f6d2..d3b3f3a 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, } reg_write(priv, REG_AIP_CLKSEL, clksel_aip); - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | /* Enable automatic CTS generation */ - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_ACR_MAN); + AIP_CNTRL_0_ACR_MAN); reg_write(priv, REG_CTS_N, cts_n); /* @@ -1001,10 +1001,10 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, reg_write(priv, REG_VIP_CNTRL_5, VIP_CNTRL_5_SP_CNT(0)); reg_write(priv, REG_VIP_CNTRL_4, VIP_CNTRL_4_BLANKIT(0) | VIP_CNTRL_4_BLC(0)); - reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_CCIR); reg_clear(priv, REG_PLL_SERIAL_1, PLL_SERIAL_1_SRL_MAN_IZ); - reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_DE); + reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_CCIR | + PLL_SERIAL_3_SRL_DE); reg_write(priv, REG_SERIALIZER, 0); /* video quantization range = 0: full, 1: RGB/YUV, 2: YUV */ @@ -1026,8 +1026,6 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, /* set BIAS tmds value: */ reg_write(priv, REG_ANA_GENERAL, 0x09); - reg_write(priv, REG_TBG_CNTRL_0, 0); - /* * Sync on rising HSYNC/VSYNC */ -- Ken ar c'henta? | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-09 11:07 ` Jean-Francois Moine 0 siblings, 0 replies; 15+ messages in thread From: Jean-Francois Moine @ 2014-01-09 11:07 UTC (permalink / raw) To: dri-devel; +Cc: Dave Airlie, Rob Clark, linux-arm-kernel, linux-kernel This patch reduces the number of I2C exchanges by setting many bits in one write and removing a useless write. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> --- drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 6b4f6d2..d3b3f3a 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, } reg_write(priv, REG_AIP_CLKSEL, clksel_aip); - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | /* Enable automatic CTS generation */ - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_ACR_MAN); + AIP_CNTRL_0_ACR_MAN); reg_write(priv, REG_CTS_N, cts_n); /* @@ -1001,10 +1001,10 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, reg_write(priv, REG_VIP_CNTRL_5, VIP_CNTRL_5_SP_CNT(0)); reg_write(priv, REG_VIP_CNTRL_4, VIP_CNTRL_4_BLANKIT(0) | VIP_CNTRL_4_BLC(0)); - reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_CCIR); reg_clear(priv, REG_PLL_SERIAL_1, PLL_SERIAL_1_SRL_MAN_IZ); - reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_DE); + reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_CCIR | + PLL_SERIAL_3_SRL_DE); reg_write(priv, REG_SERIALIZER, 0); /* video quantization range = 0: full, 1: RGB/YUV, 2: YUV */ @@ -1026,8 +1026,6 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, /* set BIAS tmds value: */ reg_write(priv, REG_ANA_GENERAL, 0x09); - reg_write(priv, REG_TBG_CNTRL_0, 0); - /* * Sync on rising HSYNC/VSYNC */ -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-09 11:07 ` Jean-Francois Moine 0 siblings, 0 replies; 15+ messages in thread From: Jean-Francois Moine @ 2014-01-09 11:07 UTC (permalink / raw) To: dri-devel; +Cc: linux-kernel, linux-arm-kernel This patch reduces the number of I2C exchanges by setting many bits in one write and removing a useless write. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> --- drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 6b4f6d2..d3b3f3a 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, } reg_write(priv, REG_AIP_CLKSEL, clksel_aip); - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | /* Enable automatic CTS generation */ - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_ACR_MAN); + AIP_CNTRL_0_ACR_MAN); reg_write(priv, REG_CTS_N, cts_n); /* @@ -1001,10 +1001,10 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, reg_write(priv, REG_VIP_CNTRL_5, VIP_CNTRL_5_SP_CNT(0)); reg_write(priv, REG_VIP_CNTRL_4, VIP_CNTRL_4_BLANKIT(0) | VIP_CNTRL_4_BLC(0)); - reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_CCIR); reg_clear(priv, REG_PLL_SERIAL_1, PLL_SERIAL_1_SRL_MAN_IZ); - reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_DE); + reg_clear(priv, REG_PLL_SERIAL_3, PLL_SERIAL_3_SRL_CCIR | + PLL_SERIAL_3_SRL_DE); reg_write(priv, REG_SERIALIZER, 0); /* video quantization range = 0: full, 1: RGB/YUV, 2: YUV */ @@ -1026,8 +1026,6 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder, /* set BIAS tmds value: */ reg_write(priv, REG_ANA_GENERAL, 0x09); - reg_write(priv, REG_TBG_CNTRL_0, 0); - /* * Sync on rising HSYNC/VSYNC */ -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH v2 26/28] drm/i2c: tda998x: code optimization 2014-01-09 11:07 ` Jean-Francois Moine @ 2014-01-11 18:55 ` Russell King - ARM Linux -1 siblings, 0 replies; 15+ messages in thread From: Russell King - ARM Linux @ 2014-01-11 18:55 UTC (permalink / raw) To: linux-arm-kernel On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > This patch reduces the number of I2C exchanges by setting many bits in > one write and removing a useless write. > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > --- > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > index 6b4f6d2..d3b3f3a 100644 > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > } > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | This patch clearly hasn't even been build tested, so I doubt there's much point reviewing this or the following patches. From a quick scan of the following patches, this never got fixed so the following patches can't have been build tested either. Thanks. -- FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. Estimate before purchase was "up to 13.2Mbit". ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-11 18:55 ` Russell King - ARM Linux 0 siblings, 0 replies; 15+ messages in thread From: Russell King - ARM Linux @ 2014-01-11 18:55 UTC (permalink / raw) To: Jean-Francois Moine Cc: dri-devel, Rob Clark, Dave Airlie, linux-kernel, linux-arm-kernel On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > This patch reduces the number of I2C exchanges by setting many bits in > one write and removing a useless write. > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > --- > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > index 6b4f6d2..d3b3f3a 100644 > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > } > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | This patch clearly hasn't even been build tested, so I doubt there's much point reviewing this or the following patches. From a quick scan of the following patches, this never got fixed so the following patches can't have been build tested either. Thanks. -- FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. Estimate before purchase was "up to 13.2Mbit". ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 26/28] drm/i2c: tda998x: code optimization 2014-01-11 18:55 ` Russell King - ARM Linux (?) @ 2014-01-12 8:22 ` Jean-Francois Moine -1 siblings, 0 replies; 15+ messages in thread From: Jean-Francois Moine @ 2014-01-12 8:22 UTC (permalink / raw) To: linux-arm-kernel On Sat, 11 Jan 2014 18:55:09 +0000 Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > This patch reduces the number of I2C exchanges by setting many bits in > > one write and removing a useless write. > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > --- > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > index 6b4f6d2..d3b3f3a 100644 > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > } > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > This patch clearly hasn't even been build tested, so I doubt there's > much point reviewing this or the following patches. From a quick scan > of the following patches, this never got fixed so the following patches > can't have been build tested either. I don't see what can be the problem with this patch. It does not change anything in the logic. About testing, it is applied to my Cubox kernel for more than 4 months and everything works correctly. I will move the following comment a bit upwards. Maybe the code will be clearer. -- Ken ar c'henta? | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-12 8:22 ` Jean-Francois Moine 0 siblings, 0 replies; 15+ messages in thread From: Jean-Francois Moine @ 2014-01-12 8:22 UTC (permalink / raw) To: Russell King - ARM Linux Cc: dri-devel, Rob Clark, Dave Airlie, linux-kernel, linux-arm-kernel On Sat, 11 Jan 2014 18:55:09 +0000 Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > This patch reduces the number of I2C exchanges by setting many bits in > > one write and removing a useless write. > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > --- > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > index 6b4f6d2..d3b3f3a 100644 > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > } > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > This patch clearly hasn't even been build tested, so I doubt there's > much point reviewing this or the following patches. From a quick scan > of the following patches, this never got fixed so the following patches > can't have been build tested either. I don't see what can be the problem with this patch. It does not change anything in the logic. About testing, it is applied to my Cubox kernel for more than 4 months and everything works correctly. I will move the following comment a bit upwards. Maybe the code will be clearer. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-12 8:22 ` Jean-Francois Moine 0 siblings, 0 replies; 15+ messages in thread From: Jean-Francois Moine @ 2014-01-12 8:22 UTC (permalink / raw) To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-kernel, dri-devel On Sat, 11 Jan 2014 18:55:09 +0000 Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > This patch reduces the number of I2C exchanges by setting many bits in > > one write and removing a useless write. > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > --- > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > index 6b4f6d2..d3b3f3a 100644 > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > } > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > This patch clearly hasn't even been build tested, so I doubt there's > much point reviewing this or the following patches. From a quick scan > of the following patches, this never got fixed so the following patches > can't have been build tested either. I don't see what can be the problem with this patch. It does not change anything in the logic. About testing, it is applied to my Cubox kernel for more than 4 months and everything works correctly. I will move the following comment a bit upwards. Maybe the code will be clearer. -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 26/28] drm/i2c: tda998x: code optimization 2014-01-12 8:22 ` Jean-Francois Moine @ 2014-01-12 9:45 ` Russell King - ARM Linux -1 siblings, 0 replies; 15+ messages in thread From: Russell King - ARM Linux @ 2014-01-12 9:45 UTC (permalink / raw) To: linux-arm-kernel On Sun, Jan 12, 2014 at 09:22:01AM +0100, Jean-Francois Moine wrote: > On Sat, 11 Jan 2014 18:55:09 +0000 > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > > This patch reduces the number of I2C exchanges by setting many bits in > > > one write and removing a useless write. > > > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > > --- > > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > > index 6b4f6d2..d3b3f3a 100644 > > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > > } > > > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > > > This patch clearly hasn't even been build tested, so I doubt there's > > much point reviewing this or the following patches. From a quick scan > > of the following patches, this never got fixed so the following patches > > can't have been build tested either. > > I don't see what can be the problem with this patch. It does not change > anything in the logic. About testing, it is applied to my Cubox kernel > for more than 4 months and everything works correctly. > > I will move the following comment a bit upwards. Maybe the code will be > clearer. You're replacing ");" with "|" here, which is not legal C. Parenthesis must be balanced and statements must be terminated. -- FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. Estimate before purchase was "up to 13.2Mbit". ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-12 9:45 ` Russell King - ARM Linux 0 siblings, 0 replies; 15+ messages in thread From: Russell King - ARM Linux @ 2014-01-12 9:45 UTC (permalink / raw) To: Jean-Francois Moine Cc: dri-devel, Rob Clark, Dave Airlie, linux-kernel, linux-arm-kernel On Sun, Jan 12, 2014 at 09:22:01AM +0100, Jean-Francois Moine wrote: > On Sat, 11 Jan 2014 18:55:09 +0000 > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > > This patch reduces the number of I2C exchanges by setting many bits in > > > one write and removing a useless write. > > > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > > --- > > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > > index 6b4f6d2..d3b3f3a 100644 > > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > > } > > > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > > > This patch clearly hasn't even been build tested, so I doubt there's > > much point reviewing this or the following patches. From a quick scan > > of the following patches, this never got fixed so the following patches > > can't have been build tested either. > > I don't see what can be the problem with this patch. It does not change > anything in the logic. About testing, it is applied to my Cubox kernel > for more than 4 months and everything works correctly. > > I will move the following comment a bit upwards. Maybe the code will be > clearer. You're replacing ");" with "|" here, which is not legal C. Parenthesis must be balanced and statements must be terminated. -- FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. Estimate before purchase was "up to 13.2Mbit". ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 26/28] drm/i2c: tda998x: code optimization 2014-01-12 9:45 ` Russell King - ARM Linux (?) @ 2014-01-12 10:14 ` Jean-Francois Moine -1 siblings, 0 replies; 15+ messages in thread From: Jean-Francois Moine @ 2014-01-12 10:14 UTC (permalink / raw) To: linux-arm-kernel On Sun, 12 Jan 2014 09:45:33 +0000 Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > On Sun, Jan 12, 2014 at 09:22:01AM +0100, Jean-Francois Moine wrote: > > On Sat, 11 Jan 2014 18:55:09 +0000 > > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > > > > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > > > This patch reduces the number of I2C exchanges by setting many bits in > > > > one write and removing a useless write. > > > > > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > > > --- > > > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > index 6b4f6d2..d3b3f3a 100644 > > > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > > > } > > > > > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > > > > > This patch clearly hasn't even been build tested, so I doubt there's > > > much point reviewing this or the following patches. From a quick scan > > > of the following patches, this never got fixed so the following patches > > > can't have been build tested either. > > > > I don't see what can be the problem with this patch. It does not change > > anything in the logic. About testing, it is applied to my Cubox kernel > > for more than 4 months and everything works correctly. > > > > I will move the following comment a bit upwards. Maybe the code will be > > clearer. > > You're replacing ");" with "|" here, which is not legal C. Parenthesis > must be balanced and statements must be terminated. !? they are: - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | /* Enable automatic CTS generation */ - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_ACR_MAN); + AIP_CNTRL_0_ACR_MAN); gives: reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | /* Enable automatic CTS generation */ AIP_CNTRL_0_ACR_MAN); -- Ken ar c'henta? | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-12 10:14 ` Jean-Francois Moine 0 siblings, 0 replies; 15+ messages in thread From: Jean-Francois Moine @ 2014-01-12 10:14 UTC (permalink / raw) To: Russell King - ARM Linux Cc: dri-devel, Rob Clark, Dave Airlie, linux-kernel, linux-arm-kernel On Sun, 12 Jan 2014 09:45:33 +0000 Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > On Sun, Jan 12, 2014 at 09:22:01AM +0100, Jean-Francois Moine wrote: > > On Sat, 11 Jan 2014 18:55:09 +0000 > > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > > > > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > > > This patch reduces the number of I2C exchanges by setting many bits in > > > > one write and removing a useless write. > > > > > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > > > --- > > > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > index 6b4f6d2..d3b3f3a 100644 > > > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > > > } > > > > > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > > > > > This patch clearly hasn't even been build tested, so I doubt there's > > > much point reviewing this or the following patches. From a quick scan > > > of the following patches, this never got fixed so the following patches > > > can't have been build tested either. > > > > I don't see what can be the problem with this patch. It does not change > > anything in the logic. About testing, it is applied to my Cubox kernel > > for more than 4 months and everything works correctly. > > > > I will move the following comment a bit upwards. Maybe the code will be > > clearer. > > You're replacing ");" with "|" here, which is not legal C. Parenthesis > must be balanced and statements must be terminated. !? they are: - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | /* Enable automatic CTS generation */ - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_ACR_MAN); + AIP_CNTRL_0_ACR_MAN); gives: reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | /* Enable automatic CTS generation */ AIP_CNTRL_0_ACR_MAN); -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-12 10:14 ` Jean-Francois Moine 0 siblings, 0 replies; 15+ messages in thread From: Jean-Francois Moine @ 2014-01-12 10:14 UTC (permalink / raw) To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-kernel, dri-devel On Sun, 12 Jan 2014 09:45:33 +0000 Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > On Sun, Jan 12, 2014 at 09:22:01AM +0100, Jean-Francois Moine wrote: > > On Sat, 11 Jan 2014 18:55:09 +0000 > > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > > > > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > > > This patch reduces the number of I2C exchanges by setting many bits in > > > > one write and removing a useless write. > > > > > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > > > --- > > > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > index 6b4f6d2..d3b3f3a 100644 > > > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > > > } > > > > > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > > > > > This patch clearly hasn't even been build tested, so I doubt there's > > > much point reviewing this or the following patches. From a quick scan > > > of the following patches, this never got fixed so the following patches > > > can't have been build tested either. > > > > I don't see what can be the problem with this patch. It does not change > > anything in the logic. About testing, it is applied to my Cubox kernel > > for more than 4 months and everything works correctly. > > > > I will move the following comment a bit upwards. Maybe the code will be > > clearer. > > You're replacing ");" with "|" here, which is not legal C. Parenthesis > must be balanced and statements must be terminated. !? they are: - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | /* Enable automatic CTS generation */ - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_ACR_MAN); + AIP_CNTRL_0_ACR_MAN); gives: reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | /* Enable automatic CTS generation */ AIP_CNTRL_0_ACR_MAN); -- Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/ _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH v2 26/28] drm/i2c: tda998x: code optimization 2014-01-12 10:14 ` Jean-Francois Moine @ 2014-01-12 10:37 ` Russell King - ARM Linux -1 siblings, 0 replies; 15+ messages in thread From: Russell King - ARM Linux @ 2014-01-12 10:37 UTC (permalink / raw) To: linux-arm-kernel On Sun, Jan 12, 2014 at 11:14:20AM +0100, Jean-Francois Moine wrote: > On Sun, 12 Jan 2014 09:45:33 +0000 > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > > On Sun, Jan 12, 2014 at 09:22:01AM +0100, Jean-Francois Moine wrote: > > > On Sat, 11 Jan 2014 18:55:09 +0000 > > > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > > > > > > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > > > > This patch reduces the number of I2C exchanges by setting many bits in > > > > > one write and removing a useless write. > > > > > > > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > > > > --- > > > > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > > > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > > > > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > > index 6b4f6d2..d3b3f3a 100644 > > > > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > > > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > > > > } > > > > > > > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > > > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > > > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > > > > > > > This patch clearly hasn't even been build tested, so I doubt there's > > > > much point reviewing this or the following patches. From a quick scan > > > > of the following patches, this never got fixed so the following patches > > > > can't have been build tested either. > > > > > > I don't see what can be the problem with this patch. It does not change > > > anything in the logic. About testing, it is applied to my Cubox kernel > > > for more than 4 months and everything works correctly. > > > > > > I will move the following comment a bit upwards. Maybe the code will be > > > clearer. > > > > You're replacing ");" with "|" here, which is not legal C. Parenthesis > > must be balanced and statements must be terminated. > > !? they are: > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > /* Enable automatic CTS generation */ > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_ACR_MAN); > + AIP_CNTRL_0_ACR_MAN); > > gives: > > reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > /* Enable automatic CTS generation */ > AIP_CNTRL_0_ACR_MAN); Yuck, that's absolutely horrid. No wonder I mis-read it. NAK for bad and confusing style. -- FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. Estimate before purchase was "up to 13.2Mbit". ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v2 26/28] drm/i2c: tda998x: code optimization @ 2014-01-12 10:37 ` Russell King - ARM Linux 0 siblings, 0 replies; 15+ messages in thread From: Russell King - ARM Linux @ 2014-01-12 10:37 UTC (permalink / raw) To: Jean-Francois Moine Cc: dri-devel, Rob Clark, Dave Airlie, linux-kernel, linux-arm-kernel On Sun, Jan 12, 2014 at 11:14:20AM +0100, Jean-Francois Moine wrote: > On Sun, 12 Jan 2014 09:45:33 +0000 > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > > On Sun, Jan 12, 2014 at 09:22:01AM +0100, Jean-Francois Moine wrote: > > > On Sat, 11 Jan 2014 18:55:09 +0000 > > > Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > > > > > > > On Thu, Jan 09, 2014 at 12:07:25PM +0100, Jean-Francois Moine wrote: > > > > > This patch reduces the number of I2C exchanges by setting many bits in > > > > > one write and removing a useless write. > > > > > > > > > > Signed-off-by: Jean-Francois Moine <moinejf@free.fr> > > > > > --- > > > > > drivers/gpu/drm/i2c/tda998x_drv.c | 10 ++++------ > > > > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > > > > > > > diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > > index 6b4f6d2..d3b3f3a 100644 > > > > > --- a/drivers/gpu/drm/i2c/tda998x_drv.c > > > > > +++ b/drivers/gpu/drm/i2c/tda998x_drv.c > > > > > @@ -751,10 +751,10 @@ tda998x_configure_audio(struct tda998x_priv *priv, > > > > > } > > > > > > > > > > reg_write(priv, REG_AIP_CLKSEL, clksel_aip); > > > > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > > > > > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > > > > > > > This patch clearly hasn't even been build tested, so I doubt there's > > > > much point reviewing this or the following patches. From a quick scan > > > > of the following patches, this never got fixed so the following patches > > > > can't have been build tested either. > > > > > > I don't see what can be the problem with this patch. It does not change > > > anything in the logic. About testing, it is applied to my Cubox kernel > > > for more than 4 months and everything works correctly. > > > > > > I will move the following comment a bit upwards. Maybe the code will be > > > clearer. > > > > You're replacing ");" with "|" here, which is not legal C. Parenthesis > > must be balanced and statements must be terminated. > > !? they are: > > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT); > + reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > /* Enable automatic CTS generation */ > - reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_ACR_MAN); > + AIP_CNTRL_0_ACR_MAN); > > gives: > > reg_clear(priv, REG_AIP_CNTRL_0, AIP_CNTRL_0_LAYOUT | > > /* Enable automatic CTS generation */ > AIP_CNTRL_0_ACR_MAN); Yuck, that's absolutely horrid. No wonder I mis-read it. NAK for bad and confusing style. -- FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. Estimate before purchase was "up to 13.2Mbit". ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2014-01-12 10:37 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-01-09 11:07 [PATCH v2 26/28] drm/i2c: tda998x: code optimization Jean-Francois Moine 2014-01-09 11:07 ` Jean-Francois Moine 2014-01-09 11:07 ` Jean-Francois Moine 2014-01-11 18:55 ` Russell King - ARM Linux 2014-01-11 18:55 ` Russell King - ARM Linux 2014-01-12 8:22 ` Jean-Francois Moine 2014-01-12 8:22 ` Jean-Francois Moine 2014-01-12 8:22 ` Jean-Francois Moine 2014-01-12 9:45 ` Russell King - ARM Linux 2014-01-12 9:45 ` Russell King - ARM Linux 2014-01-12 10:14 ` Jean-Francois Moine 2014-01-12 10:14 ` Jean-Francois Moine 2014-01-12 10:14 ` Jean-Francois Moine 2014-01-12 10:37 ` Russell King - ARM Linux 2014-01-12 10:37 ` Russell King - ARM Linux
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.