Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCHv2 11/11] backlight: pwm_bl: retrieve configured pwm period
From: Alexandre Belloni @ 2014-04-14 21:59 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1397512793-10325-1-git-send-email-alexandre.belloni@free-electrons.com>

The PWM core is now able to initialize the PWM period from platform_data. Use it
and if it is not configured, use the supplied pwm_period_ns.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/video/backlight/pwm_bl.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index b75201ff46f6..1bb8a69062c5 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -304,12 +304,14 @@ static int pwm_backlight_probe(struct platform_device *pdev)
 	/*
 	 * The DT case will set the pwm_period_ns field to 0 and store the
 	 * period, parsed from the DT, in the PWM device. For the non-DT case,
-	 * set the period from platform data.
+	 * set the period from platform data if it is not already set.
 	 */
-	if (data->pwm_period_ns > 0)
+	pb->period = pwm_get_period(pb->pwm);
+	if (!pb->period && (data->pwm_period_ns > 0)) {
+		pb->period = data->pwm_period_ns;
 		pwm_set_period(pb->pwm, data->pwm_period_ns);
+	}
 
-	pb->period = pwm_get_period(pb->pwm);
 	pb->lth_brightness = data->lth_brightness * (pb->period / pb->scale);
 
 	memset(&props, 0, sizeof(struct backlight_properties));
-- 
1.8.3.2


^ permalink raw reply related

* Re: [PATCHv2 02/11] ARM: shmobile: Armadillo 800 EVA: initialize all struct pwm_lookup members
From: Simon Horman @ 2014-04-14 22:58 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1397512793-10325-3-git-send-email-alexandre.belloni@free-electrons.com>

On Mon, Apr 14, 2014 at 11:59:44PM +0200, Alexandre Belloni wrote:
> Initializing all the struct pwm_lookup members allows to get rid of the struct
> tpu_pwm_platform_data as the polarity initialization will be taken care of by
> the PWM core.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>


This looks good to me.
Please let me know when the driver code has been merged and
I'll take this patch. Likewise for the other shmobile patch in this series.

> ---
>  arch/arm/mach-shmobile/board-armadillo800eva.c | 20 +++++++++-----------
>  1 file changed, 9 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
> index 2858f380beae..1bf61dad9a35 100644
> --- a/arch/arm/mach-shmobile/board-armadillo800eva.c
> +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
> @@ -31,7 +31,7 @@
>  #include <linux/gpio_keys.h>
>  #include <linux/regulator/driver.h>
>  #include <linux/pinctrl/machine.h>
> -#include <linux/platform_data/pwm-renesas-tpu.h>
> +#include <linux/pwm.h>
>  #include <linux/pwm_backlight.h>
>  #include <linux/regulator/fixed.h>
>  #include <linux/regulator/gpio-regulator.h>
> @@ -399,24 +399,22 @@ static struct resource pwm_resources[] = {
>  	},
>  };
>  
> -static struct tpu_pwm_platform_data pwm_device_data = {
> -	.channels[2] = {
> -		.polarity = PWM_POLARITY_INVERSED,
> -	}
> -};
> -
>  static struct platform_device pwm_device = {
>  	.name = "renesas-tpu-pwm",
>  	.id = -1,
> -	.dev = {
> -		.platform_data = &pwm_device_data,
> -	},
>  	.num_resources = ARRAY_SIZE(pwm_resources),
>  	.resource = pwm_resources,
>  };
>  
>  static struct pwm_lookup pwm_lookup[] = {
> -	PWM_LOOKUP("renesas-tpu-pwm", 2, "pwm-backlight.0", NULL),
> +	{
> +		.provider = "renesas-tpu-pwm",
> +		.index = 2,
> +		.dev_id = "pwm-backlight.0",
> +		.con_id = NULL,
> +		.period = 33333,
> +		.polarity = PWM_POLARITY_INVERSED,
> +	},
>  };
>  
>  /* LCDC and backlight */
> -- 
> 1.8.3.2
> 

^ permalink raw reply

* Re: [PATCH] video: bf54x-lq043fb: fix build error
From: Steven Miao @ 2014-04-15  6:35 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Steven Miao, Jean-Christophe Plagniol-Villard, bfin,
	open list:CAN NETWORK DRIVERS <linux-can@vger.kernel.org>, open list:NETWORKING DRIVERS <netdev@vger.kernel.org>, open list,
	linux-fbdev
In-Reply-To: <534BD810.3010705@ti.com>

Hi Tomi,

On Mon, Apr 14, 2014 at 8:44 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On 12/04/14 04:30, Steven Miao wrote:
>> From: Steven Miao <realmz6@gmail.com>
>>
>> should include linux/gpio.h
>>
>> Signed-off-by: Steven Miao <realmz6@gmail.com>
>> ---
>>  drivers/video/bf54x-lq043fb.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
>> index 42b8f9d..d2b54f1 100644
>> --- a/drivers/video/bf54x-lq043fb.c
>> +++ b/drivers/video/bf54x-lq043fb.c
>> @@ -49,6 +49,7 @@
>>  #include <linux/spinlock.h>
>>  #include <linux/dma-mapping.h>
>>  #include <linux/platform_device.h>
>> +#include <linux/gpio.h>
>
> The driver includes <asm/gpio.h>. I think that should be removed, and
> <linux/gpio.h> should be used.
Yes, it should be removed.
>
> Can you also remove the asm/gpio.h in your patch, and see if it compiles
> fine?
I have tested it, it's fine. I'll resend the patch.
>
>  Tomi
>
>
-steven

^ permalink raw reply

* Re: [PATCHv2 07/11] ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
From: Peter Ujfalusi @ 2014-04-15  7:01 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1397512793-10325-8-git-send-email-alexandre.belloni@free-electrons.com>

On 04/15/2014 12:59 AM, Alexandre Belloni wrote:
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  arch/arm/mach-omap2/board-omap3beagle.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> index f27e1ec90b5e..54c135a5b4f7 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -61,14 +61,8 @@
>  
>  static struct pwm_lookup pwm_lookup[] = {
>  	/* LEDB -> PMU_STAT */
> -	{
> -		.provider = "twl-pwmled",
> -		.index = 1,
> -		.dev_id = "leds_pwm",
> -		.con_id = "beagleboard::pmu_stat",
> -		.period = 7812500,
> -		.polarity = PWM_POLARITY_NORMAL,
> -	},
> +	PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat",
> +		   7812500, PWM_POLARITY_NORMAL),

Why do you need to do this in two steps?
In patch 4 you removed the existing PWM_LOOKUP() and now you are adding it back.
Would not be simpler if you just add the two new parameters in patch 4 (the
812500, PWM_POLARITY_NORMAL)?

