Re: [PATCH] fbcon: Don't reset logo_shown when logo is currently shown

2019-05-06 Thread Bartlomiej Zolnierkiewicz

On 04/02/2019 08:09 PM, Andreas Schwab wrote:
> When the logo is currently drawn on a virtual console, and the console
> loglevel is reduced to quiet, logo_shown must be left alone, so that it
> the scrolling region on that virtual console is properly reset.
> 
> Fixes: 10993504d647 ("fbcon: Silence fbcon logo on 'quiet' boots")
> Signed-off-by: Andreas Schwab 

Patch queued for v5.2, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 13/57] docs: fb: convert documentation to ReST format

2019-05-06 Thread Bartlomiej Zolnierkiewicz

On 04/16/2019 04:55 AM, Mauro Carvalho Chehab wrote:
> Convert all documents here from plain txt to ReST format, in
> order to allow parsing them with the documentation build
> system.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Bartlomiej Zolnierkiewicz 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 14/26] compat_ioctl: move ATYFB_CLK handling to atyfb driver

2019-05-06 Thread Bartlomiej Zolnierkiewicz

On 04/16/2019 10:25 PM, Arnd Bergmann wrote:
> These are two obscure ioctl commands, in a driver that only
> has compatible commands, so just let the driver handle this
> itself.
> 
> Signed-off-by: Arnd Bergmann 

Acked-by: Bartlomiej Zolnierkiewicz 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2 13/79] docs: fb: convert docs to ReST and rename to *.rst

2019-05-06 Thread Bartlomiej Zolnierkiewicz

On 04/22/2019 03:27 PM, Mauro Carvalho Chehab wrote:
> The conversion is actually:
>   - add blank lines and identation in order to identify paragraphs;
>   - fix tables markups;
>   - add some lists markups;
>   - mark literal blocks;
>   - adjust title markups.
> 
> At its new index.rst, let's add a :orphan: while this is not linked to
> the main index.rst file, in order to avoid build warnings.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Bartlomiej Zolnierkiewicz 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2 45/79] docs: console.txt: convert docs to ReST and rename to *.rst

2019-05-06 Thread Bartlomiej Zolnierkiewicz

On 04/22/2019 03:27 PM, Mauro Carvalho Chehab wrote:
> Convert this small file to ReST in preparation for adding it to
> the driver-api book.
> 
> While this is not part of the driver-api book, mark it as
> :orphan:, in order to avoid build warnings.
> 
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Bartlomiej Zolnierkiewicz 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH next 25/25] video: fbdev: Use dev_get_drvdata()

2019-05-06 Thread Bartlomiej Zolnierkiewicz

On 04/23/2019 09:50 AM, Kefeng Wang wrote:
> Using dev_get_drvdata directly.
> 
> Cc: Wan ZongShun 
> Cc: Kukjin Kim 
> Cc: Bartlomiej Zolnierkiewicz 
> Cc: Krzysztof Kozlowski 
> Cc: Michal Januszewski 
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-fb...@vger.kernel.org
> Signed-off-by: Kefeng Wang 

Patch queued for v5.2, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[GIT PULL] fbdev changes for v5.2

2019-05-10 Thread Bartlomiej Zolnierkiewicz

Hi Linus,

Please pull fbdev changes for v5.2. They are:
- 4 small fixes for fb core
- updates for udlfb, sm712fb, macfb and atafb drivers
- redundant code removals from amba-clcd and atmel_lcdfb drivers
- minor fixes/cleanups for other fb drivers

Please see the signed tag description for details.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


The following changes since commit 79a3aaa7b82e3106be97842dedfd8429248896e6:

  Linux 5.1-rc3 (2019-03-31 14:39:29 -0700)

are available in the git repository at:

  https://github.com/bzolnier/linux.git tags/fbdev-v5.2

for you to fetch changes up to d4a5611743a6f5d126f8cbfdbf29e12fd8d1b73f:

  video: fbdev: Use dev_get_drvdata() (2019-05-06 15:57:47 +0200)


fbdev changes for v5.2:

- fix regression in fbcon logo handling on 'quiet' boots (Andreas Schwab)

- fix divide-by-zero error in fb_var_to_videomode() (Shile Zhang)

- fix 'WARNING in __alloc_pages_nodemask' bug (Jiufei Xue)

- list all PCI memory BARs as conflicting apertures (Gerd Hoffmann)

- update udlfb driver - fix sleeping inside spinlock, add mutex around
  rendering calls and remove redundant code (Mikulas Patocka)

- update sm712fb driver - fix SM720 support related issues (Yifeng Li)

- update macfb driver - fix DAFB colour table pointer initialization and
  remove redundant code (Finn Thain)

- update atafb driver - fix kexec support, use dev_*() calls instead of
  printk() and remove obsolete module support (Geert Uytterhoeven)

- add support to mxsfb driver for skipping display initialization for
  flicker-free display takeover from bootloader (Melchior Franz)

- remove Versatile and Nomadik board families support from amba-clcd
  driver as they are handled by DRM driver nowadays (Linus Walleij)

- remove no longer needed AVR and platform_data support from atmel_lcdfb
  driver (Alexandre Belloni)

- misc fixes (Colin Ian King, Julia Lawall, Gustavo A. R. Silva, Aditya
  Pakki, Kangjie Lu, YueHaibing)

- misc cleanups (Enrico Weigelt, Kefeng Wang)


Aditya Pakki (1):
  omapfb: Fix potential NULL pointer dereference in kmalloc

Alexandre Belloni (1):
  video: fbdev: atmel_lcdfb: drop AVR and platform_data support

Andreas Schwab (1):
  fbcon: Don't reset logo_shown when logo is currently shown

Bartlomiej Zolnierkiewicz (1):
  Merge tag 'v5.1-rc3' of https://git.kernel.org/.../torvalds/linux into 
fbdev-for-next

Colin Ian King (2):
  video: fbdev: vesafb: fix indentation issue
  video: fbdev: savage: fix indentation issue

Enrico Weigelt, metux IT consult (1):
  drivers: video: fbdev: Kconfig: pedantic cleanups

Finn Thain (3):
  video/macfb: Remove redundant code
  video/macfb: Call fb_invert_cmaps()
  video/macfb: Always initialize DAFB colour table pointer register

Geert Uytterhoeven (4):
  fbdev: atafb: Stop printing virtual screen_base
  fbdev: atafb: Remove obsolete module support
  fbdev: atafb: Fix broken frame buffer after kexec
  fbdev: atafb: Modernize printing of kernel messages

Gerd Hoffmann (1):
  fbdev: list all pci memory bars as conflicting apertures

Gustavo A. R. Silva (1):
  xen, fbfront: mark expected switch fall-through

Jiufei Xue (1):
  fbdev: fix WARNING in __alloc_pages_nodemask bug

Julia Lawall (1):
  omapfb: add missing of_node_put after of_device_is_available

Kangjie Lu (2):
  video: hgafb: fix potential NULL pointer dereference
  video: imsttfb: fix potential NULL pointer dereferences

Kefeng Wang (1):
  video: fbdev: Use dev_get_drvdata()

Linus Walleij (1):
  video: amba-clcd: Decomission Versatile and Nomadik

Melchior Franz (1):
  fbdev: mxsfb: implement FB_PRE_INIT_FB option

Mikulas Patocka (3):
  udlfb: delete the unused parameter for dlfb_handle_damage
  udlfb: fix sleeping inside spinlock
  udlfb: introduce a rendering mutex

Shile Zhang (1):
  fbdev: fix divide error in fb_var_to_videomode

Yifeng Li (9):
  fbdev: sm712fb: fix white screen of death on reboot, don't set CR3B-CR3F
  fbdev: sm712fb: fix brightness control on reboot, don't set SR30
  fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75
  fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA
  fbdev: sm712fb: fix crashes during framebuffer writes by correctly 
mapping VRAM
  fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting
  fbdev: sm712fb: fix support for 1024x768-16 mode
  fbdev: sm712fb: use 1024x768 by default on non-MIPS, fix garbled display
  fbdev: sm712fb: fix memory frequency by avoiding a switch/case fallthrough

YueHaibing (3):
  video: fbdev: pvr2fb: remove set but not used variable 'size'
  video: fbdev: mxsfb: remove set but not used variable '

[PATCH v2] video: fbdev: imxfb: add COMPILE_TEST support

2019-05-21 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to imxfb driver for better compile
testing coverage.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
v2: add missing HAVE_CLK && HAS IOMEM dependencies (noted by Uwe)

drivers/video/fbdev/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -331,7 +331,8 @@ config FB_SA1100
 
 config FB_IMX
tristate "Freescale i.MX1/21/25/27 LCD support"
-   depends on FB && ARCH_MXC
+   depends on FB && HAVE_CLK && HAS_IOMEM
+   depends on ARCH_MXC || COMPILE_TEST
select LCD_CLASS_DEVICE
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v2] video: fbdev: pxa168fb: add COMPILE_TEST support

2019-05-21 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to pxa168fb driver for better compile
testing coverage.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
v2: add missing HAVE_CLK && HAS IOMEM dependencies

 drivers/video/fbdev/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1729,7 +1729,8 @@ config FB_68328
 
 config FB_PXA168
tristate "PXA168/910 LCD framebuffer support"
-   depends on FB && (CPU_PXA168 || CPU_PXA910)
+   depends on FB && HAVE_CLK && HAS_IOMEM
+   depends on CPU_PXA168 || CPU_PXA910 || COMPILE_TEST
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT


[PATCH v2] video: fbdev: atmel_lcdfb: add COMPILE_TEST support

2019-05-21 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to atmel_lcdfb driver for better compile
testing coverage.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
v2: add missing HAVE_CLK && HAS IOMEM dependencies

 drivers/video/fbdev/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -856,7 +856,8 @@ config FB_S1D13XXX
 
 config FB_ATMEL
tristate "AT91 LCD Controller support"
-   depends on FB && OF && HAVE_FB_ATMEL
+   depends on FB && OF && HAVE_CLK && HAS_IOMEM
+   depends on HAVE_FB_ATMEL || COMPILE_TEST
select FB_BACKLIGHT
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v2] video: fbdev: da8xx-fb: add COMPILE_TEST support

2019-05-21 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to da8xx-fb driver for better compile
testing coverage.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
v2: add missing HAVE_CLK && HAS IOMEM dependencies

 drivers/video/fbdev/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -2057,7 +2057,8 @@ config FB_SH7760
 
 config FB_DA8XX
tristate "DA8xx/OMAP-L1xx/AM335x Framebuffer support"
-   depends on FB && (ARCH_DAVINCI_DA8XX || SOC_AM33XX)
+   depends on FB && HAVE_CLK && HAS_IOMEM
+   depends on ARCH_DAVINCI_DA8XX || SOC_AM33XX || COMPILE_TEST
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT


[PATCH v2] video: fbdev: gbefb: add COMPILE_TEST support

2019-05-21 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to gbefb driver for better compile
testing coverage.

While at it convert bogus udelay() calls to mdelay() (needed to
build driver on ARM) and remove dead x86 specific code.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
v2:
- add missing HAS_IOMEM dependency
- fix build on ARM by converting bogus udelay() calls to mdelay()

 drivers/video/fbdev/Kconfig |3 ++-
 drivers/video/fbdev/gbefb.c |   19 +++
 2 files changed, 9 insertions(+), 13 deletions(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -670,7 +670,8 @@ config FB_HGA
 
 config FB_GBE
bool "SGI Graphics Backend frame buffer support"
-   depends on (FB = y) && SGI_IP32
+   depends on (FB = y) && HAS_IOMEM
+   depends on SGI_IP32 || COMPILE_TEST
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Index: b/drivers/video/fbdev/gbefb.c
===
--- a/drivers/video/fbdev/gbefb.c
+++ b/drivers/video/fbdev/gbefb.c
@@ -39,9 +39,7 @@ struct gbefb_par {
int valid;
 };
 
-#ifdef CONFIG_SGI_IP32
 #define GBE_BASE   0x1600 /* SGI O2 */
-#endif
 
 /* macro for fastest write-though access to the framebuffer */
 #ifdef CONFIG_MIPS
@@ -51,10 +49,6 @@ struct gbefb_par {
 #define pgprot_fb(_prot) (((_prot) & (~_CACHE_MASK)) | _CACHE_CACHABLE_NO_WA)
 #endif
 #endif
-#ifdef CONFIG_X86
-#define pgprot_fb(_prot) (((_prot) & ~_PAGE_CACHE_MASK) |  \
- cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS))
-#endif
 
 /*
  *  RAM we reserve for the frame buffer. This defines the maximum screen
@@ -279,7 +273,7 @@ static void gbe_turn_off(void)
val = 0;
SET_GBE_FIELD(VT_XY, FREEZE, val, 1);
gbe->vt_xy = val;
-   udelay(1);
+   mdelay(10);
for (i = 0; i < 1; i++) {
val = gbe->vt_xy;
if (GET_GBE_FIELD(VT_XY, FREEZE, val) != 1)
@@ -294,7 +288,7 @@ static void gbe_turn_off(void)
val = gbe->dotclock;
SET_GBE_FIELD(DOTCLK, RUN, val, 0);
gbe->dotclock = val;
-   udelay(1);
+   mdelay(10);
for (i = 0; i < 1; i++) {
val = gbe->dotclock;
if (GET_GBE_FIELD(DOTCLK, RUN, val))
@@ -331,7 +325,7 @@ static void gbe_turn_on(void)
val = gbe->dotclock;
SET_GBE_FIELD(DOTCLK, RUN, val, 1);
gbe->dotclock = val;
-   udelay(1);
+   mdelay(10);
for (i = 0; i < 1; i++) {
val = gbe->dotclock;
if (GET_GBE_FIELD(DOTCLK, RUN, val) != 1)
@@ -346,7 +340,7 @@ static void gbe_turn_on(void)
val = 0;
SET_GBE_FIELD(VT_XY, FREEZE, val, 0);
gbe->vt_xy = val;
-   udelay(1);
+   mdelay(10);
for (i = 0; i < 1; i++) {
val = gbe->vt_xy;
if (GET_GBE_FIELD(VT_XY, FREEZE, val))
@@ -547,7 +541,7 @@ static void gbe_set_timing_info(struct g
SET_GBE_FIELD(DOTCLK, P, val, timing->pll_p);
SET_GBE_FIELD(DOTCLK, RUN, val, 0); /* do not start yet */
gbe->dotclock = val;
-   udelay(1);
+   mdelay(10);
 
/* setup pixel counter */
val = 0;
@@ -1018,9 +1012,10 @@ static int gbefb_mmap(struct fb_info *in
 
/* remap using the fastest write-through mode on architecture */
/* try not polluting the cache when possible */
+#ifdef CONFIG_MIPS
pgprot_val(vma->vm_page_prot) =
pgprot_fb(pgprot_val(vma->vm_page_prot));
-
+#endif
/* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */
 
/* look for the starting tile */
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: cyber2000fb: remove superfluous CONFIG_PCI ifdef

2019-05-21 Thread Bartlomiej Zolnierkiewicz
This is a PCI driver and FB_CYBER2000 depends on PCI in Kconfig so
there is no need to check for PCI inside the driver code.

Cc: Russell King 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/cyber2000fb.c |5 -
 1 file changed, 5 deletions(-)

Index: b/drivers/video/fbdev/cyber2000fb.c
===
--- a/drivers/video/fbdev/cyber2000fb.c
+++ b/drivers/video/fbdev/cyber2000fb.c
@@ -1642,10 +1642,6 @@ static void cyberpro_common_resume(struc
 }
 
 /*
- * PCI specific support.
- */
-#ifdef CONFIG_PCI
-/*
  * We need to wake up the CyberPro, and make sure its in linear memory
  * mode.  Unfortunately, this is specific to the platform and card that
  * we are running on.
@@ -1861,7 +1857,6 @@ static struct pci_driver cyberpro_driver
.resume = cyberpro_pci_resume,
.id_table   = cyberpro_pci_table
 };
-#endif
 
 /*
  * I don't think we can use the "module_init" stuff here because
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: atafb: remove superfluous function prototypes

2019-05-21 Thread Bartlomiej Zolnierkiewicz
No need for them.

Cc: Geert Uytterhoeven 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/atafb.c |   21 -
 1 file changed, 21 deletions(-)

Index: b/drivers/video/fbdev/atafb.c
===
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -77,29 +77,8 @@
 #define SWITCH_SND7 0x80
 #define SWITCH_NONE 0x00
 
-
 #define up(x, r) (((x) + (r) - 1) & ~((r)-1))
 
-   /*
-* Interface to the world
-*/
-
-static int atafb_check_var(struct fb_var_screeninfo *var, struct fb_info 
*info);
-static int atafb_set_par(struct fb_info *info);
-static int atafb_setcolreg(unsigned int regno, unsigned int red, unsigned int 
green,
-  unsigned int blue, unsigned int transp,
-  struct fb_info *info);
-static int atafb_blank(int blank, struct fb_info *info);
-static int atafb_pan_display(struct fb_var_screeninfo *var,
-struct fb_info *info);
-static void atafb_fillrect(struct fb_info *info,
-  const struct fb_fillrect *rect);
-static void atafb_copyarea(struct fb_info *info,
-  const struct fb_copyarea *region);
-static void atafb_imageblit(struct fb_info *info, const struct fb_image 
*image);
-static int atafb_ioctl(struct fb_info *info, unsigned int cmd,
-  unsigned long arg);
-
 
 static int default_par;/* default resolution (0=none) */
 
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] fbcon: Remove fbcon_has_exited

2019-05-22 Thread Bartlomiej Zolnierkiewicz

Hi Daniel,

On 5/21/19 4:23 PM, Daniel Vetter wrote:
> This is unused code since
> 
> commit 6104c37094e729f3d4ce65797002112735d49cd1
> Author: Daniel Vetter 
> Date:   Tue Aug 1 17:32:07 2017 +0200
> 
> fbcon: Make fbcon a built-time depency for fbdev
> 
> when fbcon was made a compile-time static dependency of fbdev. We
> can't exit fbcon anymore without exiting fbdev first, which only works
> if all fbdev drivers have unloaded already. Hence this is all dead
> code.
> 
> v2: I missed that fbcon_exit is also called from con_deinit stuff, and
> there fbcon_has_exited prevents double-cleanup. But we can fix that
> by properly resetting con2fb_map[] to all -1, which is used everywhere
> else to indicate "no fb_info allocate to this console". With that
> change the double-cleanup (which resulted in a module refcount underflow,
> among other things) is prevented.
> 
> Aside: con2fb_map is a signed char, so don't register more than 128 fb_info
> or hilarity will ensue.
> 
> v3: CI showed me that I still didn't fully understand what's going on
> here. The leaked references in con2fb_map have been used upon
> rebinding the fb console in fbcon_init. It worked because fbdev
> unregistering still cleaned out con2fb_map, and reset it to info_idx.
> If the last fbdev driver unregistered, then it also reset info_idx,
> and unregistered the fbcon driver.
> 
> Imo that's all a bit fragile, so let's keep the con2fb_map reset to
> -1, and in fbcon_init pick info_idx if we're starting fresh. That
> means unbinding and rebinding will cleanse the mapping, but why are
> you doing that if you want to retain the mapping, so should be fine.
> 
> Also, I think info_idx == -1 is impossible in fbcon_init - we
> unregister the fbcon in that case. So catch&warn about that.
> 
> Signed-off-by: Daniel Vetter 
> Cc: Maarten Lankhorst 
> Cc: Bartlomiej Zolnierkiewicz 
> Cc: Daniel Vetter 
> Cc: Hans de Goede 
> Cc: "Noralf Trønnes" 
> Cc: Yisheng Xie 
> Cc: Konstantin Khorenko 
> Cc: Prarit Bhargava 
> Cc: Kees Cook 
> ---
>  drivers/video/fbdev/core/fbcon.c | 39 +---
>  1 file changed, 6 insertions(+), 33 deletions(-)
This patch was #09/33 in your patch series, now it is independent change.

