aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss
AgeCommit message (Collapse)AuthorFilesLines
2017-08-15drm: omapdrm: Move overlay caps features to dispc_features structureLaurent Pinchart3-84/+102
The overlay_caps is a dispc feature. Move it from the omap_dss_features structure to the dispc_features structure. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: Move color modes feature to dispc_features structureLaurent Pinchart3-136/+124
The supported_color_modes is a dispc feature. Move it from the omap_dss_features structure to the dispc_features structure. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: Move size unit features to dispc_features structureLaurent Pinchart3-41/+18
The buffer_size_unit and burst_size_unit are dispc features. Move them from the omap_dss_features structure to the dispc_features structure. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: Move shutdown() handler from core to dssLaurent Pinchart2-20/+16
In preparation for removal of the core module, move the shutdown() handler from core to dss. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: Move all debugfs code from core to dssLaurent Pinchart3-89/+84
debugfs code is spread between the core and dss drivers. In preparation for removal of the core driver, move it all to the dss driver. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: dss: Initialize DSS internal features at probe timeLaurent Pinchart1-13/+13
The DSS internal features are derived from the platform device compatible string which is available at probe time. Don't delay initialization until bind time. This prepares for the merge of the two DSS features structures that will be needed before the DSS is bound. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: dss: Use supported outputs instead of display typesLaurent Pinchart3-87/+17
The dss driver uses the supported display types to check whether the DSS has SDI, VENC or HDMI outputs. We can instead use the supported outputs the provide the same information. This removes the last use of the supported display types, that we can then remove as well. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: dss: Select features based on compatible stringLaurent Pinchart1-68/+29
Use the compatible string instead of the OMAP SoC revision to determine device features. The various OMAP3-based SoCs can't be told apart using the compatible string, use soc_device_match() to tell them apart. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: dpi: Replace OMAP SoC model checks with DSS modelLaurent Pinchart3-37/+45
The DPI code only needs to differentiate between major OMAP revisions, which can be obtained from the DSS compatible string. Replace the OMAP SoC model checks to prepare for removal of the OMAP SoC version platform data. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: dispc: Select features based on compatible stringLaurent Pinchart1-60/+27
Use the compatible string instead of the OMAP SoC revision to determine device features. On OMAP34xx the features depend on the ES revision that can not be determined from the compatible string. Use soc_device_match() in that case. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: Don't forward set_min_bus_tput() to no-op platform codeLaurent Pinchart2-11/+6
The OMAP implementation of the set_min_bus_tput() API is a no-op. There's no point in forwarding the driver calls to the platform code. Remove the use of the related platform data callback, but keep the internal function as a reminder that the feature will need to be implemented when the OMAP platform will provide support. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: dsi: Handle pin muxing internallyLaurent Pinchart3-25/+79
Don't rely on callback functions provided by the platform, but access the syscon internally to mux the DSI pins. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: dsi: Store DSI model and PLL hardware data in OF dataLaurent Pinchart1-61/+55
The DSI PLL hardware data and DSS channels are selected based on the OMAP SoC model. There's no need for fine-grained model information, as the driver only needs to differentiate between OMAP3, OMAP4 and OMAP5. As this can be done through the DSI compatible string, store the corresponding information in OF match data instead to avoid accessing the OMAP SoC model. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: dss: Split operations out of dss_features structureLaurent Pinchart1-15/+35
Move the two function pointers to a new dss_ops structure. This will allow merging the dss_features and omap_dss_features structures without having to expose the DPI source selection and LCD clock muxing functions in header files. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: hdmi: Store PHY features in PHY data structureLaurent Pinchart2-15/+15
PHY features are stored in a global variable, while they should be properties of the PHY object. As existing OMAP platforms have a single HDMI PHY this doesn't cause any issue, but doesn't follow the driver model. Move the PHY features to the HDMI PHY data structure to follow the driver model and pave the road for multiple HDMI PHYs support. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: venc: Don't export omap_dss_pal_vm and omap_dss_ntsc_vmLaurent Pinchart2-11/+2
The two variables are never used outside of their compilation unit, make them static. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
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-08-15drm/omap: Support for HDMI hot plug detectionPeter Ujfalusi1-0/+17
The HPD signal can be used for detecting HDMI cable plug and unplug event without the need for polling the status of the line. This will speed up detecting such event because we do not need to wait for the next poll event to notice the state change. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-06-02drm/omap: fix YUV422 90/270 rotation with mirroringTomi Valkeinen1-2/+2
When rotating 90/270 + mirroring with YUV422, the end result will have adjacent pixels swapped. The problem is that dispc_ovl_set_rotation_attrs() has wrong rotation values for these cases. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: fix YUV422 rotation with TILERTomi Valkeinen1-2/+18
TILER rotation with YUV422 pixelformats does not work at the moment. All other pixel formats work, because the pixelformat's pixel size is equal to tiler unit size (e.g. XR24's pixel size is 32 bits, and the TILER unit size that has to be used is 32 bits). For YUV422 formats this is not the case, as the TILER unit size has to be 32 bits, but the pixel size is 16 bits. The end result is OCP errors and sync losts. This patch adds the code to adjust the variables for YUV422 formats. We could make the code more generic by passing around the pixel format, rotation type, angle and the tiler unit size, which would allow us to do calculations without special case for YUV422. However, this would make the code more complex, and at least for now this is much more easier to handle with these two special cases for YUV422. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: DRM_MODE_REFLECT_* instead of mirror booleanTomi Valkeinen2-16/+10
Change dispc driver to use the DRM_MODE_REFLECT flags instead of a mirror boolean. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: use DRM_MODE_ROTATE_* instead of OMAP_DSS_ROT_*Tomi Valkeinen2-38/+30
At the moment the dispc driver uses a custom enum for rotation. Change it to use the DRM's DRM_MODE_ROTATE_*. Note that mirroring is at the moment handled as a separate boolean in the dispc driver, so we only use the DRM_MODE_ROTATE_* values. Note, DSS HW uses clockwise rotation, DRM counter-clockwise. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: rename color_mode to fourccTomi Valkeinen4-62/+57
Now that we use fourccs, we can also rename the 'color_mode' variables to 'fourcc'. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: use DRM_FORMAT_* instead of OMAP_DSS_COLOR_*Tomi Valkeinen3-144/+132
This patch changes omapdrm to use DRM_FORMAT_* values instead of OMAP_DSS_COLOR_* enum. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: use u32 instead of enum omap_color_modeTomi Valkeinen4-30/+30
In this step we drop 'enum omap_color_mode', and use u32 instead. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: change supported_modes to an arrayTomi Valkeinen4-68/+91
enum omap_color_mode is a bitmask, so at the moment we present the supported color modes as mask. To be able to move to fourccs, we need to use an array to present the supported color modes. As a first step towards fourccs, this patch changes the code to use an array to store the enums. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove unneeded prototypesTomi Valkeinen1-5/+0
omapdss.h contains prototypes for three functions, which are also defined in dss_features.h. Remove the extra prototypes from omapdss.h. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: add format_is_yuv() helperTomi Valkeinen1-33/+23
In a few places the dispc driver needs to know whether the pixel format is an YUV format. Add a helper to figure that out. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: cleanup offset calculationTomi Valkeinen1-4/+2
The code to calculate offset in dispc's calc_offset() is overly complex. Simplify it. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove dma & vrfb rotationTomi Valkeinen4-263/+8
We have three rotation methods supported by the SoCs with DSS: DMA, VRFB and TILER. DMA rotation works in theory on all DSS platforms, but in practice it's unusable due to the huge amount of memory bandwidth it uses, and has never really been used. VRFB is available on OMAP3, but is not supported by omapdrm, even though we have some code for it in the dispc driver. TILER is supported on OMAP4/OMAP5/DRA7/AM5 platforms, but has some driver bugs. To clean up the driver to help fixing the TILER issues, this patch drops the DMA and VRFB rotation support, leaving only TILER rotation. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove CLUTTomi Valkeinen3-65/+2
DSS IP versions 2 and 3 support CLUT modes (color lookup table), but the driver has never supported those. We still have had some code for CLUT modes. As the newer DSS IP versions have dropped CLUT support, we might as well clean up the driver by removing the CLUT related code. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: fix setting & clearing DOUBLESTRIDETomi Valkeinen1-5/+6
The code that sets and clears DOUBLESTRIDE is only ran when using NV12. This is not correct, as we might first set the bith when using NV12, but never clear it when using other formats. Fix it so that when the bit is available (when the HW supports NV12) we always either set or clear the bit. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: Remove unused omap_dss_find_output() functionLaurent Pinchart2-14/+0
The omap_dss_find_output() function is unused, remove it. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-06-02drm/omap: remove omap_overlay & omap_overlay_managerTomi Valkeinen1-91/+0
Structs omap_overlay and omap_overlay_manager are not used, remove them. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove unused fieldsTomi Valkeinen1-17/+0
Remove unused fields in struct omap_dss_device. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove legacy get_resolutionTomi Valkeinen2-15/+0
get_resolution is not used, remove it. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove unused get_dimensions()Tomi Valkeinen1-2/+0
get_dimensions function pointer is not used, remove it. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove rfbiTomi Valkeinen6-1131/+0
The RFBI driver has not worked nor compiled for many years. There are very few boards out there that use RFBI, and no one has stepped up to fix it. So let's remove the RFBI code that doesn't even compile. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: dpi: remove legacy data_linesTomi Valkeinen2-19/+0
Remove DPI's legacy data_lines code. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove recommended_bppTomi Valkeinen2-35/+0
recommended_bpp hasn't been used for ages, remove the code. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: venc: remove set_type & invert_vid_out_polarityTomi Valkeinen2-33/+0
Non-DT booting is no longer supported, so remove legacy code. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: sdi: remove legacy set_datapairsTomi Valkeinen2-13/+0
Non-DT booting is no longer supported, so remove legacy code. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove read_irqenable()Tomi Valkeinen2-7/+3
We only use read_irqenable() to flush posted write. Instead of having a separate function for this, do the flush implicitly in write_irqenable(). Thus we can remove read_irqenable(). Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove ovl_set_channel_outTomi Valkeinen2-10/+8
At the moment we have ovl_set_channel_out() to configure the output channel of an overlay. It makes sense to have this configuration as part of the rest of overlay configuration, and in DSS6+ we need the output channel when doing the other overlay configuration. This patch adds a 'channel' parameter to ovl_setup(), so that all overlay configuration is done via the same function, and removes the ovl_set_channel_out(). Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove unused ovl_enabled()Tomi Valkeinen2-7/+0
ovl_enabled() is not used anywhere, so remove it. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm: omapdrm: sdi: Remove platform driverLaurent Pinchart3-63/+0
The SDI platform driver was used for non-DT platforms only. On DT platforms the SDI port is handled manually. As OMAP display devices are now instantiated from DT only, remove the SDI platform driver. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-06-02drm: omapdrm: dpi: Remove platform driverLaurent Pinchart3-102/+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-06-02drm: omapdrm: Remove unused default display name supportLaurent Pinchart2-19/+0
The default display name is both unused and never set by platform data. Remove default display name module parameter, platform data field and runtime infrastructure. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Bartlomiej Zolnierkiewicz <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-06-02drm: omapdrm: Remove unused dss_get_core_pdev() functionLaurent Pinchart2-6/+0
The dss_get_core_pdev() function is unused, remove it. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-06-02drm: omapdrm: Drop support for non-DT devicesLaurent Pinchart5-109/+35
All OMAP platforms use DT nowadays, drop support for non-DT devices. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>