summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/imxfb.c
Commit message (Collapse)AuthorAgeFilesLines
* video: fbdev: imxfb: always allocate 256 entries for the color mapMartin Kaiser2017-01-111-1/+5
| | | | | | | | | | | | | | | | The current code calculates the number of color map entries as 1 << info->var.bits_per_pixel. For 32bpp modes, 1 << 32 is 0 when written to an int variable. As a consequence, the subsequent copying of the default (non-empty) color map into our newly allocated color map fails and imxfb's probe function returns an error. On both imx1 and imx21 platforms, the color map is used only for modes with <= 8bpp. By allocating 256 entries for the color map, we're on the safe side. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* video: fbdev: imxfb: add some error handlingUwe Kleine-König2016-05-101-8/+27
| | | | | | | | | | | | | clk_prepare_enable can fail and if it does the controller must not be considered enabled. So check for errors, properly unwind and give the error code back to the caller. While touching the clock code also enable the clocks in the same direction and disable in reverse order. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: fbdev: imxfb: fix semantic of .get_power and .set_powerUwe Kleine-König2016-05-101-4/+5
| | | | | | | | | .set_power gets passed an FB_BLANK_XXX value, not a bool. So 0 signals on; and >1 means off. The same applies for return values of .get_power. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()Luis R. Rodriguez2016-03-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename dma_*_writecombine() to dma_*_wc(), so that the naming is coherent across the various write-combining APIs. Keep the old names for compatibility for a while, these can be removed at a later time. A guard is left to enable backporting of the rename, and later remove of the old mapping defines seemlessly. Build tested successfully with allmodconfig. The following Coccinelle SmPL patch was used for this simple transformation: @ rename_dma_alloc_writecombine @ expression dev, size, dma_addr, gfp; @@ -dma_alloc_writecombine(dev, size, dma_addr, gfp) +dma_alloc_wc(dev, size, dma_addr, gfp) @ rename_dma_free_writecombine @ expression dev, size, cpu_addr, dma_addr; @@ -dma_free_writecombine(dev, size, cpu_addr, dma_addr) +dma_free_wc(dev, size, cpu_addr, dma_addr) @ rename_dma_mmap_writecombine @ expression dev, vma, cpu_addr, dma_addr, size; @@ -dma_mmap_writecombine(dev, vma, cpu_addr, dma_addr, size) +dma_mmap_wc(dev, vma, cpu_addr, dma_addr, size) We also keep the old names as compatibility helpers, and guard against their definition to make backporting easier. Generated-by: Coccinelle SmPL Suggested-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: airlied@linux.ie Cc: akpm@linux-foundation.org Cc: benh@kernel.crashing.org Cc: bhelgaas@google.com Cc: bp@suse.de Cc: dan.j.williams@intel.com Cc: daniel.vetter@ffwll.ch Cc: dhowells@redhat.com Cc: julia.lawall@lip6.fr Cc: konrad.wilk@oracle.com Cc: linux-fbdev@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: luto@amacapital.net Cc: mst@redhat.com Cc: tomi.valkeinen@ti.com Cc: toshi.kani@hp.com Cc: vinod.koul@intel.com Cc: xen-devel@lists.xensource.com Link: http://lkml.kernel.org/r/1453516462-4844-1-git-send-email-mcgrof@do-not-panic.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
* video: fbdev: imxfb: Provide a reset mechanismFabio Estevam2016-01-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently when we boot the kernel on a mx25pdk the LCDC controller does not show the Linux logo on boot. This problem is well explained by Sascha Hauer: "Unfortunately this LCD controller does not have an enable bit. The controller starts directly when the clocks are enabled. If the clocks are enabled when the controller is not yet programmed with proper register values then it just goes into some undefined state. What I suspect is that the clocks already were enabled before driver probe, presumably by the bootloader, so the controller is already in undefined state when entering Linux. Now by dis/enabling the ipg clock you effectively reset the controller. Since you have programmed it with valid register values in the mean time it starts working after this reset." So do as suggested and force a reset of the LCDC hardware by enabling and disabling the IPG clock. With this change the Linux logo can be seen on boot on a mx25pdk. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: fbdev: imxfb: Constify platform_device_idKrzysztof Kozlowski2015-06-121-1/+1
| | | | | | | | The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: fbdev: make of_device_id array constSanjeev Sharma2015-03-021-1/+1
| | | | | | | | Make of_device_id array const. Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: fbdev: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | 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>
* video: move fbdev to drivers/video/fbdevTomi Valkeinen2014-04-171-0/+1075
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>
OpenPOWER on IntegriCloud