Do you want me to apply it now or should I wait for the new version of
the whole series?

[ I looked at all patches in the series and they look fine to me.
  After outstanding issues are fixed I'll be happy to apply them all
  to fbdev-for-next (I can create immutable branch if needed). ]

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 1/2] video: fbdev: pvr2fb: remove function prototypes

2019-05-22 Thread Bartlomiej Zolnierkiewicz
Reorder code a bit and then remove no longer needed function
prototypes.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/pvr2fb.c |  141 ++-
 1 file changed, 61 insertions(+), 80 deletions(-)

Index: b/drivers/video/fbdev/pvr2fb.c
===
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -193,39 +193,6 @@ static unsigned int shdma = PVR2_CASCADE
 static unsigned int pvr2dma = ONCHIP_NR_DMA_CHANNELS;
 #endif
 
-static int pvr2fb_setcolreg(unsigned int regno, unsigned int red, unsigned int 
green, unsigned int blue,
-unsigned int transp, struct fb_info *info);
-static int pvr2fb_blank(int blank, struct fb_info *info);
-static unsigned long get_line_length(int xres_virtual, int bpp);
-static void set_color_bitfields(struct fb_var_screeninfo *var);
-static int pvr2fb_check_var(struct fb_var_screeninfo *var, struct fb_info 
*info);
-static int pvr2fb_set_par(struct fb_info *info);
-static void pvr2_update_display(struct fb_info *info);
-static void pvr2_init_display(struct fb_info *info);
-static void pvr2_do_blank(void);
-static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id);
-static int pvr2_init_cable(void);
-static int pvr2_get_param(const struct pvr2_params *p, const char *s,
-int val, int size);
-#ifdef CONFIG_PVR2_DMA
-static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
-   size_t count, loff_t *ppos);
-#endif
-
-static struct fb_ops pvr2fb_ops = {
-   .owner  = THIS_MODULE,
-   .fb_setcolreg   = pvr2fb_setcolreg,
-   .fb_blank   = pvr2fb_blank,
-   .fb_check_var   = pvr2fb_check_var,
-   .fb_set_par = pvr2fb_set_par,
-#ifdef CONFIG_PVR2_DMA
-   .fb_write   = pvr2fb_write,
-#endif
-   .fb_fillrect= cfb_fillrect,
-   .fb_copyarea= cfb_copyarea,
-   .fb_imageblit   = cfb_imageblit,
-};
-
 static struct fb_videomode pvr2_modedb[] = {
 /*
  * Broadcast video modes (PAL and NTSC).  I'm unfamiliar with
@@ -353,6 +320,36 @@ static int pvr2fb_setcolreg(unsigned int
return 0;
 }
 
+/*
+ * Determine the cable type and initialize the cable output format.  Don't do
+ * anything if the cable type has been overidden (via "cable:XX").
+ */
+
+#define PCTRA 0xff80002c
+#define PDTRA 0xff800030
+#define VOUTC 0xa0702c00
+
+static int pvr2_init_cable(void)
+{
+   if (cable_type < 0) {
+   fb_writel((fb_readl(PCTRA) & 0xfff0) | 0x000a,
+ PCTRA);
+   cable_type = (fb_readw(PDTRA) >> 8) & 3;
+   }
+
+   /* Now select the output format (either composite or other) */
+   /* XXX: Save the previous val first, as this reg is also AICA
+ related */
+   if (cable_type == CT_COMPOSITE)
+   fb_writel(3 << 8, VOUTC);
+   else if (cable_type == CT_RGB)
+   fb_writel(1 << 9, VOUTC);
+   else
+   fb_writel(0, VOUTC);
+
+   return cable_type;
+}
+
 static int pvr2fb_set_par(struct fb_info *info)
 {
struct pvr2fb_par *par = (struct pvr2fb_par *)info->par;
@@ -641,36 +638,6 @@ static irqreturn_t pvr2fb_interrupt(int
return IRQ_HANDLED;
 }
 
-/*
- * Determine the cable type and initialize the cable output format.  Don't do
- * anything if the cable type has been overidden (via "cable:XX").
- */
-
-#define PCTRA 0xff80002c
-#define PDTRA 0xff800030
-#define VOUTC 0xa0702c00
-
-static int pvr2_init_cable(void)
-{
-   if (cable_type < 0) {
-   fb_writel((fb_readl(PCTRA) & 0xfff0) | 0x000a,
- PCTRA);
-   cable_type = (fb_readw(PDTRA) >> 8) & 3;
-   }
-
-   /* Now select the output format (either composite or other) */
-   /* XXX: Save the previous val first, as this reg is also AICA
- related */
-   if (cable_type == CT_COMPOSITE)
-   fb_writel(3 << 8, VOUTC);
-   else if (cable_type == CT_RGB)
-   fb_writel(1 << 9, VOUTC);
-   else
-   fb_writel(0, VOUTC);
-
-   return cable_type;
-}
-
 #ifdef CONFIG_PVR2_DMA
 static ssize_t pvr2fb_write(struct fb_info *info, const char *buf,
size_t count, loff_t *ppos)
@@ -741,6 +708,37 @@ out_unmap:
 }
 #endif /* CONFIG_PVR2_DMA */
 
+static struct fb_ops pvr2fb_ops = {
+   .owner  = THIS_MODULE,
+   .fb_setcolreg   = pvr2fb_setcolreg,
+   .fb_blank   = pvr2fb_blank,
+   .fb_check_var   = pvr2fb_check_var,
+   .fb_set_par = pvr2fb_set_par,
+#ifdef CONFIG_PVR2_DMA
+   .fb_write   = pvr2fb_write,
+#endif
+   .fb_fillrect= cfb_fillrect,
+   .fb_copyarea= cfb_copyarea,
+   .fb_imageblit   = cfb_imageblit,
+};
+
+static int pvr2_g

[PATCH 2/2] video: fbdev: pvr2fb: add COMPILE_TEST support

2019-05-22 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to pvr2fb driver for better compile
testing coverage.

While at it mark pvr2fb_interrupt() and pvr2fb_common_init()
with __maybe_unused tag (to silence build warnings when
!SH_DREAMCAST), also convert mmio_base in struct pvr2fb_par to
'void __iomem *' from 'unsigned long' (needed to silence
build warnings on ARM).

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/Kconfig  |3 ++-
 drivers/video/fbdev/pvr2fb.c |   26 +-
 2 files changed, 15 insertions(+), 14 deletions(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -807,7 +807,8 @@ config FB_XVR1000
 
 config FB_PVR2
tristate "NEC PowerVR 2 display support"
-   depends on FB && SH_DREAMCAST
+   depends on FB && HAS_IOMEM
+   depends on SH_DREAMCAST || COMPILE_TEST
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Index: b/drivers/video/fbdev/pvr2fb.c
===
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -139,7 +139,7 @@ static struct pvr2fb_par {
unsigned char is_doublescan;/* Are scanlines output twice? 
(doublescan) */
unsigned char is_lowres;/* Is horizontal pixel-doubling 
enabled? */
 
-   unsigned long mmio_base;/* MMIO base */
+   void __iomem *mmio_base;/* MMIO base */
u32 palette[16];
 } *currentpar;
 
@@ -325,9 +325,9 @@ static int pvr2fb_setcolreg(unsigned int
  * anything if the cable type has been overidden (via "cable:XX").
  */
 
-#define PCTRA 0xff80002c
-#define PDTRA 0xff800030
-#define VOUTC 0xa0702c00
+#define PCTRA ((void __iomem *)0xff80002c)
+#define PDTRA ((void __iomem *)0xff800030)
+#define VOUTC ((void __iomem *)0xa0702c00)
 
 static int pvr2_init_cable(void)
 {
@@ -619,7 +619,7 @@ static void pvr2_do_blank(void)
is_blanked = do_blank > 0 ? do_blank : 0;
 }
 
-static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id)
+static irqreturn_t __maybe_unused pvr2fb_interrupt(int irq, void *dev_id)
 {
struct fb_info *info = dev_id;
 
@@ -757,7 +757,7 @@ static int pvr2_get_param(const struct p
  * in for flexibility anyways. Who knows, maybe someone has tv-out on a
  * PCI-based version of these things ;-)
  */
-static int pvr2fb_common_init(void)
+static int __maybe_unused pvr2fb_common_init(void)
 {
struct pvr2fb_par *par = currentpar;
unsigned long modememused, rev;
@@ -770,8 +770,8 @@ static int pvr2fb_common_init(void)
goto out_err;
}
 
-   par->mmio_base = (unsigned long)ioremap_nocache(pvr2_fix.mmio_start,
-   pvr2_fix.mmio_len);
+   par->mmio_base = ioremap_nocache(pvr2_fix.mmio_start,
+pvr2_fix.mmio_len);
if (!par->mmio_base) {
printk(KERN_ERR "pvr2fb: Failed to remap mmio space\n");
goto out_err;
@@ -838,7 +838,7 @@ out_err:
if (fb_info->screen_base)
iounmap(fb_info->screen_base);
if (par->mmio_base)
-   iounmap((void *)par->mmio_base);
+   iounmap(par->mmio_base);
 
return -ENXIO;
 }
@@ -905,8 +905,8 @@ static void __exit pvr2fb_dc_exit(void)
fb_info->screen_base = NULL;
}
if (currentpar->mmio_base) {
-   iounmap((void *)currentpar->mmio_base);
-   currentpar->mmio_base = 0;
+   iounmap(currentpar->mmio_base);
+   currentpar->mmio_base = NULL;
}
 
free_irq(HW_EVENT_VSYNC, fb_info);
@@ -955,8 +955,8 @@ static void pvr2fb_pci_remove(struct pci
fb_info->screen_base = NULL;
}
if (currentpar->mmio_base) {
-   iounmap((void *)currentpar->mmio_base);
-   currentpar->mmio_base = 0;
+   iounmap(currentpar->mmio_base);
+   currentpar->mmio_base = NULL;
}
 
pci_release_regions(pdev);


[PATCH v2 2/2] video: fbdev: pvr2fb: add COMPILE_TEST support

2019-05-24 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to pvr2fb driver for better compile
testing coverage.

While at it:

- mark pvr2fb_interrupt() and pvr2fb_common_init() with
  __maybe_unused tag (to silence build warnings when
  !SH_DREAMCAST)

- convert mmio_base in struct pvr2fb_par to 'void __iomem *'
  from 'unsigned long' (needed to silence build warnings on
  ARM).

- split pvr2_get_param() on pvr2_get_param_name() and
  pvr2_get_param_val() (needed to silence build warnings on
  x86).

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
v2: fix build warnings on x86 reported by kbuild test robot

patch #1/2 is unchanged so I'm not sending it again

 drivers/video/fbdev/Kconfig  |3 +-
 drivers/video/fbdev/pvr2fb.c |   61 +++
 2 files changed, 36 insertions(+), 28 deletions(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -807,7 +807,8 @@ config FB_XVR1000
 
 config FB_PVR2
tristate "NEC PowerVR 2 display support"
-   depends on FB && SH_DREAMCAST
+   depends on FB && HAS_IOMEM
+   depends on SH_DREAMCAST || COMPILE_TEST
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Index: b/drivers/video/fbdev/pvr2fb.c
===
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -139,7 +139,7 @@ static struct pvr2fb_par {
unsigned char is_doublescan;/* Are scanlines output twice? 
(doublescan) */
unsigned char is_lowres;/* Is horizontal pixel-doubling 
enabled? */
 
-   unsigned long mmio_base;/* MMIO base */
+   void __iomem *mmio_base;/* MMIO base */
u32 palette[16];
 } *currentpar;
 
@@ -325,9 +325,9 @@ static int pvr2fb_setcolreg(unsigned int
  * anything if the cable type has been overidden (via "cable:XX").
  */
 
-#define PCTRA 0xff80002c
-#define PDTRA 0xff800030
-#define VOUTC 0xa0702c00
+#define PCTRA ((void __iomem *)0xff80002c)
+#define PDTRA ((void __iomem *)0xff800030)
+#define VOUTC ((void __iomem *)0xa0702c00)
 
 static int pvr2_init_cable(void)
 {
@@ -619,7 +619,7 @@ static void pvr2_do_blank(void)
is_blanked = do_blank > 0 ? do_blank : 0;
 }
 
-static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id)
+static irqreturn_t __maybe_unused pvr2fb_interrupt(int irq, void *dev_id)
 {
struct fb_info *info = dev_id;
 
@@ -722,23 +722,30 @@ static struct fb_ops pvr2fb_ops = {
.fb_imageblit   = cfb_imageblit,
 };
 
-static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val,
- int size)
+static int pvr2_get_param_val(const struct pvr2_params *p, const char *s,
+ int size)
 {
int i;
 
-   for (i = 0 ; i < size ; i++ ) {
-   if (s != NULL) {
-   if (!strncasecmp(p[i].name, s, strlen(s)))
-   return p[i].val;
-   } else {
-   if (p[i].val == val)
-   return (int)p[i].name;
-   }
+   for (i = 0 ; i < size; i++ ) {
+   if (!strncasecmp(p[i].name, s, strlen(s)))
+   return p[i].val;
}
return -1;
 }
 
+static char *pvr2_get_param_name(const struct pvr2_params *p, int val,
+ int size)
+{
+   int i;
+
+   for (i = 0 ; i < size; i++ ) {
+   if (p[i].val == val)
+   return p[i].name;
+   }
+   return NULL;
+}
+
 /**
  * pvr2fb_common_init
  *
@@ -757,7 +764,7 @@ static int pvr2_get_param(const struct p
  * in for flexibility anyways. Who knows, maybe someone has tv-out on a
  * PCI-based version of these things ;-)
  */
-static int pvr2fb_common_init(void)
+static int __maybe_unused pvr2fb_common_init(void)
 {
struct pvr2fb_par *par = currentpar;
unsigned long modememused, rev;
@@ -770,8 +777,8 @@ static int pvr2fb_common_init(void)
goto out_err;
}
 
-   par->mmio_base = (unsigned long)ioremap_nocache(pvr2_fix.mmio_start,
-   pvr2_fix.mmio_len);
+   par->mmio_base = ioremap_nocache(pvr2_fix.mmio_start,
+pvr2_fix.mmio_len);
if (!par->mmio_base) {
printk(KERN_ERR "pvr2fb: Failed to remap mmio space\n");
goto out_err;
@@ -819,8 +826,8 @@ static int pvr2fb_common_init(void)
fb_info->var.xres, fb_info->var.yres,
fb_info->var.bits_per_pixel,
get_line_length(fb_info->var.xres, fb_info->var.bits_per_pixel),
-   (char *)pvr2_get_param(cables, NULL, cable_type, 3),
-   (cha

[PATCH v3 2/2] video: fbdev: pvr2fb: add COMPILE_TEST support

2019-05-24 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to pvr2fb driver for better compile
testing coverage.

While at it:

- mark pvr2fb_interrupt() and pvr2fb_common_init() with
  __maybe_unused tag (to silence build warnings when
  !SH_DREAMCAST)

- convert mmio_base in struct pvr2fb_par to 'void __iomem *'
  from 'unsigned long' (needed to silence build warnings on
  ARM).

- split pvr2_get_param() on pvr2_get_param_name() and
  pvr2_get_param_val() (needed to silence build warnings on
  x86).

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
v3: fix 'space prohibited before that close parenthesis ')'
checkpatch errors
v2: fix build warnings on x86 reported by kbuild test robot

patch #1/2 is unchanged so I'm not sending it again

 drivers/video/fbdev/Kconfig  |3 +-
 drivers/video/fbdev/pvr2fb.c |   61 +++
 2 files changed, 36 insertions(+), 28 deletions(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -807,7 +807,8 @@ config FB_XVR1000
 
 config FB_PVR2
tristate "NEC PowerVR 2 display support"
-   depends on FB && SH_DREAMCAST
+   depends on FB && HAS_IOMEM
+   depends on SH_DREAMCAST || COMPILE_TEST
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Index: b/drivers/video/fbdev/pvr2fb.c
===
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -139,7 +139,7 @@ static struct pvr2fb_par {
unsigned char is_doublescan;/* Are scanlines output twice? 
(doublescan) */
unsigned char is_lowres;/* Is horizontal pixel-doubling 
enabled? */
 
-   unsigned long mmio_base;/* MMIO base */
+   void __iomem *mmio_base;/* MMIO base */
u32 palette[16];
 } *currentpar;
 
@@ -325,9 +325,9 @@ static int pvr2fb_setcolreg(unsigned int
  * anything if the cable type has been overidden (via "cable:XX").
  */
 
-#define PCTRA 0xff80002c
-#define PDTRA 0xff800030
-#define VOUTC 0xa0702c00
+#define PCTRA ((void __iomem *)0xff80002c)
+#define PDTRA ((void __iomem *)0xff800030)
+#define VOUTC ((void __iomem *)0xa0702c00)
 
 static int pvr2_init_cable(void)
 {
@@ -619,7 +619,7 @@ static void pvr2_do_blank(void)
is_blanked = do_blank > 0 ? do_blank : 0;
 }
 
-static irqreturn_t pvr2fb_interrupt(int irq, void *dev_id)
+static irqreturn_t __maybe_unused pvr2fb_interrupt(int irq, void *dev_id)
 {
struct fb_info *info = dev_id;
 
@@ -722,23 +722,30 @@ static struct fb_ops pvr2fb_ops = {
.fb_imageblit   = cfb_imageblit,
 };
 
-static int pvr2_get_param(const struct pvr2_params *p, const char *s, int val,
- int size)
+static int pvr2_get_param_val(const struct pvr2_params *p, const char *s,
+ int size)
 {
int i;
 
-   for (i = 0 ; i < size ; i++ ) {
-   if (s != NULL) {
-   if (!strncasecmp(p[i].name, s, strlen(s)))
-   return p[i].val;
-   } else {
-   if (p[i].val == val)
-   return (int)p[i].name;
-   }
+   for (i = 0 ; i < size; i++) {
+   if (!strncasecmp(p[i].name, s, strlen(s)))
+   return p[i].val;
}
return -1;
 }
 
+static char *pvr2_get_param_name(const struct pvr2_params *p, int val,
+ int size)
+{
+   int i;
+
+   for (i = 0 ; i < size; i++) {
+   if (p[i].val == val)
+   return p[i].name;
+   }
+   return NULL;
+}
+
 /**
  * pvr2fb_common_init
  *
@@ -757,7 +764,7 @@ static int pvr2_get_param(const struct p
  * in for flexibility anyways. Who knows, maybe someone has tv-out on a
  * PCI-based version of these things ;-)
  */
-static int pvr2fb_common_init(void)
+static int __maybe_unused pvr2fb_common_init(void)
 {
struct pvr2fb_par *par = currentpar;
unsigned long modememused, rev;
@@ -770,8 +777,8 @@ static int pvr2fb_common_init(void)
goto out_err;
}
 
-   par->mmio_base = (unsigned long)ioremap_nocache(pvr2_fix.mmio_start,
-   pvr2_fix.mmio_len);
+   par->mmio_base = ioremap_nocache(pvr2_fix.mmio_start,
+pvr2_fix.mmio_len);
if (!par->mmio_base) {
printk(KERN_ERR "pvr2fb: Failed to remap mmio space\n");
goto out_err;
@@ -819,8 +826,8 @@ static int pvr2fb_common_init(void)
fb_info->var.xres, fb_info->var.yres,
fb_info->var.bits_per_pixel,
get_line_length(fb_info->var.xres, fb_info->var.bits_per_p

Re: [PATCH 24/33] Revert "backlight/fbcon: Add FB_EVENT_CONBLANK"

2019-05-27 Thread Bartlomiej Zolnierkiewicz

On 5/24/19 5:28 PM, Daniel Vetter wrote:
> Hi Daniel,
> 
> On Fri, May 24, 2019 at 3:14 PM Daniel Thompson
>  wrote:
>>
>> On Fri, May 24, 2019 at 10:53:45AM +0200, Daniel Vetter wrote:
>>> This reverts commit 994efacdf9a087b52f71e620b58dfa526b0cf928.
>>>
>>> The justification is that if hw blanking fails (i.e. fbops->fb_blank)
>>> fails, then we still want to shut down the backlight. Which is exactly
>>> _not_ what fb_blank() does and so rather inconsistent if we end up
>>> with different behaviour between fbcon and direct fbdev usage. Given
>>> that the entire notifier maze is getting in the way anyway I figured
>>> it's simplest to revert this not well justified commit.
>>>
>>> v2: Add static inline to the dummy version.
>>>
>>> Cc: Richard Purdie 
>>> Signed-off-by: Daniel Vetter 
>>> Cc: Lee Jones 
>>> Cc: Daniel Thompson 
>>> Cc: Jingoo Han 
>>> Cc: Bartlomiej Zolnierkiewicz 
>>> Cc: Daniel Vetter 
>>> Cc: Hans de Goede 
>>> Cc: Yisheng Xie 
>>> Cc: linux-fb...@vger.kernel.org
>>
>> Hi Daniel
>>
>> When this goes round again could you add me to the covering letter?
>>
>> I looked at all three of the patches and no objections on my side but
>> I'm reluctant to send out acks because I'm not sure I understood the
>> wider picture well enough.
> 
> It's one of these patch series with some many different subsystems and
> people you can't cc the cover to all of them or mailing lists start
> rejecting you because too many recipients. I tried to spam sufficient
> mailng lists, but I guess not enough.

BTW Not all relevant patches were posted to linux-fbdev and me (i.e.
"[PATCH 05/33] fbdev/sa1100fb: Remove dead code") - I found them on
other mailing lists but it requires some additional work from me to
find / process them. If possible please Cc: linux-fbdev & me on all
patches in the patchset. Thanks!

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] video: amba-clcd: Decomission Versatile and Nomadik

2019-04-11 Thread Bartlomiej Zolnierkiewicz

On 03/20/2019 10:33 AM, Linus Walleij wrote:
> These board families are now handled in the DRM subsystem
> where we can have reusable panel drivers and some other
> stuff. The PL111 there is now the driver used in the
> defconfig for Versatile and Nomadik so no need to keep
> this code around.
> 
> There are a few minor machines in arch/arm/ such as
> mach-netx still using the old driver, so we need to keep
> the core fbdev driver around for some time.
> 
> Cc: Russell King 
> Cc: Bartlomiej Zolnierkiewicz 
> Signed-off-by: Linus Walleij 

Patch queued for v5.2, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH -next] video: fbdev: remove set but not used variable 'size'

2019-04-11 Thread Bartlomiej Zolnierkiewicz

On 03/30/2019 03:26 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/video/fbdev/pvr2fb.c: In function 'pvr2fb_init':
> drivers/video/fbdev/pvr2fb.c:1074:6: warning:
>  variable 'size' set but not used [-Wunused-but-set-variable]
> 
> It's not used since commit 9cd1c6743454 ("pvr2fb: Fix oops when
> pseudo_palette is written")
> 
> Signed-off-by: YueHaibing 

Patch queued for v5.2 with minor change in the patch summary
("video: fbdev: pvr2fb: remove set but not used variable 'size'"),
thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH -next] fbdev: mxsfb: remove set but not used variable 'line_count'

2019-04-11 Thread Bartlomiej Zolnierkiewicz

On 04/03/2019 09:24 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/video/fbdev/mxsfb.c: In function 'mxsfb_restore_mode':
> drivers/video/fbdev/mxsfb.c:633:11: warning:
>  variable 'line_count' set but not used [-Wunused-but-set-variable]
> 
> It's never used since introduction in commit f0a523b5e5e2 ("video: Add 
> i.MX23/28
> framebuffer driver") and can be removed.
> 
> Signed-off-by: YueHaibing 

Patch queued for v5.2 with minor change in the patch summary
("video: fbdev: mxsfb: remove set but not used variable 'line_count'"),
thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH -next] video: fbdev: atmel_lcdfb: remove set but not used variable 'pdata'

2019-04-11 Thread Bartlomiej Zolnierkiewicz

On 04/03/2019 10:20 AM, nicolas.fe...@microchip.com wrote:
> On 03/04/2019 at 09:24, YueHaibing wrote:
>> External E-Mail
>>
>>
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/video/fbdev/atmel_lcdfb.c: In function 'atmel_lcdfb_remove':
>> drivers/video/fbdev/atmel_lcdfb.c:1255:28: warning:
>>   variable 'pdata' set but not used [-Wunused-but-set-variable]
>>
>> It's not used since commit 42110e91de7f ("video: atmel_lcdfb: introduce
>> atmel_lcdfb_power_control")
>>
>> Signed-off-by: YueHaibing 
> 
> Indeed:
> Acked-by: Nicolas Ferre 

Patch queued for v5.2, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm: remove redundant 'default n' from Kconfig

2019-04-12 Thread Bartlomiej Zolnierkiewicz
'default n' is the default value for any bool or tristate Kconfig
setting so there is no need to write it explicitly.

Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO
is not set' for visible symbols") the Kconfig behavior is the same
regardless of 'default n' being present or not:

...
One side effect of (and the main motivation for) this change is making
the following two definitions behave exactly the same:

config FOO
bool

config FOO
bool
default n

With this change, neither of these will generate a
'# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied).
That might make it clearer to people that a bare 'default n' is
redundant.
...

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/gpu/drm/Kconfig |5 -
 drivers/gpu/drm/amd/amdgpu/Kconfig  |1 -
 drivers/gpu/drm/arm/Kconfig |1 -
 drivers/gpu/drm/exynos/Kconfig  |2 --
 drivers/gpu/drm/i915/Kconfig|3 ---
 drivers/gpu/drm/i915/Kconfig.debug  |   13 -
 drivers/gpu/drm/msm/Kconfig |2 --
 drivers/gpu/drm/nouveau/Kconfig |2 --
 drivers/gpu/drm/omapdrm/Kconfig |1 -
 drivers/gpu/drm/omapdrm/dss/Kconfig |6 --
 10 files changed, 36 deletions(-)

Index: b/drivers/gpu/drm/Kconfig
===
--- a/drivers/gpu/drm/Kconfig   2019-04-12 11:42:30.070095359 +0200
+++ b/drivers/gpu/drm/Kconfig   2019-04-12 11:42:30.066095359 +0200
@@ -37,7 +37,6 @@ config DRM_DP_AUX_CHARDEV
 
 config DRM_DEBUG_MM
bool "Insert extra checks and debug info into the DRM range managers"
-   default n
depends on DRM=y
depends on STACKTRACE_SUPPORT
select STACKDEPOT
@@ -56,7 +55,6 @@ config DRM_DEBUG_SELFTEST
select PRIME_NUMBERS
select DRM_LIB_RANDOM
select DRM_KMS_HELPER
-   default n
help
  This option provides kernel modules that can be used to run
  various selftests on parts of the DRM api. This option is not
@@ -113,7 +111,6 @@ config DRM_FBDEV_OVERALLOC
 config DRM_FBDEV_LEAK_PHYS_SMEM
bool "Shamelessly allow leaking of fbdev physical address (DANGEROUS)"
depends on DRM_FBDEV_EMULATION && EXPERT
-   default n
help
  In order to keep user-space compatibility, we want in certain
  use-cases to keep leaking the fbdev physical address to the
@@ -247,7 +244,6 @@ config DRM_VKMS
tristate "Virtual KMS (EXPERIMENTAL)"
depends on DRM
select DRM_KMS_HELPER
-   default n
help
  Virtual Kernel Mode-Setting (VKMS) is used for testing or for
  running GPU in a headless machines. Choose this option to get
@@ -424,4 +420,3 @@ config DRM_PANEL_ORIENTATION_QUIRKS
 
 config DRM_LIB_RANDOM
bool
-   default n
Index: b/drivers/gpu/drm/amd/amdgpu/Kconfig
===
--- a/drivers/gpu/drm/amd/amdgpu/Kconfig2019-04-12 11:42:30.070095359 
+0200
+++ b/drivers/gpu/drm/amd/amdgpu/Kconfig2019-04-12 11:42:30.066095359 
+0200
@@ -35,7 +35,6 @@ config DRM_AMDGPU_GART_DEBUGFS
bool "Allow GART access through debugfs"
depends on DRM_AMDGPU
depends on DEBUG_FS
-   default n
help
  Selecting this option creates a debugfs file to inspect the mapped
  pages. Uses more memory for housekeeping, enable only for debugging.
Index: b/drivers/gpu/drm/arm/Kconfig
===
--- a/drivers/gpu/drm/arm/Kconfig   2019-04-12 11:42:30.070095359 +0200
+++ b/drivers/gpu/drm/arm/Kconfig   2019-04-12 11:42:30.066095359 +0200
@@ -16,7 +16,6 @@ config DRM_HDLCD
 config DRM_HDLCD_SHOW_UNDERRUN
bool "Show underrun conditions"
depends on DRM_HDLCD
-   default n
help
  Enable this option to show in red colour the pixels that the
  HDLCD device did not fetch from framebuffer due to underrun
Index: b/drivers/gpu/drm/exynos/Kconfig
===
--- a/drivers/gpu/drm/exynos/Kconfig2019-04-12 11:42:30.070095359 +0200
+++ b/drivers/gpu/drm/exynos/Kconfig2019-04-12 11:42:30.066095359 +0200
@@ -46,7 +46,6 @@ config DRM_EXYNOS_DPI
bool "Parallel output"
depends on DRM_EXYNOS_FIMD
select DRM_PANEL
-   default n
help
  This enables support for Exynos parallel output.
 
@@ -55,7 +54,6 @@ config DRM_EXYNOS_DSI
depends on DRM_EXYNOS_FIMD || DRM_EXYNOS5433_DECON || DRM_EXYNOS7_DECON
select DRM_MIPI_DSI
select DRM_PA

[PATCH] video: fbdev: imxfb: add COMPILE_TEST support

2019-04-12 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to imxfb driver for better compile
testing coverage.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/Kconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig   2019-04-12 12:35:07.322174869 +0200
+++ b/drivers/video/fbdev/Kconfig   2019-04-12 12:35:07.306174869 +0200
@@ -334,7 +334,7 @@ config FB_SA1100
 
 config FB_IMX
tristate "Freescale i.MX1/21/25/27 LCD support"
-   depends on FB && ARCH_MXC
+   depends on FB && (ARCH_MXC || COMPILE_TEST)
select BACKLIGHT_LCD_SUPPORT
select LCD_CLASS_DEVICE
select FB_CFB_FILLRECT
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: pxa168fb: add COMPILE_TEST support

2019-04-12 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to pxa168fb driver for better compile
testing coverage.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/Kconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig   2019-04-12 12:35:09.038174913 +0200
+++ b/drivers/video/fbdev/Kconfig   2019-04-12 12:35:09.034174912 +0200
@@ -1732,7 +1732,7 @@ config FB_68328
 
 config FB_PXA168
tristate "PXA168/910 LCD framebuffer support"
-   depends on FB && (CPU_PXA168 || CPU_PXA910)
+   depends on FB && (CPU_PXA168 || CPU_PXA910 || COMPILE_TEST)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: atmel_lcdfb: add COMPILE_TEST support

2019-04-12 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to atmel_lcdfb driver for better compile
testing coverage.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/Kconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig   2019-04-12 13:12:24.0 +0200
+++ b/drivers/video/fbdev/Kconfig   2019-04-12 13:15:03.986235226 +0200
@@ -859,7 +859,7 @@ config FB_S1D13XXX
 
 config FB_ATMEL
tristate "AT91 LCD Controller support"
-   depends on FB && OF && HAVE_FB_ATMEL
+   depends on FB && OF && (HAVE_FB_ATMEL || COMPILE_TEST)
select FB_BACKLIGHT
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: gbefb: add COMPILE_TEST support

2019-04-12 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to gbefb driver for better compile
testing coverage.

While at it remove dead x86 specific code.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/Kconfig |2 +-
 drivers/video/fbdev/gbefb.c |9 ++---
 2 files changed, 3 insertions(+), 8 deletions(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig   2019-04-12 13:34:54.0 +0200
+++ b/drivers/video/fbdev/Kconfig   2019-04-12 13:40:48.246274115 +0200
@@ -673,7 +673,7 @@ config FB_HGA
 
 config FB_GBE
bool "SGI Graphics Backend frame buffer support"
-   depends on (FB = y) && SGI_IP32
+   depends on (FB = y) && (SGI_IP32 || COMPILE_TEST)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
Index: b/drivers/video/fbdev/gbefb.c
===
--- a/drivers/video/fbdev/gbefb.c   2019-04-12 11:39:45.266091209 +0200
+++ b/drivers/video/fbdev/gbefb.c   2019-04-12 13:48:00.142284992 +0200
@@ -39,9 +39,7 @@ struct gbefb_par {
int valid;
 };
 
-#ifdef CONFIG_SGI_IP32
 #define GBE_BASE   0x1600 /* SGI O2 */
-#endif
 
 /* macro for fastest write-though access to the framebuffer */
 #ifdef CONFIG_MIPS
@@ -51,10 +49,6 @@ struct gbefb_par {
 #define pgprot_fb(_prot) (((_prot) & (~_CACHE_MASK)) | _CACHE_CACHABLE_NO_WA)
 #endif
 #endif
-#ifdef CONFIG_X86
-#define pgprot_fb(_prot) (((_prot) & ~_PAGE_CACHE_MASK) |  \
- cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS))
-#endif
 
 /*
  *  RAM we reserve for the frame buffer. This defines the maximum screen
@@ -1018,9 +1012,10 @@ static int gbefb_mmap(struct fb_info *in
 
/* remap using the fastest write-through mode on architecture */
/* try not polluting the cache when possible */
+#ifdef CONFIG_MIPS
pgprot_val(vma->vm_page_prot) =
pgprot_fb(pgprot_val(vma->vm_page_prot));
-
+#endif
/* VM_IO | VM_DONTEXPAND | VM_DONTDUMP are set by remap_pfn_range() */
 
/* look for the starting tile */
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: da8xx-fb: add COMPILE_TEST support

2019-04-12 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to da8xx-fb driver for better compile
testing coverage.

Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/Kconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig   2019-04-12 13:40:48.246274115 +0200
+++ b/drivers/video/fbdev/Kconfig   2019-04-12 13:55:50.694296842 +0200
@@ -2058,7 +2058,7 @@ config FB_SH7760
 
 config FB_DA8XX
tristate "DA8xx/OMAP-L1xx/AM335x Framebuffer support"
-   depends on FB && (ARCH_DAVINCI_DA8XX || SOC_AM33XX)
+   depends on FB && (ARCH_DAVINCI_DA8XX || SOC_AM33XX || COMPILE_TEST)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] fbdev/via: fix spelling mistake "Expandsion" -> "Expansion"

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 10/13/2018 12:47 AM, Colin King wrote:
> From: Colin Ian King 
> 
> Trivial fix to spelling mistake in MODULE_PARM_DESC text
> 
> Signed-off-by: Colin Ian King 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH -next] drivers/video/fbdev: remove set but not used variable 'size'

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 10/17/2018 01:52 AM, Michael Ellerman wrote:
> YueHaibing  writes:
> 
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/video/fbdev/chipsfb.c: In function 'chipsfb_pci_init':
>> drivers/video/fbdev/chipsfb.c:352:22: warning:
>>  variable 'size' set but not used [-Wunused-but-set-variable]
>>
>> It not used any more after commit
>> 8c8709334cec ("[PATCH] ppc32: Remove CONFIG_PMAC_PBOOK")
>>
>> Signed-off-by: YueHaibing 
>> ---
>>  drivers/video/fbdev/chipsfb.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> Looks good, thanks.
> 
> Should I merge this? Or otherwise:
> 
> Acked-by: Michael Ellerman 

I've queued the patch to fbdev tree for v5.1 w/ slightly modified patch
summary ("fbdev: chipsfb: ...") add patch description (use Fixes: tag),
thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbcon: use kvmalloc() for scrollback buffer

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 12/21/2018 11:58 AM, Konstantin Khorenko wrote:
> Hi Bartlomiej,
> 
> On 12/20/2018 07:21 PM, Bartlomiej Zolnierkiewicz wrote:
>> On 11/26/2018 11:02 AM, Konstantin Khorenko wrote:
>>> Scrollback frame buffer is rather big - 32K,
>>> so it requires 3rd order page, so let's use kvmalloc() instead of
>>> ordinary kmalloc() for it.
>>
>> Is it actually safe to use non-contiguous memory for softback_buf?
> 
> Well, that's why we need a review. :)

:)

> i've asked myself same question while fixing this,
> i've dig sources a bit and did not find places when softback_buf is provided 
> for DMA,
> all other places seems to work with virtual addresses, so there should be no 
> problem.
> 
> Even more i saw a function which mentions that softback might be 
> non-contigious:
> 
> /* As we might be inside of softback, we may work with non-contiguous buffer,
> that's why we have to use a separate routine. */
> static void fbcon_invert_region(struct vc_data *vc, u16 * p, int cnt)
> 
> So i think it's safe to use kvmalloc() here.

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: Use of_node_name_eq for node name comparisons

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 12/05/2018 08:50 PM, Rob Herring wrote:
> Convert string compares of DT node names to use of_node_name_eq helper
> instead. This removes direct access to the node name pointer.
> 
> For instances using of_node_cmp, this has the side effect of now using
> case sensitive comparisons. This should not matter for any FDT based
> system which omap is.
> 
> Cc: Benjamin Herrenschmidt 
> Cc: Bartlomiej Zolnierkiewicz 
> Cc: linux-fb...@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-o...@vger.kernel.org
> Signed-off-by: Rob Herring 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] omapfb: fix typo

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/04/2019 10:43 PM, Matteo Croce wrote:
> Fix spelling mistake: "lenght" -> "length"
> 
> Signed-off-by: Matteo Croce 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] video: offb: annotate implicit fall throughs

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/14/2019 10:50 PM, Gustavo A. R. Silva wrote:
> 
> 
> On 1/14/19 2:40 PM, Mathieu Malaterre wrote:
>> There is a plan to build the kernel with -Wimplicit-fallthrough and
>> these places in the code produced warnings (W=1). Fix them up.
>>
>> This commit remove the following warnings:
>>
>>drivers/video/fbdev/offb.c:211:5: warning: this statement may fall 
>> through [-Wimplicit-fallthrough=]
>>drivers/video/fbdev/offb.c:142:3: warning: this statement may fall 
>> through [-Wimplicit-fallthrough=]
>>
>> Signed-off-by: Mathieu Malaterre 
> 
> Acked-by: Gustavo A. R. Silva 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 1/2] video: lcd: Remove useless BACKLIGHT_LCD_SUPPORT kernel symbol

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/17/2019 05:19 PM, Daniel Thompson wrote:
> On Thu, Jan 17, 2019 at 04:33:35PM +0300, Alexander Shiyan wrote:
>> We have two *_CLASS_DEVICE kernel config options (LCD_CLASS_DEVICE
>> and BACKLIGHT_LCD_DEVICE) that do the same job.
>> The patch removes useless BACKLIGHT_LCD_SUPPORT option
>> and converts LCD_CLASS_DEVICE into a menu.
>>
>> Signed-off-by: Alexander Shiyan 
> 
> A cover letter with the v1 -> v2 changelog would be nice... but
> nevertheless:
> Acked-by: Daniel Thompson 

Also:

Acked-by: Bartlomiej Zolnierkiewicz 

Lee, will you pick this up or do you want me to do it?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 2/2] video: lcd: Remove useless BACKLIGHT_CLASS_DEVICE dependencies

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/17/2019 02:33 PM, Alexander Shiyan wrote:
> This patch removes dependencies on BACKLIGHT_CLASS_DEVICE for items
> that are already placed under #if BACKLIGHT_CLASS_DEVICE.
> 
> Signed-off-by: Alexander Shiyan 

