summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss
AgeCommit message (Collapse)Author
2016-08-12Revert "gpu: drm: omapdrm: dss-of: add missing of_node_put after calling ↵Peter Chen
of_parse_phandle" This reverts commit 2ab9f5879162499e1c4e48613287e3f59e593c4f Author: Peter Chen <peter.chen@nxp.com> Date: Fri Jul 15 11:17:03 2016 +0800 gpu: drm: omapdrm: dss-of: add missing of_node_put after calling of_parse_phandle The of_get_next_parent will drop refcount on the passed node, so the reverted patch is wrong, thanks for Tomi Valkeinen points it. Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1470908694-16362-1-git-send-email-peter.chen@nxp.com
2016-07-19Merge remote-tracking branch 'airlied/drm-next' into topic/drm-miscDaniel Vetter
Backmerge drm-next to be able to apply Chris' connector_unregister_all cleanup (need latest i915 and sun4i state for that). Also there's a trivial conflict in ttm_bo.c that git rerere fails to remember. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-07-15gpu: drm: omapdrm: dss-of: add missing of_node_put after calling ↵Peter Chen
of_parse_phandle of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
2016-07-02Back-merge tag 'v4.7-rc5' into drm-nextDave Airlie
Linux 4.7-rc5 The fsl-dcu pull needs -rc3 so go to -rc5 for now.
2016-06-09drm/omap: fix unused variable warning in dsi & hdmiTomi Valkeinen
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-06-07drm/omapdrm: Workaround for errata i734 (LCD1 Gamma) in DSS dispcJyri Sarha
Workaround for errata i734 in DSS dispc - LCD1 Gamma Correction Is Not Working When GFX Pipe Is Disabled For gamma tables to work on LCD1 the GFX plane has to be used at least once after DSS HW has come out of reset. The workaround sets up a minimal LCD setup with GFX plane and waits for one vertical sync irq before disabling the setup and continuing with the context restore. The physical outputs are gated during the operation. For details see: OMAP543x Multimedia Device Silicon Revision 2.0 Silicon Errata Literature Number: SWPZ037E Or some other relevant errata document for the DSS IP version. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-06-07drm/omapdrm: Add gamma table support to DSS dispcJyri Sarha
Add gamma table support to DSS dispc. DSS driver initializes the default gamma table at component bind time and holds a copy of all gamma tables in its internal data structure. Each call to dispc_mgr_set_gamma() updates the internal table and triggers write to the HW, if it is enabled. The tables are restored to HW in PM resume callback. The drivers internal data structure match the HW tables in size and in number of significant bits per color component. The dispc_mgr_set_gamma() converts the size of any given table for the internal data structure using linear interpolation. Default gamma table is restored if NULL is given in place of gamma lut. dispc_mgr_gamma_size() gives HW gamma table size for the channel and returns 0 if gamma table is not supported by the HW or the DSS driver. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-06-07Merge omapdss header refactoringTomi Valkeinen
Merge omapdss public header refactoring, which separates the public header into omapdrm and omapfb parts.
2016-06-06Merge branch '4.8/omapdrm-pll' (omapdrm PLL work)Tomi Valkeinen
Merge omapdrm PLL work, which makes it possible to use the DSS PLLs in a versatile manner, for example, HDMI PLL can be used for LCDs.
2016-06-03drm/omap: Remove the video/omapdss.h and move it's content to local header filePeter Ujfalusi
Move the contents of the video/omapdss.h header file to omapdrm/dss local header file and remove the original global header. The omapfb stach is using video/omapfb_dss.h so this change will complete the separation of the two driver implementation. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2016-06-03drm/omap: Do not include video/omapdss.h directly in driversPeter Ujfalusi
All drivers to include the omapdrm/dss/omapdss.h header file. This header includes the <video/omapdss.h> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2016-06-03omapdss: hdmi audio: Make header file independent of video/omapdss.hPeter Ujfalusi
Clean up the header files regarding to hdmi audio so the omap-hdmi-audio.h file will only need to include the platform_data/omapdss.h file. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> CC: Mark Brown <broonie@kernel.org> CC: Jyri Sarha <jsarha@ti.com> CC: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2016-06-03drm/omap: Remove reference to pdata->default_devicePeter Ujfalusi
The default_device is no longer used, it is a leftower from legacy. The else if (pdata->default_device) is always going to be false. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2016-06-03drm/omap: fix unused variable warning.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-05-31drm/omap: include linux/seq_file.h where neededArnd Bergmann
The omapdrm driver relies on this header to be included implicitly, but this does not always work, and I get this error in randconfig builds: gpu/drm/omapdrm/dss/hdmi_phy.c: In function 'hdmi_phy_dump': gpu/drm/omapdrm/dss/hdmi_phy.c:34:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] gpu/drm/omapdrm/dss/hdmi_wp.c: In function 'hdmi_wp_dump': gpu/drm/omapdrm/dss/hdmi_wp.c:26:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] gpu/drm/omapdrm/dss/hdmi_pll.c: In function 'hdmi_pll_dump': gpu/drm/omapdrm/dss/hdmi_pll.c:30:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] This adds the #include statements in all files that have a seq_printf statement. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-31drm/omap: Remove regulator API abusePeter Ujfalusi
regulator_can_change_voltage() is deprecated and it's use is not necessary as commit: 6a0028b3dd67b regulator: Deprecate regulator_can_change_voltage() describers it clearly. Also, regulator_set_voltage() is misused in the driver, as it is supposed to be used only in cases where the regulator voltage needs to be changed dynamically at runtime. In DSS's case, we always want a fixed voltage, set in the .dts files. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-31OMAPDSS: HDMI5: Change DDC timingsJim Lodes
The DDC scl high and low times were set to the minimum values from the i2c specification, but the i2c specification takes into account the rise time and fall time to calculate the frequency. To pass HDMI certification DDC can not exceed 100kHz therefore in a system where the rise times and fall times are negligible the high and low times for scl need to be 10us. Signed-off-by: Jim Lodes <jim.lodes@garmin.com> Signed-off-by: J.D. Schroeder <jay.schroeder@garmin.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-31OMAPDSS: HDMI5: Fix AVI infoframeJim Lodes
The AVI infoframe R0-R3 in the 2nd data byte represents the Active Format Aspect Ratio. It is four bits long not two bits. This fixes that mask used to extract the bits before writing the bits to the hardware registers. Signed-off-by: Jim Lodes <jim.lodes@garmin.com> Signed-off-by: J.D. Schroeder <jay.schroeder@garmin.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-31drm/omap: fix OMAP4 hdmi_core_powerdown_disable()Tomi Valkeinen
hdmi_core_powerdown_disable() is supposed to disable HDMI core's power-down mode. However, the function sets the power-down bit to 0, which means "enable power-down". This hasn't caused any issues as the PD seems to affect only interrupts from HDMI core, and none of those interrupts are used at the moment. CEC functionality requires core interrupts, and the PD mode needs to be fixed. This patch fixes hdmi_core_powerdown_disable() to actually disable the PD mode. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
2016-05-31drm/omap: Fix missing includesTomi Valkeinen
With certain kernel config options many omapdrm files fail to compile due to missing include of linux/gpio/consumer.h and linux/of.h. This patch adds those includes. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Dan Murphy <dmurphy@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2016-05-31drm/omapdrm: include pinctrl/consumer.h where neededArnd Bergmann
In some configurations, we can build the OMAP dss driver without implictly including the pinctrl consumer definitions, causing a build error: gpu/drm/omapdrm/dss/dss.c: In function 'dss_runtime_suspend': gpu/drm/omapdrm/dss/dss.c:1268:2: error: implicit declaration of function 'pinctrl_pm_select_sleep_state' [-Werror=implicit-function-declaration] This adds an explicit #include. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: DPI: rename "DSI" related namesTomi Valkeinen
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 <tomi.valkeinen@ti.com>
2016-05-19drm/omap: support type B PLL for DPITomi Valkeinen
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 <tomi.valkeinen@ti.com>
2016-05-19drm/omap: add comments for PLL calculationsTomi Valkeinen
Add comments showing how the PLL clock rates are calculated. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: generalize dss_pll_calc_b()Tomi Valkeinen
dss_pll_calc_b() takes HDMI TMDS clock rate as a parameter. To make dss_pll_calc_b() usable for non-HDMI users, change the function to take clkout rate as parameter, and also change the current users of dss_pll_calc_b() to accommodate that. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: move HDMI PLL calc function to pll.cTomi Valkeinen
Move hdmi_pll_compute(), used to calculate the config for HDMI PLL, from hdmi_pll.c to pll.c, with the name of dss_pll_calc_b(), to make it available to non-HDMI users. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: rename PLL calc functionsTomi Valkeinen
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 <tomi.valkeinen@ti.com>
2016-05-19drm/omap: HDMI PLL: use runtime pmTomi Valkeinen
To make it possible to use HDMI PLL for other video outputs than HDMI, the HDMI PLL code needs to do runtime_get/put for the HDMI IP, so that the IP (include the PLL) is enabled. To do that we also need to store the HDMI pdev in the hdmi_pll_data. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: fix DPI clkout index handlingTomi Valkeinen
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 <tomi.valkeinen@ti.com>
2016-05-19drm/omap: cleanup DPI clock source handlingTomi Valkeinen
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 <tomi.valkeinen@ti.com>
2016-05-19drm/omap: cleanup dispc_fclk_rate()Tomi Valkeinen
With the new PLL helpers, we can clean up the dispc_fclk_rate(). This will also make dispc_fclk_rate() support clock sources it didn't support earlier. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: cleanup dispc_mgr_lclk_rate()Tomi Valkeinen
With the new PLL helpers, we can clean up the dispc_mgr_lclk_rate(). This will also make dispc_mgr_lclk_rate() support clock sources it didn't support earlier. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: add PLL helper funcsTomi Valkeinen
Add two PLL helper functions: dss_pll_find_by_src() which returns the dss_pll for the given dss_clk_source. dss_pll_get_clkout_idx_for_src() which returns the clkout index for the given dss_clk_source. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: clean up the LCD clk mux codeTomi Valkeinen
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 <tomi.valkeinen@ti.com>
2016-05-19drm/omap: add field for PLL typeTomi Valkeinen
DSS uses two types of PLLs, type A (DSI & Video) and type B (HDMI). The two types behave slightly differently, but we don't have the type of the PLL available anywhere for the driver. This patch adds an enum for the PLL type and a field in the PLL's HW data to store it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: Add missing clock sourcesTomi Valkeinen
enum dss_clk_source does not have values for all clock sources available on OMAP4+ DSS versions. Add the missing clock sources. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: rename dss_clk_source enumsTomi Valkeinen
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 <tomi.valkeinen@ti.com>
2016-05-19drm/omap: rename dss_get_generic_clk_source_name()Tomi Valkeinen
Now that there is no "non-generic" version of the function to get the clock source name, lets rename dss_get_generic_clk_source_name() to dss_get_clk_source_name(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: remove dss_feat_get_clk_source_name()Tomi Valkeinen
We have two functions to return a name for clock sources for debugging purposes: dss_feat_get_clk_source_name() and dss_get_generic_clk_source_name(). The former is supposed to return a DSS IP version specific name for the clock source, and the latter is supposed to return a more generic name. All this seems a bit pointless, so let's remove the former one. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: rename omap_dss_clk_sourceTomi Valkeinen
'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 <tomi.valkeinen@ti.com>
2016-05-19drm/omap: copy enum omap_dss_clk_sourceTomi Valkeinen
At the moment 'enum omap_dss_clk_source' is in omapdss.h, shared by omapdrm and omapfb. We're about to improve the omapdrm clock code, so we need to make a separate copy of the enum for each driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: video-pll: add missing data for clkout2 & 3Tomi Valkeinen
Video pll hw data is missing bitfield definitions for clkout2 and clkout3. We don't use those clkouts at the moment, so this has not caused any issues. Add the bitfields. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-05-19drm/omap: fix wrong variable typeTomi Valkeinen
'r' is supposed to be int, not u16, so fix it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: remove dispc_ovl_check()Tomi Valkeinen
dispc_ovl_check() is not used anywhere, so it can be removed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: remove dss compat codeTomi Valkeinen
We have removed all the uses of compat code from omapdrm and the non-compat parts of omapdss, so now we can remove all the compat code itself. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: DSI: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes DSI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: VENC: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes VENC driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: SDI: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes SDI driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: HDMI4: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes HDMI4 driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2016-03-03drm/omap: HDMI5: remove uses of omap_overlay_managerTomi Valkeinen
We are removing the uses of 'struct omap_overlay_manager'. This patch changes HDMI5 driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>