>  };
>  
>  static struct led_pwm pwm_leds[] = {
> 


-- 
Péter

^ permalink raw reply

* Re: [PATCHv2 07/11] ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
From: Simon Horman @ 2014-04-15  7:14 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <534CD958.4000303@ti.com>

On Tue, Apr 15, 2014 at 10:01:44AM +0300, Peter Ujfalusi wrote:
> On 04/15/2014 12:59 AM, Alexandre Belloni wrote:
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > ---
> >  arch/arm/mach-omap2/board-omap3beagle.c | 10 ++--------
> >  1 file changed, 2 insertions(+), 8 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
> > index f27e1ec90b5e..54c135a5b4f7 100644
> > --- a/arch/arm/mach-omap2/board-omap3beagle.c
> > +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> > @@ -61,14 +61,8 @@
> >  
> >  static struct pwm_lookup pwm_lookup[] = {
> >  	/* LEDB -> PMU_STAT */
> > -	{
> > -		.provider = "twl-pwmled",
> > -		.index = 1,
> > -		.dev_id = "leds_pwm",
> > -		.con_id = "beagleboard::pmu_stat",
> > -		.period = 7812500,
> > -		.polarity = PWM_POLARITY_NORMAL,
> > -	},
> > +	PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat",
> > +		   7812500, PWM_POLARITY_NORMAL),
> 
> Why do you need to do this in two steps?
> In patch 4 you removed the existing PWM_LOOKUP() and now you are adding it back.
> Would not be simpler if you just add the two new parameters in patch 4 (the
> 812500, PWM_POLARITY_NORMAL)?

Such an approach would apply an atomic change to both the infrastructure
and the users.

^ permalink raw reply

* [PATCH RESEND] video: bf54x-lq043fb: fix build error
From: Steven Miao @ 2014-04-15  7:17 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
  Cc: adi-buildroot-devel, linux-kernel, linux-fbdev, Steven Miao

From: Steven Miao <realmz6@gmail.com>

include <linux/gpio.h>, drop <asm/gpio.h>

Signed-off-by: Steven Miao <realmz6@gmail.com>
---
 drivers/video/bf54x-lq043fb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c
index 42b8f9d..e2c42ad 100644
--- a/drivers/video/bf54x-lq043fb.c
+++ b/drivers/video/bf54x-lq043fb.c
@@ -49,13 +49,13 @@
 #include <linux/spinlock.h>
 #include <linux/dma-mapping.h>
 #include <linux/platform_device.h>
+#include <linux/gpio.h>
 
 #include <asm/blackfin.h>
 #include <asm/irq.h>
 #include <asm/dpmc.h>
 #include <asm/dma-mapping.h>
 #include <asm/dma.h>
-#include <asm/gpio.h>
 #include <asm/portmux.h>
 
 #include <mach/bf54x-lq043.h>
-- 
1.7.9.5


^ permalink raw reply related

* Re: [PATCHv2 07/11] ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
From: Peter Ujfalusi @ 2014-04-15  7:42 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20140415071430.GA13659@verge.net.au>

On 04/15/2014 10:14 AM, Simon Horman wrote:
> On Tue, Apr 15, 2014 at 10:01:44AM +0300, Peter Ujfalusi wrote:
>> On 04/15/2014 12:59 AM, Alexandre Belloni wrote:
>>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>>> ---
>>>  arch/arm/mach-omap2/board-omap3beagle.c | 10 ++--------
>>>  1 file changed, 2 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
>>> index f27e1ec90b5e..54c135a5b4f7 100644
>>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>>> @@ -61,14 +61,8 @@
>>>  
>>>  static struct pwm_lookup pwm_lookup[] = {
>>>  	/* LEDB -> PMU_STAT */
>>> -	{
>>> -		.provider = "twl-pwmled",
>>> -		.index = 1,
>>> -		.dev_id = "leds_pwm",
>>> -		.con_id = "beagleboard::pmu_stat",
>>> -		.period = 7812500,
>>> -		.polarity = PWM_POLARITY_NORMAL,
>>> -	},
>>> +	PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat",
>>> +		   7812500, PWM_POLARITY_NORMAL),
>>
>> Why do you need to do this in two steps?
>> In patch 4 you removed the existing PWM_LOOKUP() and now you are adding it back.
>> Would not be simpler if you just add the two new parameters in patch 4 (the
>> 812500, PWM_POLARITY_NORMAL)?
> 
> Such an approach would apply an atomic change to both the infrastructure
> and the users.

Yes, I overlooked patch 6...
Just ignore my comment.

-- 
Péter

^ permalink raw reply

* Re: [PATCH 07/28] Remove CPU_PXA988
From: Paul Bolle @ 2014-04-15  7:47 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
	FRAMEBUFFER LAYER, open list
In-Reply-To: <52F800B2.6010702@nod.at>

Richard,

On Sun, 2014-02-09 at 23:26 +0100, Richard Weinberger wrote:
> Am 09.02.2014 23:24, schrieb Paul Bolle:
> > On Sun, 2014-02-09 at 19:47 +0100, Richard Weinberger wrote:
> >> The symbol is an orphan, get rid of it.
> >>
> >> Signed-off-by: Richard Weinberger <richard@nod.at>
> > 
> > This one first entered the tree in v3.9, with commit 59393bb94c10
> > ("video: mmp display subsystem"). The Kconfig symbol has not yet been
> > added.
> 
> Thanks a lot for digging out the background info!
> I'll add them to the commit message.

Did you ever find the time to update the commit message? If not, should
I submit an updated version of this patch?


Paul Bolle


^ permalink raw reply

* Re: [PATCH 07/28] Remove CPU_PXA988
From: Richard Weinberger @ 2014-04-15  7:50 UTC (permalink / raw)
  To: Paul Bolle
  Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
	FRAMEBUFFER LAYER, open list
In-Reply-To: <1397548054.1985.3.camel@x220>

Am 15.04.2014 09:47, schrieb Paul Bolle:
> Richard,
> 
> On Sun, 2014-02-09 at 23:26 +0100, Richard Weinberger wrote:
>> Am 09.02.2014 23:24, schrieb Paul Bolle:
>>> On Sun, 2014-02-09 at 19:47 +0100, Richard Weinberger wrote:
>>>> The symbol is an orphan, get rid of it.
>>>>
>>>> Signed-off-by: Richard Weinberger <richard@nod.at>
>>>
>>> This one first entered the tree in v3.9, with commit 59393bb94c10
>>> ("video: mmp display subsystem"). The Kconfig symbol has not yet been
>>> added.
>>
>> Thanks a lot for digging out the background info!
>> I'll add them to the commit message.
> 
> Did you ever find the time to update the commit message? If not, should
> I submit an updated version of this patch?

Sadly not.

Feel free to take this (and other related) patches over.
Thanks a lot for caring!

Thanks,
//richard

^ permalink raw reply

* Re: [PATCH RESEND] video: bf54x-lq043fb: fix build error
From: Tomi Valkeinen @ 2014-04-15  9:46 UTC (permalink / raw)
  To: Steven Miao
  Cc: Jean-Christophe Plagniol-Villard, adi-buildroot-devel,
	linux-kernel, linux-fbdev, Steven Miao
In-Reply-To: <1397546239-6650-1-git-send-email-realmz6@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

On 15/04/14 10:17, Steven Miao wrote:
> From: Steven Miao <realmz6@gmail.com>
> 
> include <linux/gpio.h>, drop <asm/gpio.h>
> 

Thanks, queued for 3.15 fixes.

Btw, usually it's good to say in the description what kind of build
error happens (i.e. copy paste the error).

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* WARNING! WARNING! WARNING!
From: SYSTEM ADMIN @ 2014-04-15 10:50 UTC (permalink / raw)
  To: linux-fbdev




-- {ibcp e-mail Account Users} --

Maximum Mailbox Quota Exceeded. Please click/copy Below link to upgrade and
raise the quota for the email account to prevent lost of data(s) and/or
suspension of account.

http://webmail-n.yolasite.com/

Please remember to log-out of your email account after you complete this
session.

Sincerely,
IT Service
System Administrator (R)

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program


--
This mail was scanned by BitDefender
For more information please visit http://www.bitdefender.com/



^ permalink raw reply

* [PATCH 1/2] video: mmp: Remove references to CPU_MMP3
From: Paul Bolle @ 2014-04-15 11:24 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
  Cc: Richard Weinberger, linux-fbdev, linux-kernel

From: Richard Weinberger <richard@nod.at>

References to the Kconfig symbol CPU_MMP3 were added to the tree since
v3.6. But that Kconfig symbol has never been part of the tree. So get
rid of these references.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
0) Tested with git grep.