Acked-by: Bartlomiej Zolnierkiewicz 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: omap2: no need to check return value of debugfs_create functions

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/22/2019 04:21 PM, Greg Kroah-Hartman wrote:
> When calling debugfs functions, there is no need to ever check the
> return value.  The function can work or not, but the code logic should
> never do something different based on this.
> 
> Cc: Bartlomiej Zolnierkiewicz 
> Cc: Mauro Carvalho Chehab 
> Cc: linux-o...@vger.kernel.org
> Cc: linux-fb...@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Greg Kroah-Hartman 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: mbx: fix up debugfs file creation

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/22/2019 04:21 PM, Greg Kroah-Hartman wrote:
> There is no need to keep the dentries around for the individual debugfs
> files, just delete the whole directory all at once at shutdown instead.
> 
> This also fixes a tiny memory leak where the memory for the pointers to
> the file dentries was never freed when the device shut down, as well as
> making the logic of the code a lot simpler.
> 
> Cc: Bartlomiej Zolnierkiewicz 
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-fb...@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] video/fbdev: refactor video= cmdline parsing

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/23/2019 12:12 PM, Jani Nikula wrote:
> On Wed, 23 Jan 2019, Daniel Vetter  wrote:
>> On Wed, Jan 23, 2019 at 11:38:17AM +0200, Jani Nikula wrote:
>>> Make the video_setup() function slightly easier to read by removing the
>>> repeated checks for !global. Remove the misleading return value comment
>>> while at it.
>>>
>>> I'm slightly hesitant to change any of this, but here goes anyway, with
>>> hopes that the next person to have to look at this has it a wee bit
>>> easier.
>>>
>>> Signed-off-by: Jani Nikula 
>>
>> Reviewed-by: Daniel Vetter 
> 
> Thanks.
> 
> Just to be clear, I expect Bartlomiej to queue this via the fb tree
> (provided he agrees with the change, of course).

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: fbmem: fix memory access if logo is bigger than the screen

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/28/2019 11:04 AM, Martin Kepplinger wrote:
> From: Manfred Schlaegl 
> 
> There is no clipping on the x or y axis for logos larger that the framebuffer
> size. Therefore: a logo bigger than screen size leads to invalid memory 
> access:
> 
> [1.254664] Backtrace:
> [1.254728] [] (cfb_imageblit) from [] 
> (fb_show_logo+0x620/0x684)
> [1.254763]  r10:0003 r9:00027fd8 r8:c6a4 r7:c6a36e50 r6: 
> r5:c06b81e4
> [1.254774]  r4:c6a3e800
> [1.254810] [] (fb_show_logo) from [] 
> (fbcon_switch+0x3fc/0x46c)
> [1.254842]  r10:c6a3e824 r9:c6a3e800 r8: r7:c6a0c000 r6:c070b014 
> r5:c6a3e800
> [1.254852]  r4:c6808c00
> [1.254889] [] (fbcon_switch) from [] 
> (redraw_screen+0xf0/0x1e8)
> [1.254918]  r10: r9: r8: r7: r6:c070d5a0 
> r5:0080
> [1.254928]  r4:c6808c00
> [1.254961] [] (redraw_screen) from [] 
> (do_bind_con_driver+0x194/0x2e4)
> [1.254991]  r9: r8: r7:0014 r6:c070d5a0 r5:c070d5a0 
> r4:c070d5a0
> 
> So prevent displaying a logo bigger than screen size and avoid invalid
> memory access.
> 
> Signed-off-by: Manfred Schlaegl 
> Signed-off-by: Martin Kepplinger 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v5 0/2] Do not output logo on quiet boots

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/29/2019 02:43 PM, Prarit Bhargava wrote:
> On text-based systems the 'quiet' boot option will show printk levels
> higher than CONSOLE_LOGLEVEL_QUIET.  The displaying of the Tux logo
> during boot can cause some consoles to lose display data and as a result
> confuse the end user.
> 
> Do not display the Tux logo on systems that are in 'quiet' boot.
> 
> v2: It helps to commit all my changes before sending them.  Remove extra
> bracket.
> v3: buildbot error fix: fbcon can be built as part of a module so export 
> console_printk
> v4: move console_printk change to separate patch, and drop logo cleanup
> v5: Only set FBCON_LOGO_DONTSHOW for console loglevel
> 
> 
> Signed-off-by: Prarit Bhargava 

