aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-08-10OMAPDSS: Fix omap_dss_find_output_by_port_node() port refcount decrementJyri Sarha1-1/+1
Fix omap_dss_find_output_by_port_node() port parameter refcount decrementation. The only user of dss_of_port_get_parent_device() function is omap_dss_find_output_by_port_node() and it assumes the refcount of the port parameter is not decremented by the call. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-08-10OMAPDSS: Fix node refcount leak in omapdss_of_get_next_port()Jyri Sarha1-0/+2
Fix node refcount leak in omapdss_of_get_next_port(). Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-07-02OMAPDSS: fix probing if rfbi device is enabledTomi Valkeinen1-0/+9
After the commit 736e60ddc215b85e73bbf7da26e1cde84cc9500f ("OMAPDSS: componentize omapdss") the dss core device will wait until all the subdevices have been successfully probed. However, we don't have a working driver for RFBI, so if RFBI device exists, omapdss will never get probed. All the .dtsi files set RFBI as disabled, except am4372.dtsi. This causes omapdss probe to not finish on AM4 devices. This patch makes omapdss driver skip adding rfbi device as a subcomponent, solving the issue. This should be reverted when we have a working RFBI driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Felipe Balbi <balbi@ti.com>
2015-06-22Merge omapdss scaling fixesTomi Valkeinen3-16/+116
2015-06-17OMAPDSS: HDMI: wait for framedone when stopping videoTomi Valkeinen1-0/+16
At the moment when HDMI video output is stopped, we just clear the enable bit and return. While it's unclear if this can cause any issues, I think it's still better to wait for FRAMEDONE interrupt after clearing the enable bit so that we're sure the HDMI IP has finished. As we don't have any ready-made irq handling for HDMI, and this only needs to be done when disabling the HDMI output, this patch implements a simple loop with sleep, polling the FRAMEDONE bit. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: HDMI4: fix error handlingTomi Valkeinen1-1/+1
Error handling in hdmi_power_on_full() is not correct, and could leave resources unfreed. Fix this by arranging the error labels correctly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: DISPC: scaler debug printTomi Valkeinen1-2/+16
Improve the DISPC debug print for scaling. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: DISPC: do only y decimation on OMAP3Tomi Valkeinen1-11/+2
The current driver does both x and y decimation on OMAP3 DSS. Testing shows that x decimation rarely works, leading to underflows. The exact reason for this is unclear, as the underflows seem to happen even with low pixel clock rates, and I would presume that if the DSS can manage a display with 140MHz pixel clock, it could manage x decimation with factor 2 with a low pixel clock (~30MHz). So it is possible that there is a problem somewhere else, in memory management, or DSS DMA, or similar. I have not found anything that would help this. So, to fix the downscaling scaling, this patch removes x decimation for OMAP3. This will limit some of the more demanding downscaling scenarios, but one could argue that using DSS to downscale such a large amount is insane in the first place, as the produced image is rather bad quality. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: DISPC: check if scaling setup failedTomi Valkeinen1-0/+10
The DISPC's scaling code seems to presume that decimation always succeeds, and so we always do find a suitable downscaling setup. However, this is not the case, and the algorithm can fail. When that happens, the code just proceeds with wrong results, causing issues later. Add the necessary checks to bail out if the scaling algorithm failed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: DISPC: fix 64 bit issue in 5-tapTomi Valkeinen1-3/+3
The DISPC driver uses 64 bit arithmetic to calculate the required clock rate for scaling. The code does not seem to work correctly, and instead calculates with 32 bit numbers, giving wrong result. Fix the code by typecasting values to u64 first, so that the calculations do happen in 64 bits. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: DISPC: fix row_inc for OMAP3Tomi Valkeinen1-0/+9
pixel_inc and row_inc work differently on OMAP2/3 and OMAP4+ DSS. On OMAP2/3 DSS, the pixel_inc is _not_ added by the HW at the end of the line, after the last pixel, whereas on OMAP4+ it is. The driver currently works for OMAP4+, but does not handle OMAP2/3 correctly, which leads to tilted image when row_inc is used. This patch adds a flag to DISPC driver so that the pixel_inc is added when required. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: DISPC: add check for scaling limitsTomi Valkeinen1-0/+15
On OMAP3/AM43xx some scaling factors cause underflows/synclosts. After studying this, I found that sometimes the driver uses three-tap scaling with downscaling factor smaller than x0.5. This causes issues, as x0.5 is the limit for three-tap scaling. The driver has FEAT_PARAM_DOWNSCALE parameter, but that seems to be for five-tap scaling, which allows scaling down to x0.25. This patch adds checks for both horizontal and vertical scaling. For horizontal the HW always uses 5 taps, so the limit is x0.25. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: DISPC: fix check_horiz_timing_omap3 argsTomi Valkeinen1-2/+2
After calculating the required decimation for scaling, the dispc driver checks once more if the resulting configuration is valid by calling check_horiz_timing_omap3(). Earlier calls to this function have correctly used in_width and in_height as parameters, but the last call uses width and height. This causes the driver to possibly reject scaling that would work. This patch fixes the parameters. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: DISPC: fix predecimation for YUV modesTomi Valkeinen1-0/+36
DISPC needs even input buffer width for YUV modes. The DISPC driver doesn't check this at the moment (although omapdrm does), but worse, when DISPC driver does x predecimation the result may be uneven. This causes sometimes sync losts, underflows, or just visual errors. This patch makes DISPC driver return an error if the user gives uneven input width for a YUV buffer. It also makes the input width even in case of predecimation. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17OMAPDSS: DISPC: work-around for errata i631Tomi Valkeinen1-0/+9
Errata i631 description: "When in YUV4:2:0 format in 1D burst, the DISPC DMA skips lines when fetching Chroma sampling." Workaround: "If YUV4:2:0-1D burst is required: Set DISPC_VIDp_ATTRIBUTES[22]DOUBLESTRIDE to 0x0 and DISPC_VIDp_ATTRIBUTES[13:12]ROTATION to 0x1 or 0x3" The description is somewhat confusing, but testing has shown that DSS fetches extra rows from memory when using NV12 format in 1D mode. If the memory after the framebuffer is inaccessible, this leads to OCP errors. The driver always uses DOUBLESTRIDE=0 when using 1D mode, so we only need to handle the ROTATION part. The issue exist on all OMAP4 and OMAP5 based DSS IPs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-17Merge omapdss componentization workTomi Valkeinen11-198/+396
2015-06-17OMAPDSS: simplify submodule reg/unreg codeTomi Valkeinen1-31/+15
Now that we are using components in omapdss, there's no need for separate handling of dss and dispc driver init. Thus we can move the dss and dispc init and unit func pointers to the lists we use for the other dss submodules. We can now also handle errors returned by the registration functions properly: if registering a driver fails, we can stop processing and return the error. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-06-17OMAPDSS: componentize omapdssTomi Valkeinen9-38/+234
omapdss kernel module contains drivers for multiple devices, one for each DSS submodule. The probing we have at the moment is a mess, and doesn't give us proper deferred probing nor ensure that all the devices are probed before omapfb/omapdrm start using omapdss. This patch solves the mess by using the component system for DSS submodules. The changes to all DSS submodules (dispc, dpi, dsi, hdmi4/5, rfbi, sdi, venc) are the same: probe & remove functions are changed to bind & unbind, and new probe & remove functions are added which call component_add/del. The dss_core driver (dss.c) acts as a component master. Adding and matching the components is simple: all dss device's child devices are added as components. However, we do have some dependencies between the drivers. The order in which they should be probed is reflected by the list in core.c (dss_output_drv_reg_funcs). The drivers are registered in that order, which causes the components to be added in that order, which makes the components to be bound in that order. This feels a bit fragile, and we probably should improve the code to manage binds in random order. However, for now, this works fine. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-06-17OMAPDSS: reorder uninit callsTomi Valkeinen1-12/+12
We have a list of function pointers to dss submodule uninit functions. It makes sense to do the uninit in the reverse order to init, but that is not currently the case. This patch reorders the uninit calls to be the reverse of init order. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-06-17OMAPDSS: remove uses of __init/__exitTomi Valkeinen10-69/+69
The following patches will add component handling to omapdss, improving the handling of deferred probing. However, at the moment we're using quite a lot of __inits and __exits in the driver, which prevent normal dynamic probing and removal. This patch removes most of the uses of __init and __exit, so that we can register drivers after module init, and so that we can unregister drivers even if the module is built-in. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-06-17OMAPDSS: fix dss_init_ports error handlingTomi Valkeinen1-3/+6
The return value of dss_init_ports() is not handled at all, causing crashes later if the call failed. This patch adds the error handling, and we also move the call to a slightly earlier place to make bailing out easier. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-06-17OMAPDSS: refactor dss probe functionTomi Valkeinen1-56/+69
Refactor dss probe function by extracting the setup for video plls into a separate function. The call to this function is also moved to a slightly earlier phase, so that in error case we can bail out more easily. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-06-17OMAPDSS: move 'dss_initialized' to dss driverTomi Valkeinen2-10/+12
We have a flag, 'dss_initialized', which tells omapfb and omapdrm if omapdss is available. At the moment it can be set even if the dss submodules are not all ready, in case something gets deferred. Move the flag to dss_core driver so that it'll signal the availability of the dss drivers move accurately. For now, it'll signal that dss_core is ready, which is not quite correct but still better than previously. The following patches will add component system to omapdss, and after those patches 'dss_initialized' will signal that all the submodules are ready. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2015-06-12fbdev: omap2: remove potential format string leakKees Cook1-1/+1
Since kobject_init_and_add takes a format string, make sure that the passed in name cannot be accidentally parsed. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-03ASoC: omap-hdmi-audio: Force channel allocation only for OMAP4Misael Lopez Cruz1-0/+7
There is a constraint in the OMAP4 HDMI IP that requires to use the 8-channel code when transmitting more than two channels. The constraint doesn't apply for OMAP5 so don't force the channel allocation in the sound driver as it can be done specifically for OMAP4 later in the hdmi4 core. Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Mark Brown <broonie@kernel.org>
2015-06-03OMAPDSS: HDMI5: Fix AUDICONF3 bitfield offsetsMisael Lopez Cruz1-1/+3
Downmix inhibit in HDMI_CORE_FC_AUDICONF3 register is in bit 4 while CEA861_AUDIO_INFOFRAME_DB5_DM_INH sets bit 7. Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-03OMAPDSS: HDMI5: Set valid sample orderMisael Lopez Cruz1-0/+1
As per TRM, HDMI_WP_AUDIO_CFG[2] LEFT_BEFORE = 0 is reserved, so it must always be set to 1 (the first sample is the left). Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-03OMAPDSS: HDMI4: Set correct CC for 8-channels layoutMisael Lopez Cruz1-1/+4
OMAP4 HDMI IP uses the 8-channel layout with 8-channel speaker allocation mask when transmitting more than two channels. But the channel count field (CC) of the Audio InfoFrame's DB1 is not updated for 8-channels. As per HDMI Compliance Test 7.31 "Audio InfoFrame", CC = 7 is required for 8-channels CA masks (0x13 and 0x1F). Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-06-03fbdev: omap2: improve usage of gpiod APIUwe Kleine-König4-30/+11
Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Also make use of gpiod_get*_optional where applicable. Apart from simplification of the affected drivers this is another step towards making the flags argument to gpiod_get*() mandatory. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-04-20Merge tag 'fbdev-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linuxLinus Torvalds16-25/+166
Pull fbdev updates from Tomi Valkeinen: "Small fixes and improvements to various fbdev drivers" * tag 'fbdev-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (24 commits) omapdss: extend pm notifier to handle hibernation OMAPDSS: Correct video ports description file path in DT binding doc OMAPDSS: disable VT switch fbdev: sh_mobile_lcdc: Fix destruction of uninitialized mutex video: fbdev: sh_mobile_lcdcfb: Fix ROP3 sysfs attribute parsing fbdev: pm3fb: cleanup some confusing indenting hyperv: hyperv_fb: match wait_for_completion_timeout return type video: fbdev: use msecs_to_jiffies for time conversions fbdev: via/via_clock: fix sparse warning video: fbdev: make of_device_id array const fbdev: sm501fb: use memset_io OMAPDSS: workaround for MFLAG + NV12 issue OMAPDSS: Add support for MFLAG OMAPDSS: setup default fifo thresholds OMAPDSS: DISPC: lock access to DISPC_CONTROL & DISPC_CONFIG OMAPDSS: DISPC: fix div by zero issue in overlay scaling OMAPDSS: DISPC: change sync_pclk_edge default value OMAPDSS: change signal_level & signal_edge enum values OMAPDSS: DISPC: explicit handling for sync and de levels OMAPDSS: DISPC: remove OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES ...
2015-04-20omapdss: extend pm notifier to handle hibernationGrygorii Strashko1-0/+4
Add handling of missed events in omap_dss_pm_notif which are needed to support hibernation (suspend to disk). Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-04-20OMAPDSS: disable VT switchTomi Valkeinen1-0/+3
We don't need VT switch when suspending/resuming, so disable it. This speeds up suspend/resume. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: NeilBrown <neil@brown.name>
2015-03-25Merge tag 'of-graph-for-4.0' of git://git.pengutronix.de/git/pza/linux into for-nextRob Herring1-6/+1
Pull of-graph helpers from Philipp Zabel: of: Add of-graph helpers to loop over endpoints and find ports by id This series converts of_graph_get_next_endpoint to decrement the refcount of the passed prev parameter. This allows to add a for_each_endpoint_of_node helper macro to loop over all endpoints in a device tree node. The of_graph_get_port_by_id function is added to retrieve a port by its known port id (contained in the reg property) from the device tree.
2015-02-26OMAPDSS: workaround for MFLAG + NV12 issueTomi Valkeinen1-1/+11
It was found that having two displays enabled and having an NV12 overlay on one of the displays will cause underflows/synclosts. Debugging this pointed to some issue with MFLAG. It is unclear why this issue is happening, but it looks like there is a HW bug related to MFLAG and FIFO management. Disabling MFLAG makes this issue go away, but then we lose the benefit of MFLAG. Also forcing MFLAG always on makes the issue go away. Also, using certain values for MFLAG_START, MFLAG thresholds and PRELOAD makes the issue go away, but there was no obvious logic to which values work and which don't. As a workaround until more information about this is found, force MFLAG always on to make NV12 usable. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26OMAPDSS: Add support for MFLAGTomi Valkeinen1-0/+50
OMAP5 has support for MFLAG feature, which allows DSS to dynamically increase the priority of DISPC's DMA traffic. At the moment we don't have support for it. It was noticed that on DRA7 with high bandwidth use cases we see FIFO underflows. Implementing MFLAG support removed those underflows. Interestingly, on OMAP5 uEVM no such overflows were seen. This patch adds a simple MFLAG implementation, where we use a fixed MFLAG threshold value based on the FIFO size. The thresholds are set to 4/8 of fifo size for low threshold, and 5/8 of fifo size for high threshold. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26OMAPDSS: setup default fifo thresholdsTomi Valkeinen1-0/+15
At the moment we don't setup FIFO thresholds by default in omapdss. It's supposed to be done by the user of omapdss. And that is missing from omapdrm, causing unoptimal thresholds to be used when using omapdrm. While I believe it's in theory better to allow the user of omapdss to setup the fifo thresholds, in practice we always use the same values, and we could as well setup the thresholds in omapdss. Furthermore, in omapdss init we always swap the FIFO used for GFX and WB overlays, but we don't swap the FIFO thresholds for those overlays (which is the reason for omapdrm using unoptimal HW reset values). So it would make sense to setup the thresholds to account for the swapping of the FIFOs. So, this patch adds code to setup default FIFO tresholds at omapdss init. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26OMAPDSS: DISPC: lock access to DISPC_CONTROL & DISPC_CONFIGTomi Valkeinen1-0/+14
Dispc driver presumes that the callers handle locking for all normal functions. However, omapdrm doesn't handle this, and presumes that all overlay manager registers are private to that overlay manager, and thus presumes that configurations for overlay managers can be written via different threads freely. For many registers the above is true. The exceptions are DISPC_CONTROL and DISPC_CONFIG registers, which contain bits for both LCD and TV overlay managers. Fixing this properly in omapdrm means a big omapdrm rewrite. So, for now, add locking to dispc for the problematic registers. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Somnath Mukherjee <somnath@ti.com>
2015-02-26OMAPDSS: DISPC: fix div by zero issue in overlay scalingTomi Valkeinen1-0/+5
omapdrm doesn't always configure the overlays correctly, causing the overlay setup functions to be called with zero timings. This leads to division by zero error. This happens, for example, when a HDMI cable is not connected, but a user tries to setup a plane with scaling. Fixing omapdrm is a big job, so for now let's check for the bad timings in DISPC and return an error. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26OMAPDSS: DISPC: change sync_pclk_edge default valueTomi Valkeinen1-3/+1
The common 'struct videomode' does not have a flag to select when the sync signals should be driven. The default behavior of DISPC HW is to drive the sync signal on the opposite pixel clock edge from data signal, which is also what the videomode_to_omap_video_timings() uses. However, it looks like what panels usually expect is that the data and sync signals are driven on the same edge, so let's change videomode_to_omap_video_timings() to set the sync_pclk_edge accordingly. Note that this only affect panels drivers that use videomode_to_omap_video_timings(), probably when getting the video timings directly from DT data. The drivers can still configure the sync_pclk_edge independently if they so wish. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26OMAPDSS: DISPC: explicit handling for sync and de levelsTomi Valkeinen1-4/+37
When configuring the lcd timings, instead of writing enum values directly to the HW, use switch-case to get the value to be programmed. This is safer and also allows us to change the enum values. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26OMAPDSS: DISPC: remove OMAPDSS_DRIVE_SIG_OPPOSITE_EDGESTomi Valkeinen11-18/+16
DISPC can drive data lines either on rising or falling pixel clock edge, which can be configured by the user. Sync lines can also be driven on rising or falling pixel clock edge, but additionally the HW can be configured to drive the sync lines on opposite clock edge from the data lines. This opposite edge setting does not make any sense, as the same effect can be achieved by just setting the sync lines to be driven on the other edge compared to the data lines. It feels like some kind of backward compatibility option, even if all DSS versions seem to have the same implementation. To simplify the code and configuration of the signals, and to make the dispc timings more compatible with what is used on other platforms, let's just remove the whole opposite-edge support. The drivers that used OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES setting are changed so that they use the opposite setting from the data edge. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26OMAPDSS: TFP410: fix input sync signalsTomi Valkeinen1-0/+11
TFP410 requires that DE is active high and the data and syncs are driven on rising pixel clock edge. However, at the moment the driver doesn't request such syncs, and the end result is that the sync settings depend on default values, which are not right in all cases. Set the sync values explicitly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-26OMAPDSS: fix paddr check for TILER addressesTomi Valkeinen1-1/+1
The DISPC driver checks that the buffer address is not 0. However, when using TILER, the address space is TILER specific and 0 is a valid address. Fix the check to allow address of 0 for TILER. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
2015-02-26OMAPDSS: fix regression with display sysfs filesTomi Valkeinen1-84/+95
omapdss's sysfs directories for displays used to have 'name' file, giving the name for the display. This file was later renamed to 'display_name' to avoid conflicts with i2c sysfs 'name' file. Looks like at least xserver-xorg-video-omap3 requires the 'name' file to be present. To fix the regression, this patch creates new kobjects for each display, allowing us to create sysfs directories for the displays. This way we have the whole directory for omapdss, and there will be no sysfs file clashes with the underlying display device's sysfs files. We can thus add the 'name' sysfs file back. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by: NeilBrown <neilb@suse.de>
2015-02-25OMAPDSS: HDMI5: Increase DDC SDA-HOLD timeTomi Valkeinen1-1/+1
It has been observed that the current SDA-HOLD time is too short for some board/cable/monitor combinations. Increase the SDA-HOLD time to 1000ns. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-25OMAPDSS: fix AM43xx minimum pixel clock dividerTomi Valkeinen1-1/+1
AM43xx supports pixel clock divider of 1, just like all OMAP3+ SoCs. Fix the minimum divider value. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-23of: Decrement refcount of previous endpoint in of_graph_get_next_endpointPhilipp Zabel1-6/+1
Decrementing the reference count of the previous endpoint node allows to use the of_graph_get_next_endpoint function in a for_each_... style macro. All current users of this function that pass a non-NULL prev parameter (that is, soc_camera and imx-drm) are changed to not decrement the passed prev argument's refcount themselves. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04omapfb: Return error code when applying overlay settings failsPeter Meerwald1-2/+5
the check of the return code is missing, user space does not get notified about the error condition: omapdss OVERLAY error: overlay 2 horizontally not inside the display area (403 + 800 >= 800) omapdss APPLY error: failed to apply settings: illegal configuration. Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04OMAPDSS: DPI: DRA7xx supportTomi Valkeinen1-0/+26
Add support for DRA7xx DPI output. DRA7xx has three DPI outputs, each of which gets its input from a DISPC channel. However, DRA72x has only one video PLL, and DRA74x has two video PLLs. In both cases the video PLLs need to be shared between multiple outputs. The driver doesn't handle this at the moment. Also, DRA7xx requires configuring CONTROL module bits to route the clock from the PLL to the used DISPC channel. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-02-04OMAPDSS: HDMI: Add DRA7xx supportTomi Valkeinen3-0/+7
Add support for DRA7xx to the HDMI driver. The HDMI block on DRA7xx is the same as on OMAP5, except we need to enable and disable the HDMI PLL via the CONTROL module. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>