* PATCH] video: fix up versatile CLCD helper move
From: Arnd Bergmann @ 2014-07-15 8:39 UTC (permalink / raw)
To: linux-arm-kernel
commit 11c32d7b6274cb0f ("video: move Versatile CLCD helpers")
moved files out of the plat-versatile directory but in the process
got a few of the dependencies wrong:
- If CONFIG_FB is not set, the file no longer gets built, resulting
in a link error
- If CONFIG_FB or CONFIG_FB_ARMCLCD are disabled, we also get a
Kconfig warning for incorrect dependencies due to the symbol
being 'select'ed from the platform Kconfig.
- When the file is not built, we also get a link error for missing
symbols.
This patch should fix all three, by removing the 'select' statements,
changing the Kconfig description of the symbol to be enabled in
exactly the right configurations, and adding inline stub functions
for the case when the framebuffer driver is disabled.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fceb014c54a1..76e0d6752bd8 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -336,7 +336,6 @@ config ARCH_VERSATILE
select HAVE_MACH_CLKDEV
select ICST
select PLAT_VERSATILE
- select PLAT_VERSATILE_CLCD
select PLAT_VERSATILE_CLOCK
select VERSATILE_FPGA_IRQ
help
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig
index 3b02ba4e7094..4b7649d59bf6 100644
--- a/arch/arm/mach-realview/Kconfig
+++ b/arch/arm/mach-realview/Kconfig
@@ -9,7 +9,6 @@ config ARCH_REALVIEW
select GPIO_PL061 if GPIOLIB
select ICST
select PLAT_VERSATILE
- select PLAT_VERSATILE_CLCD
help
This enables support for ARM Ltd RealView boards.
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index d8b9330f896a..e9166dfc4756 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -13,7 +13,6 @@ menuconfig ARCH_VEXPRESS
select ICST
select NO_IOPORT_MAP
select PLAT_VERSATILE
- select PLAT_VERSATILE_CLCD
select POWER_RESET
select POWER_RESET_VEXPRESS
select POWER_SUPPLY
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index e2dd9b493580..a16efe729988 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -292,10 +292,8 @@ config FB_ARMCLCD
# Helper logic selected only by the ARM Versatile platform family.
config PLAT_VERSATILE_CLCD
- depends on FB_ARMCLCD
- depends on (PLAT_VERSATILE || ARCH_INTEGRATOR)
- default y
- bool
+ def_bool ARCH_VERSATILE || ARCH_REALVIEW || ARCH_VEXPRESS
+ depends on FB_ARMCLCD && FB=y
config FB_ACORN
bool "Acorn VIDC support"
diff --git a/include/linux/platform_data/video-clcd-versatile.h b/include/linux/platform_data/video-clcd-versatile.h
index 6bb6a1d2019b..09ccf182af4d 100644
--- a/include/linux/platform_data/video-clcd-versatile.h
+++ b/include/linux/platform_data/video-clcd-versatile.h
@@ -1,9 +1,27 @@
#ifndef PLAT_CLCD_H
#define PLAT_CLCD_H
+#ifdef CONFIG_PLAT_VERSATILE_CLCD
struct clcd_panel *versatile_clcd_get_panel(const char *);
int versatile_clcd_setup_dma(struct clcd_fb *, unsigned long);
int versatile_clcd_mmap_dma(struct clcd_fb *, struct vm_area_struct *);
void versatile_clcd_remove_dma(struct clcd_fb *);
+#else
+static inline struct clcd_panel *versatile_clcd_get_panel(const char *s)
+{
+ return NULL;
+}
+static inline int versatile_clcd_setup_dma(struct clcd_fb *fb, unsigned long framesize)
+{
+ return -ENODEV;
+}
+static inline int versatile_clcd_mmap_dma(struct clcd_fb *fb, struct vm_area_struct *vm)
+{
+ return -ENODEV;
+}
+static inline void versatile_clcd_remove_dma(struct clcd_fb *fb)
+{
+}
+#endif
#endif
^ permalink raw reply related
* [PATCH v2 trivial 5/6] video: mx3fb: Update comment for dmaengine_prep_slave_sg() API
From: Geert Uytterhoeven @ 2014-07-11 16:13 UTC (permalink / raw)
To: Vinod Koul, Dan Williams
Cc: dmaengine, linux-kernel, Geert Uytterhoeven,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jiri Kosina,
linux-fbdev
In-Reply-To: <1405095208-14642-1-git-send-email-geert+renesas@glider.be>
Commit 16052827d98fbc13c31ebad560af4bd53e2b4dd5 ("dmaengine/dma_slave:
introduce inline wrappers") changed the code to use the new API, but forgot
to update a comment.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: linux-fbdev@vger.kernel.org
--
v2:
- New
---
drivers/video/fbdev/mx3fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/mx3fb.c b/drivers/video/fbdev/mx3fb.c
index c645a0a0c341..5e97baf92721 100644
--- a/drivers/video/fbdev/mx3fb.c
+++ b/drivers/video/fbdev/mx3fb.c
@@ -1179,7 +1179,7 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
/*
* We enable the End of Frame interrupt, which will free a tx-descriptor,
- * which we will need for the next device_prep_slave_sg(). The
+ * which we will need for the next dmaengine_prep_slave_sg(). The
* IRQ-handler will disable the IRQ again.
*/
init_completion(&mx3_fbi->flip_cmpl);
--
1.9.1
^ permalink raw reply related
* [patch] video: of: display_timing: double free on error
From: Dan Carpenter @ 2014-07-11 9:21 UTC (permalink / raw)
To: linux-fbdev
The display_timings_release() function frees "disp" and we free it
again on the next line.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 987edf1..5c098d5 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -236,6 +236,7 @@ timingfail:
if (native_mode)
of_node_put(native_mode);
display_timings_release(disp);
+ disp = NULL;
entryfail:
kfree(disp);
dispfail:
^ permalink raw reply related
* Re: [PATCH] video: backlight: jornada720_lcd.c: Cleaning up variable that is never used
From: Lee Jones @ 2014-07-10 7:40 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Rickard Strandqvist', 'Bryan Wu',
'Jean-Christophe Plagniol-Villard',
'Tomi Valkeinen', 'Linux Fbdev development list',
linux-kernel
In-Reply-To: <003001cf9be6$b45cfcd0$1d16f670$%han@samsung.com>
On Thu, 10 Jul 2014, Jingoo Han wrote:
> On Thursday, July 10, 2014 7:08 AM, Rickard Strandqvist wrote:
> > 2014-07-09 18:30 GMT+02:00 Lee Jones <lee.jones@linaro.org>:
> > > On Mon, 07 Jul 2014, Rickard Strandqvist wrote:
> > >
> > >> Variable ar assigned a value that is never used.
> > >> I have also removed all the code that thereby serves no purpose,
> > >> and made same change to clarify the similarities in function.
> > >>
> > >> This was found using a static code analysis program called cppcheck
> > >>
> > >> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> > >> ---
> > >> drivers/video/backlight/jornada720_lcd.c | 31 ++++++++++++++----------------
> > >> 1 file changed, 14 insertions(+), 17 deletions(-)
> > >>
> > >> diff --git a/drivers/video/backlight/jornada720_lcd.c b/drivers/video/backlight/jornada720_lcd.c
> > >> index da3876c..d16abcf 100644
> > >> --- a/drivers/video/backlight/jornada720_lcd.c
> > >> +++ b/drivers/video/backlight/jornada720_lcd.c
> > >> @@ -36,44 +36,41 @@ static int jornada_lcd_get_power(struct lcd_device *ld)
> > >>
> > >> static int jornada_lcd_get_contrast(struct lcd_device *ld)
> > >> {
> > >> - int ret;
> > >> + int ret = -ETIMEDOUT;
> > >>
> > >> if (jornada_lcd_get_power(ld) != FB_BLANK_UNBLANK)
> > >> return 0;
> > >>
> > >> jornada_ssp_start();
> > >>
> > >> - if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY) {
> > >> + if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY)
> > >> dev_err(&ld->dev, "get contrast failed\n");
> > >> - jornada_ssp_end();
> > >> - return -ETIMEDOUT;
> > >> - } else {
> > >> + else
> > >> ret = jornada_ssp_byte(TXDUMMY);
> > >> - jornada_ssp_end();
> > >> - return ret;
> > >> - }
> > >> +
> > >> + jornada_ssp_end();
> > >> +
> > >> + return ret;
> > >> }
> > >>
> > >> static int jornada_lcd_set_contrast(struct lcd_device *ld, int value)
> > >> {
> > >> - int ret;
> > >> + int ret = -ETIMEDOUT;
> > >>
> > >> jornada_ssp_start();
> > >>
> > >> /* start by sending our set contrast cmd to mcu */
> > >> - ret = jornada_ssp_byte(SETCONTRAST);
> > >> -
> > >> + if (jornada_ssp_byte(SETCONTRAST) != TXDUMMY)
> > >> + dev_err(&ld->dev, "set contrast failed\n");
> > >> /* push the new value */
> > >> - if (jornada_ssp_byte(value) != TXDUMMY) {
> > >> + else if (jornada_ssp_byte(value) != TXDUMMY)
> > >> dev_err(&ld->dev, "set contrast failed\n");
> > >> - jornada_ssp_end();
> > >> - return -ETIMEDOUT;
> > >> - }
> > >> + else /* if we get here we can assume everything went well */
> > >> + ret = 0;
> > >>
> > >> - /* if we get here we can assume everything went well */
> > >> jornada_ssp_end();
> > >>
> > >> - return 0;
> > >> + return ret;
> > >> }
> > >>
> > >> static int jornada_lcd_set_power(struct lcd_device *ld, int power)
> > >
> > > Counter suggestion.
> > >
> > > What do you think, I think this looks cleaner:
> > >
> > > static int jornada_lcd_get_contrast(struct lcd_device *ld)
> > > {
> > > int ret;
> > >
> > > if (jornada_lcd_get_power(ld) != FB_BLANK_UNBLANK)
> > > return 0;
> > >
> > > jornada_ssp_start();
> > >
> > > if (jornada_ssp_byte(GETCONTRAST) = TXDUMMY) {
> > > ret = jornada_ssp_byte(TXDUMMY);
> > > goto success;
> > > }
> > >
> > > dev_err(&ld->dev, "failed to set contrast\n");
> > > ret = -ETIMEDOUT;
> > >
> > > success:
> > > jornada_ssp_end();
> > > return ret;
> > > }
> > >
> > > static int jornada_lcd_set_contrast(struct lcd_device *ld, int value)
> > > {
> > > int ret = 0;
> > >
> > > jornada_ssp_start();
> > >
> > > /* start by sending our set contrast cmd to mcu */
> > > if (jornada_ssp_byte(SETCONTRAST) = TXDUMMY) {
> > > /* if successful, push the new value */
> > > if (jornada_ssp_byte(value) = TXDUMMY)
> > > goto success;
> > > }
> > >
> > > dev_err(&ld->dev, "failed to set contrast\n");
> > > ret = -ETIMEDOUT;
> > >
> > > success:
> > > jornada_ssp_end();
> > > return ret;
> > > }
> >
> >
> > Hi Lee!
> >
> > Yes, I agree!
> > Both are clean without so much repetition of code, which was what annoyd me.
> > But yours is clearer when things go good or bad, nice 1 ;)
>
> Hi Rickard Strandqvist,
>
> I would liked to prefer Lee Jones's code. It looks cleaner.
>
> >
> > I do not know what I can/may do, but I'll try. Remove what is not ok :-)
> >
> > Reviewed-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> > Suggested-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>
> I suggest the following.
>
> Suggested-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> Acked-by: Jingoo Han <jg1.han@samsung.com>
> Cc: Bryan Wu <cooloney@gmail.com>
Very well, I will submit as a patch with Jingoo's Ack and Rickard's
Suggested-by and Reviewed-by. Is anyone able to test this patch?
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* Re: [PATCH] video: backlight: jornada720_lcd.c: Cleaning up variable that is never used
From: Jingoo Han @ 2014-07-10 2:28 UTC (permalink / raw)
To: 'Rickard Strandqvist', 'Lee Jones'
Cc: 'Bryan Wu', 'Jean-Christophe Plagniol-Villard',
'Tomi Valkeinen', 'Linux Fbdev development list',
linux-kernel, 'Jingoo Han'
In-Reply-To: <CAFo99gYErPZo_f-5kZkDqZ0YSPirE1fLn2F1odMPSjuUdLUQ8A@mail.gmail.com>
On Thursday, July 10, 2014 7:08 AM, Rickard Strandqvist wrote:
> 2014-07-09 18:30 GMT+02:00 Lee Jones <lee.jones@linaro.org>:
> > On Mon, 07 Jul 2014, Rickard Strandqvist wrote:
> >
> >> Variable ar assigned a value that is never used.
> >> I have also removed all the code that thereby serves no purpose,
> >> and made same change to clarify the similarities in function.
> >>
> >> This was found using a static code analysis program called cppcheck
> >>
> >> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> >> ---
> >> drivers/video/backlight/jornada720_lcd.c | 31 ++++++++++++++----------------
> >> 1 file changed, 14 insertions(+), 17 deletions(-)
> >>
> >> diff --git a/drivers/video/backlight/jornada720_lcd.c b/drivers/video/backlight/jornada720_lcd.c
> >> index da3876c..d16abcf 100644
> >> --- a/drivers/video/backlight/jornada720_lcd.c
> >> +++ b/drivers/video/backlight/jornada720_lcd.c
> >> @@ -36,44 +36,41 @@ static int jornada_lcd_get_power(struct lcd_device *ld)
> >>
> >> static int jornada_lcd_get_contrast(struct lcd_device *ld)
> >> {
> >> - int ret;
> >> + int ret = -ETIMEDOUT;
> >>
> >> if (jornada_lcd_get_power(ld) != FB_BLANK_UNBLANK)
> >> return 0;
> >>
> >> jornada_ssp_start();
> >>
> >> - if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY) {
> >> + if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY)
> >> dev_err(&ld->dev, "get contrast failed\n");
> >> - jornada_ssp_end();
> >> - return -ETIMEDOUT;
> >> - } else {
> >> + else
> >> ret = jornada_ssp_byte(TXDUMMY);
> >> - jornada_ssp_end();
> >> - return ret;
> >> - }
> >> +
> >> + jornada_ssp_end();
> >> +
> >> + return ret;
> >> }
> >>
> >> static int jornada_lcd_set_contrast(struct lcd_device *ld, int value)
> >> {
> >> - int ret;
> >> + int ret = -ETIMEDOUT;
> >>
> >> jornada_ssp_start();
> >>
> >> /* start by sending our set contrast cmd to mcu */
> >> - ret = jornada_ssp_byte(SETCONTRAST);
> >> -
> >> + if (jornada_ssp_byte(SETCONTRAST) != TXDUMMY)
> >> + dev_err(&ld->dev, "set contrast failed\n");
> >> /* push the new value */
> >> - if (jornada_ssp_byte(value) != TXDUMMY) {
> >> + else if (jornada_ssp_byte(value) != TXDUMMY)
> >> dev_err(&ld->dev, "set contrast failed\n");
> >> - jornada_ssp_end();
> >> - return -ETIMEDOUT;
> >> - }
> >> + else /* if we get here we can assume everything went well */
> >> + ret = 0;
> >>
> >> - /* if we get here we can assume everything went well */
> >> jornada_ssp_end();
> >>
> >> - return 0;
> >> + return ret;
> >> }
> >>
> >> static int jornada_lcd_set_power(struct lcd_device *ld, int power)
> >
> > Counter suggestion.
> >
> > What do you think, I think this looks cleaner:
> >
> > static int jornada_lcd_get_contrast(struct lcd_device *ld)
> > {
> > int ret;
> >
> > if (jornada_lcd_get_power(ld) != FB_BLANK_UNBLANK)
> > return 0;
> >
> > jornada_ssp_start();
> >
> > if (jornada_ssp_byte(GETCONTRAST) = TXDUMMY) {
> > ret = jornada_ssp_byte(TXDUMMY);
> > goto success;
> > }
> >
> > dev_err(&ld->dev, "failed to set contrast\n");
> > ret = -ETIMEDOUT;
> >
> > success:
> > jornada_ssp_end();
> > return ret;
> > }
> >
> > static int jornada_lcd_set_contrast(struct lcd_device *ld, int value)
> > {
> > int ret = 0;
> >
> > jornada_ssp_start();
> >
> > /* start by sending our set contrast cmd to mcu */
> > if (jornada_ssp_byte(SETCONTRAST) = TXDUMMY) {
> > /* if successful, push the new value */
> > if (jornada_ssp_byte(value) = TXDUMMY)
> > goto success;
> > }
> >
> > dev_err(&ld->dev, "failed to set contrast\n");
> > ret = -ETIMEDOUT;
> >
> > success:
> > jornada_ssp_end();
> > return ret;
> > }
>
>
> Hi Lee!
>
> Yes, I agree!
> Both are clean without so much repetition of code, which was what annoyd me.
> But yours is clearer when things go good or bad, nice 1 ;)
Hi Rickard Strandqvist,
I would liked to prefer Lee Jones's code. It looks cleaner.
>
> I do not know what I can/may do, but I'll try. Remove what is not ok :-)
>
> Reviewed-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> Suggested-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
I suggest the following.
Suggested-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Cc: Bryan Wu <cooloney@gmail.com>
Best regards,
Jingoo Han
>
>
> Kind regards
> Rickard Strandqvist
^ permalink raw reply
* Re: [PATCH] video: backlight: jornada720_lcd.c: Cleaning up variable that is never used
From: Rickard Strandqvist @ 2014-07-09 22:08 UTC (permalink / raw)
To: Lee Jones
Cc: Jingoo Han, Bryan Wu, Jean-Christophe Plagniol-Villard,
Tomi Valkeinen, Linux Fbdev development list,
linux-kernel@vger.kernel.org
In-Reply-To: <20140709163050.GM2635@lee--X1>
2014-07-09 18:30 GMT+02:00 Lee Jones <lee.jones@linaro.org>:
> On Mon, 07 Jul 2014, Rickard Strandqvist wrote:
>
>> Variable ar assigned a value that is never used.
>> I have also removed all the code that thereby serves no purpose,
>> and made same change to clarify the similarities in function.
>>
>> This was found using a static code analysis program called cppcheck
>>
>> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>> ---
>> drivers/video/backlight/jornada720_lcd.c | 31 ++++++++++++++----------------
>> 1 file changed, 14 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/video/backlight/jornada720_lcd.c b/drivers/video/backlight/jornada720_lcd.c
>> index da3876c..d16abcf 100644
>> --- a/drivers/video/backlight/jornada720_lcd.c
>> +++ b/drivers/video/backlight/jornada720_lcd.c
>> @@ -36,44 +36,41 @@ static int jornada_lcd_get_power(struct lcd_device *ld)
>>
>> static int jornada_lcd_get_contrast(struct lcd_device *ld)
>> {
>> - int ret;
>> + int ret = -ETIMEDOUT;
>>
>> if (jornada_lcd_get_power(ld) != FB_BLANK_UNBLANK)
>> return 0;
>>
>> jornada_ssp_start();
>>
>> - if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY) {
>> + if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY)
>> dev_err(&ld->dev, "get contrast failed\n");
>> - jornada_ssp_end();
>> - return -ETIMEDOUT;
>> - } else {
>> + else
>> ret = jornada_ssp_byte(TXDUMMY);
>> - jornada_ssp_end();
>> - return ret;
>> - }
>> +
>> + jornada_ssp_end();
>> +
>> + return ret;
>> }
>>
>> static int jornada_lcd_set_contrast(struct lcd_device *ld, int value)
>> {
>> - int ret;
>> + int ret = -ETIMEDOUT;
>>
>> jornada_ssp_start();
>>
>> /* start by sending our set contrast cmd to mcu */
>> - ret = jornada_ssp_byte(SETCONTRAST);
>> -
>> + if (jornada_ssp_byte(SETCONTRAST) != TXDUMMY)
>> + dev_err(&ld->dev, "set contrast failed\n");
>> /* push the new value */
>> - if (jornada_ssp_byte(value) != TXDUMMY) {
>> + else if (jornada_ssp_byte(value) != TXDUMMY)
>> dev_err(&ld->dev, "set contrast failed\n");
>> - jornada_ssp_end();
>> - return -ETIMEDOUT;
>> - }
>> + else /* if we get here we can assume everything went well */
>> + ret = 0;
>>
>> - /* if we get here we can assume everything went well */
>> jornada_ssp_end();
>>
>> - return 0;
>> + return ret;
>> }
>>
>> static int jornada_lcd_set_power(struct lcd_device *ld, int power)
>
> Counter suggestion.
>
> What do you think, I think this looks cleaner:
>
> static int jornada_lcd_get_contrast(struct lcd_device *ld)
> {
> int ret;
>
> if (jornada_lcd_get_power(ld) != FB_BLANK_UNBLANK)
> return 0;
>
> jornada_ssp_start();
>
> if (jornada_ssp_byte(GETCONTRAST) = TXDUMMY) {
> ret = jornada_ssp_byte(TXDUMMY);
> goto success;
> }
>
> dev_err(&ld->dev, "failed to set contrast\n");
> ret = -ETIMEDOUT;
>
> success:
> jornada_ssp_end();
> return ret;
> }
>
> static int jornada_lcd_set_contrast(struct lcd_device *ld, int value)
> {
> int ret = 0;
>
> jornada_ssp_start();
>
> /* start by sending our set contrast cmd to mcu */
> if (jornada_ssp_byte(SETCONTRAST) = TXDUMMY) {
> /* if successful, push the new value */
> if (jornada_ssp_byte(value) = TXDUMMY)
> goto success;
> }
>
> dev_err(&ld->dev, "failed to set contrast\n");
> ret = -ETIMEDOUT;
>
> success:
> jornada_ssp_end();
> return ret;
> }
Hi Lee!
Yes, I agree!
Both are clean without so much repetition of code, which was what annoyd me.
But yours is clearer when things go good or bad, nice 1 ;)
I do not know what I can/may do, but I'll try. Remove what is not ok :-)
Reviewed-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Suggested-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Kind regards
Rickard Strandqvist
^ permalink raw reply
* Re: [PATCH] video: backlight: jornada720_lcd.c: Cleaning up variable that is never used
From: Lee Jones @ 2014-07-09 16:30 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Jingoo Han, Bryan Wu, Jean-Christophe Plagniol-Villard,
Tomi Valkeinen, linux-fbdev, linux-kernel
In-Reply-To: <1404763270-24932-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On Mon, 07 Jul 2014, Rickard Strandqvist wrote:
> Variable ar assigned a value that is never used.
> I have also removed all the code that thereby serves no purpose,
> and made same change to clarify the similarities in function.
>
> This was found using a static code analysis program called cppcheck
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> drivers/video/backlight/jornada720_lcd.c | 31 ++++++++++++++----------------
> 1 file changed, 14 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/video/backlight/jornada720_lcd.c b/drivers/video/backlight/jornada720_lcd.c
> index da3876c..d16abcf 100644
> --- a/drivers/video/backlight/jornada720_lcd.c
> +++ b/drivers/video/backlight/jornada720_lcd.c
> @@ -36,44 +36,41 @@ static int jornada_lcd_get_power(struct lcd_device *ld)
>
> static int jornada_lcd_get_contrast(struct lcd_device *ld)
> {
> - int ret;
> + int ret = -ETIMEDOUT;
>
> if (jornada_lcd_get_power(ld) != FB_BLANK_UNBLANK)
> return 0;
>
> jornada_ssp_start();
>
> - if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY) {
> + if (jornada_ssp_byte(GETCONTRAST) != TXDUMMY)
> dev_err(&ld->dev, "get contrast failed\n");
> - jornada_ssp_end();
> - return -ETIMEDOUT;
> - } else {
> + else
> ret = jornada_ssp_byte(TXDUMMY);
> - jornada_ssp_end();
> - return ret;
> - }
> +
> + jornada_ssp_end();
> +
> + return ret;
> }
>
> static int jornada_lcd_set_contrast(struct lcd_device *ld, int value)
> {
> - int ret;
> + int ret = -ETIMEDOUT;
>
> jornada_ssp_start();
>
> /* start by sending our set contrast cmd to mcu */
> - ret = jornada_ssp_byte(SETCONTRAST);
> -
> + if (jornada_ssp_byte(SETCONTRAST) != TXDUMMY)
> + dev_err(&ld->dev, "set contrast failed\n");
> /* push the new value */
> - if (jornada_ssp_byte(value) != TXDUMMY) {
> + else if (jornada_ssp_byte(value) != TXDUMMY)
> dev_err(&ld->dev, "set contrast failed\n");
> - jornada_ssp_end();
> - return -ETIMEDOUT;
> - }
> + else /* if we get here we can assume everything went well */
> + ret = 0;
>
> - /* if we get here we can assume everything went well */
> jornada_ssp_end();
>
> - return 0;
> + return ret;
> }
>
> static int jornada_lcd_set_power(struct lcd_device *ld, int power)
Counter suggestion.
What do you think, I think this looks cleaner:
static int jornada_lcd_get_contrast(struct lcd_device *ld)
{
int ret;
if (jornada_lcd_get_power(ld) != FB_BLANK_UNBLANK)
return 0;
jornada_ssp_start();
if (jornada_ssp_byte(GETCONTRAST) = TXDUMMY) {
ret = jornada_ssp_byte(TXDUMMY);
goto success;
}
dev_err(&ld->dev, "failed to set contrast\n");
ret = -ETIMEDOUT;
success:
jornada_ssp_end();
return ret;
}
static int jornada_lcd_set_contrast(struct lcd_device *ld, int value)
{
int ret = 0;
jornada_ssp_start();
/* start by sending our set contrast cmd to mcu */
if (jornada_ssp_byte(SETCONTRAST) = TXDUMMY) {
/* if successful, push the new value */
if (jornada_ssp_byte(value) = TXDUMMY)
goto success;
}
dev_err(&ld->dev, "failed to set contrast\n");
ret = -ETIMEDOUT;
success:
jornada_ssp_end();
return ret;
}
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [PATCH v3] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic
From: Dexuan Cui @ 2014-07-09 2:04 UTC (permalink / raw)
To: gregkh, dan.carpenter, linux-kernel, driverdev-devel, plagnioj,
tomi.valkeinen, linux-fbdev
Cc: olaf, apw, jasowang, kys, haiyangz
Currently the VSC has no chance to notify the VSP of the dirty rectangle on VM
panic because the notification work is done in a workqueue, and in panic() the
kernel typically ends up in an infinite loop, and a typical kernel config has
CONFIG_PREEMPT_VOLUNTARY=y and CONFIG_PREEMPT is not set, so a context switch
can't happen in panic() and the workqueue won't have a chance to run. As a
result, the VM Connection window can't refresh until it's closed and we
re-connect to the VM.
We can register a handler on panic_notifier_list: the handler can notify
the VSC and switch the framebuffer driver to a "synchronous mode", meaning
the VSC flushes any future framebuffer change to the VSP immediately.
v2: removed the MS-TFS line in the commit message
v3: remove some 'unlikely' markings
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
---
drivers/video/fbdev/hyperv_fb.c | 58 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 55 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c
index e23392e..a7b98e1 100644
--- a/drivers/video/fbdev/hyperv_fb.c
+++ b/drivers/video/fbdev/hyperv_fb.c
@@ -226,11 +226,16 @@ struct hvfb_par {
u8 recv_buf[MAX_VMBUS_PKT_SIZE];
};
+static struct fb_info *hvfb_info;
+
static uint screen_width = HVFB_WIDTH;
static uint screen_height = HVFB_HEIGHT;
static uint screen_depth;
static uint screen_fb_size;
+/* If true, the VSC notifies the VSP on every framebuffer change */
+static bool synchronous_fb;
+
/* Send message to Hyper-V host */
static inline int synthvid_send(struct hv_device *hdev,
struct synthvid_msg *msg)
@@ -532,6 +537,20 @@ static void hvfb_update_work(struct work_struct *w)
schedule_delayed_work(&par->dwork, HVFB_UPDATE_DELAY);
}
+static int hvfb_on_panic(struct notifier_block *nb,
+ unsigned long e, void *p)
+{
+ if (hvfb_info)
+ synthvid_update(hvfb_info);
+
+ synchronous_fb = true;
+
+ return NOTIFY_DONE;
+}
+
+static struct notifier_block hvfb_panic_nb = {
+ .notifier_call = hvfb_on_panic,
+};
/* Framebuffer operation handlers */
@@ -582,14 +601,41 @@ static int hvfb_blank(int blank, struct fb_info *info)
return 1; /* get fb_blank to set the colormap to all black */
}
+static void hvfb_cfb_fillrect(struct fb_info *p,
+ const struct fb_fillrect *rect)
+{
+ cfb_fillrect(p, rect);
+
+ if (synchronous_fb)
+ synthvid_update(p);
+}
+
+static void hvfb_cfb_copyarea(struct fb_info *p,
+ const struct fb_copyarea *area)
+{
+ cfb_copyarea(p, area);
+
+ if (synchronous_fb)
+ synthvid_update(p);
+}
+
+static void hvfb_cfb_imageblit(struct fb_info *p,
+ const struct fb_image *image)
+{
+ cfb_imageblit(p, image);
+
+ if (synchronous_fb)
+ synthvid_update(p);
+}
+
static struct fb_ops hvfb_ops = {
.owner = THIS_MODULE,
.fb_check_var = hvfb_check_var,
.fb_set_par = hvfb_set_par,
.fb_setcolreg = hvfb_setcolreg,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
+ .fb_fillrect = hvfb_cfb_fillrect,
+ .fb_copyarea = hvfb_cfb_copyarea,
+ .fb_imageblit = hvfb_cfb_imageblit,
.fb_blank = hvfb_blank,
};
@@ -801,6 +847,9 @@ static int hvfb_probe(struct hv_device *hdev,
par->fb_ready = true;
+ hvfb_info = info;
+ atomic_notifier_chain_register(&panic_notifier_list, &hvfb_panic_nb);
+
return 0;
error:
@@ -820,6 +869,9 @@ static int hvfb_remove(struct hv_device *hdev)
struct fb_info *info = hv_get_drvdata(hdev);
struct hvfb_par *par = info->par;
+ atomic_notifier_chain_unregister(&panic_notifier_list, &hvfb_panic_nb);
+ hvfb_info = NULL;
+
par->update = false;
par->fb_ready = false;
--
1.9.1
^ permalink raw reply related
* RE: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic
From: Dexuan Cui @ 2014-07-09 1:46 UTC (permalink / raw)
To: gregkh@linuxfoundation.org
Cc: linux-fbdev@vger.kernel.org, jasowang@redhat.com,
driverdev-devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org, tomi.valkeinen@ti.com,
olaf@aepfle.de, apw@canonical.com, plagnioj@jcrosoft.com,
Haiyang Zhang, Dan Carpenter
In-Reply-To: <20140708223425.GB6310@kroah.com>
> -----Original Message-----
> > > From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> > > Sent: Tuesday, July 8, 2014 17:27 PM
> > > To: Dexuan Cui
> > > Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org;
> driverdev-
> > > devel@linuxdriverproject.org; plagnioj@jcrosoft.com;
> > > tomi.valkeinen@ti.com; linux-fbdev@vger.kernel.org; olaf@aepfle.de;
> > > apw@canonical.com; jasowang@redhat.com; Haiyang Zhang
> > > Subject: Re: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen
> by
> > > force on VM panic
> > >
> > > Don't use likely/unlikely unless you have benchmark numbers to show
> that
> > > it makes a speed up.
> > >
> > > regards,
> > > dan carpenter
> >
> > Hi Dan,
> > Here the variable 'synchronous_fb' is only set to true when the system
> panics.
> > So before the system panics, it's always 'unlikely'. :-)
>
> Then take advantage of gcc's and your processor's prediction, which
> knows that 0 is the "common" case and will choose to do the right thing
> here.
>
> Dan is right, never put those markings in your code unless you can
> benchmark the difference. Which means in reality, never put them in
> your code.
>
> gerg k-h
OK, let me send out a v3 patch, which will remove the unlikely.
Thanks,
-- Dexuan
^ permalink raw reply
* Re: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic
From: gregkh @ 2014-07-08 22:34 UTC (permalink / raw)
To: Dexuan Cui
Cc: linux-fbdev@vger.kernel.org, jasowang@redhat.com,
driverdev-devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org, tomi.valkeinen@ti.com,
olaf@aepfle.de, apw@canonical.com, plagnioj@jcrosoft.com,
Haiyang Zhang, Dan Carpenter
In-Reply-To: <EE124450C0AAF944A40DD71E61F878C987A663@SINEX14MBXC417.southpacific.corp.microsoft.com>
On Tue, Jul 08, 2014 at 10:17:48PM +0000, Dexuan Cui wrote:
> > -----Original Message-----
> > From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> > Sent: Tuesday, July 8, 2014 17:27 PM
> > To: Dexuan Cui
> > Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; driverdev-
> > devel@linuxdriverproject.org; plagnioj@jcrosoft.com;
> > tomi.valkeinen@ti.com; linux-fbdev@vger.kernel.org; olaf@aepfle.de;
> > apw@canonical.com; jasowang@redhat.com; Haiyang Zhang
> > Subject: Re: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by
> > force on VM panic
> >
> > Don't use likely/unlikely unless you have benchmark numbers to show that
> > it makes a speed up.
> >
> > regards,
> > dan carpenter
>
> Hi Dan,
> Here the variable 'synchronous_fb' is only set to true when the system panics.
> So before the system panics, it's always 'unlikely'. :-)
Then take advantage of gcc's and your processor's prediction, which
knows that 0 is the "common" case and will choose to do the right thing
here.
Dan is right, never put those markings in your code unless you can
benchmark the difference. Which means in reality, never put them in
your code.
thanks,
gerg k-h
^ permalink raw reply
* RE: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic
From: Dexuan Cui @ 2014-07-08 22:17 UTC (permalink / raw)
To: Dan Carpenter
Cc: linux-fbdev@vger.kernel.org, gregkh@linuxfoundation.org,
jasowang@redhat.com, driverdev-devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org, tomi.valkeinen@ti.com,
olaf@aepfle.de, apw@canonical.com, plagnioj@jcrosoft.com,
Haiyang Zhang
In-Reply-To: <20140708092709.GI25880@mwanda>
> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Tuesday, July 8, 2014 17:27 PM
> To: Dexuan Cui
> Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; driverdev-
> devel@linuxdriverproject.org; plagnioj@jcrosoft.com;
> tomi.valkeinen@ti.com; linux-fbdev@vger.kernel.org; olaf@aepfle.de;
> apw@canonical.com; jasowang@redhat.com; Haiyang Zhang
> Subject: Re: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by
> force on VM panic
>
> Don't use likely/unlikely unless you have benchmark numbers to show that
> it makes a speed up.
>
> regards,
> dan carpenter
Hi Dan,
Here the variable 'synchronous_fb' is only set to true when the system panics.
So before the system panics, it's always 'unlikely'. :-)
Thanks,
-- Dexuan
^ permalink raw reply
* [PATCH 1/1] video: vermilion: remove unnecessary break after goto
From: Fabian Frederick @ 2014-07-08 16:27 UTC (permalink / raw)
To: linux-kernel
Cc: Fabian Frederick, Jean-Christophe Plagniol-Villard,
Tomi Valkeinen, Jingoo Han, linux-fbdev
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/video/fbdev/vermilion/vermilion.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c
index 048a666..5f930ae 100644
--- a/drivers/video/fbdev/vermilion/vermilion.c
+++ b/drivers/video/fbdev/vermilion/vermilion.c
@@ -481,7 +481,6 @@ static int vml_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
default:
err = -ENODEV;
goto out_err_1;
- break;
}
info = &vinfo->info;
--
1.8.4.5
^ permalink raw reply related
* Re: [PATCH] video: fbdev: xen-fbfront.c: Cleaning up useless assignment of function parameter
From: Konrad Rzeszutek Wilk @ 2014-07-08 15:08 UTC (permalink / raw)
To: Stefano Stabellini
Cc: Rickard Strandqvist, Jean-Christophe Plagniol-Villard,
Tomi Valkeinen, Jingoo Han, Daniel Vetter, linux-fbdev,
linux-kernel
In-Reply-To: <alpine.DEB.2.02.1407071120310.27641@kaball.uk.xensource.com>
On Mon, Jul 07, 2014 at 11:20:39AM +0100, Stefano Stabellini wrote:
> On Sun, 6 Jul 2014, Rickard Strandqvist wrote:
> > Remove assignment of function parameter, that has no effect outside the function
> >
> > This was found using a static code analysis program called cppcheck
> >
> > Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
>
> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
and Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
>
> > drivers/video/fbdev/xen-fbfront.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c
> > index 901014b..e1207a1 100644
> > --- a/drivers/video/fbdev/xen-fbfront.c
> > +++ b/drivers/video/fbdev/xen-fbfront.c
> > @@ -222,7 +222,6 @@ static int xenfb_setcolreg(unsigned regno, unsigned red, unsigned green,
> > red = CNVT_TOHW(red, info->var.red.length);
> > green = CNVT_TOHW(green, info->var.green.length);
> > blue = CNVT_TOHW(blue, info->var.blue.length);
> > - transp = CNVT_TOHW(transp, info->var.transp.length);
> > #undef CNVT_TOHW
> >
> > v = (red << info->var.red.offset) |
> > --
> > 1.7.10.4
> >
^ permalink raw reply
* Re: [PATCH v9] video: ARM CLCD: Add DT support
From: Pawel Moll @ 2014-07-08 13:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1403610911-31491-1-git-send-email-pawel.moll@arm.com>
On Tue, 2014-06-24 at 12:55 +0100, Pawel Moll wrote:
> This patch adds basic DT bindings for the PL11x CLCD cells
> and make their fbdev driver use them.
>
> Signed-off-by: Pawel Moll <pawel.moll@arm.com>
As two weeks passed without any further comment, I'm assuming that there
are no more obstacles for this patch to be merged.
Tomi, will you pick it up for 3.17, as you offered? Russell, if you
prefer to take it via your tree, it's in your system as 8005/4.
Thanks!
Pawel
^ permalink raw reply
* Re: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic
From: Dan Carpenter @ 2014-07-08 9:27 UTC (permalink / raw)
To: Dexuan Cui
Cc: linux-fbdev, gregkh, jasowang, driverdev-devel, linux-kernel,
tomi.valkeinen, olaf, apw, plagnioj, haiyangz
In-Reply-To: <1403818501-15547-1-git-send-email-decui@microsoft.com>
Don't use likely/unlikely unless you have benchmark numbers to show that
it makes a speed up.
regards,
dan carpenter
^ permalink raw reply
* RE: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force on VM panic
From: Dexuan Cui @ 2014-07-08 9:06 UTC (permalink / raw)
To: gregkh@linuxfoundation.org, plagnioj@jcrosoft.com,
tomi.valkeinen@ti.com, linux-kernel@vger.kernel.org,
driverdev-devel@linuxdriverproject.org,
linux-fbdev@vger.kernel.org, olaf@aepfle.de, apw@canonical.com,
jasowang@redhat.com
Cc: Haiyang Zhang
In-Reply-To: <1403818501-15547-1-git-send-email-decui@microsoft.com>
> -----Original Message-----
> From: driverdev-devel-bounces@linuxdriverproject.org [mailto:driverdev-
> devel-bounces@linuxdriverproject.org] On Behalf Of Dexuan Cui
> Sent: Friday, June 27, 2014 5:35 AM
> To: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; driverdev-
> devel@linuxdriverproject.org; plagnioj@jcrosoft.com;
> tomi.valkeinen@ti.com; linux-fbdev@vger.kernel.org; olaf@aepfle.de;
> apw@canonical.com; jasowang@redhat.com
> Cc: Haiyang Zhang
> Subject: [PATCH v2] video: hyperv: hyperv_fb: refresh the VM screen by force
> on VM panic
>
> Currently the VSC has no chance to notify the VSP of the dirty rectangle on
> VM
> panic because the notification work is done in a workqueue, and in panic()
> the
> kernel typically ends up in an infinite loop, and a typical kernel config has
> CONFIG_PREEMPT_VOLUNTARY=y and CONFIG_PREEMPT is not set, so a
> context switch
> can't happen in panic() and the workqueue won't have a chance to run. As a
> result, the VM Connection window can't refresh until it's closed and we
> re-connect to the VM.
>
> We can register a handler on panic_notifier_list: the handler can notify
> the VSC and switch the framebuffer driver to a "synchronous mode",
> meaning
> the VSC flushes any future framebuffer change to the VSP immediately.
>
> v2: removed the MS-TFS line in the commit message
>
> Signed-off-by: Dexuan Cui <decui@microsoft.com>
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Hi Greg, Tomi, Jean and all,
Any new comment for the patch?
Thanks,
-- Dexuan
> ---
> drivers/video/fbdev/hyperv_fb.c | 58
> ++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 55 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/fbdev/hyperv_fb.c
> b/drivers/video/fbdev/hyperv_fb.c
> index e23392e..291d171 100644
> --- a/drivers/video/fbdev/hyperv_fb.c
> +++ b/drivers/video/fbdev/hyperv_fb.c
> @@ -226,11 +226,16 @@ struct hvfb_par {
> u8 recv_buf[MAX_VMBUS_PKT_SIZE];
> };
>
> +static struct fb_info *hvfb_info;
> +
> static uint screen_width = HVFB_WIDTH;
> static uint screen_height = HVFB_HEIGHT;
> static uint screen_depth;
> static uint screen_fb_size;
>
> +/* If true, the VSC notifies the VSP on every framebuffer change */
> +static bool synchronous_fb;
> +
> /* Send message to Hyper-V host */
> static inline int synthvid_send(struct hv_device *hdev,
> struct synthvid_msg *msg)
> @@ -532,6 +537,20 @@ static void hvfb_update_work(struct work_struct *w)
> schedule_delayed_work(&par->dwork,
> HVFB_UPDATE_DELAY);
> }
>
> +static int hvfb_on_panic(struct notifier_block *nb,
> + unsigned long e, void *p)
> +{
> + if (hvfb_info)
> + synthvid_update(hvfb_info);
> +
> + synchronous_fb = true;
> +
> + return NOTIFY_DONE;
> +}
> +
> +static struct notifier_block hvfb_panic_nb = {
> + .notifier_call = hvfb_on_panic,
> +};
>
> /* Framebuffer operation handlers */
>
> @@ -582,14 +601,41 @@ static int hvfb_blank(int blank, struct fb_info *info)
> return 1; /* get fb_blank to set the colormap to all black */
> }
>
> +static void hvfb_cfb_fillrect(struct fb_info *p,
> + const struct fb_fillrect *rect)
> +{
> + cfb_fillrect(p, rect);
> +
> + if (unlikely(synchronous_fb))
> + synthvid_update(p);
> +}
> +
> +static void hvfb_cfb_copyarea(struct fb_info *p,
> + const struct fb_copyarea *area)
> +{
> + cfb_copyarea(p, area);
> +
> + if (unlikely(synchronous_fb))
> + synthvid_update(p);
> +}
> +
> +static void hvfb_cfb_imageblit(struct fb_info *p,
> + const struct fb_image *image)
> +{
> + cfb_imageblit(p, image);
> +
> + if (unlikely(synchronous_fb))
> + synthvid_update(p);
> +}
> +
> static struct fb_ops hvfb_ops = {
> .owner = THIS_MODULE,
> .fb_check_var = hvfb_check_var,
> .fb_set_par = hvfb_set_par,
> .fb_setcolreg = hvfb_setcolreg,
> - .fb_fillrect = cfb_fillrect,
> - .fb_copyarea = cfb_copyarea,
> - .fb_imageblit = cfb_imageblit,
> + .fb_fillrect = hvfb_cfb_fillrect,
> + .fb_copyarea = hvfb_cfb_copyarea,
> + .fb_imageblit = hvfb_cfb_imageblit,
> .fb_blank = hvfb_blank,
> };
>
> @@ -801,6 +847,9 @@ static int hvfb_probe(struct hv_device *hdev,
>
> par->fb_ready = true;
>
> + hvfb_info = info;
> + atomic_notifier_chain_register(&panic_notifier_list,
> &hvfb_panic_nb);
> +
> return 0;
>
> error:
> @@ -820,6 +869,9 @@ static int hvfb_remove(struct hv_device *hdev)
> struct fb_info *info = hv_get_drvdata(hdev);
> struct hvfb_par *par = info->par;
>
> + atomic_notifier_chain_unregister(&panic_notifier_list,
> &hvfb_panic_nb);
> + hvfb_info = NULL;
> +
> par->update = false;
> par->fb_ready = false;
>
> --
> 1.9.1
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply
* Re: [Intel-gfx] [PATCH 5/5] drm/i915: Kick out vga console
From: Daniel Vetter @ 2014-07-08 8:10 UTC (permalink / raw)
To: Ed Tomlinson
Cc: linux-fbdev, Dave Airlie, Intel Graphics Development, LKML,
DRI Development, Tomi Valkeinen, David Herrmann,
Jean-Christophe Plagniol-Villard
In-Reply-To: <2319392.n3fnJUhemF@grover>
On Mon, Jul 07, 2014 at 10:53:16PM -0400, Ed Tomlinson wrote:
> Hi Daniel,
>
> The patch below also works. You can use my Tested By for it.
Thanks a lot for testing, patch submitted and should get forwarded asap.
>
> Thanks
> Ed Tomlinson <edtoml@gmail.com>
>
> PS. I _really_ need to get a serial console working on my i7 box.
Usually this doesn't help a lot with gfx initialization issues since we do
an awful lot of setup while holding the console_lock. Which prevents any
dmesg output on any console :(
Cheers, Daniel
>
> On Monday 07 July 2014 14:26:54 Daniel Vetter wrote:
> > On Mon, Jul 07, 2014 at 06:45:49AM -0400, Ed Tomlinson wrote:
> > > Daniel,
> > >
> > > I am not quite sure I understand what you want me to test?
> > > Do you want me to try it without:
> > >
> > > > > + if (ret = 0) {
> > > > > + ret = do_unregister_con_driver(&vga_con);
> >
> > Below the diff of what I mean.
> > -Daniel
> >
> >
> > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> > index 5e583a1838f8..bd8517151479 100644
> > --- a/drivers/gpu/drm/i915/i915_dma.c
> > +++ b/drivers/gpu/drm/i915/i915_dma.c
> > @@ -1466,12 +1466,13 @@ static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
> > #else
> > static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
> > {
> > - int ret;
> > + int ret = 0;
> >
> > DRM_INFO("Replacing VGA console driver\n");
> >
> > console_lock();
> > - ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, 1);
> > + if (con_is_bound(&vga_con))
> > + ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, 1);
> > if (ret = 0) {
> > ret = do_unregister_con_driver(&vga_con);
> >
> >
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply
* Re: [PATCH 01/12] ARM: OMAP2+: Remove non working OMAP HDMI audio initialization
From: Tony Lindgren @ 2014-07-08 8:09 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: Jyri Sarha, alsa-devel, linux-fbdev, linux-omap, broonie,
liam.r.girdwood, tomi.valkeinen, detheridge, jyri.sarha
In-Reply-To: <53BB9E08.7090802@ti.com>
* Peter Ujfalusi <peter.ujfalusi@ti.com> [140708 00:32]:
> Hi Tony,
>
> On 07/07/2014 02:46 PM, Tony Lindgren wrote:
> > * Jyri Sarha <jsarha@ti.com> [140626 12:26]:
> >> This code is not working currently and it can be removed. There is a
> >> conflict in sharing resources with the actual HDMI driver and with
> >> the ASoC HDMI audio DAI driver.
> >
> > Is this OK to queue for v3.17 or do we need this for v3.16-rc series?
>
> Jyri is away currently, but I think it would be great if this patch goes in
> for 3.16. The patch does not introduce regression since the OMAP4/5 HDMI is in
> non working state in the kernel so removing the platform device right now will
> ease up the merger of the new and working code.
OK, will apply it into omap-for-v3.16/fixes as it just removes broken code.
Regards,
Tony
^ permalink raw reply
* Re: [PATCH 01/12] ARM: OMAP2+: Remove non working OMAP HDMI audio initialization
From: Peter Ujfalusi @ 2014-07-08 7:30 UTC (permalink / raw)
To: Tony Lindgren, Jyri Sarha
Cc: alsa-devel, linux-fbdev, linux-omap, broonie, liam.r.girdwood,
tomi.valkeinen, detheridge, jyri.sarha
In-Reply-To: <20140707114625.GT28884@atomide.com>
Hi Tony,
On 07/07/2014 02:46 PM, Tony Lindgren wrote:
> * Jyri Sarha <jsarha@ti.com> [140626 12:26]:
>> This code is not working currently and it can be removed. There is a
>> conflict in sharing resources with the actual HDMI driver and with
>> the ASoC HDMI audio DAI driver.
>
> Is this OK to queue for v3.17 or do we need this for v3.16-rc series?
Jyri is away currently, but I think it would be great if this patch goes in
for 3.16. The patch does not introduce regression since the OMAP4/5 HDMI is in
non working state in the kernel so removing the platform device right now will
ease up the merger of the new and working code.
Regards,
Péter
>
> Regards,
>
> Tony
>
>> Signed-off-by: Jyri Sarha <jsarha@ti.com>
>> ---
>> arch/arm/mach-omap2/devices.c | 28 ----------------------------
>> 1 file changed, 28 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
>> index 592ba0a..b6f8f34 100644
>> --- a/arch/arm/mach-omap2/devices.c
>> +++ b/arch/arm/mach-omap2/devices.c
>> @@ -297,33 +297,6 @@ static void omap_init_audio(void)
>> static inline void omap_init_audio(void) {}
>> #endif
>>
>> -#if defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI) || \
>> - defined(CONFIG_SND_OMAP_SOC_OMAP_HDMI_MODULE)
>> -
>> -static struct platform_device omap_hdmi_audio = {
>> - .name = "omap-hdmi-audio",
>> - .id = -1,
>> -};
>> -
>> -static void __init omap_init_hdmi_audio(void)
>> -{
>> - struct omap_hwmod *oh;
>> - struct platform_device *pdev;
>> -
>> - oh = omap_hwmod_lookup("dss_hdmi");
>> - if (!oh)
>> - return;
>> -
>> - pdev = omap_device_build("omap-hdmi-audio-dai", -1, oh, NULL, 0);
>> - WARN(IS_ERR(pdev),
>> - "Can't build omap_device for omap-hdmi-audio-dai.\n");
>> -
>> - platform_device_register(&omap_hdmi_audio);
>> -}
>> -#else
>> -static inline void omap_init_hdmi_audio(void) {}
>> -#endif
>> -
>> #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
>>
>> #include <linux/platform_data/spi-omap2-mcspi.h>
>> @@ -459,7 +432,6 @@ static int __init omap2_init_devices(void)
>> */
>> omap_init_audio();
>> omap_init_camera();
>> - omap_init_hdmi_audio();
>> omap_init_mbox();
>> /* If dtb is there, the devices will be created dynamically */
>> if (!of_have_populated_dt()) {
>> --
>> 1.7.9.5
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
^ permalink raw reply
* Re: [PATCH v2] video: fbdev: sis: init.c: Cleaning up variable that is never used
From: Dan Carpenter @ 2014-07-08 5:59 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jingoo Han,
Daniel Vetter, Mauro Carvalho Chehab, Chen, Gong, linux-fbdev,
linux-kernel
In-Reply-To: <1404764628-25192-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
On Mon, Jul 07, 2014 at 10:23:47PM +0200, Rickard Strandqvist wrote:
> Variable ar assigned a value that is never used.
> I have also removed all the code that thereby serves no purpose.
>
> This was found using a static code analysis program called cppcheck
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Thanks.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
regards,
dan carpenter
^ permalink raw reply
* Re: [Intel-gfx] [PATCH 5/5] drm/i915: Kick out vga console
From: Ed Tomlinson @ 2014-07-08 2:53 UTC (permalink / raw)
To: Chris Wilson, Intel Graphics Development, DRI Development, LKML,
David Herrmann, Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
linux-fbdev, Jani Nikula, Dave Airlie
In-Reply-To: <20140707122654.GQ5821@phenom.ffwll.local>
Hi Daniel,
The patch below also works. You can use my Tested By for it.
Thanks
Ed Tomlinson <edtoml@gmail.com>
PS. I _really_ need to get a serial console working on my i7 box.
On Monday 07 July 2014 14:26:54 Daniel Vetter wrote:
> On Mon, Jul 07, 2014 at 06:45:49AM -0400, Ed Tomlinson wrote:
> > Daniel,
> >
> > I am not quite sure I understand what you want me to test?
> > Do you want me to try it without:
> >
> > > > + if (ret = 0) {
> > > > + ret = do_unregister_con_driver(&vga_con);
>
> Below the diff of what I mean.
> -Daniel
>
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 5e583a1838f8..bd8517151479 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1466,12 +1466,13 @@ static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
> #else
> static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
> {
> - int ret;
> + int ret = 0;
>
> DRM_INFO("Replacing VGA console driver\n");
>
> console_lock();
> - ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, 1);
> + if (con_is_bound(&vga_con))
> + ret = do_take_over_console(&dummy_con, 0, MAX_NR_CONSOLES - 1, 1);
> if (ret = 0) {
> ret = do_unregister_con_driver(&vga_con);
>
>
^ permalink raw reply
* [PATCH 3.10 52/53] drivers/video/fbdev/fb-puv3.c: Add header files for function unifb_mmap
From: Greg Kroah-Hartman @ 2014-07-07 23:58 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Zhichuang Sun,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jingoo Han,
Daniel Vetter, Joe Perches, Laurent Pinchart, linux-fbdev,
Xuetao Guan, Guenter Roeck
In-Reply-To: <20140707235829.281783607@linuxfoundation.org>
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhichuang SUN <sunzc522@gmail.com>
commit fbc6c4a13bbfb420eedfdb26a0a859f9c07e8a7b upstream.
Function unifb_mmap calls functions which are defined in linux/mm.h
and asm/pgtable.h
The related error (for unicore32 with unicore32_defconfig):
CC drivers/video/fbdev/fb-puv3.o
drivers/video/fbdev/fb-puv3.c: In function 'unifb_mmap':
drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
function 'vm_iomap_memory'
drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
function 'pgprot_noncached'
Signed-off-by: Zhichuang Sun <sunzc522@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joe Perches <joe@perches.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-fbdev@vger.kernel.org
Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/video/fb-puv3.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/video/fb-puv3.c
+++ b/drivers/video/fb-puv3.c
@@ -18,8 +18,10 @@
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/console.h>
+#include <linux/mm.h>
#include <asm/sizes.h>
+#include <asm/pgtable.h>
#include <mach/hardware.h>
/* Platform_data reserved for unifb registers. */
^ permalink raw reply
* [PATCH 3.14 91/94] drivers/video/fbdev/fb-puv3.c: Add header files for function unifb_mmap
From: Greg Kroah-Hartman @ 2014-07-07 23:58 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Zhichuang Sun,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jingoo Han,
Daniel Vetter, Joe Perches, Laurent Pinchart, linux-fbdev,
Xuetao Guan, Guenter Roeck
In-Reply-To: <20140707235756.780319003@linuxfoundation.org>
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhichuang SUN <sunzc522@gmail.com>
commit fbc6c4a13bbfb420eedfdb26a0a859f9c07e8a7b upstream.
Function unifb_mmap calls functions which are defined in linux/mm.h
and asm/pgtable.h
The related error (for unicore32 with unicore32_defconfig):
CC drivers/video/fbdev/fb-puv3.o
drivers/video/fbdev/fb-puv3.c: In function 'unifb_mmap':
drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
function 'vm_iomap_memory'
drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
function 'pgprot_noncached'
Signed-off-by: Zhichuang Sun <sunzc522@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joe Perches <joe@perches.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-fbdev@vger.kernel.org
Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/video/fb-puv3.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/video/fb-puv3.c
+++ b/drivers/video/fb-puv3.c
@@ -18,8 +18,10 @@
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/console.h>
+#include <linux/mm.h>
#include <asm/sizes.h>
+#include <asm/pgtable.h>
#include <mach/hardware.h>
/* Platform_data reserved for unifb registers. */
^ permalink raw reply
* [PATCH 3.15 121/122] drivers/video/fbdev/fb-puv3.c: Add header files for function unifb_mmap
From: Greg Kroah-Hartman @ 2014-07-07 23:58 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Zhichuang Sun,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Jingoo Han,
Daniel Vetter, Joe Perches, Laurent Pinchart, linux-fbdev,
Xuetao Guan, Guenter Roeck
In-Reply-To: <20140707235734.234226883@linuxfoundation.org>
3.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhichuang SUN <sunzc522@gmail.com>
commit fbc6c4a13bbfb420eedfdb26a0a859f9c07e8a7b upstream.
Function unifb_mmap calls functions which are defined in linux/mm.h
and asm/pgtable.h
The related error (for unicore32 with unicore32_defconfig):
CC drivers/video/fbdev/fb-puv3.o
drivers/video/fbdev/fb-puv3.c: In function 'unifb_mmap':
drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
function 'vm_iomap_memory'
drivers/video/fbdev/fb-puv3.c:646: error: implicit declaration of
function 'pgprot_noncached'
Signed-off-by: Zhichuang Sun <sunzc522@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joe Perches <joe@perches.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-fbdev@vger.kernel.org
Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/video/fbdev/fb-puv3.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/video/fbdev/fb-puv3.c
+++ b/drivers/video/fbdev/fb-puv3.c
@@ -18,8 +18,10 @@
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/console.h>
+#include <linux/mm.h>
#include <asm/sizes.h>
+#include <asm/pgtable.h>
#include <mach/hardware.h>
/* Platform_data reserved for unifb registers. */
^ permalink raw reply
* [PATCH v2] video: fbdev: sis: init.c: Cleaning up redundant condition is always true
From: Rickard Strandqvist @ 2014-07-07 20:56 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: Rickard Strandqvist, Jingoo Han, Daniel Vetter,
Mauro Carvalho Chehab, Chen, Gong, Dan Carpenter, linux-fbdev,
linux-kernel
In-Reply-To: <1404764628-25192-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Find a redundant condition that is always true, that after
some discussions prove to be that wrong variable that was checked.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/video/fbdev/sis/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/sis/init.c b/drivers/video/fbdev/sis/init.c
index bd40f5e..dc9613a 100644
--- a/drivers/video/fbdev/sis/init.c
+++ b/drivers/video/fbdev/sis/init.c
@@ -355,12 +355,12 @@ SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,
}
break;
case 400:
- if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDwidth >= 600))) {
+ if ((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 800) && (LCDheight >= 600))) {
if(VDisplay = 300) ModeIndex = ModeIndex_400x300[Depth];
}
break;
case 512:
- if((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDwidth >= 768))) {
+ if ((!(VBFlags & CRT1_LCDA)) || ((LCDwidth >= 1024) && (LCDheight >= 768))) {
if(VDisplay = 384) ModeIndex = ModeIndex_512x384[Depth];
}
break;
--
1.7.10.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox