aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss
AgeCommit message (Collapse)AuthorFilesLines
2017-03-01gpu: drm: drivers: Convert printk(KERN_<LEVEL> to pr_<level>Joe Perches3-20/+15
Use a more common logging style. Miscellanea: o Coalesce formats and realign arguments o Neaten a few macros now using pr_<level> Signed-off-by: Joe Perches <[email protected]> Acked-by: Rob Clark <[email protected]> Acked-by: Sinclair Yeh <[email protected]> Acked-by: Patrik Jakobsson <[email protected]> Acked-by: Tomi Valkeinen <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/76355db47b31668bb64d996865ceee53bd66b11f.1488285953.git.joe@perches.com
2017-02-16drm/omapdrm: dispc: Refuse x-decimation above 4 for all but 8-bit formatsJyri Sarha1-0/+19
Let's disable all scaling that requires horizontal decimation with higher factor than 4, until we have better estimates of what we can and can not do. However, NV12 color format appears to work Ok with all decimation factors. When decimating horizontally by more that 4 the dss is not able to fetch the data in burst mode. When this happens it is hard to tell if there enough bandwidth. Despite what theory says this appears to be true also for 16-bit color formats. Signed-off-by: Jyri Sarha <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-01-04drm/omap: dsi: fix compile errors when enabling debug printsH. Nikolaus Schaller1-9/+9
dsi.c compile fails if PRINT_VERBOSE_VM_TIMINGS is enabled, as the video timings were not converted in the code behind that ifdef. Note that PRINT_VERBOSE_VM_TIMINGS has to be enabled by hand, there's no config option for it. Signed-off-by: H. Nikolaus Schaller <[email protected]> Acked-by: Peter Ujfalusi <[email protected]> [[email protected]: fixed the patch description] Signed-off-by: Tomi Valkeinen <[email protected]>
2016-12-19drm: omapdrm: Use sizeof(*var) instead of sizeof(type) for structuresLaurent Pinchart1-2/+1
By linking the sizeof to a variable type the code will be less prone to bugs due to future type changes of variables. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]>
2016-12-19drm: omapdrm: Check the CRTC software state at enable/disable timeLaurent Pinchart2-15/+13
The omapdrm DSS manager enable/disable operations check the DSS manager state to avoid double enabling/disabling. Check the CRTC software state instead to decrease the dependency of the DRM layer to the DSS layer. The dispc_mgr_is_enabled() function then be turned into a static function, but needs to be moved up in its compilation unit to avoid a forward declaration. Add a WARN_ON to catch double enable or disable that should be prevented by the DRM core and would be a clear sign of a bug. The warning should eventually be removed. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: Use consistent name for struct videomodePeter Ujfalusi16-334/+328
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 Ujfalusi16-159/+94
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 Ujfalusi4-13/+14
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: Use display_flags for sync edgePeter Ujfalusi7-29/+15
In preparation to move the stack to use the generic videmode struct for display timing information use display_flags for sync edge. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for pixel data edgePeter Ujfalusi7-28/+15
In preparation to move the stack to use the generic videmode struct for display timing information use display_flags for pixel data edge. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for double_pixel modePeter Ujfalusi6-11/+8
In preparation to move the stack to use the generic videmode struct for display timing information use display_flags for double_pixel mode. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for DE levelPeter Ujfalusi6-28/+13
In preparation to move the stack to use the generic videmode struct for display timing information use display_flags for DE level. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for h/vsync levelPeter Ujfalusi8-58/+29
In preparation to move the stack to use the generic videmode struct for display timing information use display_flags for h/vsync level. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: dispc: Simplify _dispc_mgr_set_lcd_timings() parametersPeter Ujfalusi1-24/+14
Instead of passing the omap_video_timings structure's members individually, use the pointer to the struct. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for interlace modePeter Ujfalusi7-17/+16
Remove the interlace member and add display_flags to omap_video_timings to configure the interlace mode. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: HDMI5: Use pointer to cfg->v_fc_config.timings in ↵Peter Ujfalusi1-27/+20
hdmi_core_video_config By using a pointer to the omap_mode_timings struct we can unwrap lines to make the code easier to follow. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename vbp to vback_porchPeter Ujfalusi8-21/+22
In preparation to move the stack to use the generic videmode struct for display timing information rename the vbp member to vback_porch. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename vfp to vfront_porchPeter Ujfalusi8-21/+22
In preparation to move the stack to use the generic videmode struct for display timing information rename the vfp member to vfront_porch. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename vsw to vsync_lenPeter Ujfalusi8-20/+20
In preparation to move the stack to use the generic videmode struct for display timing information rename the vsw member to vsync_len. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename hbp to hback_porchPeter Ujfalusi8-25/+27
In preparation to move the stack to use the generic videmode struct for display timing information rename the hbp member to hback_porch. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename hfp to hfront_porchPeter Ujfalusi8-34/+36
In preparation to move the stack to use the generic videmode struct for display timing information rename the hfp member to hfront_porch. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename hsw to hsync_lenPeter Ujfalusi8-41/+42
In preparation to move the stack to use the generic videmode struct for display timing information rename the hsw member to hsync_len. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename y_res to vactivePeter Ujfalusi10-28/+30
In preparation to move the stack to use the generic videmode struct for display timing information rename the y_res member to vactive. 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 Ujfalusi11-34/+34
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-11-02drm/omap: fix return value check in dsi_bind()Wei Yongjun1-2/+2
Fix the retrn value check which testing the wrong variable in dsi_bind(). Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: remove unneeded conversions to boolAndrew F. Davis1-3/+3
Found with scripts/coccinelle/misc/boolconv.cocci. Signed-off-by: Andrew F. Davis <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-08-12Revert "gpu: drm: omapdrm: dss-of: add missing of_node_put after calling ↵Peter Chen1-4/+3
of_parse_phandle" This reverts commit 2ab9f5879162499e1c4e48613287e3f59e593c4f Author: Peter Chen <[email protected]> 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 <[email protected]> Signed-off-by: Peter Chen <[email protected]> Acked-by: Tomi Valkeinen <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-07-19Merge remote-tracking branch 'airlied/drm-next' into topic/drm-miscDaniel Vetter2-2/+0
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 <[email protected]>
2016-07-15gpu: drm: omapdrm: dss-of: add missing of_node_put after calling ↵Peter Chen1-3/+4
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 <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Sean Paul <[email protected]>
2016-07-02Back-merge tag 'v4.7-rc5' into drm-nextDave Airlie2-2/+0
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 Valkeinen2-2/+0
Signed-off-by: Tomi Valkeinen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2016-06-07drm/omapdrm: Workaround for errata i734 (LCD1 Gamma) in DSS dispcJyri Sarha1-0/+174
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 <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-06-07drm/omapdrm: Add gamma table support to DSS dispcJyri Sarha5-22/+197
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 <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-06-07Merge omapdss header refactoringTomi Valkeinen23-36/+888
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 Valkeinen13-348/+494
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 Ujfalusi1-1/+865
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 <[email protected]>
2016-06-03drm/omap: Do not include video/omapdss.h directly in driversPeter Ujfalusi22-33/+22
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-06-03omapdss: hdmi audio: Make header file independent of video/omapdss.hPeter Ujfalusi1-0/+1
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 <[email protected]> CC: Mark Brown <[email protected]> CC: Jyri Sarha <[email protected]> CC: Liam Girdwood <[email protected]>
2016-06-03drm/omap: Remove reference to pdata->default_devicePeter Ujfalusi1-2/+0
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 <[email protected]>
2016-06-03drm/omap: fix unused variable warning.Dave Airlie1-1/+0
Signed-off-by: Dave Airlie <[email protected]>
2016-05-31drm/omap: include linux/seq_file.h where neededArnd Bergmann3-0/+3
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 <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-31drm/omap: Remove regulator API abusePeter Ujfalusi3-27/+0
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 <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-31OMAPDSS: HDMI5: Change DDC timingsJim Lodes1-2/+2
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 <[email protected]> Signed-off-by: J.D. Schroeder <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-31OMAPDSS: HDMI5: Fix AVI infoframeJim Lodes1-1/+1
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 <[email protected]> Signed-off-by: J.D. Schroeder <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-05-31drm/omap: fix OMAP4 hdmi_core_powerdown_disable()Tomi Valkeinen1-1/+1
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 <[email protected]> Reported-by: Hans Verkuil <[email protected]>
2016-05-31drm/omap: Fix missing includesTomi Valkeinen2-0/+2
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 <[email protected]> Reported-by: Dan Murphy <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2016-05-31drm/omapdrm: include pinctrl/consumer.h where neededArnd Bergmann1-0/+1
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 <[email protected]> Signed-off-by: Tomi Valkeinen <[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: add comments for PLL calculationsTomi Valkeinen1-0/+7
Add comments showing how the PLL clock rates are calculated. Signed-off-by: Tomi Valkeinen <[email protected]>