History log of /linux-master/drivers/video/fbdev/fsl-diu-fb.c
Revision Date Author Comments
# 75dda3f0 20-Nov-2023 Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>

fbdev: fsl-diu-fb: Fix sparse warning due to virt_to_phys() prototype change

Explicitly cast __iomem pointer to const void* with __force to fix the
following warning:

incorrect type in argument 1 (different address spaces)
expected void const volatile *address
got char [noderef] __iomem *screen_base

Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311161120.BgyxTBMQ-lkp@intel.com/
Signed-off-by: Helge Deller <deller@gmx.de>


# a5035c81 08-Nov-2023 Arnd Bergmann <arnd@arndb.de>

fbdev: fsl-diu-fb: mark wr_reg_wa() static

wr_reg_wa() is not an appropriate name for a global function, and doesn't need
to be global anyway, so mark it static and avoid the warning:

drivers/video/fbdev/fsl-diu-fb.c:493:6: error: no previous prototype for 'wr_reg_wa' [-Werror=missing-prototypes]

Fixes: 0d9dab39fbbe ("powerpc/5121: fsl-diu-fb: fix issue with re-enabling DIU area descriptor")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Helge Deller <deller@gmx.de>


# 65479f45 03-Aug-2023 Thomas Zimmermann <tzimmermann@suse.de>

fbdev/fsl-diu-fb: Use fbdev I/O helpers

Set struct fb_ops and with FB_DEFAULT_IOMEM_OPS, fbdev's initializer
for I/O memory. Sets the callbacks to the cfb_ and fb_io_ functions.
Select the correct modules with Kconfig's FB_IOMEM_HELPERS token.

The macro and token set the currently selected values, so there is
no functional change.

v3:
* use _IOMEM_ in commit message
v2:
* updated to use _IOMEM_ tokens

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Helge Deller <deller@gmx.de>
Cc: Timur Tabi <timur@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230803184034.6456-12-tzimmermann@suse.de


# 76a68cde 15-Jul-2023 Thomas Zimmermann <tzimmermann@suse.de>

fbdev/fsl-diu-fb: Remove flag FBINFO_DEFAULT

The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags
has been allocated to zero by dmam_alloc_coherent(__GFP_ZERO). So do not
set it.

Flags should signal differences from the default values. After cleaning
up all occurrences of FBINFO_DEFAULT, the token will be removed.

v2:
* fix commit message (Miguel)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Timur Tabi <timur@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-7-tzimmermann@suse.de


# 55094932 13-Jun-2023 Thomas Zimmermann <tzimmermann@suse.de>

fbdev/fsl-diu-fb: Output messages with fb_*() helpers

Fix cases were output helpers are called with struct fb_info.dev.
Use fb_*() helpers instead. Prepares fbdev for making struct
fb_info.dev optional.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Timur Tabi <timur@kernel.org>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-16-tzimmermann@suse.de


# 0dc08e87 18-Mar-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

fbdev: fsl-diu-fb: Convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Helge Deller <deller@gmx.de>


# 83fc7f6a 10-Sep-2020 Jason Yan <yanaijie@huawei.com>

video: fbdev: fsl-diu-fb: remove unneeded variable 'res'

Eliminate the following coccicheck warning:

drivers/video/fbdev/fsl-diu-fb.c:1428:5-8: Unneeded variable: "res".
Return "0" on line 1450

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Acked-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200910140558.1191423-1-yanaijie@huawei.com


# df561f66 23-Aug-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

treewide: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>


# ad04fae0 07-Jul-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

fbdev: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200707210539.GA12530@embeddedor


# 4a7001f0 11-Sep-2019 Gustavo A. R. Silva <gustavo@embeddedor.com>

video: fbdev: fsl-diu-fb: mark expected switch fall-throughs

Mark switch cases where we are expecting to fall through.

Fix the following warnings (Building: mpc512x_defconfig powerpc):

