summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/dss_features.c
Commit message (Collapse)AuthorAgeFilesLines
* video: move fbdev to drivers/video/fbdevTomi Valkeinen2014-04-171-935/+0
| | | | | | | | | | | | | | | | | | | | 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>
* OMAPDSS: DISPC: Add MFLAG definesTomi Valkeinen2013-12-301-0/+1
| | | | | | | OMAP5 has MFLAG feature in DISPC. Add the register definition and dump it. The register is not used yet, though. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* omapdss: HDMI: Use OMAP4 HDMI core functions directly and remove hdmi_ip_opsArchit Taneja2013-10-091-33/+0
| | | | | | | | | | | | | | | | | | After removing wrapper, pll and phy funcs from ti_hdmi_4xxx_ip.c, we are left with OMAP4 HDMI core functions. Use these directly in hdmi.c rather than using hdmi_ip_ops. Rename the core functions with a 'hdmi4' suffix. We used to have hdmi_ip_ops so that one could support HDMI within a TI SoC which had a non-DSS display subsytem. This however never got put into use, and hence these ops aren't useful any more. The DT/hwmod information for hdmi doesn't split the address space according to the required sub blocks. Keep the address offset and size information in the driver for now. This will be removed when the driver gets the information correctly from DT/hwmod. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* omapdss: HDMI: create a PHY libraryArchit Taneja2013-10-091-3/+0
| | | | | | | | | | | | | | | | | | | HDMI PHY is a block common to DSS in OMAP4, OMAP5 and DRA7x. Move the existing functions from ti_hdmi_4xxx_ip.c to a separate file. These funcs are called directly from the hdmi driver rather than hdmi_ip_ops function pointer calls. Add the PHY library function declarations to ti_hdmi.h. These will be shared amongst the omap4/5 hdmi platform drivers. Remove the PHY function pointer ops from the ti_hdmi_ip_ops struct. The DT/hwmod information for hdmi doesn't split the address space according to the required sub blocks. Keep the address offset and size information in the driver for now. This will be removed when the driver gets the information correctly from DT/hwmod. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* omapdss: HDMI: create a PLL libraryArchit Taneja2013-10-091-3/+0
| | | | | | | | | | | | | | | | | | | | HDMI PLL is a block common to DSS in OMAP4, OMAP5 and DRA7x. Move the existing PLL functions from ti_hdmi_4xxx_ip.c and hdmi.c to a separate file. These funcs are called directly from the hdmi driver rather than hdmi_ip_ops function pointer calls. Add the PLL library function declarations to ti_hdmi.h. These will be shared amongst the omap4/5 hdmi platform drivers. Remove the PLL function pointer ops from the ti_hdmi_ip_ops struct. These will be shared amongst the omap4/5 hdmi platform drivers and other libraries. The DT/hwmod information for hdmi doesn't split the address space according to the required sub blocks. Keep the address offset and size information in the driver for now. This will be removed when the driver gets the information correctly from DT/hwmod. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* omapdss: HDMI: create a Wrapper libraryArchit Taneja2013-10-091-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | HDMI wrapper is a block common to DSS in OMAP4, OMAP5 and DRA7x. Move the existing functions from ti_hdmi_4xxx_ip.c to a separate file. These funcs are called directly from the hdmi driver rather than hdmi_ip_ops funtion pointer calls. Add new wrapper funcs which can be used by other hdmi libraries like core, pll and phy. Move some of the enums, structs and funcs related to the wrapper from ti_hdmi_4xxx_ip.h to ti_hdmi.h. These will be shared amongst the omap4/5 hdmi platform drivers and other libraries. The old hdmi_wp_init() is removed since it didn't do anything. Timing parameters like interlace, hsync_level and vsync_level weren't copied correctly before. Those are copied correctly now. The DT/hwmod information for hdmi doesn't split the address space according to the required sub blocks. Keep the address offset and size information in the driver for now. This will be removed when the driver gets the information correctly from DT/hwmod. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI clean up hpd_gpioTomi Valkeinen2013-06-171-1/+0
| | | | | | | hpd_gpio is no longer used by the OMAP4 HDMI IP driver, and we can thus remove the unnecessary code. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* omapdss: Features: Fix some parameter rangesArchit Taneja2013-04-101-4/+4
| | | | | | | | | | | | | Increase the DSS_FCLK and DSI_FCLK max supported frequencies, these come because some frequencies were increased from OMAP5 ES1 to OMAP5 ES2. We support only OMAP5 ES2 in the kernel, so replace the ES1 values with ES2 values. Increase the DSI PLL Fint range, this was previously just copied from the OMAP4 param range struct. Fix the maximum DSS_FCLK on OMAP2, it's 133 Mhz according to the TRM. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* omapdss: features: fix supported outputs for OMAP4Archit Taneja2013-03-221-4/+2
| | | | | | | | | | | | | | | The support outputs struct for overlay managers is incorrect for OMAP4. Make these changes: - DPI isn't supported via the LCD1 overlay manager, remove DPI as a supported output. - the TV manager can suppport DPI, but the omapdss driver doesn't support that yet, we require some muxing at the DSS level, and we also need to configure the hdmi pll in the DPI driver so that the TV manager has a pixel clock. We don't support that yet. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: add FEAT_DPI_USES_VDDS_DSI to omap3630_dss_feat_listNeilBrown2013-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | commit 195e672a76056478cc79f5c48343164c9237852e OMAPDSS: DPI: Remove cpu_is_xxxx checks made the mistake of assuming that cpu_is_omap34xx() is exclusive of other cpu_is_* predicates whereas it includes cpu_is_omap3630(). So on an omap3630, code that was previously enabled by if (cpu_is_omap34xx()) is now disabled as dss_has_feature(FEAT_DPI_USES_VDDS_DSI) fails. So add FEAT_DPI_USES_VDDS_DSI to omap3630_dss_feat_list. Cc: Chandrabhanu Mahapatra <cmahapatra@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: export dss_feat functionsTomi Valkeinen2012-12-071-0/+6
| | | | | | Export dss_features related functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: Add overlay manager width and height limits as a dispc featureArchit Taneja2012-11-201-8/+0
| | | | | | | | | | | The overlay manager width and height vary in OMAP5 from previous OMAPs in terms of maximum limit and register field positions. Add parameters in dispc_features for these. Also remove params related to manager width and height from dss_features, as we want to maintain a feature list for individual IPs. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI: Add op to get audio DMA port address offsetRicardo Neri2012-11-061-0/+1
| | | | | | | | | It could be possible that the DMA port differs accross diferent HDMI IPs. Thus, add an IP-specific function to obtain the address offset and size of the DMA data port. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: remove <plat/cpu.h> includesTomi Valkeinen2012-10-171-1/+0
| | | | | | | cpu_is_* calls are no longer used in omapdss, so the includes for <plat/cpu.h> can be removed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI: use omapdss_versionTomi Valkeinen2012-10-161-2/+12
| | | | | | Use omapdss_version in hdmi.c to select the proper hdmi features. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: use omapdss_version in dss_features.cTomi Valkeinen2012-10-161-17/+32
| | | | | | | Pass the omapdss_version to dss_features.c and use it to select the proper dss features. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: Add writeback register offsets and dss features structsArchit Taneja2012-09-261-0/+19
| | | | | | | | | | | | | 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: OVERLAY: Add position and replication as overlay capsArchit Taneja2012-09-261-13/+25
| | | | | | | | | | | | 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: APPLY: Add manager set/unset output ops for omap_overlay_managerArchit Taneja2012-09-261-0/+71
| | | | | | | | | | | | | | Add set_output/unset_output ops for overlay managers, these form links between managers and outputs. Create a function in dss features which tell all the output instances that connect to a manager, use it when a manager tries to set an output. Add a constraint of not unsetting an output when the manager is enabled. Keep the omap_dss_device pointer and set/unset_device ops in overlay_manager for now to not break things. Keep the dss feature function get_supported_displays as it's used in some places. These will be removed later. Signed-off-by: Archit Taneja <archit@ti.com>
* Merge OMAP5 DSS changes to omapdssTomi Valkeinen2012-09-251-0/+96
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This series adds basic OMAP5 DSS functionality, mainly related to DSS core, DPI and DSI. * omap5-dss: OMAPDSS: DSI: make OMAP2_DSS_DSI depend on ARCH_OMAP5 OMAPDSS: DSI: Add code to disable PHY DCC OMAPDSS: DSI: Add new linebuffer size for OMAP5 OMAPDSS: DSI: Add FEAT_DSI_PLL_REFSEL OMAPDSS: DSI: Add FEAT_DSI_PLL_SELFREQDCO OMAPDSS: Add support for DPI source selection OMAPDSS: move dss feats to the end of dss.c OMAPDSS: Add basic omap5 features to dss and dispc OMAPDSS: DSI: improve DSI clock calcs for DISPC
| * OMAPDSS: DSI: Add code to disable PHY DCCTomi Valkeinen2012-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | OMAP5 DSI PHY has DCC (Duty Cycle Corrector) block, and by default DCC is enabled and thus the PLL clock is divided by 2 to get the DSI DDR clk. This divider has been 4 for all previous OMAPs, and changing it needs some reorganization of the code. The DCC can be disabled, and in that case the divider is back to the old 4. This patch adds dss feature for the DCC, and adds code to always disable the DCC. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * OMAPDSS: DSI: Add FEAT_DSI_PLL_REFSELTomi Valkeinen2012-09-241-0/+1
| | | | | | | | | | | | | | Add FEAT_DSI_PLL_REFSEL. OMAP5's DSI PLL needs configuration to select the reference clock to be used. We always use SYSCLK. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * OMAPDSS: DSI: Add FEAT_DSI_PLL_SELFREQDCOTomi Valkeinen2012-09-241-0/+1
| | | | | | | | | | | | | | | | Add FEAT_DSI_PLL_SELFREQDCO. OMAP5's DSI PLL has a new configuration option that needs to be programmed depending on the PLL's output clock frequency. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * OMAPDSS: Add basic omap5 features to dss and dispcArchit Taneja2012-09-241-0/+93
| | | | | | | | | | | | | | Add basic omap5 features for dss and dispc. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* | OMAPDSS: Do not require a VDDS_DSI regulator on AM35xxRaphaël Assénat2012-09-251-2/+49
|/ | | | | | | | | | | | On our AM3505 based board, dpi.c complains that there is no VDDS_DSI regulator and the framebuffer cannot be enabled. However, this check does not seem to apply to AM3505/17 chips. This patch adds new features list for AM35xxx, which is the same as for OMAP3 except the VDDS_DSI is removed. Signed-off-by: Raphael Assenat <raph@8d.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: Add DSI fclk maximum to dss_featuresTomi Valkeinen2012-09-071-0/+2
| | | | | | | Add max value of DSI functional clock to dss_features, so that DSI driver can use it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DPI: Remove cpu_is_xxxx checksChandrabhanu Mahapatra2012-08-221-0/+1
| | | | | | | | | | | | | | The OMAP3 checks have been removed and replaced by a dss feature FEAT_DPI_USES_VDDS_DSI for cleaner implementation. The patches "OMAP: DSS2: enable VDDS_DSI when using DPI" (8a2cfea8cc) by Tomi Valkeinen <tomi.valkeinen@nokia.com> and "ARM: omap: fix oops in drivers/video/omap2/dss/dpi.c" (4041071571) by Russell King <rmk+kernel@arm.linux.org.uk> had introduced these checks. As it is evident from these patches a dependency exists for some DSS pins on VDDS_DSI which is better shown by dss feature FEAT_DPI_USES_VDDS_DSI. Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: Support rotation through TILERChandrabhanu Mahapatra2012-05-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TILER is a block in OMAP4's DMM which lets DSS fetch frames in a rotated manner. Physical memory can be mapped to a portion of OMAP's system address space called TILER address space. The TILER address space is split into 8 views. Each view represents a rotated or mirrored form of the mapped physical memory. When a DISPC overlay's base address is programmed to one of these views, the TILER fetches the pixels according to the orientation of the view. A view is further split into 4 containers, each container holds elements of a particular size. Rotation can be achieved at the granularity of elements in the container. For more information on TILER, refer to the Memory Subsytem section in OMAP4 TRM. Rotation type TILER has been added which is used to exploit the capabilities of these 8 views for performing various rotations. When fetching from addresses mapped to TILER space, the DISPC DMA can fetch pixels in either 1D or 2D bursts. The fetch depends on which TILER container we are accessing. Accessing 8, 16 and 32 bit sized containers requires 2D bursts, and page mode sized containers require 1D bursts. The DSS2 user is expected to provide the Tiler address of the view that it is interested in. This is passed to the paddr and p_uv_addr parameters in omap_overlay_info. It is also expected to provide the stride value based on the view's orientation and container type, this should be passed to the screen_width parameter of omap_overlay_info. In calc_tiler_rotation_offset screen_width is used to calculate the required row_inc for DISPC. x_predecim and y_predecim are also used to calculate row_inc and pix_inc thereby adding predecimation support for TILER. Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI: Add an audio configuration functionRicardo Neri2012-05-111-0/+1
| | | | | | | | | | | | | | | | | | The generic HDMI driver does not need to know about the specific settings of a given IP. Hence, it just passes the audio configuration and the IP library parses such configuration and sets the IP accordingly. This patch introduces an IP-specific audio configuration function. Also, this patch implements the audio config function for OMAP4. The DMA, format and core config functions are no longer exposed to the generic HDMI driver as they are IP-specific. The audio configuration function caters for 16-bit through 24-bit audio samples with sample rates from 32kHz and up to 192kHz as well as up to 8 audio channels. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
* OMAPDSS: HDMI: Decouple HDMI audio from ASoCRicardo Neri2012-05-111-2/+1
| | | | | | | | Instead of having OMAPDSS HDMI audio functionality depending on the ASoC HDMI audio driver, use a new config option so that potential users, including ASoC, may select if needed. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
* OMAPDSS: HDMI: Decouple wrapper enable/disable and audio start/stopAxel Castaneda Gonzalez2012-05-111-0/+2
| | | | | | | | | | Decouple the enable/disable operation of the HDMI audio wrapper from audio start/stop. Otherwise, an audio FIFO underflow may occur. The audio wrapper enablement must be done after configuration and before audio playback is started. Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com> Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
* OMAPDSS: HDMI: Split video_enable into video_enable/disableRicardo Neri2012-05-111-0/+1
| | | | | | | | | | To improve readability, split the video_enable HDMI IP operation into two separate functions for enabling and disabling video. The video_enable function is also modified to return an error value. While there, update these operations for the OMAP4 IP accordingly. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
* OMAPDSS: HDMI: Split audio_enable into audio_enable/disableRicardo Neri2012-05-111-0/+1
| | | | | | | | | | To improve readability, split the audio_enable HDMI IP operation into two separate functions for enabling and disabling audio. The audio_enable function is also modified to return an error value. While there, update these operations for the OMAP4 IP accordingly. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
* OMAPDSS: DISPC: Clean up manager timing/size functionsArchit Taneja2012-04-231-0/+6
| | | | | | | | | | | Clean up the DISPC manager timings related function by: - Create a common function to set size for LCD and TV. - Create a common function to check timings for LCD and TV. - Add dss params to get the range of manager size. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: Fix OMAP4 supported color formatsLajos Molnar2012-03-061-1/+2
| | | | | | | | | | | | | | | | Add missing but supported color formats for GFX pipeline in dss features: RGBX16-4444, RGBA16-4444 and XRGB16-1555. In dispc_ovl_set_color_mode(): - Remove unsupported modes on GFX pipeline: YUV2 and UYVY. Replace these by missing modes supported by GFX pipelines: RGBX16-4444 and RGBA16-4444. - Fix swapped modes on VID pipelines: RGBX16-4444 and XRGB16-4444. Signed-off-by: Lajos Molnar <lajos@ti.com> Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: Add DSS feature for HDMI MCLK for audioRicardo Neri2012-02-211-0/+41
| | | | | | | | | | | | | Certain OMAP4 revisions (i.e., 4430 ES2.3, 4460, and 4470) use a pseudo clock (generated from the TMDS clock), MCLK, to drive the generation of Audio Clock Regeneration packets. Other devices (i.e., 4430 ES2.[0,2]) use the TMDS clock directly. This patch adds a new DSS feature for MCLK support. It also rearranges the omap_dss_features structures to reflect the devices supporting it. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: Features: Maintain dss_feats as a listArchit Taneja2012-02-211-39/+101
| | | | | | | | | | | | The number of dss_feat_id members has increased to a large value, the current way of assigning a subset of these features (for a particular OMAP) as a mask is no longer feasible. Maintain the subset of features supported as lists. Make the function dss_has_feature() traverse through this list. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: Add naive threshold calc for fifomergeTomi Valkeinen2012-01-251-2/+4
| | | | | | | | | | | | Take fifo merge into use by implementing a rather naive fifo merge threshold calculation: keep the low threshold always the same, but increase the high threshold when fifo merge is used. This should greatly increase the time between pixel data fetches from SDRAM, as the usable fifo size is much larger. However, it probably won't help for fifo underflows, as the low threshols is kept the same. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: FEAT: Add FIFO_MERGE featureTomi Valkeinen2012-01-251-4/+5
| | | | | | | | | | Add feature flag for fifo merge. OMAP2 doesn't contain fifo merge, later OMAPs do. dispc_enable_fifomerge() checks for the flag when called, and gives a WARN if fifo merge is being enabled when it is not supported. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI: Create function to enable HDMI audioRicardo Neri2012-01-051-0/+4
| | | | | | | | | | | In order to separate clearly IP-specific code from general DSS code, a function for OMAP4 audio enable is created. This function is included in the HDMI IP ops to align with the current implementation of the DSS HDMI driver. This function is to be used by the ASoC HDMI audio codec. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: Update Scaling Clock LogicChandrabhanu Mahapatra2012-01-021-0/+7
| | | | | | | | | | | | | | | | | | | Clock requirements for scaling in OMAP2, OMAP3 and OMAP4 are different. In OMAP2 and OMAP3 the required clock rate is a function of pixel clock, vertical downscale ratio and horizontal downscale ratio whereas in OMAP4 it is a function of pixel clock and horizontal downscale ratio only. Selection of 3-tap vs 5-tap coefficients depends on clock rate line buffer width in OMAP3 whereas in OMAP4 it is independent of clock rate and line buffer width. In OMAP2 3-tap for vertical and 5-tap for horizontal scaling is used. In OMAP4 5-tap is used both for horizontal and vertical scaling for better performance. Also, the number and width of line buffers differs in OMAP3 and OMAP4. So, clock functions have been fined tuned for OMAP3 and support has been added added for OMAP4. This code has been tested on OMAP2, OMAP3 and OMAP4, and scaling issues due to clock errors have been resolved. Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: DISPC: VIDEO3 pipeline supportArchit Taneja2011-10-031-2/+16
| | | | | | | | | | | Add support for VIDEO3 pipeline on OMAP4: - Add VIDEO3 pipeline information in dss_features and omapdss.h - Add VIDEO3 pipeline register coefficients in dispc.h - Create a new overlay structure corresponding to VIDEO3. - Make changes in dispc.c for VIDEO3 Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility settingArchit Taneja2011-10-031-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On OMAP3, in order to enable alpha blending for LCD and TV managers, we needed to set LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits in DISPC_CONFIG. On OMAP4, alpha blending is always enabled by default, if the above bits are set, we switch to an OMAP3 compatibility mode where the zorder values in the pipeline attribute registers are ignored and a fixed priority is configured. Rename the manager_info member "alpha_enabled" to "partial_alpha_enabled" for more clarity. Introduce two dss_features FEAT_ALPHA_FIXED_ZORDER and FEAT_ALPHA_FREE_ZORDER which represent OMAP3-alpha compatibility mode and OMAP4 alpha mode respectively. Introduce an overlay cap for ZORDER. The DSS2 user is expected to check for the ZORDER cap, if an overlay doesn't have this cap, the user is expected to set the parameter partial_alpha_enabled. If the overlay has ZORDER cap, the DSS2 user can assume that alpha blending is already enabled. Don't support OMAP3 compatibility mode for now. Trying to read/write to alpha_blending_enabled sysfs attribute issues a warning for OMAP4 and does not set the LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits. Change alpha_enabled to partial_alpha_enabled in the omap_vout driver. Use overlay cap "OMAP_DSS_OVL_CAP_GLOBAL_ALPHA" to check if overlay supports alpha blending or not. Replace this with checks for VIDEO1 pipeline. Cc: linux-media@vger.kernel.org Cc: Lajos Molnar <molnar@ti.com> Signed-off-by: Archit Taneja <archit@ti.com> Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: HDMI: Add support to dump registers through debugfsMythri P K2011-09-301-0/+5
| | | | | | | | | Add support to dump the HDMI wrapper, core, PLL and PHY registers through debugfs. Signed-off-by: Mythri P K <mythripk@ti.com> [tomi.valkeinen@ti.com: updated the description] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAPDSS: FEATURES: Create a range param to get max downscalingArchit Taneja2011-09-301-0/+3
| | | | | | | | | Create a dss_range_param member called FEAT_PARAM_DOWNSCALE to get the maximum downscaling possible on the current platform. Use this in dispc_ovl_calc_scaling(). Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: HDMI: implement detect()Tomi Valkeinen2011-09-301-0/+1
| | | | | | | | | | | Implement detect() by checking the hot plug detect status. The implementation is not very good, as it always turns on the HDMI output to get the detection working. HDMI driver needs improvements so that we could enable only core parts of it. Cc: Mythri P K <mythripk@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: DISPC: Fix minimum PCD valueTomi Valkeinen2011-09-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | The current driver had a hardcoded minimum value of 2 for pixel clock divisor (PCD). This doesn't seem to be right. OMAP4 TRM says that PCD can be 1 when not downscaling, and inverted pixel clock (IPC) is off. OMAP3 TRM says the same, but also in the register descriptions that PCD value 1 is invalid. OMAP2 TRM says PCD 2 is the minimum. OMAP2 is still untested, but for both OMAP3 and OMAP4 PCD of 1 seems to work fine. This patch adds a new DSS feature, FEAT_PARAM_DSS_PCD, which is used to find the minimum and maximum PCD. The minimum is set to 2 for OMAP2, and 1 for OMAP3/4. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP4: DSS2: HDMI: Function pointer approach to callMythri P K2011-09-301-0/+20
| | | | | | | | | | | | | | | | | HDMI IP fundamentally has replaceable core PHY and PLL blocks. These blocks might vary across OMAP's but the end functionality such as to enable or disable PLL, PHY, function to read EDID would remain the same. Thus to make the current hdmi DSS driver compatible with different OMAP's having different IP blocks( A combination of different core, PHY, PLL blocks), function pointer approach is introduced. With function pointer, relevant IP dependent functions are mapped to the generic functions used by DSS during the initialization based on the OMAP compiled. Thus making hdmi DSS driver IP agnostic. Signed-off-by: Mythri P K <mythripk@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
* OMAP: DSS2: Add GLOBAL_ALPHA & PRE_MULT_ALPHA to ovl capsTomi Valkeinen2011-09-301-12/+15
| | | | | | | | | | | | | Add OMAP_DSS_OVL_CAP_GLOBAL_ALPHA and OMAP_DSS_OVL_CAP_PRE_MULT_ALPHA to overlay capabilities. Use these instead of FEAT_GLOBAL_ALPHA, FEAT_GLOBAL_ALPHA_VID1 and FEAT_PRE_MULT_ALPHA in code. Remove FEAT_GLOBAL_ALPHA_VID1 and FEAT_PRE_MULT_ALPHA which are no longer used. FEAT_GLOBAL_ALPHA is still used to decide if the HW has global alpha register. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Archit Taneja <archit@ti.com>
* OMAP: DSS2: Add overlay caps to DSS featuresTomi Valkeinen2011-09-301-0/+55
| | | | | | | | Add support to define overlay capabilities into dss_features. The features are set to overlay->caps at initialization time. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Archit Taneja <archit@ti.com>
OpenPOWER on IntegriCloud