summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'driver-core-3.8-rc1' of ↵Linus Torvalds2012-12-1125-78/+78
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg Kroah-Hartman: "Here's the large driver core updates for 3.8-rc1. The biggest thing here is the various __dev* marking removals. This is going to be a pain for the merge with different subsystem trees, I know, but all of the patches included here have been ACKed by their various subsystem maintainers, as they wanted them to go through here. If this is too much of a pain, I can pull all of them out of this tree and just send you one with the other fixes/updates and then, after 3.8-rc1 is out, do the rest of the removals to ensure we catch them all, it's up to you. The merges should all be trivial, and Stephen has been doing them all in linux-next for a few weeks now quite easily. Other than the __dev* marking removals, there's nothing major here, some firmware loading updates and other minor things in the driver core. All of these have (much to Stephen's annoyance), been in linux-next for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio update. * tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits) modpost.c: Stop checking __dev* section mismatches init.h: Remove __dev* sections from the kernel acpi: remove use of __devinit PCI: Remove __dev* markings PCI: Always build setup-bus when PCI is enabled PCI: Move pci_uevent into pci-driver.c PCI: Remove CONFIG_HOTPLUG ifdefs unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs sh/PCI: Remove CONFIG_HOTPLUG ifdefs powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs mips/PCI: Remove CONFIG_HOTPLUG ifdefs microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs dma: remove use of __devinit dma: remove use of __devexit_p firewire: remove use of __devinitdata firewire: remove use of __devinit leds: remove use of __devexit leds: remove use of __devinit leds: remove use of __devexit_p mmc: remove use of __devexit ...
| * backlight: remove use of __devexitBill Pemberton2012-11-2822-26/+26
| | | | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * backlight: remove use of __devinitBill Pemberton2012-11-2822-30/+30
| | | | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * backlight: remove use of __devexit_pBill Pemberton2012-11-2822-22/+22
| | | | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linuxLinus Torvalds2012-11-234-11/+26
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | Pull omapdss fixes from Tomi Valkeinen: "Here are a few OMAPDSS fixes for the next -rc. I'm sending these directly to you, and quite late, as the fbdev tree maintainer (Florian) has been busy with his work and hasn't had time to manage the fb patches." * tag 'omapdss-for-3.7-rc' of git://gitorious.org/linux-omap-dss2/linux: OMAPDSS: do not fail if dpll4_m4_ck is missing OMAPFB: Fix possible null pointer dereferencing OMAPDSS: HDMI: fix missing unlock on error in hdmi_dump_regs() omapdss: dss: Fix clocks on OMAP363x OMAPDSS: DSI: fix dsi_get_dsidev_from_id()
| * OMAPDSS: do not fail if dpll4_m4_ck is missingAaro Koskinen2012-11-221-5/+9
| | | | | | | | | | | | | | | | | | | | | | Do not fail if dpll4_m4_ck is missing. The clock is not there on omap24xx, so this should not be a hard error. The patch retains the functionality before the commit 185bae10 (OMAPDSS: DSS: Cleanup cpu_is_xxxx checks). Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * OMAPFB: Fix possible null pointer dereferencingTushar Behera2012-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 952cbaaa9b8beacc425f9aedf370468cbb737a2c (OMAPFB: Change dssdev->manager references) added checks for OMAPFB_WAITFORVSYNC ioctl to verify that the display, output and overlay manager exist. However, the code erroneously uses && for each part, which means that OMAPFB_WAITFORVSYNC may crash the kernel if no display, output or manager is associated with the framebuffer. This patch fixes the issue by using ||. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * OMAPDSS: HDMI: fix missing unlock on error in hdmi_dump_regs()Wei Yongjun2012-10-261-1/+3
| | | | | | | | | | | | | | | | | | Add the missing unlock on the error handling path in function hdmi_dump_regs(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Sumit Semwal <sumit.semwal@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * omapdss: dss: Fix clocks on OMAP363xLaurent Pinchart2012-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 185bae1095188aa199c9be64d6030d8dbfc65e0a ("OMAPDSS: DSS: Cleanup cpu_is_xxxx checks") broke the DSS clocks configuration by erroneously using the clock parameters applicable to all other OMAP34xx SoCs for the OMAP363x. This went unnoticed probably because the cpu_is_omap34xx() class check wasn't seen as matching the OMAP363x subclass. Fix it by checking for the OMAP363x subclass before checking for the OMAP34xx class. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * OMAPDSS: DSI: fix dsi_get_dsidev_from_id()Tomi Valkeinen2012-10-251-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If dsi_get_dsidev_from_id() is called with a DSI module id that does not exist on the board, the function will crash as omap_dss_get_output() will return NULL. This happens on omap3 boards when dumping DSI clocks, as the dumping code will try to get the dsidev for DSI modules 0 and 1, but omap3 only has DSI module 0. Also clean up the id -> output mapping, so that if the function is called with invalid module ID it will return NULL. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Archit Taneja <archit@ti.com>
* | Merge tag 'stable/for-linus-3.7-rc4-tag' of ↵Linus Torvalds2012-11-021-1/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen Pull Xen bugfixes from Konrad Rzeszutek Wilk: - Use appropriate macros instead of hand-rolling our own (ARM). - Fixes if FB/KBD closed unexpectedly. - Fix memory leak in /dev/gntdev ioctl calls. - Fix overflow check in xenbus_file_write. - Document cleanup. - Performance optimization when migrating guests. * tag 'stable/for-linus-3.7-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen/mmu: Use Xen specific TLB flush instead of the generic one. xen/arm: use the __HVC macro xen/xenbus: fix overflow check in xenbus_file_write() xen-kbdfront: handle backend CLOSED without CLOSING xen-fbfront: handle backend CLOSED without CLOSING xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF x86: remove obsolete comment from asm/xen/hypervisor.h
| * | xen-fbfront: handle backend CLOSED without CLOSINGDavid Vrabel2012-10-301-1/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | Backend drivers shouldn't transistion to CLOSED unless the frontend is CLOSED. If a backend does transition to CLOSED too soon then the frontend may not see the CLOSING state and will not properly shutdown. So, treat an unexpected backend CLOSED state the same as CLOSING. Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
* | backlight: ili9320: add missing SPI dependencyJingoo Han2012-10-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add this missing SPI dependency and prevent the driver from building without SPI, because functions of the spi driver are used in this driver. drivers/video/backlight/ili9320.c:51: undefined reference to `spi_sync' Also, a prompt string for CONFIG_LCD_ILI9320 is added for explicit selection. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | drivers/video/backlight/lm3639_bl.c: return proper error in ↵Axel Lin2012-10-191-2/+2
|/ | | | | | | | lm3639_bled_mode_store() error paths Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6Linus Torvalds2012-10-1295-4382/+5027
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull fbdev updates from Florian Tobias Schandinat: "This includes: - large updates for OMAP - basic OMAP5 DSS support for DPI and DSI outputs - large cleanups and restructuring - some update to Exynos and da8xx-fb - removal of the pnx4008 driver (arch removed) - various other small patches" Fix up some trivial conflicts (mostly just include line changes, but also some due to the renaming of the deferred work functions by Tejun). * tag 'fbdev-updates-for-3.7' of git://github.com/schandinat/linux-2.6: (193 commits) gbefb: fix compile error video: mark nuc900fb_map_video_memory as __devinit video/mx3fb: set .owner to prevent module unloading while being used video: exynos_dp: use clk_prepare_enable and clk_disable_unprepare drivers/video/exynos/exynos_mipi_dsi.c: fix error return code drivers/video/savage/savagefb_driver.c: fix error return code video: s3c-fb: use clk_prepare_enable and clk_disable_unprepare da8xx-fb: save and restore LCDC context across suspend/resume cycle da8xx-fb: add pm_runtime support video/udlfb: fix line counting in fb_write OMAPDSS: add missing include for string.h OMAPDSS: DISPC: Configure color conversion coefficients for writeback OMAPDSS: DISPC: Add manager like functions for writeback OMAPDSS: DISPC: Configure writeback FIFOs OMAPDSS: DISPC: Configure writeback specific parameters in dispc_wb_setup() OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setup OMAPDSS: DISPC: Add function to set channel in for writeback OMAPDSS: DISPC: Don't set chroma resampling bit for writeback OMAPDSS: DISPC: Downscale chroma if plane is writeback OMAPDSS: DISPC: Configure input and output sizes for writeback ...
| * gbefb: fix compile errorFlorian Tobias Schandinat2012-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch "drivers/video/gbefb.c: use devm_ functions" caused a compile error. drivers/video/gbefb.c:1159:16: error: implicit declaration of function 'devm_ioremap' [-Werror=implicit-function-declaration] drivers/video/gbefb.c:1179:3: error: implicit declaration of function 'devm_ioremap_nocache' [-Werror=implicit-function-declaration] Fix it by including linux/io.h which defines those functions. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Damien Cassou <damien.cassou@lifl.fr>
| * Merge tag 'omapdss-for-3.7' of git://gitorious.org/linux-omap-dss2/linux ↵Florian Tobias Schandinat2012-10-1042-2456/+4419
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into fbdev-next Omapdss driver changes for the 3.7 merge window. Notable changes: * Basic writeback support for DISPC level. Writeback is not yet usable, though, as we need higher level code to actually expose the writeback feature to userspace. * Rewriting the omapdss output drivers. We're trying to remove the hard links between the omapdss and the panels, and this rewrite work moves us closer to that goal. * Cleanup and restructuring patches that have been made while working on device tree support for omapdss. Device tree support is still some way ahead, but these patches are good cleanups in themselves. * Basic OMAP5 DSS support for DPI and DSI outputs. * Workaround for the problem that GFX overlay's fifo is too small for high resolution scenarios, causing underflows. * Cleanups that remove dependencies to omap platform code.
| | * OMAPDSS: add missing include for string.hTomi Valkeinen2012-09-282-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both dpi.c and sdi.c use strcmp(), but do not include string.h. With some Kconfig options string.h is included implicitly, but with some other the compilation fails: drivers/video/omap2/dss/dpi.c:407:5: error: implicit declaration of function 'strcmp' Include string.h in both dpi.c and sdi.c Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * OMAPDSS: DISPC: Configure color conversion coefficients for writebackArchit Taneja2012-09-261-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writeback pipeline receives RGB data from one of the overlays or one of the overlay managers. If the target color mode is YUV422 or NV12, we need to convert the RGB pixels to YUV. The scaler in WB then converts it to the target color mode. Hence, the color conversion coefficients that need to be programmed are the ones which convert a RGB24 pixel to YUV444. Program these coefficients for writeback pipeline. Rearrange the code a bit to configure different coefficients for overlays and writeback. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Add manager like functions for writebackArchit Taneja2012-09-262-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions to enable writeback, and set/check state of GO bit. These bits are identical in behaviour with the corresponding overlay manager bits. Configure them in a similar way to mgr_enable() and mgr_go_* functions. Add a helper to get the FRAMEDONE irq corresponding to writeback. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Configure writeback FIFOsArchit Taneja2012-09-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the DISPC fifo functions to also configure the writeback FIFO thresholds. The most optimal configuration for writeback is to push out data to the interconnect the moment writeback pushes enough pixels in the FIFO to form a burst. This reduces the chance of writeback overflowing it's FIFO. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Configure writeback specific parameters in dispc_wb_setup()Archit Taneja2012-09-262-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configure some of the writeback specific parameters in dispc_wb_setup(). The writeback parameters configured are: truncation: This needs to be set if the color depth input to writeback is more than the color depth of the color mode we want to store in memory. writeback mode: This configures whether we want to use writeback in mem to mem or capture mode. This information will be directly passed by APPLY later. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Configure overlay-like parameters in dispc_wb_setupArchit Taneja2012-09-262-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create struct omap_dss_writeback_info, this is similar to omap_overlay_info, the major difference is that there is no parameter which describes the input size to writeback, this is because this is always fixed, and decided by the connected overlay or overlay manager. One more difference is that screen_width is renamed to buf_width, to give the value of stride the writeback buffer has. Call dispc_ovl_setup_common() through dispc_wb_setup() to configure overlay-like parameters. The parameters in dispc_ovl_setup_common() which do not hold for writeback are filled passed as zeroes or false, the code takes care of not configuring them as they won't possess the needed overlay caps. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Add function to set channel in for writebackArchit Taneja2012-09-262-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writeback can take input from either one of the overlays, or one of the overlay managers. Add an enum which represents the channel_in for writeback, and maps to the register field programming. Add a function to configure channel in for writeback. This will be used later in APPLY. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Don't set chroma resampling bit for writebackArchit Taneja2012-09-261-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bit YUVCHROMARESAMPLING isn't there for writeback in DISPC_WB_ATTRIBUTES2. It isn't there because we don't upsample chroma like for video pipelines, we downsample chroma in writeback to get YUV422 or NV12 formats from the YUV444 input. Ignore this bit in dispc_ovl_set_scaling_uv() if the plane is OMAP_DSS_WB. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Downscale chroma if plane is writebackArchit Taneja2012-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When converting YUYV444 content to YUV422 or NV12 formats through writeback pipeline, the scaler needs to downscale the chroma plane. Ensure that chroma is downscaled when the pipeline is writeback. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Configure input and output sizes for writebackArchit Taneja2012-09-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writeback uses the WB_PICTURE_SIZE register to define the size of the content written to memory, this is the output of the scaler. It uses the WB_SIZE register to define the size of the content coming from the overlay/manager to which it is connected, this is the input to the scaler. This naming is different as compared to overlays. Add checks for writeback in dispc_ovl_set_input_size() and dispc_ovl_set_output_size() to write to the correct registers. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Add writeback register offsets and dss features structsArchit Taneja2012-09-263-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since writeback has many overlay like properties, and most of it's registers are similar to that of overlays, it's possible to reuse most of the overlay related DISPC code for writeback when considering it as a plane. Writeback was added as a plane in the omap_plane field as OMAP_DSS_WB. Add the writeback register offsets in dispc.h, add minimal WB plane related info needed in dss_features. Add a function which returns the number of writeback pipelines an OMAP version has. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Allow both upscaling and downscaling of chromaArchit Taneja2012-09-261-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the function dispc_plane_set_scaling_uv(), create a parameter which tells if we want to upscale or downscale the chroma plane. Downscaling of chroma is required by writeback pipeline for converting the input YUV444 color format to YUV422 or NV12. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DIPSC: Relax scaling limitations when in memory to memory modeArchit Taneja2012-09-263-21/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The scalers of overlays and writeback do not have any constraints on downscale ratio when operating in memory to memory mode. This is because in memory to memory mode, we aren't connected to a display which needs data output at the rate of pixel clock. The scalers can perform as much downscaling as needed, the rate at which the scaler outputs is adjusted accordingly. Relax constraints related to downscaling based on whether the input overlays are connected to writeback in memory to memory mode. We pass a mem_to_mem boolean parameter to dispc_ovl_setup() from APPLY. This is currently set to false, this will later be configured to the correct value based on whether the overlay is connected to writeback or not. Do the same later for writeback when writeback is configured. In the scaling calculation code, we calculate the minimum amount of core clock we need to achieve the required downscaling. If we are in memory to memory mode, we set this to a very small value(1 in this case), this value would always be lesser than the actual DISPC core clock value, and hence the scaling checks would succeed. We take care that pixel clock isn't calculated for writeback and the overlays connected to it when in memory to memory mode. A pixel clock in such cases doesn't make sense. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Don't pass channel out when configuring overlaysArchit Taneja2012-09-261-46/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dispc_ovl_setup_common() is to be used by both overlays and writeback. We pass channel out to figure out what manager the overlay is connected to, to determine the pixel clock rate. This is used to decide the scaling limitations for that overlay. writeback doesn't have a channel out, it has a channel in field which tells where writeback gets its input from. These are 2 different fields, and this prevents us reusing the overlay configuration code for writeback. To overcome this, we now pass omap_plane to overlay related functions rather than passing channel out. We create helper functions which can derive pclk/lclk from the omap_plane id. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Make dispc_ovl_setup call dispc_ovl_setup_commonArchit Taneja2012-09-261-58/+72
| | | | | | | | | | | | | | | | | | | | | | | | Add a new static function called dispc_ovl_setup_common(). This function is used by dispc_ovl_setup() to configure the overlay registers. This split is done so that dispc_wb_setup() can reuse overlay register configuration related code. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: OVERLAY: Add position and replication as overlay capsArchit Taneja2012-09-262-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add position and replication as overlay caps, and pass overlay caps as an argument to the corresponding functions. Adding position and replication to overlay caps seems a bit unnecessary, but it allows us to use the corresponding functions for writeback too. These caps will be set for all overlays, but not for writeback. This is done so writeback can reuse dispc_ovl_setup() to the maximum. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Pass overlay caps as a parameter to dispc plane functionsArchit Taneja2012-09-261-19/+17Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the functions below take the omap_plane parameter and derive the overlay caps within them. Pass the overlay caps as a parameter to the function to allow these to be used by writeback too. - dispc_ovl_set_zorder() - dispc_ovl_set_pre_mult_alpha() - dispc_ovl_setup_global_alpha() - dispc_ovl_calc_scaling() - dispc_ovl_setup() These functions will be used for writeback later, and the caps will help in deciding if they are to be used for writeback or not. This allows reuse of overlay caps for writeback. Using omap_overlay_caps for writeback seems a bit incorrect, but caps is something already in use by users of OMAPDSS(omapfb/omap_vout), so we use overlay caps for overlay like features of writeback too. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Simplify function names for setting pipeline input and ↵Archit Taneja2012-09-261-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | output sizes The DISPC pipeline register names in the TRM for setting the buffer size and the output size are a bit misleading, for example, there are different register names for setting the buffer size for VID and GFX pipes. Things get more confusing when considering writeback pipeline. Rename the functions so that they tell whether they are configuring the input to the scalar or the output. These will be extended later to support writeback registers. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DISPC: Constify omap_overlay_info in dispc_ovl_setup()Archit Taneja2012-09-262-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The struct omap_overlay_info passed to dispc_ovl_setup() is used to configure DISPC registers. It shouldn't modify the overlay_info structure. The pos_y field was being changed in dispc_ovl_setup in the case of interlaced displays. Fix this and const qualifier to the omap_overlay_info argument. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: Remove old way of setting manager and device linksArchit Taneja2012-09-262-66/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that an omap_dss_output can be used to link between managers and devices, we can remove the old way of setting manager and device links. This involves removing the device and manager pointers from omap_overlay_manager and omap_dss_device respectively, and removing the set_device/unset_device ops from omap_overlay_manager. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: APPLY: Remove omap_dss_device references from dss_ovl_enable/disableArchit Taneja2012-09-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An overlay isn't allowed to be enabled/disabled if it isn't connected to an omap_dss_device. This requirement isn't needed any more. An overlay can be enabled/disabled as long as it has an output connected to it. The output may not be connected to a device, but we can be assured that the connected manager's output is in use by an output interface. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: OVERLAY/MANAGER: Get device via outputArchit Taneja2012-09-262-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | A manager is not connected to a device directly any more. It first connects to an output, and then to the display. Update overlay and manager get_device ops to return the device via the connected output. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: MANAGER: Update display sysfs storeArchit Taneja2012-09-261-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The display sysfs attribute's store function needs to be changed with the introduction of outputs. The DSS driver ensures that there is one display per output, and that a registered omap_dss_device will have an output connected to it. The display sysfs store function unsets the current output connected to the manager, and sets it with the output connected to the new display. If the new display doesn't have an output for some reason, we just bail out. The function doesn't set/unset output->device links. These remain the same as when the omap_dss_device was registered. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPFB: Change dssdev->manager referencesArchit Taneja2012-09-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | To retrieve the manager pointer via a device, we need to now access it via the output to which the device is connected. Make this change in omapfb_ioctl() where the WAITFORVSYNC ioctl tries to access the manager's device. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: HDMI: Replace dssdev->manager with dssdev->output->manager referencesArchit Taneja2012-09-261-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With addition of output entities, a device connects to an output, and an output connects to overlay manager. Replace the dssdev->manager references with dssdev->output->manager to access the manager correctly. When enabling the HDMI output, check whether the output entity connected to display is not NULL. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: VENC: Replace dssdev->manager with dssdev->output->manager referencesArchit Taneja2012-09-261-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With addition of output entities, a device connects to an output, and an output connects to overlay manager. Replace the dssdev->manager references with dssdev->output->manager to access the manager correctly. When enabling the VENC output, check whether the output entity connected to display is not NULL. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: RFBI: Replace dssdev->manager with dssdev->output->manager referencesArchit Taneja2012-09-261-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With addition of output entities, a device connects to an output, and an output connects to overlay manager. Replace the dssdev->manager references with dssdev->output->manager to access the manager correctly. When enabling the RFBI output, check whether the output entity connected to display is not NULL. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: SDI: Replace dssdev->manager with dssdev->output->manager referencesArchit Taneja2012-09-261-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With addition of output entities, a device connects to an output, and an output connects to overlay manager. Replace the dssdev->manager references with dssdev->output->manager to access the manager correctly. When enabling the SDI output, check whether the output entity connected to display is not NULL. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DSI: Replace dssdev->manager with dssdev->output->manager referencesArchit Taneja2012-09-261-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With addition of output entities, a device connects to an output, and an output connects to overlay manager. Replace the dssdev->manager references with dssdev->output->manager to access the manager correctly. When enabling the DSI output, check whether the output entity connected to display is not NULL. In dsi_init_display(), the display won't be connected to the DSI output yet, that happens later in dss_recheck_connections() in the panel driver's probe. Get the dsidev platform device pointer using the DSI moudle number provided in the omap_dss_device struct. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DSI: Remove dsi_pdev_map global structArchit Taneja2012-09-261-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dsi_pdev_map is a struct visible globally in the DSI driver to get the platform device pointer of the DSI device corresponding to it's module ID. This was required because there was no clean way to derive the platform device from the DSI module instance number or from the connected panel. With the new output entity, it is possible to retrieve the platform device pointer if the omap_dss_output pointer is available. Modify the functions dsi_get_dsidev_from_dssdev() dsi_get_dsidev_from_id() so that they use output instead of dsi_pdev_map to retrieve the dsi platform device pointer. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: DPI: Replace dssdev->manager with dssdev->output->manager referencesArchit Taneja2012-09-261-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With addition of output entities, a device connects to an output, and an output connects to overlay manager. Replace the dssdev->manager references with dssdev->output->manager to access the manager correctly. When enabling the DPI output, check whether the output entity connected to display is not NULL. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPDSS: Create links between managers, outputs and devicesArchit Taneja2012-09-263-8/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Links between DSS entities are made in dss_init_connections() when a panel device is registered, and are removed in dss_uninit_connections() when the device is unregistered. Modify these functions to incorporate the addition of outputs. The fields in omap_dss_device struct gives information on which output and manager to connect to. The desired manager and output pointers are retrieved and prepared to form the desired links. The output is linked to the device, and then the manager to the output. A helper function omapdss_get_output_from_device() is created to retrieve the output from the display by checking it's type, and the module id in case of DSI. Signed-off-by: Archit Taneja <archit@ti.com>
| | * OMAPFB: remove manager->device referencesArchit Taneja2012-09-262-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the introduction of output entities, managers will now connect to outputs. Use the helper op for overlays named get_device. This will abstract away the information on how to get the device from an overlay. Using the helper function will reduce the number of pointer dereferences a user of OMAPDSS needs to do and reduce risk of a NULL dereference. Signed-off-by: Archit Taneja <archit@ti.com>