Patches #1-2 queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH -next] video: fbdev: Fix potential NULL pointer dereference

2019-02-08 Thread Bartlomiej Zolnierkiewicz

On 01/30/2019 11:16 AM, YueHaibing wrote:
> There is a potential NULL pointer dereference in case
> fb_create_modedb() fails and returns NULL.
> 
> Signed-off-by: YueHaibing 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] udlfb: fix some inconsistent NULL checking

2018-12-20 Thread Bartlomiej Zolnierkiewicz

[ added Mikulas, Alexey, Colin & Wen to Cc: ]

On 10/10/2018 12:36 PM, Dan Carpenter wrote:
> In the current kernel, then kzalloc() can't fail for small allocations,
> but if it did fail then we would have a NULL dereference in the error
> handling.  Also in dlfb_usb_disconnect() if "info" were NULL then it
> would cause an Oops inside the unregister_framebuffer() function but it
> can't be NULL so let's remove that check.
> 
> Signed-off-by: Dan Carpenter 

Patch queued for 4.21, thanks (also sorry for the delay).

[ Mikulas, Alexey, Colin & Wen: please verify that there are no known
  issues with udlfb left with this patch applied (thanks!). ]

> diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
> index 070026a7e55a..1d034dddc556 100644
> --- a/drivers/video/fbdev/udlfb.c
> +++ b/drivers/video/fbdev/udlfb.c
> @@ -1598,7 +1598,7 @@ static int dlfb_usb_probe(struct usb_interface *intf,
>   dlfb = kzalloc(sizeof(*dlfb), GFP_KERNEL);
>   if (!dlfb) {
>   dev_err(&intf->dev, "%s: failed to allocate dlfb\n", __func__);
> - goto error;
> + return -ENOMEM;
>   }
>  
>   INIT_LIST_HEAD(&dlfb->deferred_free);
> @@ -1703,7 +1703,7 @@ static int dlfb_usb_probe(struct usb_interface *intf,
>  error:
>   if (dlfb->info) {
>   dlfb_ops_destroy(dlfb->info);
> - } else if (dlfb) {
> + } else {
>   usb_put_dev(dlfb->udev);
>   kfree(dlfb);
>   }
> @@ -1730,12 +1730,10 @@ static void dlfb_usb_disconnect(struct usb_interface 
> *intf)
>   /* this function will wait for all in-flight urbs to complete */
>   dlfb_free_urb_list(dlfb);
>  
> - if (info) {
> - /* remove udlfb's sysfs interfaces */
> - for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++)
> - device_remove_file(info->dev, &fb_device_attrs[i]);
> - device_remove_bin_file(info->dev, &edid_attr);
> - }
> + /* remove udlfb's sysfs interfaces */
> + for (i = 0; i < ARRAY_SIZE(fb_device_attrs); i++)
> + device_remove_file(info->dev, &fb_device_attrs[i]);
> + device_remove_bin_file(info->dev, &edid_attr);
>  
>   unregister_framebuffer(info);
>  }

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: make FB_BACKLIGHT a tristate

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 12/18/2018 02:19 PM, Rob Clark wrote:
> On Fri, Oct 26, 2018 at 10:09 AM Rob Clark  wrote:
>>
>> BACKLIGHT_CLASS_DEVICE is already tristate, but a dependency
>> FB_BACKLIGHT prevents it from being built as a module.  There
>> doesn't seem to be any particularly good reason for this, so
>> switch FB_BACKLIGHT over to tristate.
>>
>> Signed-off-by: Rob Clark 
>> Tested-by: Arnd Bergmann 
> 
> bump

Patch queued for 4.21, thanks (also sorry for the delay).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbcon: use kvmalloc() for scrollback buffer

2018-12-20 Thread Bartlomiej Zolnierkiewicz

Hi,

On 11/26/2018 11:02 AM, Konstantin Khorenko wrote:
> Scrollback frame buffer is rather big - 32K,
> so it requires 3rd order page, so let's use kvmalloc() instead of
> ordinary kmalloc() for it.

Is it actually safe to use non-contiguous memory for softback_buf?

> Signed-off-by: Konstantin Khorenko 
> ---
>  drivers/video/fbdev/core/fbcon.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/core/fbcon.c 
> b/drivers/video/fbdev/core/fbcon.c
> index 8958ccc8b1ac..2b1a34d3f5e2 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
> @@ -992,7 +992,7 @@ static const char *fbcon_startup(void)
>   if (!softback_buf) {
>   softback_buf =
>   (unsigned long)
> - kmalloc(fbcon_softback_size,
> + kvmalloc(fbcon_softback_size,
>   GFP_KERNEL);
>   if (!softback_buf) {
>   fbcon_softback_size = 0;
> @@ -1001,7 +1001,7 @@ static const char *fbcon_startup(void)
>   }
>   } else {
>   if (softback_buf) {
> - kfree((void *) softback_buf);
> + kvfree((void *) softback_buf);
>   softback_buf = 0;
>   softback_top = 0;
>   }
> @@ -3665,7 +3665,7 @@ static void fbcon_exit(void)
>   }
>  #endif
>  
> - kfree((void *)softback_buf);
> + kvfree((void *)softback_buf);
>   softback_buf = 0UL;
>  
>   for_each_registered_fb(i) {

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v3] fbcon: Silence fbcon logo on 'quiet' boots

2018-12-20 Thread Bartlomiej Zolnierkiewicz

[ added Petr & Sergey to Cc: ]

Hi,

On 10/30/2018 04:44 PM, Prarit Bhargava wrote:
> On text-based systems the 'quiet' boot option will show printk levels
> higher than CONSOLE_LOGLEVEL_QUIET.  The displaying of the Tux logo
> during boot can cause some consoles to lose display data and as a result
> confuse the end user.
> 
> Do not display the Tux logo on systems that are in 'quiet' boot.
> 
> v2: It helps to commit all my changes before sending them.  Remove extra
> bracket.
> v3: buildbot error fix: fbcon can be built as part of a module so export 
> console_printk
> 
> Signed-off-by: Prarit Bhargava 
> Cc: Hans de Goede 
> Cc: Marko Myllynen 
> Cc: Steven Rostedt (VMware) 
> Cc: Bartlomiej Zolnierkiewicz 
> Cc: Kees Cook 
> Cc: Daniel Vetter 
> Cc: Thierry Reding 
> Cc: Yisheng Xie 
> Cc: dri-devel@lists.freedesktop.org
> ---
>  drivers/video/fbdev/core/fbcon.c | 13 -
>  kernel/printk/printk.c   |  1 +
>  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/video/fbdev/core/fbcon.c 
> b/drivers/video/fbdev/core/fbcon.c
> index 8958ccc8b1ac..08e092eaf45c 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
> @@ -649,11 +649,14 @@ static void fbcon_prepare_logo(struct vc_data *vc, 
> struct fb_info *info,
>   kfree(save);
>   }
>  
> + if (logo_shown == FBCON_LOGO_DONTSHOW)
> + return;
> +
>   if (logo_lines > vc->vc_bottom) {
>   logo_shown = FBCON_LOGO_CANSHOW;
>   printk(KERN_INFO
>  "fbcon_init: disable boot-logo (boot-logo bigger than 
> screen).\n");
> - } else if (logo_shown != FBCON_LOGO_DONTSHOW) {
> + } else {
>   logo_shown = FBCON_LOGO_DRAW;
>   vc->vc_top = logo_lines;
>   }
> @@ -1051,7 +1054,7 @@ static void fbcon_init(struct vc_data *vc, int init)
>   struct vc_data **default_mode = vc->vc_display_fg;
>   struct vc_data *svc = *default_mode;
>   struct display *t, *p = &fb_display[vc->vc_num];
> - int logo = 1, new_rows, new_cols, rows, cols, charcnt = 256;
> + int new_rows, new_cols, rows, cols, charcnt = 256;
>   int cap, ret;
>  
>   if (info_idx == -1 || info == NULL)
> @@ -1059,9 +1062,9 @@ static void fbcon_init(struct vc_data *vc, int init)
>  
>   cap = info->flags;
>  
> - if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||
> + if (vc != svc || console_loglevel <= CONSOLE_LOGLEVEL_QUIET ||
>   (info->fix.type == FB_TYPE_TEXT))
> - logo = 0;
> + logo_shown = FBCON_LOGO_DONTSHOW;

"logo" variable removal is an unrelated change which actually
changes the code behavior ("logo_shown" will be now modified
also for "vc != svc" and "info->fix.type == FB_TYPE_TEXT" cases).

Please either drop it or explain in the patch description why
it is a safe thing to do.

>   if (var_to_display(p, &info->var, info))
>   return;
> @@ -1176,7 +1179,7 @@ static void fbcon_init(struct vc_data *vc, int init)
>   } else
>   vc_resize(vc, new_cols, new_rows);
>  
> - if (logo)
> + if (logo_shown != FBCON_LOGO_DONTSHOW)
>   fbcon_prepare_logo(vc, info, cols, rows, new_cols, new_rows);
>  
>   if (vc == svc && softback_buf)
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index b77150ad1965..391e390feac9 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -66,6 +66,7 @@ int console_printk[4] = {
>   CONSOLE_LOGLEVEL_MIN,   /* minimum_console_loglevel */
>   CONSOLE_LOGLEVEL_DEFAULT,   /* default_console_loglevel */
>  };
> +EXPORT_SYMBOL(console_printk);

You need printk Maintainers Ack on it.

>  atomic_t ignore_console_lock_warning __read_mostly = ATOMIC_INIT(0);
>  EXPORT_SYMBOL(ignore_console_lock_warning);

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] video: clps711x-fb: release disp device node in probe()

2018-12-20 Thread Bartlomiej Zolnierkiewicz

[ added dri-devel ML to Cc: ]

On 11/02/2018 11:23 PM, Alexey Khoroshilov wrote:
> clps711x_fb_probe() increments refcnt of disp device node by
> of_parse_phandle() and leaves it undecremented on both
> successful and error paths.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov 

Patch queued for 4.21, thanks.

> ---
>  drivers/video/fbdev/clps711x-fb.c | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/clps711x-fb.c 
> b/drivers/video/fbdev/clps711x-fb.c
> index ff561073ee4e..42f909618f04 100644
> --- a/drivers/video/fbdev/clps711x-fb.c
> +++ b/drivers/video/fbdev/clps711x-fb.c
> @@ -287,14 +287,17 @@ static int clps711x_fb_probe(struct platform_device 
> *pdev)
>   }
>  
>   ret = of_get_fb_videomode(disp, &cfb->mode, OF_USE_NATIVE_MODE);
> - if (ret)
> + if (ret) {
> + of_node_put(disp);
>   goto out_fb_release;
> + }
>  
>   of_property_read_u32(disp, "ac-prescale", &cfb->ac_prescale);
>   cfb->cmap_invert = of_property_read_bool(disp, "cmap-invert");
>  
>   ret = of_property_read_u32(disp, "bits-per-pixel",
>      &info->var.bits_per_pixel);
> + of_node_put(disp);
>   if (ret)
>   goto out_fb_release;
>  

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [REGRESSION PATCH] fbdev: fbmem: behave better with small rotated displays and many CPUs

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 11/26/2018 10:19 PM, Peter Rosin wrote:
> On 2018-11-26 15:33, Bartlomiej Zolnierkiewicz wrote:
>> On 11/26/2018 03:16 PM, Peter Rosin wrote:
>>> Ping?!
>>
>> Hi,
>>
>> Thank you for your patch, it will be considered for 4.21 (as it is not
>> a recent regression + I'm busy with other things currently).
> 
> Right, thanks for letting me know!

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH -next] video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 11/16/2018 12:02 PM, YueHaibing wrote:
> 'info->modes' got allocated with devm_kcalloc in of_get_pxafb_display.
> 
> This gives this error message:
>   ./drivers/video/fbdev/pxafb.c:2238:2-7: WARNING: invalid free of devm_ 
> allocated data
> 
> Signed-off-by: YueHaibing 

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH -next] video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 12/20/2018 05:55 PM, Bartlomiej Zolnierkiewicz wrote:
> 
> On 11/16/2018 12:02 PM, YueHaibing wrote:
>> 'info->modes' got allocated with devm_kcalloc in of_get_pxafb_display.
>>
>> This gives this error message:
>>   ./drivers/video/fbdev/pxafb.c:2238:2-7: WARNING: invalid free of devm_ 
>> allocated data
>>
>> Signed-off-by: YueHaibing 
> 
> Patch queued for 4.21, thanks.

I've just noticed v2, I will queue it instead..

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 -next] video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 11/19/2018 02:36 AM, YueHaibing wrote:
> 'info->modes' got allocated with devm_kcalloc in of_get_pxafb_display.
> 
> This gives this error message:
>   ./drivers/video/fbdev/pxafb.c:2238:2-7: WARNING: invalid free of devm_ 
> allocated data
> 
> Fixes: c8f96304ec8b4 ("video: fbdev: pxafb: switch to devm_* API")
> Cc: sta...@kernel.org [v4.19+]
> Signed-off-by: YueHaibing 
> Reviewed-by: Daniel Mack 

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/2] fbdev: fbmem: make fb_show_logo_line return the end instead of the height

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 11/26/2018 10:57 PM, Peter Rosin wrote:
> In preparation for allowing centering of the bootup logo, make
> fb_show_logo_line return where the next free framebuffer line is,
> instead of returning the height of the shown logo.
> 
> Signed-off-by: Peter Rosin 

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 2/2] fbdev: fbmem: add config option to center the bootup logo

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 11/26/2018 10:57 PM, Peter Rosin wrote:
> If there are extra logos (CONFIG_FB_LOGO_EXTRA) the heights of these
> extra logos are not considered when centering the first logo vertically.
> 
> Signed-off-by: Peter Rosin 

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: uvesafb: fix spelling mistake "memoery" -> "memory"

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 11/28/2018 04:37 PM, Colin King wrote:
> From: Colin Ian King 
> 
> There is a spelling mistake in the module parameter description, fix it.
> 
> Signed-off-by: Colin Ian King 

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2] media: omap2: omapfb: convert to DEFINE_SHOW_ATTRIBUTE

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 12/02/2018 05:14 AM, Yangtao Li wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> 
> Signed-off-by: Yangtao Li 

Patch queued for 4.21, thanks.

