summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/pxafb.c
Commit message (Collapse)AuthorAgeFilesLines
* video: fbdev: pxafb: Fix "WARNING: invalid free of devm_ allocated data"YueHaibing2018-12-201-3/+1Star
| | | | | | | | | | | | | | '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: stable@kernel.org [v4.19+] Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* video: fbdev: pxafb: Add support for lcd-supply regulatorDaniel Mack2018-07-241-0/+24
| | | | | | | | | | | | Optionally obtain a lcd-supply regulator during probe and use it in __pxafb_lcd_power() to switch the power supply of LCD panels. This helps boards booted from DT to control such voltages without callbacks. Signed-off-by: Daniel Mack <daniel@zonque.org> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* video: fbdev: pxafb: handle errors from pxafb_init_fbinfo() correctlyDaniel Mack2018-07-241-5/+4Star
| | | | | | | | | | | | pxafb_init_fbinfo() can not only report errors caused by failed allocations but also when the clock can't be found. To fix this, return an error pointer instead of NULL in case of errors, and up-chain the result. Signed-off-by: Daniel Mack <daniel@zonque.org> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* video: fbdev: pxafb: switch to devm_* APIDaniel Mack2018-07-241-47/+17Star
| | | | | | | | This helps us clean up the probe() and remove() implementations. Signed-off-by: Daniel Mack <daniel@zonque.org> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* video: fbdev: pxafb: clear allocated memory for video modesDaniel Mack2018-07-241-2/+2
| | | | | | | | | | | When parsing the video modes from DT properties, make sure to zero out memory before using it. This is important because not all fields in the mode struct are explicitly initialized, even though they are used later on. Fixes: 420a488278e86 ("video: fbdev: pxafb: initial devicetree conversion") Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* video: fbdev: pxafb: match_string() conversion fixupBartlomiej Zolnierkiewicz2018-05-151-1/+1
| | | | | | | | | | "unknown" lcd_types[] entry is needed for proper operation of the driver, add it back. Fixes: 6d09dfe70f8f ("video: fbdev: pxafb: Convert to use match_string() helper") Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* video: fbdev: pxafb: Convert to use match_string() helperAndy Shevchenko2018-05-151-6/+4Star
| | | | | | | | | The new helper returns index of the matching string in an array. We are going to use it here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* video: fbdev: pxafb: Handle return value of clk_prepare_enableArvind Yadav2017-06-141-1/+4
| | | | | | | clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* drivers/video: Convert remaining uses of pr_warning to pr_warnJoe Perches2017-03-211-4/+3Star
| | | | | | | | | | | | | To enable eventual removal of pr_warning This makes pr_warn use consistent for drivers/video Prior to this patch, there were 6 uses of pr_warning and 25 uses of pr_warn in drivers/video Signed-off-by: Joe Perches <joe@perches.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
* video: fbdev: pxafb: add missing of_node_put() in of_get_pxafb_mode_info()Wei Yongjun2016-08-301-0/+1
| | | | | | | | | | | | This node pointer is returned by of_graph_get_next_endpoint() with refcount incremented in this function. of_node_put() on it before exitting this function. Found by Coccinelle. Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: fbdev: pxafb: potential NULL dereference on errorDan Carpenter2016-08-111-1/+1
| | | | | | | | | | If we "goto out;" then it calls display_timings_release(timings); Since "timings" is NULL, that's going to oops. Just return directly. Fixes: 420a488278e8 ('video: fbdev: pxafb: initial devicetree conversion') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()Luis R. Rodriguez2016-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: pxafb: fix out of memory error pathRobert Jarzmik2016-01-181-0/+2
| | | | | | | | | | As seen by Julia, the initial allocation memory is not checked anymore after commit "video: fbdev: pxafb: initial devicetree conversion". Introduce back the removed test. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: fbdev: pxafb: initial devicetree conversionRobert Jarzmik2015-12-151-3/+157
| | | | | | | | | | | | | | | | This patch brings a first support of pxa framebuffer devices to a devicetree pxa platform, as was before platform data. There are restrictions with this port, the biggest one being the lack of support of smart panels. Moreover the conversion doesn't provide a way to declare multiple framebuffer configurations with different bits per pixel, only the LCD hardware bus width is used. The patch was tested on both pxa25x, pxa27x and pxa3xx platform (namely lubbock, mainstone and zylonite). Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: fbdev: pxafb: loosen the platform data bondRobert Jarzmik2015-12-151-20/+34
| | | | | | | | | | | | In order to prepare the transition to a mixed platform data and device-tree initialization, remove all the platform data references all over the driver. Copy the platform data into the internal structure of the pxafb, and only use this afterward. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier eventViresh Kumar2015-09-011-1/+0Star
| | | | | | | | | | | | | What's being done from CPUFREQ_INCOMPATIBLE, can also be done with CPUFREQ_ADJUST. There is nothing special with CPUFREQ_INCOMPATIBLE notifier. Kill CPUFREQ_INCOMPATIBLE and fix its usage sites. This also updates the numbering of notifier events to remove holes. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* video: fbdev: use msecs_to_jiffies for time conversionsNicholas Mc Guire2015-03-101-3/+3
| | | | | | | | This is only an API consolidation and should make things more readable by replacing var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: fbdev: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0Star
| | | | | | | 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: fbdev: pxafb.c: use container_of to resolve pxafb_info/layer from fb_infoFabian Frederick2014-09-301-10/+10
| | | | | | | Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* video: move fbdev to drivers/video/fbdevTomi Valkeinen2014-04-171-0/+2332
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>