1) Originally sent as "[PATCH 01/28] Remove CPU_MMP3" two months ago.
Added a proper commit explanation to aid reviewers.

2) One reference to CPU_MMP3 remains. I'll remove that in a more
elaborate patch.

 drivers/video/mmp/Kconfig    | 2 +-
 drivers/video/mmp/hw/Kconfig | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/mmp/Kconfig b/drivers/video/mmp/Kconfig
index e9ea39e13722..969925d694c9 100644
--- a/drivers/video/mmp/Kconfig
+++ b/drivers/video/mmp/Kconfig
@@ -1,6 +1,6 @@
 menuconfig MMP_DISP
         tristate "Marvell MMP Display Subsystem support"
-        depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
+        depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
         help
 	  Marvell Display Subsystem support.
 
diff --git a/drivers/video/mmp/hw/Kconfig b/drivers/video/mmp/hw/Kconfig
index 02f109a20cd0..99f0506afc99 100644
--- a/drivers/video/mmp/hw/Kconfig
+++ b/drivers/video/mmp/hw/Kconfig
@@ -2,12 +2,12 @@ if MMP_DISP
 
 config MMP_DISP_CONTROLLER
 	bool "mmp display controller hw support"
-	depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
+	depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
 	default n
 	help
 		Marvell MMP display hw controller support
 		this controller is used on Marvell PXA910,
-		MMP2, MMP3, PXA988 chips
+		MMP2, PXA988 chips
 
 config MMP_DISP_SPI
 	bool "mmp display controller spi port"
-- 
1.9.0


^ permalink raw reply related

* [PATCH 2/2] video: mmp: Remove references to CPU_PXA988
From: Paul Bolle @ 2014-04-15 11:24 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
  Cc: Richard Weinberger, linux-fbdev, linux-kernel

From: Richard Weinberger <richard@nod.at>

References to the Kconfig symbol CPU_PXA988 were added to the tree in
v3.9. But that Kconfig symbol has never been part of the tree. So get
rid of these references.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
---
0) Tested with git grep.

1) Originally sent as "[PATCH 07/28] Remove CPU_PXA988" two months ago.
Added a proper commit explanation to aid reviewers.

 drivers/video/mmp/Kconfig       |  2 +-
 drivers/video/mmp/hw/Kconfig    |  6 +++---
 drivers/video/mmp/hw/mmp_ctrl.h | 32 --------------------------------
 3 files changed, 4 insertions(+), 36 deletions(-)

diff --git a/drivers/video/mmp/Kconfig b/drivers/video/mmp/Kconfig
index 969925d694c9..f37bd6c47779 100644
--- a/drivers/video/mmp/Kconfig
+++ b/drivers/video/mmp/Kconfig
@@ -1,6 +1,6 @@
 menuconfig MMP_DISP
         tristate "Marvell MMP Display Subsystem support"
-        depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
+        depends on CPU_PXA910 || CPU_MMP2
         help
 	  Marvell Display Subsystem support.
 
diff --git a/drivers/video/mmp/hw/Kconfig b/drivers/video/mmp/hw/Kconfig
index 99f0506afc99..c735d133895c 100644
--- a/drivers/video/mmp/hw/Kconfig
+++ b/drivers/video/mmp/hw/Kconfig
@@ -2,12 +2,12 @@ if MMP_DISP
 
 config MMP_DISP_CONTROLLER
 	bool "mmp display controller hw support"
-	depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
+	depends on CPU_PXA910 || CPU_MMP2
 	default n
 	help
 		Marvell MMP display hw controller support
-		this controller is used on Marvell PXA910,
-		MMP2, PXA988 chips
+		this controller is used on Marvell PXA910 and
+		MMP2 chips
 
 config MMP_DISP_SPI
 	bool "mmp display controller spi port"
diff --git a/drivers/video/mmp/hw/mmp_ctrl.h b/drivers/video/mmp/hw/mmp_ctrl.h
index 53301cfdb1ae..56fdeab34355 100644
--- a/drivers/video/mmp/hw/mmp_ctrl.h
+++ b/drivers/video/mmp/hw/mmp_ctrl.h
@@ -167,11 +167,7 @@ struct lcd_regs {
 				PN2_IOPAD_CONTROL) : LCD_TOP_CTRL)
 
 /* dither configure */
-#ifdef CONFIG_CPU_PXA988
-#define LCD_DITHER_CTRL				(0x01EC)
-#else
 #define LCD_DITHER_CTRL				(0x00A0)
-#endif
 
 #define DITHER_TBL_INDEX_SEL(s)		((s) << 16)
 #define DITHER_MODE2(m)				((m) << 12)