[ subject line was fixed to "fbdev" from "media" while applying ]

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: fsl-diu: remove redundant null check on cmap

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 12/03/2018 03:53 PM, Timur Tabi wrote:
> On 12/3/18 12:43 AM, Wen Yang wrote:
>> The null check on &info->cmap is redundant since cmap is a struct
>> inside fb_info and can never be null, so the check is always true.
>> we may remove it.
>>
>> Signed-off-by: Wen Yang
> 
> Acked-by: Timur Tabi 

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] pxa168fb: trivial typo fix

2018-12-20 Thread Bartlomiej Zolnierkiewicz

[ added dri-devel ML & fbdev ML to Cc: ]

On 12/03/2018 12:47 PM, Lubomir Rintel wrote:
> A missing space in an error message.
> 
> Signed-off-by: Lubomir Rintel 

Patch queued for 4.21, thanks.

> ---
>  drivers/video/fbdev/pxa168fb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c
> index e31340fad3c7..1410f476e135 100644
> --- a/drivers/video/fbdev/pxa168fb.c
> +++ b/drivers/video/fbdev/pxa168fb.c
> @@ -279,7 +279,7 @@ static void set_clock_divider(struct pxa168fb_info *fbi,
>  
>   /* check whether divisor is too small. */
>   if (divider_int < 2) {
> - dev_warn(fbi->dev, "Warning: clock source is too slow."
> + dev_warn(fbi->dev, "Warning: clock source is too slow. "
>   "Try smaller resolution\n");
>   divider_int = 2;
>   }

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v5] fbdev: Remove depends on HAS_DMA in case of platform dependency

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 12/03/2018 01:24 PM, Geert Uytterhoeven wrote:
> Remove dependencies on HAS_DMA where a Kconfig symbol depends on another
> symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST".
> In most cases this other symbol is an architecture or platform specific
> symbol, or PCI.
> 
> Generic symbols and drivers without platform dependencies keep their
> dependencies on HAS_DMA, to prevent compiling subsystems or drivers that
> cannot work anyway.
> 
> This simplifies the dependencies, and allows to improve compile-testing.
> 
> Signed-off-by: Geert Uytterhoeven 
> Reviewed-by: Mark Brown 
> Acked-by: Robin Murphy 
> Acked-by: Bartlomiej Zolnierkiewicz 

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: fbcon: Fix unregister crash when more than one framebuffer

2018-12-20 Thread Bartlomiej Zolnierkiewicz

On 12/12/2018 03:20 PM, Noralf Trønnes wrote:
> 
> Den 12.12.2018 12.05, skrev Daniel Vetter:
>> On Mon, Dec 10, 2018 at 08:02:55PM +0100, Noralf Trønnes wrote:
>>> When unregistering fbdev using unregister_framebuffer(), any bound
>>> console will unbind automatically. This is working fine if this is the
>>> only framebuffer, resulting in a switch to the dummy console. However if
>>> there is a fb0 and I unregister fb1 having a bound console, I eventually
>>> get a crash. The fastest way for me to trigger the crash is to do a
>>> reboot, resulting in this splat:
>>>
>>> [   76.478825] WARNING: CPU: 0 PID: 527 at linux/kernel/workqueue.c:1442 
>>> __queue_work+0x2d4/0x41c
>>> [   76.478849] Modules linked in: raspberrypi_hwmon gpio_backlight 
>>> backlight bcm2835_rng rng_core [last unloaded: tinydrm]
>>> [   76.478916] CPU: 0 PID: 527 Comm: systemd-udevd Not tainted 4.20.0-rc4+ 
>>> #4
>>> [   76.478933] Hardware name: BCM2835
>>> [   76.478949] Backtrace:
>>> [   76.478995] [] (dump_backtrace) from [] 
>>> (show_stack+0x20/0x24)
>>> [   76.479022]  r6: r5:c0bc73be r4: r3:6fb5bf81
>>> [   76.479060] [] (show_stack) from [] 
>>> (dump_stack+0x20/0x28)
>>> [   76.479102] [] (dump_stack) from [] 
>>> (__warn+0xec/0x12c)
>>> [   76.479134] [] (__warn) from [] 
>>> (warn_slowpath_null+0x4c/0x58)
>>> [   76.479165]  r9:c0eb6944 r8:0001 r7:c0e927f8 r6:c0bc73be r5:05a2 
>>> r4:c0139e84
>>> [   76.479197] [] (warn_slowpath_null) from [] 
>>> (__queue_work+0x2d4/0x41c)
>>> [   76.479222]  r6:d7666a00 r5:c0e918ee r4:dbc4e700
>>> [   76.479251] [] (__queue_work) from [] 
>>> (queue_work_on+0x60/0x88)
>>> [   76.479281]  r10:c0496bf8 r9:0100 r8:c0e92ae0 r7:0001 
>>> r6:d9403700 r5:d7666a00
>>> [   76.479298]  r4:2113
>>> [   76.479348] [] (queue_work_on) from [] 
>>> (cursor_timer_handler+0x30/0x54)
>>> [   76.479374]  r7:d8a8fabc r6:c0e08088 r5:d8afdc5c r4:d8a8fabc
>>> [   76.479413] [] (cursor_timer_handler) from [] 
>>> (call_timer_fn+0x100/0x230)
>>> [   76.479435]  r4:c0e9192f r3:d758a340
>>> [   76.479465] [] (call_timer_fn) from [] 
>>> (expire_timers+0x10c/0x12c)
>>> [   76.479495]  r10:4000 r9:c0e9192f r8:c0e92ae0 r7:d8afdccc 
>>> r6:c0e19280 r5:c0496bf8
>>> [   76.479513]  r4:d8a8fabc
>>> [   76.479541] [] (expire_timers) from [] 
>>> (run_timer_softirq+0xa8/0x184)
>>> [   76.479570]  r9:0001 r8:c0e19280 r7: r6:c0e08088 r5:c0e1a3e0 
>>> r4:c0e19280
>>> [   76.479603] [] (run_timer_softirq) from [] 
>>> (__do_softirq+0x1ac/0x3fc)
>>> [   76.479632]  r10:c0e91680 r9:d8afc020 r8:000a r7:0100 
>>> r6:0001 r5:0002
>>> [   76.479650]  r4:c0eb65ec
>>> [   76.479686] [] (__do_softirq) from [] 
>>> (irq_exit+0xe8/0x168)
>>> [   76.479716]  r10:d8d1a9b0 r9:d8afc000 r8:0001 r7:d949c000 
>>> r6: r5:c0e8b3f0
>>> [   76.479734]  r4:
>>> [   76.479764] [] (irq_exit) from [] 
>>> (__handle_domain_irq+0x94/0xb0)
>>> [   76.479793] [] (__handle_domain_irq) from [] 
>>> (bcm2835_handle_irq+0x3c/0x48)
>>> [   76.479823]  r8:d8afdebc r7:d8afddfc r6: r5:c0e089f8 r4:d8afddc8 
>>> r3:d8afddc8
>>> [   76.479851] [] (bcm2835_handle_irq) from [] 
>>> (__irq_svc+0x70/0x98)
>>>
>>> The problem is in the console rebinding in fbcon_fb_unbind(). It uses the
>>> virtual console index as the new framebuffer index to bind the console(s)
>>> to. The correct way is to use the con2fb_map lookup table to find the
>>> framebuffer index.
>>>
>>> Fixes: cfafca8067c6 ("fbdev: fbcon: console unregistration from 
>>> unregister_framebuffer")
>>> Signed-off-by: Noralf Trønnes 
>>> Reviewed-by: Mikulas Patocka 
>>> ---
>>>
>>> Mikulas,
>>> If you have forgotten about this, here's where you gave your r-b:
>>> https://lists.freedesktop.org/archives/dri-devel/2018-July/182728.html
>> Iirc Bart is out still, and this seems like a good fix that fell through
>> cracks, so a could idea to push this through drm-misc-fixes I think. Or at
>> least drm-misc-next-fixes so it hits the next merge window.
>>
>> Acked-by: Daniel Vetter 
>>
>> if you do that.
> 
> 
> I looked closer at the offending commit and it's 11 years old... so I
> guess it's not urgent. Probably not that many who has fbcon on a
> secondary display and then unloads the driver.
> 
> I got a reply from Bart that he'll be back the 20th. I'll leave the
> urgency decision to him.

Patch queued for 4.21, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig

2018-12-28 Thread Bartlomiej Zolnierkiewicz
Making FB_BACKLIGHT tristate by commit b4a1ed0cd18b ("fbdev:
make FB_BACKLIGHT a tristate") caused unmet dependencies in
some configurations:

WARNING: unmet direct dependencies detected for FB_BACKLIGHT
  Depends on [m]: HAS_IOMEM [=y] && FB [=m]
  Selected by [y]:
  - DRM_NOUVEAU [=y] && HAS_IOMEM [=y] && DRM [=y] && PCI [=y] && MMU [=y] && 
DRM_NOUVEAU_BACKLIGHT [=y]
  Selected by [m]:
  - FB_NVIDIA [=m] && HAS_IOMEM [=y] && FB [=m] && PCI [=y] && 
FB_NVIDIA_BACKLIGHT [=y]

Fix it by making DRM_NOUVEAU select BACKLIGHT_CLASS_DEVICE and
BACKLIGHT_LCD_SUPPORT instead of FB_BACKLIGHT.

Fixes: b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate")
Reported-by: Randy Dunlap 
Cc: Rob Clark 
Cc: Arnd Bergmann 
Cc: Ben Skeggs 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: Stephen Rothwell 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
I would like to merge this patch through fbdev tree for v4.21
(as it is needed to fix commit currently in fbdev tree).

 drivers/gpu/drm/nouveau/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/drivers/gpu/drm/nouveau/Kconfig
===
--- a/drivers/gpu/drm/nouveau/Kconfig   2018-11-30 11:46:55.716464505 +0100
+++ b/drivers/gpu/drm/nouveau/Kconfig   2018-12-28 14:54:51.655965845 +0100
@@ -4,7 +4,8 @@ config DRM_NOUVEAU
 select FW_LOADER
select DRM_KMS_HELPER
select DRM_TTM
-   select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT
+   select BACKLIGHT_CLASS_DEVICE if DRM_NOUVEAU_BACKLIGHT
+   select BACKLIGHT_LCD_SUPPORT if DRM_NOUVEAU_BACKLIGHT
select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && INPUT
select X86_PLATFORM_DEVICES if ACPI && X86
select ACPI_WMI if ACPI && X86
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig

2019-01-02 Thread Bartlomiej Zolnierkiewicz

On 12/28/2018 07:03 PM, Randy Dunlap wrote:
> On 12/28/18 7:15 AM, Bartlomiej Zolnierkiewicz wrote:
>> Making FB_BACKLIGHT tristate by commit b4a1ed0cd18b ("fbdev:
>> make FB_BACKLIGHT a tristate") caused unmet dependencies in
>> some configurations:
>>
>> WARNING: unmet direct dependencies detected for FB_BACKLIGHT
>>   Depends on [m]: HAS_IOMEM [=y] && FB [=m]
>>   Selected by [y]:
>>   - DRM_NOUVEAU [=y] && HAS_IOMEM [=y] && DRM [=y] && PCI [=y] && MMU [=y] 
>> && DRM_NOUVEAU_BACKLIGHT [=y]
>>   Selected by [m]:
>>   - FB_NVIDIA [=m] && HAS_IOMEM [=y] && FB [=m] && PCI [=y] && 
>> FB_NVIDIA_BACKLIGHT [=y]
>>
>> Fix it by making DRM_NOUVEAU select BACKLIGHT_CLASS_DEVICE and
>> BACKLIGHT_LCD_SUPPORT instead of FB_BACKLIGHT.
>>
>> Fixes: b4a1ed0cd18b ("fbdev: make FB_BACKLIGHT a tristate")
>> Reported-by: Randy Dunlap 
>> Cc: Rob Clark 
>> Cc: Arnd Bergmann 
>> Cc: Ben Skeggs 
>> Cc: David Airlie 
>> Cc: Daniel Vetter 
>> Cc: Stephen Rothwell 
>> Signed-off-by: Bartlomiej Zolnierkiewicz 
> 
> Works for me.  Thanks.
> 
> Acked-by: Randy Dunlap  # build-tested

Thanks, I queued the patch for 4.21.

>> ---
>> I would like to merge this patch through fbdev tree for v4.21
>> (as it is needed to fix commit currently in fbdev tree).
>>
>>  drivers/gpu/drm/nouveau/Kconfig |3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> Index: b/drivers/gpu/drm/nouveau/Kconfig
>> ===
>> --- a/drivers/gpu/drm/nouveau/Kconfig2018-11-30 11:46:55.716464505 
>> +0100
>> +++ b/drivers/gpu/drm/nouveau/Kconfig2018-12-28 14:54:51.655965845 
>> +0100
>> @@ -4,7 +4,8 @@ config DRM_NOUVEAU
>>  select FW_LOADER
>>  select DRM_KMS_HELPER
>>  select DRM_TTM
>> -select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT
>> +select BACKLIGHT_CLASS_DEVICE if DRM_NOUVEAU_BACKLIGHT
>> +select BACKLIGHT_LCD_SUPPORT if DRM_NOUVEAU_BACKLIGHT
>>  select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && INPUT
>>  select X86_PLATFORM_DEVICES if ACPI && X86
>>  select ACPI_WMI if ACPI && X86

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[GIT PULL] fbdev changes for v4.21

2019-01-04 Thread Bartlomiej Zolnierkiewicz

Hi Linus,

Please pull fbdev changes for v4.21. This time the pull request is
really small. The most notable changes are fixing fbcon to not cause
crash on unregister_framebuffer() operation when there is more than
one framebuffer, adding config option to center the bootup logo and
making FB_BACKLIGHT config option tristate (which in turn uncovered
incorrect FB_BACKLIGHT usage by DRM's nouveau driver). Please see
the signed tag description for details.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


The following changes since commit 7566ec393f4161572ba6f11ad5171fd5d59b0fbd:

  Linux 4.20-rc7 (2018-12-16 15:46:55 -0800)

are available in the git repository at:

  https://github.com/bzolnier/linux.git tags/fbdev-v4.21

for you to fetch changes up to 399382f8018204407174f0229b4087d40e1cdc82:

  drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig (2019-01-02 18:47:37 
+0100)


fbdev changes for v4.21:

- fix fbcon to not cause crash on unregister_framebuffer()
  when there is more than one framebuffer (Noralf Trønnes)

- improve support for small rotated displays (Peter Rosin)

- fix probe failure handling in udlfb driver (Dan Carpenter)

- add config option to center the bootup logo (Peter Rosin)

- make FB_BACKLIGHT config option tristate (Rob Clark)

- remove superfluous HAS_DMA dependency for goldfishfb driver
  (Geert Uytterhoeven)

- misc fixes (Alexey Khoroshilov, YueHaibing, Colin Ian King,
  Lubomir Rintel)

- misc cleanups (Yangtao Li, Wen Yang)

also there is DRM's nouveau driver fix for wrong FB_BACKLIGHT
config option usage (FB_BACKLIGHT is for internal fbdev
subsystem use only)


Alexey Khoroshilov (1):
  video: clps711x-fb: release disp device node in probe()

Bartlomiej Zolnierkiewicz (2):
  Merge tag 'v4.20-rc7' of https://git.kernel.org/.../torvalds/linux into 
fbdev-for-next
  drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig

Colin Ian King (1):
  fbdev: uvesafb: fix spelling mistake "memoery" -> "memory"

Dan Carpenter (1):
  udlfb: fix some inconsistent NULL checking

Geert Uytterhoeven (1):
  fbdev: Remove depends on HAS_DMA in case of platform dependency

Lubomir Rintel (1):
  pxa168fb: trivial typo fix

Noralf Trønnes (1):
  fbdev: fbcon: Fix unregister crash when more than one framebuffer

Peter Rosin (3):
  fbdev: fbmem: behave better with small rotated displays and many CPUs
  fbdev: fbmem: make fb_show_logo_line return the end instead of the height
  fbdev: fbmem: add config option to center the bootup logo

Rob Clark (1):
  fbdev: make FB_BACKLIGHT a tristate

Wen Yang (1):
  fbdev: fsl-diu: remove redundant null check on cmap

Yangtao Li (1):
  fbdev: omap2: omapfb: convert to DEFINE_SHOW_ATTRIBUTE

YueHaibing (1):
  video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"

 drivers/gpu/drm/nouveau/Kconfig |  3 ++-
 drivers/video/fbdev/Kconfig |  5 ++--
 drivers/video/fbdev/clps711x-fb.c   |  5 +++-
 drivers/video/fbdev/core/fbcon.c|  2 +-
 drivers/video/fbdev/core/fbmem.c| 39 -
 drivers/video/fbdev/core/fbsysfs.c  |  8 +++---
 drivers/video/fbdev/fsl-diu-fb.c|  3 +--
 drivers/video/fbdev/omap2/omapfb/dss/core.c | 18 +++--
 drivers/video/fbdev/pxa168fb.c  |  2 +-
 drivers/video/fbdev/pxafb.c |  4 +--
 drivers/video/fbdev/udlfb.c | 14 +--
 drivers/video/fbdev/uvesafb.c   |  2 +-
 drivers/video/logo/Kconfig  |  9 +++
 include/linux/fb.h  |  2 +-
 include/uapi/linux/fb.h |  2 --
 15 files changed, 71 insertions(+), 47 deletions(-)
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: offb: Fix OF node name handling

2019-01-11 Thread Bartlomiej Zolnierkiewicz

On 01/07/2019 09:11 PM, Mathieu Malaterre wrote:
> On Mon, Jan 7, 2019 at 6:31 PM Rob Herring  wrote:
>>
>> Commit 5c63e407aaab ("fbdev: Convert to using %pOFn instead of
>> device_node.name") changed how the OF FB driver handles the OF node
>> name. This missed the case where the node name is passed to
>> offb_init_palette_hacks(). This results in a NULL ptr dereference
>> in strncmp and breaks any system except ones using bootx with no display
>> node.
>>
>> Fix this by making offb_init_palette_hacks() use the OF node pointer and
>> use of_node_name_prefix() helper function instead for node name
>> comparisons. This helps in moving all OF node name accesses to helper
>> functions in preparation to remove struct device_node.name pointer.
>>
>> Fixes: 5c63e407aaab ("fbdev: Convert to using %pOFn instead of 
>> device_node.name")
> 
> Looks good to me:
> 
> ...
> [0.00] Linux version 5.0.0-rc1+ (ma...@debian.org) (gcc
> version 6.3.0 20170516 (Debian 6.3.0-18)) #21 Mon Jan 7 21:03:53 CET
> 2019
> ...
> 
> So here is my :
> 
> Tested-by: Mathieu Malaterre 

Patch queued for 5.0, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2] fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd, line option

2019-01-16 Thread Bartlomiej Zolnierkiewicz

On 01/07/2019 11:35 AM, Peter Rosin wrote:
> On 2019-01-07 10:11, Geert Uytterhoeven wrote:
>> Hi Peter,
>>
>> On Mon, Jan 7, 2019 at 10:03 AM Peter Rosin  wrote:
>>> On 2019-01-07 09:59, Peter Rosin wrote:
>>>> On 2019-01-07 09:40, Geert Uytterhoeven wrote:
>>>>> On Mon, Jan 7, 2019 at 9:26 AM Peter Rosin  wrote:
>>>>>> On 2019-01-06 10:33, Geert Uytterhoeven wrote:
>>>>>>> On Mon, Nov 26, 2018 at 10:59 PM Peter Rosin  wrote:
>>>>>>>> If there are extra logos (CONFIG_FB_LOGO_EXTRA) the heights of these
>>>>>>>> extra logos are not considered when centering the first logo 
>>>>>>>> vertically.
>>>>>>>>
>>>>>>>> Signed-off-by: Peter Rosin 
>>>>>>>
>>>>>>>> --- a/drivers/video/logo/Kconfig
>>>>>>>> +++ b/drivers/video/logo/Kconfig
>>>>>>>> @@ -10,6 +10,15 @@ menuconfig LOGO
>>>>>>>>
>>>>>>>>  if LOGO
>>>>>>>>
>>>>>>>> +config FB_LOGO_CENTER
>>>>>>>> +   bool "Center the logo"
>>>>>>>> +   depends on FB=y
>>>>>>>> +   help
>>>>>>>> + When this option is selected, the bootup logo is centered 
>>>>>>>> both
>>>>>>>> + horizontally and vertically. If more than one logo is 
>>>>>>>> displayed
>>>>>>>> + due to multiple CPUs, the collected line of logos is centered
>>>>>>>> + as a whole.
>>>>>>>> +
>>>>>>>
>>>>>>> Isn't a kernel command line option more suitable to configure the 
>>>>>>> position
>>>>>>> of the logo?
>>>>>>
>>>>>> That didn't occur to me previously, but it does make sense now that you
>>>>>> mention it. This is on top of v5.0-rc1, and if applied before v5.0 we
>>>>>> can avoid possible regressions for folks who might start to rely on
>>>>>> CONFIG_FB_LOGO_CENTER if v5.0 is released w/o this.
>>>>>>
>>>>>> Cheers,
>>>>>> Peter
>>>>>>
>>>>>> From de7353ab519ba9b5c9ea3f62d607bb8e94b687cc Mon Sep 17 00:00:00 2001
>>>>>> From: Peter Rosin 
>>>>>> Cc: Bartlomiej Zolnierkiewicz 
>>>>>> Cc: Jonathan Corbet 
>>>>>> Cc: Peter Rosin 
>>>>>> Cc: dri-devel@lists.freedesktop.org
>>>>>> Cc: linux-fb...@vger.kernel.org
>>>>>> Cc: linux-...@vger.kernel.org
>>>>>> To: linux-ker...@vger.kernel.org
>>>>>> Date: Mon, 7 Jan 2019 08:35:26 +0100
>>>>>> Subject: [PATCH] fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd 
>>>>>> line
>>>>>>  option
>>>>>>
>>>>>> A command line option is much more flexible than a config option and
>>>>>> the supporting code is small. Gets rid of #ifdefs in the code too...
>>>>>>
>>>>>> Suggested-by: Geert Uytterhoeven 
>>>>>> Signed-off-by: Peter Rosin 
>>>>>
>>>>> Thanks for your patch!
>>>>>
>>>>>> --- a/Documentation/fb/fbcon.txt
>>>>>> +++ b/Documentation/fb/fbcon.txt
>>>>>> @@ -163,6 +163,12 @@ C. Boot options
>>>>>> be preserved until there actually is some text is output to the 
>>>>>> console.
>>>>>> This option causes fbcon to bind immediately to the fbdev device.
>>>>>>
>>>>>> +7. fbcon=center-logo
>>>>>> +
>>>>>> +   When this option is selected, the bootup logo is centered both
>>>>>> +   horizontally and vertically. If more than one logo is displayed 
>>>>>> due to
>>>>>> +   multiple CPUs, the collected line of logos is centered as a 
>>>>>> whole.
>>>>>> +
>>>>>
>>>>> What about making this more generic, than an option specific for 
>>>>> centering?
>>>>> Else people want fbcon=left-logo or fbcon=right-logo soon?
>>>>>
>>>>> fbcon=logo-pos:
>>>>>
>&g

Re: [PATCH v2] fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd, line option

2019-01-17 Thread Bartlomiej Zolnierkiewicz

On 01/17/2019 02:40 PM, Peter Rosin wrote:
> On 2019-01-16 17:45, Bartlomiej Zolnierkiewicz wrote:
>> On 01/07/2019 11:35 AM, Peter Rosin wrote:
>>> Right. So, here's an update...
>>>
>>> Again, it would probably be best if this went in before 5.0 is released.
>>>
>>> Changes since v1:
>>> - rename from fbcon=center-logo option to fbcon=logo-pos:center (and adjust
>>>   the help text accordingly).
>>>
>>> Cheers,
>>> Peter
>>>
>>> From ebfb2feb7ea4298ac9c222e6ea6f9c9a92452084 Mon Sep 17 00:00:00 2001
>>> From: Peter Rosin 
>>> Cc: Bartlomiej Zolnierkiewicz 
>>> Cc: Jonathan Corbet 
>>> Cc: Peter Rosin 
>>> Cc: dri-devel@lists.freedesktop.org
>>> Cc: linux-fb...@vger.kernel.org
>>> Cc: linux-...@vger.kernel.org
>>> To: linux-ker...@vger.kernel.org
>>> Date: Mon, 7 Jan 2019 08:35:26 +0100
>>> Subject: [PATCH v2] fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd
>>>  line option
>>>
>>> A command line option is much more flexible than a config option and
>>> the supporting code is small. Gets rid of #ifdefs in the code too...
>>>
>>> Suggested-by: Geert Uytterhoeven 
>>> Signed-off-by: Peter Rosin 
>>
>> Patch queued for 5.0, thanks.
> 
> Hmm, I see the patch on the fbdev-for-next branch, but that sounds
> like stuff destined for 5.1? Maybe you simply don't have any
> fbdev-for-current or fbdev-fixes branch or something like that?

Yes. the single public fbdev branch has been sufficient for now
(there is no active fbdev development and patches for -rcX kernels
are even more rare). OTOH there is no problem with adding -fixes
branch once needed..

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[GIT PULL] fbdev fixes for v5.0-rc3

2019-01-18 Thread Bartlomiej Zolnierkiewicz

Hi Linus,

Please pull fbdev fixes for v5.0-rc3 (please see the signed tag
description for details).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


The following changes since commit 399382f8018204407174f0229b4087d40e1cdc82:

  drm/nouveau: fix incorrect FB_BACKLIGHT usage in Kconfig (2019-01-02 18:47:37 
+0100)

are available in the git repository at:

  https://github.com/bzolnier/linux.git tags/fbdev-v5.0-rc3

for you to fetch changes up to 890d14d2d4b57ff5a149309da3ed36c8a529987f:

  fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd line option 
(2019-01-16 17:42:35 +0100)


fbdev fixes for v5.0-rc3:

- fix stack memory leak in omap2fb driver (Vlad Tsyrklevich)

- fix OF node name handling v4.20 regression in offb driver (Rob Herring)

- convert CONFIG_FB_LOGO_CENTER config option added in v5.0-rc1 into
  a kernel parameter (Peter Rosin)


Peter Rosin (1):
  fbdev: fbmem: convert CONFIG_FB_LOGO_CENTER into a cmd line option

Rob Herring (1):
  fbdev: offb: Fix OF node name handling

Vlad Tsyrklevich (1):
  omap2fb: Fix stack memory disclosure

 Documentation/fb/fbcon.txt  |  8 
 drivers/video/fbdev/core/fbcon.c|  7 +++
 drivers/video/fbdev/core/fbmem.c| 19 ++-
 drivers/video/fbdev/offb.c  | 18 +-
 drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c |  2 ++
 drivers/video/logo/Kconfig  |  9 -
 include/linux/fb.h  |  1 +
 7 files changed, 37 insertions(+), 27 deletions(-)
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] fbdev: omap2: fix warnings in dss core

2019-03-01 Thread Bartlomiej Zolnierkiewicz

On 02/13/2019 09:47 AM, Anders Roxell wrote:
> Commit 60d2fa0dad06 ("fbdev: omap2: no need to check return value of
> debugfs_create functions") changed the declaration of the return value
> of function dss_debugfs_create_file() and the following two warnings
> appeared:
> 
> drivers/video/fbdev/omap2/omapfb/dss/core.c: In function 
> ‘dss_debugfs_create_file’:
> drivers/video/fbdev/omap2/omapfb/dss/core.c:139:9: warning: ‘return’ with a 
> value,
>  in function returning void
>   return 0;
>  ^
> drivers/video/fbdev/omap2/omapfb/dss/core.c: In function ‘omap_dss_probe’:
> drivers/video/fbdev/omap2/omapfb/dss/core.c:172:6: warning: unused variable 
> ‘r’
>  [-Wunused-variable]
>   int r;
>   ^
> 
> Rework so function dss_debugfs_create_file() that is declared to return
> void don't 'return 0' and remove the declaration of the unused variable
> 'r'.
> 
> Signed-off-by: Anders Roxell 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH -next] fbdev: omap2: omapfb: trivial code cleanup

2019-03-01 Thread Bartlomiej Zolnierkiewicz

Hi,

On 03/01/2019 02:53 AM, Yue Haibing wrote:
> From: YueHaibing 
> 
> After commit 60d2fa0dad06 ("fbdev: omap2: no need to check
> return value of debugfs_create functions"), there are corner
> code need to be cleaned.
> 
> Signed-off-by: YueHaibing 

Thanks but I've already applied earlier patch from Anders Roxell:

https://marc.info/?l=linux-fbdev&m=155004766902831&w=2

> ---
>  drivers/video/fbdev/omap2/omapfb/dss/core.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/omap2/omapfb/dss/core.c 
> b/drivers/video/fbdev/omap2/omapfb/dss/core.c
> index 7e6a3eb..b5956a1 100644
> --- a/drivers/video/fbdev/omap2/omapfb/dss/core.c
> +++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c
> @@ -136,7 +136,6 @@ static inline void dss_uninitialize_debugfs(void)
>  }
>  void dss_debugfs_create_file(const char *name, void (*write)(struct seq_file 
> *))
>  {
> - return 0;
>  }
>  #endif /* CONFIG_FB_OMAP2_DSS_DEBUGFS */
>  
> @@ -169,8 +168,6 @@ static struct notifier_block omap_dss_pm_notif_block = {
>  
>  static int __init omap_dss_probe(struct platform_device *pdev)
>  {
> - int r;
> -
>   core.pdev = pdev;
>  
>   dss_features_init(omapdss_get_version());

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] fbdev: mbx: fix a misspelled variable name

2019-03-05 Thread Bartlomiej Zolnierkiewicz

On 03/04/2019 08:52 PM, Arnd Bergmann wrote:
> A recent cleanup introduced a build failure when a variable
> was spelled incorrectly:
> 
> In file included from drivers/video/fbdev/mbx/mbxfb.c:881:
> drivers/video/fbdev/mbx/mbxdebugfs.c: In function 'mbxfb_debugfs_init':
> drivers/video/fbdev/mbx/mbxdebugfs.c:217:2: error: 'mbfi' undeclared (first 
> use in this function); did you mean 'mfbi'?
>   mbfi->debugfs_dir = dir;
>   ^~~~
>   mfbi
> drivers/video/fbdev/mbx/mbxdebugfs.c:217:2: note: each undeclared identifier 
> is reported only once for each function it appears in
> drivers/video/fbdev/mbx/mbxdebugfs.c:213:21: error: unused variable 'mfbi' 
> [-Werror=unused-variable]
>   struct mbxfb_info *mfbi = fbi->par;
>  ^~~~
> 
> Fixes: 72aed9e31344 ("fbdev: mbx: fix up debugfs file creation")
> Signed-off-by: Arnd Bergmann 

Patch queued for v5.1, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v3] video: fbdev: atmel_lcdfb: add COMPILE_TEST support

2019-05-30 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to atmel_lcdfb driver for better compile
testing coverage.

While at it fix improper use of UL (to silence build warnings on
x86_64).

Cc: Alexandre Belloni 
Cc: Ludovic Desroches 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
v3: fix build warnings on x86_64

v2: add missing HAVE_CLK && HAS IOMEM dependencies

 drivers/video/fbdev/Kconfig   |3 ++-
 drivers/video/fbdev/atmel_lcdfb.c |4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -855,7 +855,8 @@ config FB_S1D13XXX
 
 config FB_ATMEL
tristate "AT91 LCD Controller support"
-   depends on FB && OF && HAVE_FB_ATMEL
+   depends on FB && OF && HAVE_CLK && HAS_IOMEM
+   depends on HAVE_FB_ATMEL || COMPILE_TEST
select FB_BACKLIGHT
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
Index: b/drivers/video/fbdev/atmel_lcdfb.c
===
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -673,7 +673,7 @@ static int atmel_lcdfb_set_par(struct fb
lcdc_writel(sinfo, ATMEL_LCDC_MVAL, 0);
 
/* Disable all interrupts */
-   lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
+   lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
/* Enable FIFO & DMA errors */
lcdc_writel(sinfo, ATMEL_LCDC_IER, ATMEL_LCDC_UFLWI | ATMEL_LCDC_OWRI | 
ATMEL_LCDC_MERI);
 
@@ -1291,7 +1291,7 @@ static int atmel_lcdfb_suspend(struct pl
 * We don't want to handle interrupts while the clock is
 * stopped. It may take forever.
 */
-   lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
+   lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
 
sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 00/33] fbcon notifier begone v3!

2019-06-07 Thread Bartlomiej Zolnierkiewicz


On 6/6/19 9:38 AM, Daniel Vetter wrote:
> Hi Bart,

Hi Daniel,

> On Tue, May 28, 2019 at 11:02:31AM +0200, Daniel Vetter wrote:
>> Hi all,
>>
>> I think we're slowly getting there. Previous cover letters with more
>> context:
>>
>> https://lists.freedesktop.org/archives/dri-devel/2019-May/218362.html
>>
>> tldr; I have a multi-year plan to improve fbcon locking, because the
>> current thing is a bit a mess.
>>
>> Cover letter of this version, where I detail a bit more the details
>> fixed in this one here:
>>
>> https://lists.freedesktop.org/archives/dri-devel/2019-May/218984.html
>>
>> Note that the locking plan in this one is already outdated, I overlooked a
>> few fun issues around any printk() going back to console_lock.
>>
>> I think remaining bits:
>>
>> - Ack from Daniel Thompson for the backlight bits, he wanted to check the
>>   big picture.
> 
> I think Daniel is still on vacation until next week or so.
> 
>> - Hash out actual merge plan.
> 
> I'd like to stuff this into drm.git somehow, I guess topic branch works
> too.

I would like to have topic branch for this patchset.

> Long term I think we need to reconsider how we handle fbdev, at least the
> core/fbcon pieces. Since a few years all the work in that area has been
> motivated by drm, and pushed by drm contributors. Having that maintained
> in a separate tree that doesn't regularly integrate imo doesn't make much
> sense, and we ended up merging almost everything through some drm tree.
> That one time we didn't (for some panel rotation stuff) it resulted in
> some good suprises.
> 
> I think best solution is if we put the core and fbcon bits into drm-misc,
> as group maintained infrastructure piece. All the other gfx infra pieces
> are maintained in there already too. You'd obviously get commit rights.
> I think that would include
> - drivers/video/fbdev
> - drivers/video/*c
> - drivers/video/console

Sounds fine to me.

> I don't really care about what happens with the actual fbdev drivers
> (aside from the drm one in drm_fb_helper.c, but that's already maintained
> as part of drm). I guess we could also put those into drm-misc, or as a
> separate tree, depending what you want.
> 
> Thoughts?

I would like to handle fbdev changes for v5.3 merge window using fbdev
tree but after that everything (including changes to fbdev drivers) can go
through drm-misc tree.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> Cheers, Daniel
> 
> 
>>
>> I'm also cc'ing the entire pile to a lot more people on request.
>>
>> Thanks, Daniel
>>
>> Daniel Vetter (33):
>>   dummycon: Sprinkle locking checks
>>   fbdev: locking check for fb_set_suspend
>>   vt: might_sleep() annotation for do_blank_screen
>>   vt: More locking checks
>>   fbdev/sa1100fb: Remove dead code
>>   fbdev/cyber2000: Remove struct display
>>   fbdev/aty128fb: Remove dead code
>>   fbcon: s/struct display/struct fbcon_display/
>>   fbcon: Remove fbcon_has_exited
>>   fbcon: call fbcon_fb_(un)registered directly
>>   fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify
>>   fbdev/omap: sysfs files can't disappear before the device is gone
>>   fbdev: sysfs files can't disappear before the device is gone
>>   staging/olpc: lock_fb_info can't fail
>>   fbdev/atyfb: lock_fb_info can't fail
>>   fbdev: lock_fb_info cannot fail
>>   fbcon: call fbcon_fb_bind directly
>>   fbdev: make unregister/unlink functions not fail
>>   fbdev: unify unlink_framebuffer paths
>>   fbdev/sh_mob: Remove fb notifier callback
>>   fbdev: directly call fbcon_suspended/resumed
>>   fbcon: Call fbcon_mode_deleted/new_modelist directly
>>   fbdev: Call fbcon_get_requirement directly
>>   Revert "backlight/fbcon: Add FB_EVENT_CONBLANK"
>>   fbmem: pull fbcon_fb_blanked out of fb_blank
>>   fbdev: remove FBINFO_MISC_USEREVENT around fb_blank
>>   fb: Flatten control flow in fb_set_var
>>   fbcon: replace FB_EVENT_MODE_CHANGE/_ALL with direct calls
>>   vgaswitcheroo: call fbcon_remap_all directly
>>   fbcon: Call con2fb_map functions directly
>>   fbcon: Document what I learned about fbcon locking
>>   staging/olpc_dcon: Add drm conversion to TODO
>>   backlight: simplify lcd notifier
>>
>>  arch/arm/mach-pxa/am200epd.c  |  13 +-
>>  drivers/gpu/vga/vga_switcheroo.c  |  11 +-
>>  drivers/media/pci/ivtv/ivtvfb.c   |   6 +-
>>  drivers/staging/fbtft/fbtft-c

Re: [PATCH] video: fbdev: mxsfb: Remove driver

2019-06-07 Thread Bartlomiej Zolnierkiewicz

On 5/20/19 3:43 PM, Marek Vasut wrote:
> On 5/20/19 3:06 PM, Fabio Estevam wrote:
>> There is a DRM version of the mxsfb driver for quite some time
>> at drivers/gpu/drm/mxsfb/, so there is no need to keep maintaining
>> the fbdev version any longer.
>>
>> Remove the fbdev mxsfb driver in favour of the DRM version.
>>
>> Signed-off-by: Fabio Estevam 
> 
> Acked-by: Marek Vasut 

Patch queued for v5.3, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 3/8] drivers: (video|gpu): fix warning same module names

2019-06-07 Thread Bartlomiej Zolnierkiewicz


On 6/7/19 9:57 AM, Daniel Vetter wrote:
> On Thu, Jun 06, 2019 at 11:47:12AM +0200, Anders Roxell wrote:
>> When building with CONFIG_DRM_MXSFB and CONFIG_FB_MXS enabled as
>> loadable modules, we see the following warning:
>>
>> warning: same module names found:
>>   drivers/video/fbdev/mxsfb.ko
>>   drivers/gpu/drm/mxsfb/mxsfb.ko
>>
>> Rework so the names matches the config fragment.
>>
>> Signed-off-by: Anders Roxell 
> 
> Reviewed-by: Daniel Vetter 
> 
> I'm assuming Bart will pick this one up for fbdev.

The DRM mxsfb has been a default for almost a year (since July
2018) and I've just applied "[PATCH] video: fbdev: mxsfb: Remove
driver" (https://marc.info/?l=dri-devel&m=155835758115686&w=2)
so it seems that this patch is not needed any longer (sorry!).

> -Daniel
> 
>> ---
>>  drivers/gpu/drm/mxsfb/Makefile | 4 ++--
>>  drivers/video/fbdev/Makefile   | 3 ++-
>>  2 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/mxsfb/Makefile b/drivers/gpu/drm/mxsfb/Makefile
>> index ff6e358088fa..5d49d7548e66 100644
>> --- a/drivers/gpu/drm/mxsfb/Makefile
>> +++ b/drivers/gpu/drm/mxsfb/Makefile
>> @@ -1,3 +1,3 @@
>>  # SPDX-License-Identifier: GPL-2.0-only
>> -mxsfb-y := mxsfb_drv.o mxsfb_crtc.o mxsfb_out.o
>> -obj-$(CONFIG_DRM_MXSFB) += mxsfb.o
>> +drm-mxsfb-y := mxsfb_drv.o mxsfb_crtc.o mxsfb_out.o
>> +obj-$(CONFIG_DRM_MXSFB) += drm-mxsfb.o
>> diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile
>> index 655f2537cac1..7ee967525af2 100644
>> --- a/drivers/video/fbdev/Makefile
>> +++ b/drivers/video/fbdev/Makefile
>> @@ -131,7 +131,8 @@ obj-$(CONFIG_FB_VGA16)+= vga16fb.o
>>  obj-$(CONFIG_FB_OF)   += offb.o
>>  obj-$(CONFIG_FB_MX3)  += mx3fb.o
>>  obj-$(CONFIG_FB_DA8XX)+= da8xx-fb.o
>> -obj-$(CONFIG_FB_MXS)      += mxsfb.o
>> +obj-$(CONFIG_FB_MXS)  += fb-mxs.o
>> +fb-mxs-objs   := mxsfb.o
>>  obj-$(CONFIG_FB_SSD1307)  += ssd1307fb.o
>>  obj-$(CONFIG_FB_SIMPLE)   += simplefb.o
>>  
>> -- 
>> 2.20.1
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


Re: [PATCH] video: fbdev: atafb: remove superfluous function prototypes

2019-06-07 Thread Bartlomiej Zolnierkiewicz



On 5/21/19 4:12 PM, Geert Uytterhoeven wrote:
> On Tue, May 21, 2019 at 4:02 PM Bartlomiej Zolnierkiewicz
>  wrote:
>> No need for them.
>>
>> Cc: Geert Uytterhoeven 
>> Signed-off-by: Bartlomiej Zolnierkiewicz 
> 
> Reviewed-by: Geert Uytterhoeven 
Thanks, I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


Re: [PATCH v3] video: fbdev: atmel_lcdfb: add COMPILE_TEST support

2019-06-07 Thread Bartlomiej Zolnierkiewicz

On 6/1/19 11:06 PM, Alexandre Belloni wrote:
> On 30/05/2019 14:30:19+0200, Bartlomiej Zolnierkiewicz wrote:
>> Add COMPILE_TEST support to atmel_lcdfb driver for better compile
>> testing coverage.
>>
>> While at it fix improper use of UL (to silence build warnings on
>> x86_64).
>>
>> Cc: Alexandre Belloni 
> Acked-by: Alexandre Belloni 

Thanks, I queued the patch for v5.3.

>> Cc: Ludovic Desroches 
>> Signed-off-by: Bartlomiej Zolnierkiewicz 
>> ---
>> v3: fix build warnings on x86_64
> 
> Hopefully, no building errors anymore ;)

I hope so. :)

>> v2: add missing HAVE_CLK && HAS IOMEM dependencies
>>
>>  drivers/video/fbdev/Kconfig   |3 ++-
>>  drivers/video/fbdev/atmel_lcdfb.c |4 ++--
>>  2 files changed, 4 insertions(+), 3 deletions(-)
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2] video: fbdev: imxfb: add COMPILE_TEST support

2019-06-07 Thread Bartlomiej Zolnierkiewicz

On 5/21/19 12:47 PM, Bartlomiej Zolnierkiewicz wrote:
> Add COMPILE_TEST support to imxfb driver for better compile
> testing coverage.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz 

I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2] video: fbdev: pxa168fb: add COMPILE_TEST support

2019-06-07 Thread Bartlomiej Zolnierkiewicz

On 5/21/19 12:49 PM, Bartlomiej Zolnierkiewicz wrote:
> Add COMPILE_TEST support to pxa168fb driver for better compile
> testing coverage.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz 

I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2] video: fbdev: gbefb: add COMPILE_TEST support

2019-06-07 Thread Bartlomiej Zolnierkiewicz

On 5/21/19 1:51 PM, Bartlomiej Zolnierkiewicz wrote:
> Add COMPILE_TEST support to gbefb driver for better compile
> testing coverage.
> 
> While at it convert bogus udelay() calls to mdelay() (needed to
> build driver on ARM) and remove dead x86 specific code.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz 

I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2] video: fbdev: da8xx-fb: add COMPILE_TEST support

2019-06-07 Thread Bartlomiej Zolnierkiewicz


On 5/21/19 12:53 PM, Bartlomiej Zolnierkiewicz wrote:
> Add COMPILE_TEST support to da8xx-fb driver for better compile
> testing coverage.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz 

I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


Re: [PATCH] video: fbdev: cyber2000fb: remove superfluous CONFIG_PCI ifdef

2019-06-07 Thread Bartlomiej Zolnierkiewicz

On 5/21/19 3:44 PM, Bartlomiej Zolnierkiewicz wrote:
> This is a PCI driver and FB_CYBER2000 depends on PCI in Kconfig so
> there is no need to check for PCI inside the driver code.
> 
> Cc: Russell King 
> Signed-off-by: Bartlomiej Zolnierkiewicz 

I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 1/2] video: fbdev: pvr2fb: remove function prototypes

2019-06-07 Thread Bartlomiej Zolnierkiewicz


On 5/22/19 12:15 PM, Bartlomiej Zolnierkiewicz wrote:
> Reorder code a bit and then remove no longer needed function
> prototypes.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz 

I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


Re: [PATCH v3 2/2] video: fbdev: pvr2fb: add COMPILE_TEST support

2019-06-07 Thread Bartlomiej Zolnierkiewicz

On 5/24/19 1:58 PM, Bartlomiej Zolnierkiewicz wrote:
> Add COMPILE_TEST support to pvr2fb driver for better compile
> testing coverage.
> 
> While at it:
> 
> - mark pvr2fb_interrupt() and pvr2fb_common_init() with
>   __maybe_unused tag (to silence build warnings when
>   !SH_DREAMCAST)
> 
> - convert mmio_base in struct pvr2fb_par to 'void __iomem *'
>   from 'unsigned long' (needed to silence build warnings on
>   ARM).
> 
> - split pvr2_get_param() on pvr2_get_param_name() and
>   pvr2_get_param_val() (needed to silence build warnings on
>   x86).
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz 
I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: pvr2fb: fix build warning when compiling as module

2019-06-14 Thread Bartlomiej Zolnierkiewicz
Add missing #ifndef MODULE around pvr2_get_param_val().

Fixes: 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support")
Reported-by: Stephen Rothwell 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/pvr2fb.c |2 ++
 1 file changed, 2 insertions(+)

Index: b/drivers/video/fbdev/pvr2fb.c
===
--- a/drivers/video/fbdev/pvr2fb.c
+++ b/drivers/video/fbdev/pvr2fb.c
@@ -722,6 +722,7 @@ static struct fb_ops pvr2fb_ops = {
.fb_imageblit   = cfb_imageblit,
 };
 
+#ifndef MODULE
 static int pvr2_get_param_val(const struct pvr2_params *p, const char *s,
  int size)
 {
@@ -733,6 +734,7 @@ static int pvr2_get_param_val(const stru
}
return -1;
 }
+#endif
 
 static char *pvr2_get_param_name(const struct pvr2_params *p, int val,
  int size)
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: imxfb: fix sparse warnings about using incorrect types

2019-06-14 Thread Bartlomiej Zolnierkiewicz
Use ->screen_buffer instead of ->screen_base to fix sparse warnings.

[ Please see commit 17a7b0b4d974 ("fb.h: Provide alternate screen_base
  pointer") for details. ]

Reported-by: kbuild test robot 
Cc: Shawn Guo 
Cc: Sascha Hauer 
Cc: Pengutronix Kernel Team 
Cc: Fabio Estevam 
Cc: Uwe Kleine-König 
Cc: NXP Linux Team 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/imxfb.c |9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

Index: b/drivers/video/fbdev/imxfb.c
===
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -974,9 +974,8 @@ static int imxfb_probe(struct platform_d
}
 
fbi->map_size = PAGE_ALIGN(info->fix.smem_len);
-   info->screen_base = dma_alloc_wc(&pdev->dev, fbi->map_size,
-&fbi->map_dma, GFP_KERNEL);
-
+   info->screen_buffer = dma_alloc_wc(&pdev->dev, fbi->map_size,
+  &fbi->map_dma, GFP_KERNEL);
if (!info->screen_base) {
dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret);
ret = -ENOMEM;
@@ -1046,7 +1045,7 @@ failed_cmap:
if (pdata && pdata->exit)
pdata->exit(fbi->pdev);
 failed_platform_init:
-   dma_free_wc(&pdev->dev, fbi->map_size, info->screen_base,
+   dma_free_wc(&pdev->dev, fbi->map_size, info->screen_buffer,
fbi->map_dma);
 failed_map:
iounmap(fbi->regs);
@@ -1077,7 +1076,7 @@ static int imxfb_remove(struct platform_
pdata = dev_get_platdata(&pdev->dev);
if (pdata && pdata->exit)
pdata->exit(fbi->pdev);
-   dma_free_wc(&pdev->dev, fbi->map_size, info->screen_base,
+   dma_free_wc(&pdev->dev, fbi->map_size, info->screen_buffer,
fbi->map_dma);
iounmap(fbi->regs);
release_mem_region(res->start, resource_size(res));

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] video: fbdev: s3c-fb: add COMPILE_TEST support

2019-06-14 Thread Bartlomiej Zolnierkiewicz
Add COMPILE_TEST support to s3c-fb driver for better compile
testing coverage.

Cc: Jingoo Han 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/Kconfig |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/drivers/video/fbdev/Kconfig
===
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1877,7 +1877,8 @@ config FB_TMIO_ACCELL
 
 config FB_S3C
tristate "Samsung S3C framebuffer support"
-   depends on FB && (CPU_S3C2416 || ARCH_S3C64XX)
+   depends on FB && HAVE_CLK && HAS_IOMEM
+   depends on (CPU_S3C2416 || ARCH_S3C64XX) || COMPILE_TEST
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT


[PATCH 1/3] video: fbdev: s3c-fb: return -ENOMEM on framebuffer_alloc() failure

2019-06-14 Thread Bartlomiej Zolnierkiewicz
Fix error code from -ENOENT to -ENOMEM.

Cc: Jingoo Han 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/s3c-fb.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/video/fbdev/s3c-fb.c
===
--- a/drivers/video/fbdev/s3c-fb.c
+++ b/drivers/video/fbdev/s3c-fb.c
@@ -1191,7 +1191,7 @@ static int s3c_fb_probe_win(struct s3c_f
   palette_size * sizeof(u32), sfb->dev);
if (!fbinfo) {
dev_err(sfb->dev, "failed to allocate framebuffer\n");
-   return -ENOENT;
+   return -ENOMEM;
}
 
windata = sfb->pdata->win[win_no];


[PATCH 2/3] video: fbdev: intelfb: return -ENOMEM on framebuffer_alloc() failure

2019-06-14 Thread Bartlomiej Zolnierkiewicz
Fix error code from -ENODEV to -ENOMEM.

Cc: Maik Broemme 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/intelfb/intelfbdrv.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/video/fbdev/intelfb/intelfbdrv.c
===
--- a/drivers/video/fbdev/intelfb/intelfbdrv.c
+++ b/drivers/video/fbdev/intelfb/intelfbdrv.c
@@ -493,7 +493,7 @@ static int intelfb_pci_register(struct p
info = framebuffer_alloc(sizeof(struct intelfb_info), &pdev->dev);
if (!info) {
ERR_MSG("Could not allocate memory for intelfb_info.\n");
-   return -ENODEV;
+   return -ENOMEM;
}
if (fb_alloc_cmap(&info->cmap, 256, 1) < 0) {
ERR_MSG("Could not allocate cmap for intelfb_info.\n");
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 3/3] video: fbdev: don't print error message on framebuffer_alloc() failure

2019-06-14 Thread Bartlomiej Zolnierkiewicz
framebuffer_alloc() can fail only on kzalloc() memory allocation
failure and since kzalloc() will print error message in such case
we can omit printing extra error message in drivers (which BTW is
what the majority of framebuffer_alloc() users is doing already).

Cc: "Bruno Prémont" 
Cc: Jiri Kosina 
Cc: Benjamin Tissoires 
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/hid/hid-picolcd_fb.c   |4 +---
 drivers/video/fbdev/amifb.c|4 +---
 drivers/video/fbdev/arkfb.c|4 +---
 drivers/video/fbdev/atmel_lcdfb.c  |4 +---
 drivers/video/fbdev/aty/aty128fb.c |5 ++---
 drivers/video/fbdev/aty/atyfb_base.c   |   10 --
 drivers/video/fbdev/aty/radeon_base.c  |2 --
 drivers/video/fbdev/chipsfb.c  |1 -
 drivers/video/fbdev/cirrusfb.c |5 +
 drivers/video/fbdev/da8xx-fb.c |1 -
 drivers/video/fbdev/efifb.c|1 -
 drivers/video/fbdev/grvga.c|4 +---
 drivers/video/fbdev/gxt4500.c  |5 ++---
 drivers/video/fbdev/hyperv_fb.c|4 +---
 drivers/video/fbdev/i740fb.c   |4 +---
 drivers/video/fbdev/imsttfb.c  |5 +
 drivers/video/fbdev/intelfb/intelfbdrv.c   |5 ++---
 drivers/video/fbdev/jz4740_fb.c|4 +---
 drivers/video/fbdev/mb862xx/mb862xxfbdrv.c |5 +
 drivers/video/fbdev/mbx/mbxfb.c|4 +---
 drivers/video/fbdev/omap/omapfb_main.c |2 --
 drivers/video/fbdev/omap2/omapfb/omapfb-main.c |6 +-
 drivers/video/fbdev/platinumfb.c   |5 ++---
 drivers/video/fbdev/pmag-aa-fb.c   |4 +---
 drivers/video/fbdev/pmag-ba-fb.c   |4 +---
 drivers/video/fbdev/pmagb-b-fb.c   |4 +---
 drivers/video/fbdev/pvr2fb.c   |6 +-
 drivers/video/fbdev/riva/fbdev.c   |1 -
 drivers/video/fbdev/s3c-fb.c   |4 +---
 drivers/video/fbdev/s3fb.c |4 +---
 drivers/video/fbdev/sh_mobile_lcdcfb.c |8 ++--
 drivers/video/fbdev/sm501fb.c  |4 +---
 drivers/video/fbdev/sm712fb.c  |1 -
 drivers/video/fbdev/smscufx.c  |4 +---
 drivers/video/fbdev/ssd1307fb.c|4 +---
 drivers/video/fbdev/sunxvr1000.c   |1 -
 drivers/video/fbdev/sunxvr2500.c   |1 -
 drivers/video/fbdev/sunxvr500.c|1 -
 drivers/video/fbdev/tgafb.c|4 +---
 drivers/video/fbdev/udlfb.c|4 +---
 drivers/video/fbdev/via/viafbdev.c |6 +-
 drivers/video/fbdev/vt8623fb.c |4 +---
 42 files changed, 40 insertions(+), 123 deletions(-)

Index: b/drivers/hid/hid-picolcd_fb.c
===
--- a/drivers/hid/hid-picolcd_fb.c
+++ b/drivers/hid/hid-picolcd_fb.c
@@ -522,10 +522,8 @@ int picolcd_init_framebuffer(struct pico
sizeof(struct fb_deferred_io) +
sizeof(struct picolcd_fb_data) +
PICOLCDFB_SIZE, dev);
-   if (info == NULL) {
-   dev_err(dev, "failed to allocate a framebuffer\n");
+   if (!info)
goto err_nomem;
-   }
 
info->fbdefio = info->par;
*info->fbdefio = picolcd_fb_defio;
Index: b/drivers/video/fbdev/amifb.c
===
--- a/drivers/video/fbdev/amifb.c
+++ b/drivers/video/fbdev/amifb.c
@@ -3554,10 +3554,8 @@ static int __init amifb_probe(struct pla
custom.dmacon = DMAF_ALL | DMAF_MASTER;
 
info = framebuffer_alloc(sizeof(struct amifb_par), &pdev->dev);
-   if (!info) {
-   dev_err(&pdev->dev, "framebuffer_alloc failed\n");
+   if (!info)
return -ENOMEM;
-   }
 
strcpy(info->fix.id, "Amiga ");
info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
Index: b/drivers/video/fbdev/arkfb.c
===
--- a/drivers/video/fbdev/arkfb.c
+++ b/drivers/video/fbdev/arkfb.c
@@ -954,10 +954,8 @@ static int ark_pci_probe(struct pci_dev
 
/* Allocate and fill driver data structure */
info = framebuffer_alloc(sizeof(struct arkfb_info), &(dev->dev));
-   if (! info) {
-   dev_err(&(dev->dev), "cannot allocate memory\n");
+   if (!info)
return -ENOMEM;
-   }
 
par = info->par;
mutex_init(&par->open_lock);
Index: b/drivers/video/fbdev/atmel_lcdfb.c
===
--- a/drivers/vid

Re: [PULL] topic/remove-fbcon-notifiers for v5.3

2019-06-18 Thread Bartlomiej Zolnierkiewicz

Hi,

On 6/18/19 11:20 AM, Maarten Lankhorst wrote:
> Op 14-06-2019 om 11:25 schreef Maarten Lankhorst:
>> Hi all,
>>
>> As discussed with Daniel V, I'm just doing the paperwork here as drm-misc 
>> maintainer.
>>
>> This is the topic pull request for the fbdev notifier removal.
>>
>> Bar, please make a final check and pull into your fbdev tree.
>>
>> Lee, please make a final check and pull into your backlight tree.
>>
>> Greg, this is just fyi, you already acked all the vt and staging patches in 
>> here
>> to land through other trees.
>>
>> I'll pull this into drm-misc-next once Bart & Lee acked it.
>>
>> Cheers, Maarten.
> 
> Bart, Lee, ping?

Looks OK to me (I have test pulled it locally and there is only trivial
merge conflict on removed mxsfb fbdev driver) but it seems that all
patches miss your "S-o-B:" line (there is only "Reviewed-by:" tag which
is OK but has a different meaning)?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> 
>> topic/remove-fbcon-notifiers-2019-06-14-1:
>> 
>> topic/remove-fbcon-notifiers:
>> - remove fbdev notifier usage for fbcon, as prep work to clean up the fbcon 
>> locking
>> - assorted locking checks in vt/console code
>> - assorted notifier and cleanups in fbdev and backlight code
>>
>> The following changes since commit d1fdb6d8f6a4109a4263176c84b899076a5f8008:
>>
>>   Linux 5.2-rc4 (2019-06-08 20:24:46 -0700)
>>
>> are available in the Git repository at:
>>
>>   git://anongit.freedesktop.org/drm/drm-misc 
>> tags/topic/remove-fbcon-notifiers-2019-06-14-1
>>
>> for you to fetch changes up to 1dcff4ae65185e8c0300972f6d8d39d9a9db2bda:
>>
>>   backlight: simplify lcd notifier (2019-06-13 10:07:20 +0200)
>>
>> 
>> Daniel Vetter (33):
>>   dummycon: Sprinkle locking checks
>>   fbdev: locking check for fb_set_suspend
>>   vt: might_sleep() annotation for do_blank_screen
>>   vt: More locking checks
>>   fbdev/sa1100fb: Remove dead code
>>   fbdev/cyber2000: Remove struct display
>>   fbdev/aty128fb: Remove dead code
>>   fbcon: s/struct display/struct fbcon_display/
>>   fbcon: Remove fbcon_has_exited
>>   fbcon: call fbcon_fb_(un)registered directly
>>   fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify
>>   fbdev/omap: sysfs files can't disappear before the device is gone
>>   fbdev: sysfs files can't disappear before the device is gone
>>   staging/olpc: lock_fb_info can't fail
>>   fbdev/atyfb: lock_fb_info can't fail
>>   fbdev: lock_fb_info cannot fail
>>   fbcon: call fbcon_fb_bind directly
>>   fbdev: make unregister/unlink functions not fail
>>   fbdev: unify unlink_framebuffer paths
>>   fbdev/sh_mob: Remove fb notifier callback
>>   fbdev: directly call fbcon_suspended/resumed
>>   fbcon: Call fbcon_mode_deleted/new_modelist directly
>>   fbdev: Call fbcon_get_requirement directly
>>   Revert "backlight/fbcon: Add FB_EVENT_CONBLANK"
>>   fbmem: pull fbcon_fb_blanked out of fb_blank
>>   fbdev: remove FBINFO_MISC_USEREVENT around fb_blank
>>   fb: Flatten control flow in fb_set_var
>>   fbcon: replace FB_EVENT_MODE_CHANGE/_ALL with direct calls
>>   vgaswitcheroo: call fbcon_remap_all directly
>>   fbcon: Call con2fb_map functions directly
>>   fbcon: Document what I learned about fbcon locking
>>   staging/olpc_dcon: Add drm conversion to TODO
>>   backlight: simplify lcd notifier
>>
>>  arch/arm/mach-pxa/am200epd.c|  13 +-
>>  drivers/gpu/vga/vga_switcheroo.c|  11 +-
>>  drivers/media/pci/ivtv/ivtvfb.c |   6 +-
>>  drivers/staging/fbtft/fbtft-core.c  |   4 +-
>>  drivers/staging/olpc_dcon/TODO  |   7 +
>>  drivers/staging/olpc_dcon/olpc_dcon.c   |   6 +-
>>  drivers/tty/vt/vt.c |  18 ++
>>  drivers/video/backlight/backlight.c |   2 +-
>>  drivers/video/backlight/lcd.c   |  12 -
>>  drivers/video/console/dummycon.c|   6 +
>>  drivers/video/fbdev/aty/aty128fb.c  |  64 
>>  drivers/video/fbdev/aty/atyfb_base.c|   3 +-
>>  drivers/video/fbdev/core/fbcmap.c   |  

Re: [PULL] topic/remove-fbcon-notifiers for v5.3

2019-06-19 Thread Bartlomiej Zolnierkiewicz

On 6/18/19 1:46 PM, Maarten Lankhorst wrote:
> Op 18-06-2019 om 13:17 schreef Bartlomiej Zolnierkiewicz:
>> Hi,
>>
>> On 6/18/19 11:20 AM, Maarten Lankhorst wrote:
>>> Op 14-06-2019 om 11:25 schreef Maarten Lankhorst:
>>>> Hi all,
>>>>
>>>> As discussed with Daniel V, I'm just doing the paperwork here as drm-misc 
>>>> maintainer.
>>>>
>>>> This is the topic pull request for the fbdev notifier removal.
>>>>
>>>> Bar, please make a final check and pull into your fbdev tree.
>>>>
>>>> Lee, please make a final check and pull into your backlight tree.
>>>>
>>>> Greg, this is just fyi, you already acked all the vt and staging patches 
>>>> in here
>>>> to land through other trees.
>>>>
>>>> I'll pull this into drm-misc-next once Bart & Lee acked it.
>>>>
>>>> Cheers, Maarten.
>>> Bart, Lee, ping?
>> Looks OK to me (I have test pulled it locally and there is only trivial
>> merge conflict on removed mxsfb fbdev driver) but it seems that all
>> patches miss your "S-o-B:" line (there is only "Reviewed-by:" tag which
>> is OK but has a different meaning)?
> 
> Hey,
> 
> I created the topic branch, but daniel pushed the patches to it. :)
> 
> That explains why there's a R-B but no S-o-B.

I see, that's kind of interesting work-flow.. :)

Anyway, I've pulled topic/remove-fbcon-notifiers-2019-06-14-1 tag
(and also topic/remove-fbcon-notifiers branch to get a buildfix)
into fbdev-for-next, thanks!

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> Cheers,
> 
> Maarten
> 
>> Best regards,
>> --
>> Bartlomiej Zolnierkiewicz
>> Samsung R&D Institute Poland
>> Samsung Electronics
>>
>>>> topic/remove-fbcon-notifiers-2019-06-14-1:
>>>> 
>>>> topic/remove-fbcon-notifiers:
>>>> - remove fbdev notifier usage for fbcon, as prep work to clean up the 
>>>> fbcon locking
>>>> - assorted locking checks in vt/console code
>>>> - assorted notifier and cleanups in fbdev and backlight code
>>>>
>>>> The following changes since commit 
>>>> d1fdb6d8f6a4109a4263176c84b899076a5f8008:
>>>>
>>>>   Linux 5.2-rc4 (2019-06-08 20:24:46 -0700)
>>>>
>>>> are available in the Git repository at:
>>>>
>>>>   git://anongit.freedesktop.org/drm/drm-misc 
>>>> tags/topic/remove-fbcon-notifiers-2019-06-14-1
>>>>
>>>> for you to fetch changes up to 1dcff4ae65185e8c0300972f6d8d39d9a9db2bda:
>>>>
>>>>   backlight: simplify lcd notifier (2019-06-13 10:07:20 +0200)
>>>>
>>>> 
>>>> Daniel Vetter (33):
>>>>   dummycon: Sprinkle locking checks
>>>>   fbdev: locking check for fb_set_suspend
>>>>   vt: might_sleep() annotation for do_blank_screen
>>>>   vt: More locking checks
>>>>   fbdev/sa1100fb: Remove dead code
>>>>   fbdev/cyber2000: Remove struct display
>>>>   fbdev/aty128fb: Remove dead code
>>>>   fbcon: s/struct display/struct fbcon_display/
>>>>   fbcon: Remove fbcon_has_exited
>>>>   fbcon: call fbcon_fb_(un)registered directly
>>>>   fbdev/sh_mobile: remove sh_mobile_lcdc_display_notify
>>>>   fbdev/omap: sysfs files can't disappear before the device is gone
>>>>   fbdev: sysfs files can't disappear before the device is gone
>>>>   staging/olpc: lock_fb_info can't fail
>>>>   fbdev/atyfb: lock_fb_info can't fail
>>>>   fbdev: lock_fb_info cannot fail
>>>>   fbcon: call fbcon_fb_bind directly
>>>>   fbdev: make unregister/unlink functions not fail
>>>>   fbdev: unify unlink_framebuffer paths
>>>>   fbdev/sh_mob: Remove fb notifier callback
>>>>   fbdev: directly call fbcon_suspended/resumed
>>>>   fbcon: Call fbcon_mode_deleted/new_modelist directly
>>>>   fbdev: Call fbcon_get_requirement directly
>>>>   Revert "backlight/fbcon: Add FB_EVENT_CONBLANK"
>>>>   fbmem: pull fbcon_fb_blanked out of fb_blank
>>>>   fbdev: remove FBINFO_MISC_USEREVENT aroun

Re: [PATCH] video: fbdev: pvr2fb: fix link error for pvr2fb_pci_exit

2019-06-21 Thread Bartlomiej Zolnierkiewicz

Hi,

On 6/17/19 3:16 PM, Arnd Bergmann wrote:
> When the driver is built-in for PCI, we reference the exit function
> after discarding it:
> 
> `pvr2fb_pci_exit' referenced in section `.ref.data' of 
> drivers/video/fbdev/pvr2fb.o: defined in discarded section `.exit.text' of 
> drivers/video/fbdev/pvr2fb.o
> 
> Just remove the __exit annotation as the easiest workaround.

Don't we also need to fix pvr2fb_dc_exit() for CONFIG_SH_DREAMCAST=y case? 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> Fixes: 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support")
> Signed-off-by: Arnd Bergmann 
> ---
>  drivers/video/fbdev/pvr2fb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c
> index 299ea7db9220..cf9cfdc5e685 100644
> --- a/drivers/video/fbdev/pvr2fb.c
> +++ b/drivers/video/fbdev/pvr2fb.c
> @@ -990,7 +990,7 @@ static int __init pvr2fb_pci_init(void)
>   return pci_register_driver(&pvr2fb_pci_driver);
>  }
>  
> -static void __exit pvr2fb_pci_exit(void)
> +static void pvr2fb_pci_exit(void)
>  {
>   pci_unregister_driver(&pvr2fb_pci_driver);
>  }
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] video: fbdev: pvr2fb: fix build warning when compiling as module

2019-06-21 Thread Bartlomiej Zolnierkiewicz

On 6/14/19 12:43 PM, Bartlomiej Zolnierkiewicz wrote:
> Add missing #ifndef MODULE around pvr2_get_param_val().
> 
> Fixes: 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support")
> Reported-by: Stephen Rothwell 
> Signed-off-by: Bartlomiej Zolnierkiewicz 

I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] video: fbdev: imxfb: fix sparse warnings about using incorrect types

2019-06-21 Thread Bartlomiej Zolnierkiewicz

On 6/14/19 1:53 PM, Bartlomiej Zolnierkiewicz wrote:
> Use ->screen_buffer instead of ->screen_base to fix sparse warnings.
> 
> [ Please see commit 17a7b0b4d974 ("fb.h: Provide alternate screen_base
>   pointer") for details. ]
> 
> Reported-by: kbuild test robot 
> Cc: Shawn Guo 
> Cc: Sascha Hauer 
> Cc: Pengutronix Kernel Team 
> Cc: Fabio Estevam 
> Cc: Uwe Kleine-König 
> Cc: NXP Linux Team 
> Signed-off-by: Bartlomiej Zolnierkiewicz 

I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] video: fbdev: s3c-fb: add COMPILE_TEST support

2019-06-21 Thread Bartlomiej Zolnierkiewicz


On 6/18/19 8:12 AM, Jingoo Han wrote:
> On 6/14/19, 11:46 PM, Bartlomiej Zolnierkiewicz wrote:
>>
>> Add COMPILE_TEST support to s3c-fb driver for better compile
>> testing coverage.
>>
>> Cc: Jingoo Han 
> Acked-by: Jingoo Han 
>> Signed-off-by: Bartlomiej Zolnierkiewicz 

Thanks, I queued the patch for v5.3.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


Re: [PATCH] video: fbdev: pvr2fb: fix compile-testing as module

2019-06-21 Thread Bartlomiej Zolnierkiewicz

On 6/17/19 2:47 PM, Arnd Bergmann wrote:
> Building an allmodconfig kernel now produces a harmless warning:
> 
> drivers/video/fbdev/pvr2fb.c:726:12: error: unused function 
> 'pvr2_get_param_val' [-Werror,-Wunused-function]
> 
> Shut this up the same way as we do for other unused functions
> in the same file, using the __maybe_unused attribute.
> 
> Fixes: 0f5a5712ad1e ("video: fbdev: pvr2fb: add COMPILE_TEST support")
> Signed-off-by: Arnd Bergmann 

Thanks but I've fixed it already by adding #ifndef MODULE (since other
functions in the same file using __maybe_unused depend on either PCI or
SH_DREAMCAST I've preferred not to use this attribute):

https://marc.info/?l=linux-fbdev&m=156050904010778&w=2

> ---
>  drivers/video/fbdev/pvr2fb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/pvr2fb.c b/drivers/video/fbdev/pvr2fb.c
> index 59c59b3a67cb..cf9cfdc5e685 100644
> --- a/drivers/video/fbdev/pvr2fb.c
> +++ b/drivers/video/fbdev/pvr2fb.c
> @@ -723,8 +723,8 @@ static struct fb_ops pvr2fb_ops = {
>   .fb_imageblit   = cfb_imageblit,
>  };
>  
> -static int pvr2_get_param_val(const struct pvr2_params *p, const char *s,
> -   int size)
> +static int __maybe_unused pvr2_get_param_val(const struct pvr2_params *p,
> +  const char *s, int size)
>  {
>   int i;

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] video: fbdev: pvr2fb: fix link error for pvr2fb_pci_exit

2019-06-21 Thread Bartlomiej Zolnierkiewicz

On 6/21/19 1:05 PM, Arnd Bergmann wrote:
> On Fri, Jun 21, 2019 at 12:58 PM Bartlomiej Zolnierkiewicz
>  wrote:
>>
>> On 6/17/19 3:16 PM, Arnd Bergmann wrote:
>>> When the driver is built-in for PCI, we reference the exit function
>>> after discarding it:
>>>
>>> `pvr2fb_pci_exit' referenced in section `.ref.data' of 
>>> drivers/video/fbdev/pvr2fb.o: defined in discarded section `.exit.text' of 
>>> drivers/video/fbdev/pvr2fb.o
>>>
>>> Just remove the __exit annotation as the easiest workaround.
>>
>> Don't we also need to fix pvr2fb_dc_exit() for CONFIG_SH_DREAMCAST=y case?
> 
> I think that's correct, yes. Can you fix that up when applying the patch?

Sure.

I've queued the patch for v5.3, thanks!

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] efifb: BGRT: Add check for new BGRT status field rotation bits

2019-06-21 Thread Bartlomiej Zolnierkiewicz

On 6/11/19 4:24 PM, Hans de Goede wrote:
> Hi,
> 
> On 11-06-19 16:04, Ard Biesheuvel wrote:
>> On Mon, 10 Jun 2019 at 17:12, Ard Biesheuvel  
>> wrote:
>>>
>>> On Wed, 29 May 2019 at 17:46, Hans de Goede  wrote:
>>>>
>>>> Starting with ACPI 6.2 bits 1 and 2 of the BGRT status field are no longer
>>>> reserved. These bits are now used to indicate if the image needs to be
>>>> rotated before being displayed.
>>>>
>>>> The efifb code does not support rotating the image before copying it to
>>>> the screen.
>>>>
>>>> This commit adds a check for these new bits and if they are set leaves the
>>>> fb contents as is instead of trying to use the un-rotated BGRT image.
>>>>
>>>> Signed-off-by: Hans de Goede 
>>>
>>> Acked-by: Ard Biesheuvel 
>>>
>>
>> BTW should we make sure that this patch and the efi-bgrt patch get
>> merged at the same time?
> 
> The 2 patches are related but merging them at the same time is not
> necessary.
> 
>> I guess the net result is just that we get
>> rid of some error in the log, but a rotated BMP will be ignored
>> otherwise.
> 
> Right, worse case (if the bmp fits pre-rotation) it will be displayed
> rotated. Note on the one machine I'm aware of which uses these bits
> the bmp does not fit pre-rotation, so we end up triggering:
> 
> error:
>     memunmap(bgrt_image);
>     pr_warn("efifb: Ignoring BGRT: unexpected or invalid BMP data\n");
> }
> 
> Which this patch replaces with hitting:
> 
>     if (bgrt_tab.status & 0x06) {
>     pr_info("efifb: BGRT rotation bits set, not showing boot 
> graphics\n");
>     return;
>     }
> 
> Instead. So at least on the one machine I know of this is 99% cosmetic.
> 
>> Or is it relevant for userland in some other way?
> 
> No.
> 
> Regards,
> 
> Hans

Patch queued for v5.3, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2] video: fbdev: Fix Warning comparing pointer to 0 reported by coccicheck

2019-06-21 Thread Bartlomiej Zolnierkiewicz

On 6/3/19 1:57 PM, Mathieu Malaterre wrote:
> On Mon, Jun 3, 2019 at 1:21 PM  wrote:
>>
>> From: Shobhit Kukreti 
>>
>> Fixed Warning Comparing Pointer to 0. Changed return value to -ENOMEM to
>> report kzalloc failure
>>
>> drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
>> drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
>> drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
>>
>> Signed-off-by: Shobhit Kukreti 
>> ---
>> Changes in v2:
>>  - Modified commit message to report change in return type
>>
>>  drivers/video/fbdev/controlfb.c | 8 
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/video/fbdev/controlfb.c 
>> b/drivers/video/fbdev/controlfb.c
>> index 7af8db2..07907c5 100644
>> --- a/drivers/video/fbdev/controlfb.c
>> +++ b/drivers/video/fbdev/controlfb.c
>> @@ -182,7 +182,7 @@ int init_module(void)
>> int ret = -ENXIO;
>>
>> dp = of_find_node_by_name(NULL, "control");
>> -   if (dp != 0 && !control_of_init(dp))
>> +   if (dp != NULL && !control_of_init(dp))
>> ret = 0;
>> of_node_put(dp);
>>
>> @@ -580,7 +580,7 @@ static int __init control_init(void)
>> control_setup(option);
>>
>> dp = of_find_node_by_name(NULL, "control");
>> -   if (dp != 0 && !control_of_init(dp))
>> +   if (dp != NULL && !control_of_init(dp))
>> ret = 0;
>> of_node_put(dp);
>>
>> @@ -683,8 +683,8 @@ static int __init control_of_init(struct device_node *dp)
>> return -ENXIO;
>> }
>> p = kzalloc(sizeof(*p), GFP_KERNEL);
>> -   if (p == 0)
>> -   return -ENXIO;
>> +   if (p == NULL)
> 
> nit: I would have use `!p` (same for the others above). Maybe
> checkpatch with --strict would warn for those (can't remember from top
> of my head).
> 
> Anyway:
> 
> Reviewed-by: Mathieu Malaterre 
> 
>> +   return -ENOMEM;
>> control_fb = p; /* save it for cleanups */
>>
>> /* Map in frame buffer and registers */
Patch queued (with some fixups, please see below) for v5.3, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


From: Shobhit Kukreti 
Subject: [PATCH] video: fbdev: controlfb: fix warnings about comparing pointer 
to 0

Fix warnings aboout comparing pointer to 0 reported by coccicheck:

drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0
drivers/video/fbdev/controlfb.c: WARNING comparing pointer to 0

Also while at it change return value to -ENOMEM on kzalloc() failure.

Signed-off-by: Shobhit Kukreti 
Reviewed-by: Mathieu Malaterre 
[b.zolnierkie: minor fixups]
Signed-off-by: Bartlomiej Zolnierkiewicz 
---
 drivers/video/fbdev/controlfb.c |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: b/drivers/video/fbdev/controlfb.c
===
--- a/drivers/video/fbdev/controlfb.c
+++ b/drivers/video/fbdev/controlfb.c
@@ -182,7 +182,7 @@ int init_module(void)
int ret = -ENXIO;
 
dp = of_find_node_by_name(NULL, "control");
-   if (dp != 0 && !control_of_init(dp))
+   if (dp && !control_of_init(dp))
ret = 0;
of_node_put(dp);
 
@@ -580,7 +580,7 @@ static int __init control_init(void)
control_setup(option);
 
dp = of_find_node_by_name(NULL, "control");
-   if (dp != 0 && !control_of_init(dp))
+   if (dp && !control_of_init(dp))
ret = 0;
of_node_put(dp);
 
@@ -683,8 +683,8 @@ static int __init control_of_init(struct
return -ENXIO;
}
p = kzalloc(sizeof(*p), GFP_KERNEL);
-   if (p == 0)
-   return -ENXIO;
+   if (!p)
+   return -ENOMEM;
control_fb = p; /* save it for cleanups */
 
/* Map in frame buffer and registers */
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  1   2   3   4   5   6   7   >