summaryrefslogtreecommitdiffstats
path: root/drivers/video/imx.c
Commit message (Collapse)AuthorAgeFilesLines
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: imx: assert that image buffer doesn't cross a 4 MiB boundaryUwe Kleine-König2015-09-211-10/+39
| | | | | | | | | | | | | | The reference manual (for the i.MX25 in my case) states: This field must start at a location that enables a complete picture to be stored in a 4 Mbyte memory boundary (A [21:0]). A [31:22] has a fixed value for a picture’s image. Check this condition for user-supplied framebuffer values and enforce it for driver-allocated buffers. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_request_mem_region return an error pointerSascha Hauer2014-09-161-0/+3
| | | | | | For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-04-041-5/+0
|\
| * drivers: treewide: Kill empty remove() implementationsAlexander Shiyan2014-04-021-5/+0
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | video: introduce struct display_timingsSascha Hauer2014-03-291-3/+3
|/ | | | | | | And use it inside struct fb_info. This struct has the advantage that the supported modes can be passed around in a single pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: imx: Add a name to perclkSascha Hauer2014-02-101-1/+1
| | | | | | perclk should be named 'per' to make sure we get the correct clock. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fb: imxfb: Use dev_add_param_int for alpha parameterSascha Hauer2013-04-111-17/+9
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use new device_platform_driver() macro for driversAlexander Shiyan2013-02-131-8/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX21/27: don't enable lcd bus clocks too earlyDaniel Mierswa2013-01-171-7/+22
| | | | | | | | | | | | | | | | On the MX27 based board phycard-i.MX27 the display won't properly come up. Before removing imx-regs.h and the code that sets the register in the i.MX video driver, the PCCR registers were set _after_ the screen start (LSSAR) was set. This restores that old behaviour and makes the display come up properly again. I did not have a chance to test this on any other i.MX27 or i.MX21 hardware though I assume that the "old" order is required there too. Signed-off-by: Daniel Mierswa <d.mierswa@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: get rid of imx-regs.hSascha Hauer2012-10-171-1/+0
| | | | | | | | | - remove now unused __REG definitions - include individual SoC register files instead of imx-regs.h - move IMX_GPIO_NR to generic.h - finally remove imx-regs.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video i.MX: Use regular clk_[en|dis]able functionsSascha Hauer2012-10-101-39/+5
| | | | | | | | This controller has no enable bit. It is always on once the pixel clock is provided. This patch switches the driver to use regular clk functions instead of SoC specific register hacking. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/imx-clk'Sascha Hauer2012-10-041-2/+8
|\
| * ARM i.MX: Remove old clock supportSascha Hauer2012-10-041-1/+0
| | | | | | | | | | | | | | The old clock support is now unused. Remove it. The former i.MX clko command is superseeded by generic clock manipulation commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * video i.MX: Switch to clock supportSascha Hauer2012-10-041-1/+8
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
|/ | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* video imx: specify num_modes in platform_dataSascha Hauer2012-01-051-0/+5
| | | | | | | | Without num_modes the imx fb driver won't work. Specify this in the boards and also bail out in the driver when num_modes is unspecified. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imxfb: Add support for multiple video modesChristian Hemp2011-12-131-1/+16
| | | | | | | | Add all available video modes to the framebuffer. devinfo fb0 shows the available modes. We can select a mode now. Signed-off-by: Christian Hemp <c.hemp@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce io.hSascha Hauer2011-09-221-1/+1
| | | | | | | To allow for some generic io accessors introduce io.h and use this instead of asm/io.h throughout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video i.MX: convert to struct resourceSascha Hauer2011-07-191-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imxfb: do not enable framebuffer on startupSascha Hauer2010-06-241-2/+0
| | | | | | | The board code or startup script should enable it when it actually wants to. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imxfb: Add board specific hook to enable displaySascha Hauer2010-06-241-0/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rework device parametersSascha Hauer2010-06-171-8/+9
| | | | | | | | Change device parameters so that the memory management is in generic code. This also removes the need of storing statically initialized parameters as they are stored in a struct list_head for each device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX25 : add Framebuffer supportEric Benard2010-05-171-1/+18
| | | | | Signed-off-by: Eric Benard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX21: support framebufferIvo Clarysse2010-04-021-0/+9
| | | | | | | | This patch allows using the i.MX (LCDC) framebuffer driver on boards using an i.MX21 SoC. Signed-off-by: Ivo Clarysse <ivo.clarysse@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machJean-Christophe PLAGNIOL-VILLARD2009-10-221-3/+3
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* imxfb: make framebuffer base address configurableSascha Hauer2009-10-131-4/+10
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX fb: Add support for overlay framebufferSascha Hauer2009-08-131-0/+148
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add framebuffer supportSascha Hauer2009-07-311-0/+415
This patch adds framebuffer support and a driver for i.MX[12] framebuffer devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>