aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/dpi.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-15drm: omapdrm: dpi: Remove unneeded regulator checkLaurent Pinchart1-10/+3
The dpi_display_enable() function ensures that a VDDS_DSI regulator is available if the DSI uses the VDDS_DSI supply. This is not needed, as a failure to get the VDDS_DSI supply will result in a probe failure, dpi_display_enable() will thus never be called in that case. Remove the check, and replace tests for the FEAT_DPI_USES_VDDS_DSI feature with a test for the regulator object. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-06-02drm/omap: dpi: remove legacy data_linesTomi Valkeinen1-13/+0
Remove DPI's legacy data_lines code. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm: omapdrm: dpi: Remove platform driverLaurent Pinchart1-93/+0
The DPI platform driver was used for non-DT platforms only. On DT platforms the DPI port is handled manually. As OMAP display devices are now instantiated from DT only, remove the DPI platform driver. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-04-06drm: omap: use common OF graph helpersRob Herring1-1/+1
The OMAP driver has its own OF graph helpers that are similar to the common helpers. This commit replaces most of the calls with the common helpers. There's still a couple of custom helpers left, but the driver needs more extensive changes to get rid of them. In dss_init_ports, we invert the loop, looping through the known ports and matching them to DT nodes rather than looping thru DT nodes and matching them to the ports. Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Sean Paul <[email protected]>
2017-04-03drm/omap: improve DPI clock selection on DRA7xxTomi Valkeinen1-10/+40
The clock source selection for the LCD outputs is too hardcoded at the moment. For example, LCD3 is set to use PLL2_1, and PLL2 doesn't exist on DRA72x SoCs. There are quite many ways to configure the clocks, even using HDMI PLL for LCD outputs, but enabling full configuration of the clocks is rather tricky. This patch improves the situation a bit by checking if the PLL about to be used exists, and if not, tries another one. Signed-off-by: Tomi Valkeinen <[email protected]>
2017-04-03drm/omap: remove divider constraint from hsdivTomi Valkeinen1-8/+0
The driver only uses even dividers for hsdiv when pclk >= 100MHz, as odd dividers can create uneven duty cycle. However, while this holds true for some dividers like DISPC's LCK and PCK dividers, it is not actually true for hsdiv. hsdiv always produces even duty cycle, so the constraint can be removed. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]>
2016-11-02drm/omap: Use consistent name for struct videomodePeter Ujfalusi1-19/+19
Use 'vm' to refer to a struct videomode instead of 'p', 't', 'timings' or something else. The code will be easier to follow if we use consistent names. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: Replace struct omap_video_timings with videomodePeter Ujfalusi1-5/+5
omap_video_timings can be replaced with the generic videomode in omapdrm and the omap_video_timings can be removed. This patch will replace the omap_video_timings with videomode. With the change we no longer need the functions to convert to/from videomode and drm_display_mode to omap_video_timings, these can be removed as well. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: Change the types of struct omap_video_timings membersPeter Ujfalusi1-1/+1
omap_video_timings struct have the same members as struct videomode, but their types are different. As first step change the types of the omap_video_timings struct members to match their counterpart in struct videomode to catch any type cast related issues. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename x_res to hactivePeter Ujfalusi1-1/+1
In preparation to move the stack to use the generic videmode struct for display timing information rename the x_res member to hactive. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-06-07Merge omapdss header refactoringTomi Valkeinen1-2/+1
Merge omapdss public header refactoring, which separates the public header into omapdrm and omapfb parts.
2016-06-03drm/omap: Do not include video/omapdss.h directly in driversPeter Ujfalusi1-2/+1
All drivers to include the omapdrm/dss/omapdss.h header file. This header includes the <video/omapdss.h> Signed-off-by: Peter Ujfalusi <[email protected]>
2016-05-19drm/omap: DPI: rename "DSI" related namesTomi Valkeinen1-22/+22
Originally DSS only had DSI PLLs, and thus the DPI driver has functions and variables that refer to DSI or DSI PLL. Now we support DSI, VIDEO and HDMI PLLs, so it's time to remove the DSI references from the code. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-19drm/omap: support type B PLL for DPITomi Valkeinen1-9/+22
Type A and B PLLs require a bit different calculations for the clock rates. DPI driver supports only type A PLLs. This patch adds support for the type B PLL. Type B PLLs are simpler than type A, as type B can produce a good clock for almost any rate. Thus we can just ask it to produce the pixel clock and use one as LCK and PCK dividers. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-19drm/omap: rename PLL calc functionsTomi Valkeinen1-2/+2
Add a "_a" postfix to the type A PLL calc functions, to differentiate them from the type B PLL calculations which we will add shortly. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-19drm/omap: fix DPI clkout index handlingTomi Valkeinen1-6/+6
DPI driver uses a fixed clkout index, 0. This has worked fine as the first clkout is usually used. To generalize the code and to support additional clock sources, change the code to use dss_pll_get_clkout_idx_for_src() to get the clkout index. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-19drm/omap: cleanup DPI clock source handlingTomi Valkeinen1-30/+18
We can clean up the DPI driver's clock source handling by using the dss_clk_source instead of only a dss_pll pointer. This will also make it possible to use additional clock sources, like PLL1_3 or HDMI_PLL, which the code did not support earlier. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-19drm/omap: clean up the LCD clk mux codeTomi Valkeinen1-4/+0
The code to set the clock muxes for DISPC's LCD clock inputs is very confusing. Especially on DRA7, there's an additional clock muxing that needs to be done, which at the moment is done in dpi.c using dss_ctrl_pll_set_control_mux(). Clean this all up by: - Using dss_clk_source instead of dss_pll_id, as dss_pll_id doesn't specify the clock source quite correctly. - Splitting the dss_select_lcd_clk_source() up into DSS version specific helper functions. - Using dss_ctrl_pll_set_control_mux() from the helper functions, so that dpi.c doesn't have to call it. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-19drm/omap: rename dss_clk_source enumsTomi Valkeinen1-5/+5
The names of the enum dss_clk_source's values are legacy names, only correct for OMAP3 DSS. Rename the names to more generic ones. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-19drm/omap: rename omap_dss_clk_sourceTomi Valkeinen1-1/+1
'enum omap_dss_clk_source' is internal to dss. Let's rename it to 'dss_clk_source' match our naming convention. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: DPI: remove uses of omap_overlay_managerTomi Valkeinen1-20/+20
We are removing the uses of 'struct omap_overlay_manager'. This patch changes DPI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: remove extra manager checks on disconnectTomi Valkeinen1-2/+1
The DSS output drivers check 'dssdev->manager' in disconnect() functions. This check is not needed as the manager must always be set if the output device was connected. Remove the check. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: remove extra check in dpi and sdiTomi Valkeinen1-1/+1
Both dpi and sdi check for 'mgr != NULL' in check_timings. This check is not necessary, as mgr must always be set before check_timings. Remove the check. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_disable to accept omap_channelTomi Valkeinen1-1/+1
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_enable to accept omap_channelTomi Valkeinen1-1/+1
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_enable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_set_lcd_config to accept omap_channelTomi Valkeinen1-1/+1
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_set_lcd_config() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_set_timings to accept omap_channelTomi Valkeinen1-1/+1
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_set_timings() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_disconnect to accept omap_channelTomi Valkeinen1-2/+2
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disconnect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_connect to accept omap_channelTomi Valkeinen1-1/+1
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_connect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: use dispc_channel_connected in output driversTomi Valkeinen1-1/+1
Use 'out->dispc_channel_connected' to check if the device is connected to an overlay manager or not, instead of using 'out->manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: verify that display x-res is divisible by 8Tomi Valkeinen1-0/+3
DISPC requires the x resolution to be divisible by 8 when stall mode is not used. Add a check to the DPI driver to verify this. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]>
2015-12-29drm/omap: move omapdss & displays under omapdrmTomi Valkeinen1-0/+899
Now that omapfb has its own copy of omapdss and display drivers, we can move omapdss and display drivers which omapdrm uses to omapdrm's directory. We also need to change the main drm Makefile so that omapdrm directory is always entered, because omapdss has a file that can't be built as a module. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Rob Clark <[email protected]>