aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/offb.c
AgeCommit message (Collapse)Author
2019-02-08video: offb: annotate implicit fall throughsMathieu Malaterre
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 <malat@debian.org> Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2019-02-08fbdev: Use of_node_name_eq for node name comparisonsRob Herring
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. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2019-01-11fbdev: offb: Fix OF node name handlingRob Herring
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") Reported-by: Mathieu Malaterre <malat@debian.org> Tested-by: Mathieu Malaterre <malat@debian.org> Cc: stable@vger.kernel.org # v4.19+ Cc: Elimar Riesebieter <riesebie@lxtec.de> Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2018-10-08fbdev: Convert to using %pOFn instead of device_node.nameRob Herring
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2018-03-12video: offb: Deallocate the color mapMathieu Malaterre
The function offb_destroy did not deallocate the color map leaving some memory around after destruction. Call the color map deallocate function to remove the memory leak. Handle another case where color map should have been deallocated during an error code path. Fix memory leaks reported by kmemleak: # dmesg ... [ 1884.719941] kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak) # cat /sys/kernel/debug/kmemleak unreferenced object 0xde3d9000 (size 512): comm "swapper", pid 1, jiffies 4294892827 (age 1906.784s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 aa aa aa aa aa aa aa aa ................ 55 55 55 55 55 55 55 55 ff ff ff ff ff ff ff ff UUUUUUUU........ backtrace: [<f1433400>] fb_alloc_cmap_gfp+0x54/0x15c [<cb6b409b>] offb_init_nodriver+0x8e8/0xa3c [<b5a1c019>] offb_init+0xd0/0x164 [<322f82a3>] do_one_initcall+0x4c/0x178 [<b592db9f>] kernel_init_freeable+0x138/0x1cc [<2a17fa0e>] kernel_init+0x24/0x118 [<4079749a>] ret_from_kernel_thread+0x5c/0x64 unreferenced object 0xde3d9200 (size 512): comm "swapper", pid 1, jiffies 4294892827 (age 1906.784s) hex dump (first 32 bytes): 00 00 00 00 aa aa aa aa 00 00 00 00 55 55 aa aa ............UU.. 55 55 55 55 ff ff ff ff 55 55 55 55 ff ff ff ff UUUU....UUUU.... backtrace: [<4bf3594d>] fb_alloc_cmap_gfp+0x6c/0x15c [<cb6b409b>] offb_init_nodriver+0x8e8/0xa3c [<b5a1c019>] offb_init+0xd0/0x164 [<322f82a3>] do_one_initcall+0x4c/0x178 [<b592db9f>] kernel_init_freeable+0x138/0x1cc [<2a17fa0e>] kernel_init+0x24/0x118 [<4079749a>] ret_from_kernel_thread+0x5c/0x64 unreferenced object 0xde3d9600 (size 512): comm "swapper", pid 1, jiffies 4294892827 (age 1906.784s) hex dump (first 32 bytes): 00 00 aa aa 00 00 aa aa 00 00 aa aa 00 00 aa aa ................ 55 55 ff ff 55 55 ff ff 55 55 ff ff 55 55 ff ff UU..UU..UU..UU.. backtrace: [<23a3ea03>] fb_alloc_cmap_gfp+0x84/0x15c [<cb6b409b>] offb_init_nodriver+0x8e8/0xa3c [<b5a1c019>] offb_init+0xd0/0x164 [<322f82a3>] do_one_initcall+0x4c/0x178 [<b592db9f>] kernel_init_freeable+0x138/0x1cc [<2a17fa0e>] kernel_init+0x24/0x118 [<4079749a>] ret_from_kernel_thread+0x5c/0x64 Signed-off-by: Mathieu Malaterre <malat@debian.org> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-08-07video: fbdev: Convert to using %pOF instead of full_nameRob Herring
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-02-08video: fbdev: offb: switch to using for_each_node_by_typeDmitry Torokhov
Instead of open-coding loops let's switch to a nice macro. Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Yongji Xie <xyjxie@linux.vnet.ibm.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2016-09-27video: fbdev: offb: Call pci_enable_device() before using the PCI VGA deviceYongji Xie
Currently the offb module will use the PCI VGA device as frame buffer device without calling something like pci_enable_device(). However, this would cause some problem if we disable memory decoding of the upstream bridge before. When the console driver issued memory access to the VGA device, the access cannot be supported by the bridge which will cause EEH error on Power machine. Signed-off-by: Yongji Xie <xyjxie@linux.vnet.ibm.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-02-05PCI: Remove includes of asm/pci-bridge.hBjorn Helgaas
Drivers should include asm/pci-bridge.h only when they need the arch- specific things provided there. Outside of the arch/ directories, the only drivers that actually need things provided by asm/pci-bridge.h are the powerpc RPA hotplug drivers in drivers/pci/hotplug/rpa*. Remove the includes of asm/pci-bridge.h from the other drivers, adding an include of linux/pci.h if necessary. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-06-16Revert "offb: Add palette hack for little endian"Benjamin Herrenschmidt
This reverts commit e1edf18b20076da83dd231dbd2146cbbc31c0b14. This patch was a misguided attempt at fixing offb for LE ppc64 kernels on BE qemu but is just wrong ... it breaks real LE/LE setups, LE with real HW, and existing mixed endian systems that did the fight thing with the appropriate device-tree property. Bad reviewing on my part, sorry. The right fix is to either make qemu change its endian when the guest changes endian (working on that) or to use the existing foreign endian support. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: <stable@vger.kernel.org> [v3.13+] ---
2014-04-17video: move fbdev to drivers/video/fbdevTomi Valkeinen
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>