drivers/video/fbdev/fsl-diu-fb.c: In function ‘fsl_diu_ioctl’:
./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/fbdev/fsl-diu-fb.c:1287:3: note: in expansion of macro ‘dev_warn’
dev_warn(info->dev,
^~~~~~~~
drivers/video/fbdev/fsl-diu-fb.c:1290:2: note: here
case MFB_SET_PIXFMT:
^~~~
In file included from ./include/linux/acpi.h:15:0,
from ./include/linux/i2c.h:13,
from ./include/uapi/linux/fb.h:6,
from ./include/linux/fb.h:6,
from drivers/video/fbdev/fsl-diu-fb.c:20:
./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/video/fbdev/fsl-diu-fb.c:1296:3: note: in expansion of macro ‘dev_warn’
dev_warn(info->dev,
^~~~~~~~
drivers/video/fbdev/fsl-diu-fb.c:1299:2: note: here
case MFB_GET_PIXFMT:
^~~~

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Cc: Timur Tabi <timur@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190911113604.GA31512@embeddedor


# 8a48ac33 03-Dec-2019 Jani Nikula <jani.nikula@intel.com>

video: constify fb ops across all drivers

Now that the fbops member of struct fb_info is const, we can start
making the ops const as well.

This does not cover all drivers; some actually modify the fbops struct,
for example to adjust for different configurations, and others do more
involved things that I'd rather not touch in practically obsolete
drivers. Mostly this is the low hanging fruit where we can add "const"
and be done with it.

v3:
- un-constify atyfb, mb862xx, nvidia and uvesabf (0day)

v2:
- fix typo (Christophe de Dinechin)
- use "static const" instead of "const static" in mx3fb.c
- also constify smscufx.c

Cc: linux-fbdev@vger.kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ce67f14435f3af498f2e8bf35ce4be11f7504132.1575390740.git.jani.nikula@intel.com


# 2874c5fd 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5c29085a 20-Dec-2018 Wen Yang <wen.yang99@zte.com.cn>

fbdev: fsl-diu: remove redundant null check on cmap

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 <wen.yang99@zte.com.cn>
Acked-by: Timur Tabi <timur@kernel.org>
Cc: zhong.weidong@zte.com.cn
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>


# a691240e 27-Aug-2018 Rob Herring <robh@kernel.org>

fbdev: fsl-diu: get cpu node with of_get_cpu_node

"device_type" use is deprecated for FDT though it has continued to be used
for nodes like cpu nodes. Use of_get_cpu_node() instead which works using
node names by default. This will allow the eventually removal of cpu
device_type properties.

Acked-by: Timur Tabi <timur@kernel.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Rob Herring <robh@kernel.org>


# 4a1208c5 24-Jul-2018 Kees Cook <keescook@chromium.org>

video: fbdev: fsl-diu-fb: Remove VLA usage

In the quest to remove all stack VLA usage from the kernel[1], this moves
the buffer off the stack (since it could be as much as 1024 bytes), and
uses a new area in the cursor data structure. Additionally adds missed
documentation and removes redundant assignments.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Timur Tabi <timur@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>


# d43f4b5d 28-Mar-2018 Markus Elfring <elfring@users.sourceforge.net>

video: fsl-diu-fb: Delete an error message for a failed memory allocation in fsl_diu_init()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>


# 526c9e97 04-Jul-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

video: fbdev: fsl-diu-fb: constify mfb_template and fsl_diu_match.

File size before:
text data bss dec hex filename
2469 1552 24 4045 fcd drivers/video/fbdev/fsl-diu-fb.o

File size after adding 'const':
text data bss dec hex filename
3821 200 24 4045 fcd drivers/video/fbdev/fsl-diu-fb.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Timur Tabi <timur@tabi.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>


# 42f82367 20-Feb-2017 Colin Ian King <colin.king@canonical.com>

video: fbdev: fsl-diu-fb: fix spelling mistake "palette"

trivial fix to spelling mistakes of "palette"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>


# 0704916a 08-Feb-2017 Sachin Shukla <sachin.s5@samsung.com>

video: fbdev: fsl-diu-fb: remove impossible condition

xoffset and yoffset of struct fb_var_screeninfo are unsigned and so
they can never be less than 0.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: sachiniiitm@gmail.com
Cc: ravikant.s2@samsung.com
Cc: p.shailesh@samsung.com
Cc: ashish.kalra@samsung.com
Cc: vidushi.koul@samsung.com
Signed-off-by: Sachin Shukla <sachin.s5@samsung.com>
Acked-by: Timur Tabi <timur@tabi.org>
[b.zolnierkie: split from the bigger patch]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>


# acfc1cc1 02-Dec-2015 Wang Dongsheng <dongsheng.wang@freescale.com>

video: fbdev: fsl: Fix kernel crash when diu_ops is not implemented

If diu_ops is not implemented on platform, kernel will access a NULL
pointer. We need to check this pointer in DIU initialization.

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Acked-by: Timur Tabi <timur@tabi.org>
Cc: stable@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>


# e03dc19b 13-Aug-2015 Jason Jin <Jason.Jin@freescale.com>

video: fbdev: fsl: Fix the sleep function for FSL DIU module

For deep sleep, the diu module will power off, when wake up
from the deep sleep, the registers need to be reinitialized.

Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>


# 6a732bec 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

video: fbdev: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# f7018c21 13-Feb-2014 Tomi Valkeinen <tomi.valkeinen@ti.com>

video: move fbdev to drivers/video/fbdev

The drivers/video directory is a mess. It contains generic video related
files, directories for backlight, console, linux logo, lots of fbdev
device drivers, fbdev framework files.

Make some order into the chaos by creating drivers/video/fbdev
directory, and move all fbdev related files there.

No functionality is changed, although I guess it is possible that some
subtle Makefile build order related issue could be created by this
patch.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>