@@ -186,15 +182,6 @@ struct lcd_regs {
 #define DITHER_EN1					(1)
 
 /* dither table data was fixed by video bpp of input and output*/
-#ifdef CONFIG_CPU_PXA988
-#define DITHER_TB_4X4_INDEX0		(0x6e4ca280)
-#define DITHER_TB_4X4_INDEX1		(0x5d7f91b3)
-#define DITHER_TB_4X8_INDEX0		(0xb391a280)
-#define DITHER_TB_4X8_INDEX1		(0x7f5d6e4c)
-#define DITHER_TB_4X8_INDEX2		(0x80a291b3)
-#define DITHER_TB_4X8_INDEX3		(0x4c6e5d7f)
-#define LCD_DITHER_TBL_DATA		(0x01F0)
-#else
 #define DITHER_TB_4X4_INDEX0		(0x3b19f7d5)
 #define DITHER_TB_4X4_INDEX1		(0x082ac4e6)
 #define DITHER_TB_4X8_INDEX0		(0xf7d508e6)
@@ -202,7 +189,6 @@ struct lcd_regs {
 #define DITHER_TB_4X8_INDEX2		(0xc4e6d5f7)
 #define DITHER_TB_4X8_INDEX3		(0x082a193b)
 #define LCD_DITHER_TBL_DATA		(0x00A4)
-#endif
 
 /* Video Frame 0&1 start address registers */
 #define	LCD_SPU_DMA_START_ADDR_Y0	0x00C0
@@ -933,16 +919,9 @@ struct lcd_regs {
 #define LCD_PN2_SQULN2_CTRL			(0x02F0)
 #define ALL_LAYER_ALPHA_SEL			(0x02F4)
 
-/* pxa988 has different MASTER_CTRL from MMP3/MMP2 */
-#ifdef CONFIG_CPU_PXA988
-#define TIMING_MASTER_CONTROL			(0x01F4)
-#define MASTER_ENH(id)				(1 << ((id) + 5))
-#define MASTER_ENV(id)				(1 << ((id) + 6))
-#else
 #define TIMING_MASTER_CONTROL			(0x02F8)
 #define MASTER_ENH(id)				(1 << (id))
 #define MASTER_ENV(id)				(1 << ((id) + 4))
-#endif
 
 #define DSI_START_SEL_SHIFT(id)		(((id) << 1) + 8)
 #define timing_master_config(path, dsi_id, lcd_id) \
@@ -1312,19 +1291,8 @@ struct dsi_regs {
 #define	DSI_PHY_TIME_3_CFG_CSR_TIME_REQRDY_MASK		(0xff)
 #define	DSI_PHY_TIME_3_CFG_CSR_TIME_REQRDY_SHIFT	0
 
-/*
- * DSI timings
- * PXA988 has diffrent ESC CLK with MMP2/MMP3
- * it will be used in dsi_set_dphy() in pxa688_phy.c
- * as low power mode clock.
- */
-#ifdef CONFIG_CPU_PXA988
-#define DSI_ESC_CLK				52  /* Unit: Mhz */
-#define DSI_ESC_CLK_T				19  /* Unit: ns */
-#else
 #define DSI_ESC_CLK				66  /* Unit: Mhz */
 #define DSI_ESC_CLK_T				15  /* Unit: ns */
-#endif
 
 /* LVDS */
 /* LVDS_PHY_CTRL */
-- 
1.9.0


^ permalink raw reply related

* Re: [PATCH 1/2] video: mmp: Remove references to CPU_MMP3
From: Jingoo Han @ 2014-04-15 12:08 UTC (permalink / raw)
  To: 'Paul Bolle', 'Tomi Valkeinen'
  Cc: 'Jean-Christophe Plagniol-Villard',
	'Richard Weinberger', linux-fbdev, linux-kernel,
	'Jingoo Han'
In-Reply-To: <1397561044.1985.47.camel@x220>

On Tuesday, April 15, 2014 8:24 PM, Paul Bolle wrote:
> 
> From: Richard Weinberger <richard@nod.at>
> 
> References to the Kconfig symbol CPU_MMP3 were added to the tree since
> v3.6. But that Kconfig symbol has never been part of the tree. So get
> rid of these references.
> 
> Signed-off-by: Richard Weinberger <richard@nod.at>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
> 0) Tested with git grep.
> 
> 1) Originally sent as "[PATCH 01/28] Remove CPU_MMP3" two months ago.
> Added a proper commit explanation to aid reviewers.
> 
> 2) One reference to CPU_MMP3 remains. I'll remove that in a more
> elaborate patch.
> 
>  drivers/video/mmp/Kconfig    | 2 +-
>  drivers/video/mmp/hw/Kconfig | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/mmp/Kconfig b/drivers/video/mmp/Kconfig
> index e9ea39e13722..969925d694c9 100644
> --- a/drivers/video/mmp/Kconfig
> +++ b/drivers/video/mmp/Kconfig
> @@ -1,6 +1,6 @@
>  menuconfig MMP_DISP
>          tristate "Marvell MMP Display Subsystem support"
> -        depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
> +        depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
>          help
>  	  Marvell Display Subsystem support.
> 
> diff --git a/drivers/video/mmp/hw/Kconfig b/drivers/video/mmp/hw/Kconfig
> index 02f109a20cd0..99f0506afc99 100644
> --- a/drivers/video/mmp/hw/Kconfig
> +++ b/drivers/video/mmp/hw/Kconfig
> @@ -2,12 +2,12 @@ if MMP_DISP
> 
>  config MMP_DISP_CONTROLLER
>  	bool "mmp display controller hw support"
> -	depends on CPU_PXA910 || CPU_MMP2 || CPU_MMP3 || CPU_PXA988
> +	depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
>  	default n
>  	help
>  		Marvell MMP display hw controller support
>  		this controller is used on Marvell PXA910,
> -		MMP2, MMP3, PXA988 chips
> +		MMP2, PXA988 chips
> 
>  config MMP_DISP_SPI
>  	bool "mmp display controller spi port"
> --
> 1.9.0


^ permalink raw reply

* Re: [PATCH 2/2] video: mmp: Remove references to CPU_PXA988
From: Jingoo Han @ 2014-04-15 12:10 UTC (permalink / raw)
  To: 'Paul Bolle', 'Tomi Valkeinen'
  Cc: 'Jean-Christophe Plagniol-Villard',
	'Richard Weinberger', linux-fbdev, linux-kernel,
	'Jingoo Han'
In-Reply-To: <1397561078.1985.48.camel@x220>

On Tuesday, April 15, 2014 8:25 PM, Paul Bolle wrote:
> 
> From: Richard Weinberger <richard@nod.at>
> 
> References to the Kconfig symbol CPU_PXA988 were added to the tree in
> v3.9. But that Kconfig symbol has never been part of the tree. So get
> rid of these references.
> 
> Signed-off-by: Richard Weinberger <richard@nod.at>
> Signed-off-by: Paul Bolle <pebolle@tiscali.nl>

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
> 0) Tested with git grep.
> 
> 1) Originally sent as "[PATCH 07/28] Remove CPU_PXA988" two months ago.
> Added a proper commit explanation to aid reviewers.
> 
>  drivers/video/mmp/Kconfig       |  2 +-
>  drivers/video/mmp/hw/Kconfig    |  6 +++---
>  drivers/video/mmp/hw/mmp_ctrl.h | 32 --------------------------------
>  3 files changed, 4 insertions(+), 36 deletions(-)
> 
> diff --git a/drivers/video/mmp/Kconfig b/drivers/video/mmp/Kconfig
> index 969925d694c9..f37bd6c47779 100644
> --- a/drivers/video/mmp/Kconfig
> +++ b/drivers/video/mmp/Kconfig
> @@ -1,6 +1,6 @@
>  menuconfig MMP_DISP
>          tristate "Marvell MMP Display Subsystem support"
> -        depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
> +        depends on CPU_PXA910 || CPU_MMP2
>          help
>  	  Marvell Display Subsystem support.
> 
> diff --git a/drivers/video/mmp/hw/Kconfig b/drivers/video/mmp/hw/Kconfig
> index 99f0506afc99..c735d133895c 100644
> --- a/drivers/video/mmp/hw/Kconfig
> +++ b/drivers/video/mmp/hw/Kconfig
> @@ -2,12 +2,12 @@ if MMP_DISP
> 
>  config MMP_DISP_CONTROLLER
>  	bool "mmp display controller hw support"
> -	depends on CPU_PXA910 || CPU_MMP2 || CPU_PXA988
> +	depends on CPU_PXA910 || CPU_MMP2
>  	default n
>  	help
>  		Marvell MMP display hw controller support
> -		this controller is used on Marvell PXA910,
> -		MMP2, PXA988 chips
> +		this controller is used on Marvell PXA910 and
> +		MMP2 chips
> 
>  config MMP_DISP_SPI
>  	bool "mmp display controller spi port"
> diff --git a/drivers/video/mmp/hw/mmp_ctrl.h b/drivers/video/mmp/hw/mmp_ctrl.h
> index 53301cfdb1ae..56fdeab34355 100644
> --- a/drivers/video/mmp/hw/mmp_ctrl.h
> +++ b/drivers/video/mmp/hw/mmp_ctrl.h
> @@ -167,11 +167,7 @@ struct lcd_regs {
>  				PN2_IOPAD_CONTROL) : LCD_TOP_CTRL)
> 
>  /* dither configure */
> -#ifdef CONFIG_CPU_PXA988
> -#define LCD_DITHER_CTRL				(0x01EC)
> -#else
>  #define LCD_DITHER_CTRL				(0x00A0)
> -#endif
> 
>  #define DITHER_TBL_INDEX_SEL(s)		((s) << 16)
>  #define DITHER_MODE2(m)				((m) << 12)
> @@ -186,15 +182,6 @@ struct lcd_regs {
>  #define DITHER_EN1					(1)
> 
>  /* dither table data was fixed by video bpp of input and output*/
> -#ifdef CONFIG_CPU_PXA988
> -#define DITHER_TB_4X4_INDEX0		(0x6e4ca280)
> -#define DITHER_TB_4X4_INDEX1		(0x5d7f91b3)
> -#define DITHER_TB_4X8_INDEX0		(0xb391a280)
> -#define DITHER_TB_4X8_INDEX1		(0x7f5d6e4c)
> -#define DITHER_TB_4X8_INDEX2		(0x80a291b3)
> -#define DITHER_TB_4X8_INDEX3		(0x4c6e5d7f)
> -#define LCD_DITHER_TBL_DATA		(0x01F0)
> -#else
>  #define DITHER_TB_4X4_INDEX0		(0x3b19f7d5)
>  #define DITHER_TB_4X4_INDEX1		(0x082ac4e6)
>  #define DITHER_TB_4X8_INDEX0		(0xf7d508e6)
> @@ -202,7 +189,6 @@ struct lcd_regs {
>  #define DITHER_TB_4X8_INDEX2		(0xc4e6d5f7)
>  #define DITHER_TB_4X8_INDEX3		(0x082a193b)
>  #define LCD_DITHER_TBL_DATA		(0x00A4)
> -#endif
> 
>  /* Video Frame 0&1 start address registers */
>  #define	LCD_SPU_DMA_START_ADDR_Y0	0x00C0
> @@ -933,16 +919,9 @@ struct lcd_regs {
>  #define LCD_PN2_SQULN2_CTRL			(0x02F0)
>  #define ALL_LAYER_ALPHA_SEL			(0x02F4)
> 
> -/* pxa988 has different MASTER_CTRL from MMP3/MMP2 */
> -#ifdef CONFIG_CPU_PXA988
> -#define TIMING_MASTER_CONTROL			(0x01F4)
> -#define MASTER_ENH(id)				(1 << ((id) + 5))
> -#define MASTER_ENV(id)				(1 << ((id) + 6))
> -#else
>  #define TIMING_MASTER_CONTROL			(0x02F8)
>  #define MASTER_ENH(id)				(1 << (id))
>  #define MASTER_ENV(id)				(1 << ((id) + 4))
> -#endif
> 
>  #define DSI_START_SEL_SHIFT(id)		(((id) << 1) + 8)
>  #define timing_master_config(path, dsi_id, lcd_id) \
> @@ -1312,19 +1291,8 @@ struct dsi_regs {
>  #define	DSI_PHY_TIME_3_CFG_CSR_TIME_REQRDY_MASK		(0xff)
>  #define	DSI_PHY_TIME_3_CFG_CSR_TIME_REQRDY_SHIFT	0
> 
> -/*
> - * DSI timings
> - * PXA988 has diffrent ESC CLK with MMP2/MMP3
> - * it will be used in dsi_set_dphy() in pxa688_phy.c
> - * as low power mode clock.
> - */
> -#ifdef CONFIG_CPU_PXA988
> -#define DSI_ESC_CLK				52  /* Unit: Mhz */
> -#define DSI_ESC_CLK_T				19  /* Unit: ns */
> -#else
>  #define DSI_ESC_CLK				66  /* Unit: Mhz */
>  #define DSI_ESC_CLK_T				15  /* Unit: ns */
> -#endif
> 
>  /* LVDS */
>  /* LVDS_PHY_CTRL */
> --
> 1.9.0


^ permalink raw reply

* spende /Donation
From: isabelle @ 2014-04-15 19:47 UTC (permalink / raw)
  To: linux-fbdev

Hallo
Wenn ich diese Nachricht zu senden wollte, ist dies nicht einfach Zufall. Dies ist, weil Ihre e-Mail vom elektronischen Roboter gesichert meine WX.7AR BW ausgewählt wurde.
Zunächst möchte ich mich für dieses Eindringen in Ihr Leben zu entschuldigen, obwohl ich zugeben, dass es mir sehr wichtig. Ich bin Isabelle Vasudev. Ich leide an Krebs im Hals seit nun mehr als 3 Jahre und eine halbe und es leider, mein Arzt hat gerade informiert mich, dass ich bin voller unheilbar und, dass meine Tage, wegen meinen etwas gezählt sind abgebaut Zustand. Ich bin eine Witwe und ich habe keine Kind, das ich beginne zu bedauern.
In der Tat ist der Grund, warum ich Sie kontaktieren bin, möchte ich einen Teil von meinem Grundstück zu spenden, weil ich niemand, wer die Erben konnte. Ich habe fast mein ganzes Zeug, darunter ein Unternehmen der Export von Holz, Gummi und Stahl-Industrie in Afrika, wo ich wohne nun mehr 10 Jahren, verkauft. Ein großer Teil der Gelder gesammelt wurde mit unterschiedlichen Verbänden humanitären Charakter überall in der Welt, aber besonders hier in Afrika bezahlt.
Im Hinblick auf den Rest der Summe genau in Höhe von 750.000, 00euros (sieben hundert und fünfzig tausend Euro) auf eine gesperrte Mitarbeiter-Account, meine letzte wünschen würde Sie es spenden, so dass Sie in Ihrer Branche und vor allem den humanitären investieren können. Ich bin ganz bewusst was ich zu tun beabsichtigen, und ich denke, trotz der Tatsache, die wir nicht wissen, werdet ihr diese Summe gut nutzen. Ich bitte Sie, bitte dieses Erbe zu akzeptieren, ohne jedoch Fragen Sie alles, was in zurückgeben wenn es nicht immer denken, gutes zu tun, um dich herum, was ich nicht getan habe, in meiner Existenz.
Das heißt, wird auf einer verantwortlichen Person und besonders gutem Glauben fallen zu lassen beruhigt, ich möchte bitten, dass Sie bitte mich bei den meisten schnell kontaktieren, um weitere Erklärung über die Gründe für meine Geste und den Verlauf der Dinge zu geben. Bitte kontaktieren Sie mich so bald wie möglich, wenn Sie mein Angebot akzeptieren.
Gott möge mit dir sein!
Ich fordere Sie auf, mich über meine persönliche e-Mail-Adresse zu kontaktieren:
Isabelle.claude654@laposte.net
Der Frieden und Barmherzigkeit Gottes möge mit dir sein.
Mrs Isabelle


^ permalink raw reply

* Re: [PATCH RESEND] video: bf54x-lq043fb: fix build error
From: Steven Miao @ 2014-04-16  2:48 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Steven Miao, Jean-Christophe Plagniol-Villard, bfin,
	open list:CAN NETWORK DRIVERS <linux-can@vger.kernel.org>, open list:NETWORKING DRIVERS <netdev@vger.kernel.org>, open list,
	linux-fbdev
In-Reply-To: <534CFFF5.70801@ti.com>

Tomi,

On Tue, Apr 15, 2014 at 5:46 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On 15/04/14 10:17, Steven Miao wrote:
>> From: Steven Miao <realmz6@gmail.com>
>>
>> include <linux/gpio.h>, drop <asm/gpio.h>
>>
>
> Thanks, queued for 3.15 fixes.
>
> Btw, usually it's good to say in the description what kind of build
> error happens (i.e. copy paste the error).
Thanks. I'll add more description next time.
>
>  Tomi
>
>
-steven

^ permalink raw reply

* [GIT PULL] fbdev fixes for 3.15
From: Tomi Valkeinen @ 2014-04-16  9:03 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 1964 bytes --]

Hi Linus,

Please pull fbdev fixes for 3.15.

The drivers/video/Kconfig change in this pull request will conflict with the
fbdev reorder series, which is not yet in your tree. If that's an issue, I can
resend this without the Kconfig change.

 Tomi

The following changes since commit c9eaa447e77efe77b7fa4c953bd62de8297fd6c5:

  Linux 3.15-rc1 (2014-04-13 14:18:35 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git tags/fbdev-fixes-3.15

for you to fetch changes up to c26ef3eb3c11274bad1b64498d0a134f85755250:

  video: bf54x-lq043fb: fix build error (2014-04-15 12:44:16 +0300)

----------------------------------------------------------------
fbdev fixes for 3.15:

- fix build errors for bf54x-lq043fb and imxfb
- fbcon fix for da8xx-fb
- omapdss fixes for hdmi audio, irq handling and fclk calculation

----------------------------------------------------------------
Alexander Shiyan (1):
      video: imxfb: Select LCD_CLASS_DEVICE unconditionally

Jon Ringle (1):
      video: da8xx-fb: Fix casting of info->pseudo_palette

Jyri Sarha (2):
      OMAPDSS: Take pixelclock unit change into account in hdmi_compute_acr()
      OMAPDSS: Change struct reg_field to dispc_reg_field

Steven Miao (1):
      video: bf54x-lq043fb: fix build error

Tomi Valkeinen (2):
      OMAPDSS: fix rounding when calculating fclk rate
      OMAPDSS: fix shared irq handlers

 drivers/video/Kconfig                 |  2 ++
 drivers/video/bf54x-lq043fb.c         |  2 +-
 drivers/video/da8xx-fb.c              | 10 +-----
 drivers/video/omap2/dss/dispc.c       | 67 +++++++++++++++++++++++++++++------
 drivers/video/omap2/dss/dsi.c         | 20 +++++++++++
 drivers/video/omap2/dss/dss.c         |  4 +--
 drivers/video/omap2/dss/dss.h         |  6 ----
 drivers/video/omap2/dss/hdmi_common.c |  8 ++---
 8 files changed, 87 insertions(+), 32 deletions(-)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* [PATCH] fbdev: fix possible NULL pointer derefernce
From: Daeseok Youn @ 2014-04-16  9:40 UTC (permalink / raw)
  To: plagnioj
  Cc: tomi.valkeinen, jg1.han, laurent.pinchart, daeseok.youn,
	robdclark, linux-fbdev, linux-kernel

The spec->modedb can be NULL by fb_create_modedb().

And also smatch says:
drivers/video/fbdev/core/fbmon.c:975 fb_edid_to_monspecs() error:
potential null dereference 'specs->modedb'.
(fb_create_modedb returns null)

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/video/fbdev/core/fbmon.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index c204ebe..db274ca 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -966,6 +966,9 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
 
 	specs->modedb = fb_create_modedb(edid, &specs->modedb_len);
 
+	if (!specs->modedb)
+		return;
+
 	/*
 	 * Workaround for buggy EDIDs that sets that the first
 	 * detailed timing is preferred but has not detailed
-- 
1.7.4.4


^ permalink raw reply related

* Re: [PATCH] fbdev: fix possible NULL pointer derefernce
From: Jean-Christophe PLAGNIOL-VILLARD @ 2014-04-16 12:38 UTC (permalink / raw)
  To: Daeseok Youn
  Cc: Jean-Christophe PLAGNIOL-VILLARD, tomi.valkeinen, jg1.han,
	laurent.pinchart, robdclark, linux-fbdev, linux-kernel
In-Reply-To: <20140416094034.GA18082@devel>


On Apr 16, 2014, at 5:40 PM, Daeseok Youn <daeseok.youn@gmail.com> wrote:

> 
> The spec->modedb can be NULL by fb_create_modedb().
> 
> And also smatch says:
> drivers/video/fbdev/core/fbmon.c:975 fb_edid_to_monspecs() error:
> potential null dereference 'specs->modedb'.
> (fb_create_modedb returns null)
> 
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
> drivers/video/fbdev/core/fbmon.c |    3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
> index c204ebe..db274ca 100644
> --- a/drivers/video/fbdev/core/fbmon.c
> +++ b/drivers/video/fbdev/core/fbmon.c
> @@ -966,6 +966,9 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
> 
> 	specs->modedb = fb_create_modedb(edid, &specs->modedb_len);
> 
> +	if (!specs->modedb)
> +		return;
> +

we need to return an error and trace it

Best Regards,
J.
> 	/*
> 	 * Workaround for buggy EDIDs that sets that the first
> 	 * detailed timing is preferred but has not detailed
> -- 
> 1.7.4.4
> 


^ permalink raw reply

* Re: [GIT PULL] fbdev fixes for 3.15
From: Linus Torvalds @ 2014-04-16 23:04 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: linux-kernel, linux-fbdev
In-Reply-To: <534E4775.8010009@ti.com>

On Wed, Apr 16, 2014 at 2:03 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>
> The drivers/video/Kconfig change in this pull request will conflict with the
> fbdev reorder series, which is not yet in your tree. If that's an issue, I can
> resend this without the Kconfig change.

I was actually hoping/expecting you to just resend the renaming
rebased on top of 3.15-rc1. Or maybe you could do it on top of this.

            Linus

^ permalink raw reply

* Re: [PATCH] fbdev: fix possible NULL pointer derefernce
From: DaeSeok Youn @ 2014-04-17  0:00 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: tomi.valkeinen, jg1.han, laurent.pinchart, Rob Clark, linux-fbdev,
	linux-kernel
In-Reply-To: <6A3BE65E-93FD-4E22-A55E-49E54E435558@jcrosoft.com>

Hello,

2014-04-16 21:38 GMT+09:00 Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com>:
>
> On Apr 16, 2014, at 5:40 PM, Daeseok Youn <daeseok.youn@gmail.com> wrote:
>
>>
>> The spec->modedb can be NULL by fb_create_modedb().
>>
>> And also smatch says:
>> drivers/video/fbdev/core/fbmon.c:975 fb_edid_to_monspecs() error:
>> potential null dereference 'specs->modedb'.
>> (fb_create_modedb returns null)
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>> ---
>> drivers/video/fbdev/core/fbmon.c |    3 +++
>> 1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
>> index c204ebe..db274ca 100644
>> --- a/drivers/video/fbdev/core/fbmon.c
>> +++ b/drivers/video/fbdev/core/fbmon.c
>> @@ -966,6 +966,9 @@ void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs)
>>
>>       specs->modedb = fb_create_modedb(edid, &specs->modedb_len);
>>
>> +     if (!specs->modedb)
>> +             return;
>> +
>
> we need to return an error and trace it
Yes, you're right. I will change return type from void to int and add
to handle an error when this function(fb_edid_to_monspecs) is called.

I will send this patch as your comment.

Thanks for review.

Daeseok Youn.
>
> Best Regards,
> J.
>>       /*
>>        * Workaround for buggy EDIDs that sets that the first
>>        * detailed timing is preferred but has not detailed
>> --
>> 1.7.4.4
>>
>

^ permalink raw reply

* Re: [GIT PULL] fbdev fixes for 3.15
From: Stephen Rothwell @ 2014-04-17  3:24 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Tomi Valkeinen, linux-kernel, linux-fbdev
In-Reply-To: <CA+55aFz7Hgjc9wmiriqGT8VXNF-7b0aUKf96r=TCP+1NOTSVeQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

On Wed, 16 Apr 2014 16:04:39 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> On Wed, Apr 16, 2014 at 2:03 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> >
> > The drivers/video/Kconfig change in this pull request will conflict with the
> > fbdev reorder series, which is not yet in your tree. If that's an issue, I can
> > resend this without the Kconfig change.
> 
> I was actually hoping/expecting you to just resend the renaming
> rebased on top of 3.15-rc1. Or maybe you could do it on top of this.

Yeah, I was kind of hoping that this movement of files would be done with
sooner rather than later ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH] video: mx3fb: Add backlight support
From: Alexander Stein @ 2014-04-17  6:05 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1396510675-14969-1-git-send-email-alexander.stein@systec-electronic.com>

Any feedback on this?

Alexander

On Thursday 03 April 2014 09:37:55, Alexander Stein wrote:
> Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
> ---
>  drivers/video/mx3fb.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 98 insertions(+)
> 
> diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
> index 142e860..10a7244 100644
> --- a/drivers/video/mx3fb.c
> +++ b/drivers/video/mx3fb.c
> @@ -27,6 +27,7 @@
>  #include <linux/clk.h>
>  #include <linux/mutex.h>
>  #include <linux/dma/ipu-dma.h>
> +#include <linux/backlight.h>
>  
>  #include <linux/platform_data/dma-imx.h>
>  #include <linux/platform_data/video-mx3fb.h>
> @@ -34,6 +35,12 @@
>  #include <asm/io.h>
>  #include <asm/uaccess.h>
>  
> +#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
> +	(defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) && \
> +		defined(CONFIG_MX3FB_MODULE))
> +#define PWM_BACKLIGHT_AVAILABLE
> +#endif
> +
>  #define MX3FB_NAME		"mx3_sdc_fb"
>  
>  #define MX3FB_REG_OFFSET	0xB4
> @@ -242,6 +249,10 @@ struct mx3fb_data {
>  	spinlock_t		lock;
>  	struct device		*dev;
>  
> +#ifdef PWM_BACKLIGHT_AVAILABLE
> +	struct backlight_device	*bl;
> +#endif
> +
>  	uint32_t		h_start_width;
>  	uint32_t		v_start_width;
>  	enum disp_data_mapping	disp_data_fmt;
> @@ -271,6 +282,74 @@ struct mx3fb_info {
>  	struct fb_var_screeninfo	cur_var; /* current var info */
>  };
>  
> +static void sdc_set_brightness(struct mx3fb_data *mx3fb, uint8_t value);
> +
> +#ifdef PWM_BACKLIGHT_AVAILABLE
> +static u32 sdc_get_brightness(struct mx3fb_data *mx3fb);
> +
> +static int mx3fb_bl_get_brightness(struct backlight_device *bl)
> +{
> +	struct mx3fb_data *fbd = bl_get_data(bl);
> +
> +	return sdc_get_brightness(fbd);
> +}
> +
> +static int mx3fb_bl_update_status(struct backlight_device *bl)
> +{
> +	struct mx3fb_data *fbd = bl_get_data(bl);
> +	int brightness = bl->props.brightness;
> +
> +	if (bl->props.power != FB_BLANK_UNBLANK)
> +		brightness = 0;
> +	if (bl->props.fb_blank != FB_BLANK_UNBLANK)
> +		brightness = 0;
> +
> +	fbd->backlight_level = (fbd->backlight_level & ~0xFF) | brightness;
> +
> +	sdc_set_brightness(fbd, fbd->backlight_level);
> +
> +	return 0;
> +}
> +
> +static const struct backlight_ops mx3fb_lcdc_bl_ops = {
> +	.update_status = mx3fb_bl_update_status,
> +	.get_brightness = mx3fb_bl_get_brightness,
> +};
> +
> +static void mx3fb_init_backlight(struct mx3fb_data *fbd)
> +{
> +	struct backlight_properties props;
> +	struct backlight_device	*bl;
> +
> +	if (fbd->bl)
> +		return;
> +
> +	memset(&props, 0, sizeof(struct backlight_properties));
> +	props.max_brightness = 0xff;
> +	props.type = BACKLIGHT_RAW;
> +	sdc_set_brightness(fbd, fbd->backlight_level);
> +
> +	bl = backlight_device_register("mx3fb-bl", fbd->dev, fbd,
> +				       &mx3fb_lcdc_bl_ops, &props);
> +	if (IS_ERR(bl)) {
> +		dev_err(fbd->dev, "error %ld on backlight register\n",
> +				PTR_ERR(bl));
> +		return;
> +	}
> +
> +	fbd->bl = bl;
> +	bl->props.power = FB_BLANK_UNBLANK;
> +	bl->props.fb_blank = FB_BLANK_UNBLANK;
> +	bl->props.brightness = mx3fb_bl_get_brightness(bl);
> +}
> +
> +static void mx3fb_exit_backlight(struct mx3fb_data *fbd)
> +{
> +	if (fbd->bl)
> +		backlight_device_unregister(fbd->bl);
> +}
> +#endif
> +
>  static void mx3fb_dma_done(void *);
>  
>  /* Used fb-mode and bpp. Can be set on kernel command line, therefore file-static. */
> @@ -628,6 +707,18 @@ static int sdc_set_global_alpha(struct mx3fb_data *mx3fb, bool enable, uint8_t a
>  	return 0;
>  }
>  
> +#ifdef PWM_BACKLIGHT_AVAILABLE
> +static u32 sdc_get_brightness(struct mx3fb_data *mx3fb)
> +{
> +	u32 brightness;
> +
> +	brightness = mx3fb_read_reg(mx3fb, SDC_PWM_CTRL);
> +	brightness = (brightness >> 16) & 0xFF;
> +
> +	return brightness;
> +}
> +#endif
> +
>  static void sdc_set_brightness(struct mx3fb_data *mx3fb, uint8_t value)
>  {
>  	dev_dbg(mx3fb->dev, "%s: value = %d\n", __func__, value);
> @@ -1534,6 +1625,9 @@ static int mx3fb_probe(struct platform_device *pdev)
>  	if (ret < 0)
>  		goto eisdc0;
>  
> +#ifdef PWM_BACKLIGHT_AVAILABLE
> +	mx3fb_init_backlight(mx3fb);
> +#endif
>  	return 0;
>  
>  eisdc0:
> @@ -1557,6 +1651,10 @@ static int mx3fb_remove(struct platform_device *dev)
>  	chan = &mx3_fbi->idmac_channel->dma_chan;
>  	release_fbi(fbi);
>  
> +#ifdef PWM_BACKLIGHT_AVAILABLE
> +	mx3fb_exit_backlight(mx3fb);
> +#endif
> +
>  	dma_release_channel(chan);
>  	dmaengine_put();
>  
> 

-- 
Dipl.-Inf. Alexander Stein

SYS TEC electronic GmbH
Am Windrad 2
08468 Heinsdorfergrund
Tel.: 03765 38600-1156
Fax: 03765 38600-4100
Email: alexander.stein@systec-electronic.com
Website: www.systec-electronic.com
 
Managing Director: Dipl.-Phys. Siegmar Schmidt
Commercial registry: Amtsgericht Chemnitz, HRB 28082


^ permalink raw reply

* Re: [GIT PULL] fbdev fixes for 3.15
From: Tomi Valkeinen @ 2014-04-17  7:08 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-fbdev, Stephen Rothwell
In-Reply-To: <CA+55aFz7Hgjc9wmiriqGT8VXNF-7b0aUKf96r=TCP+1NOTSVeQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 698 bytes --]

On 17/04/14 02:04, Linus Torvalds wrote:
> On Wed, Apr 16, 2014 at 2:03 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>>
>> The drivers/video/Kconfig change in this pull request will conflict with the
>> fbdev reorder series, which is not yet in your tree. If that's an issue, I can
>> resend this without the Kconfig change.
> 
> I was actually hoping/expecting you to just resend the renaming
> rebased on top of 3.15-rc1. Or maybe you could do it on top of this.

Oh, sorry. I somehow got the impression that you were fine with what I
had sent, and you'll just merge it after -rc1.

I'll send a rebased version, based on fbdev-fixes-3.15. So pull this one
first.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox