aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm
AgeCommit message (Collapse)AuthorFilesLines
2017-08-15drm/omap: panel-dsi-cm: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 4669 464 0 5133 140d panel-dsi-cm.o File size After adding 'const': text data bss dec hex filename 4725 400 0 5125 1405 panel-dsi-cm.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm/omap: panel-sony-acx565akm: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 5147 560 0 5707 164b panel-sony-acx565akm.o File size After adding 'const': text data bss dec hex filename 5211 496 0 5707 164b panel-sony-acx565akm.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm/omap: constify attribute_group structures.Arvind Yadav1-1/+1
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 2673 368 0 3041 be1 panel-tpo-td043mtea1.o File size After adding 'const': text data bss dec hex filename 2721 304 0 3025 bd1 panel-tpo-td043mtea1.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm/omap: dma-buf: Constify dma_buf_ops structures.Arvind Yadav1-1/+1
dma_buf_ops are not supposed to change at runtime. All functions working with dma_buf_ops provided by <linux/dma-buf.h> work with const dma_buf_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 1240 112 0 1352 548 drivers/gpu/drm/omapdrm/omap_gem_dmabuf.o File size After adding 'const': text data bss dec hex filename 1352 0 0 1352 548 drivers/gpu/drm/omapdrm/omap_gem_dmabuf.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm/omap: omap_display_timings: constify videomode structuresJulia Lawall2-2/+2
The videomode structures are only copied into the vm field of a panel_drv_data structure, so they can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm/omap: displays: encoder-tpd12s015: Support for hot plug detectionPeter Ujfalusi1-0/+81
Use interrupt handler for hpd GPIO to react to HPD changes. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm/omap: displays: connector-hdmi: Support for hot plug detectionPeter Ujfalusi1-0/+104
If the hpd_gpio is valid, use interrupt handler to react to HPD changes. In case the hpd_gpio is not valid, try to enable hpd detection on the encoder if it supports it. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm/omap: Support for HDMI hot plug detectionPeter Ujfalusi3-1/+82
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-08-15drm/omap: fix memory leak when FB init failsTomi Valkeinen1-1/+1
omap_framebuffer_create() fails to unref all the gem objects if creating the FB fails, leading to a memory leak. Fix the loop so that it goes through all the reffed gem objects. Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-08drm: Nuke drm_atomic_helper_connector_dpmsDaniel Vetter1-1/+0
It's dead code, the core handles all this directly now. The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same. v2: Rebase over the panel/brideg refactorings in stm/ltdc. Signed-off-by: Daniel Vetter <[email protected]> Cc: Archit Taneja <[email protected]> Cc: Andrzej Hajda <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Peter Senna Tschudin <[email protected]> Cc: Martin Donnelly <[email protected]> Cc: Martyn Welch <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Sean Paul <[email protected]> Cc: David Airlie <[email protected]> Cc: Inki Dae <[email protected]> Cc: Joonyoung Shim <[email protected]> Cc: Seung-Woo Kim <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Cc: Stefan Agner <[email protected]> Cc: Alison Wang <[email protected]> Cc: Russell King <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: CK Hu <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Neil Armstrong <[email protected]> Cc: Carlo Caione <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Mark Yao <[email protected]> Cc: Heiko Stuebner <[email protected]> Cc: Benjamin Gaignard <[email protected]> Cc: Vincent Abriou <[email protected]> Cc: Yannick Fertre <[email protected]> Cc: Philippe Cornu <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Jonathan Hunter <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Shawn Guo <[email protected]> Cc: John Stultz <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Cc: Sergei Shtylyov <[email protected]> Cc: Jeffy Chen <[email protected]> Cc: Tomeu Vizoso <[email protected]> Cc: Yakir Yang <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Jose Abreu <[email protected]> Cc: Romain Perier <[email protected]> Cc: Kieran Bingham <[email protected]> Cc: Xinliang Liu <[email protected]> Cc: Alexey Brodkin <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Rongrong Zou <[email protected]> Cc: Rob Clark <[email protected]> Cc: Hai Li <[email protected]> Cc: "Noralf Trønnes" <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: zain wang <[email protected]> Cc: Baoyou Xie <[email protected]> Cc: Boris Brezillon <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Neil Armstrong <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Acked-by: Philipp Zabel <[email protected]> Acked-by: Archit Taneja <[email protected]> Tested-by: Philippe Cornu <[email protected]> (on stm) Reviewed-by: Laurent Pinchart <[email protected]> Acked-by: Shawn Guo <[email protected]> Acked-by: Shawn Guo <[email protected]> Acked-by: Noralf Trønnes <[email protected]> Acked-by: Vincent Abriou <[email protected]>
2017-08-08drm: Nuke drm_atomic_helper_plane_set_propertyDaniel Vetter1-1/+0
It's dead code, the core handles all this directly now. This also allows us to unexport drm_atomic_plane_set_property. Signed-off-by: Daniel Vetter <[email protected]> Cc: Liviu Dudau <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Mali DP Maintainers <[email protected]> Cc: Boris Brezillon <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Sean Paul <[email protected]> Cc: David Airlie <[email protected]> Cc: Inki Dae <[email protected]> Cc: Joonyoung Shim <[email protected]> Cc: Seung-Woo Kim <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Benjamin Gaignard <[email protected]> Cc: Vincent Abriou <[email protected]> Cc: Yannick Fertre <[email protected]> Cc: Philippe Cornu <[email protected]> Cc: Jyri Sarha <[email protected]> Cc: "Ville Syrjälä" <[email protected]> Cc: Rongrong Zou <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Alexey Brodkin <[email protected]> Cc: Eric Engestrom <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Rob Clark <[email protected]> Cc: Archit Taneja <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Thomas Hellstrom <[email protected]> Cc: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Archit Taneja <[email protected]> Acked-by: Philippe Cornu <[email protected]> Tested-by: Philippe Cornu <[email protected]> Acked-by: Liviu Dudau <[email protected]> Acked-by: Vincent Abriou <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-08-08drm: Nuke drm_atomic_helper_crtc_set_propertyDaniel Vetter1-1/+0
It's dead code because this is now handled in the core. Signed-off-by: Daniel Vetter <[email protected]> Cc: Boris Brezillon <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Sean Paul <[email protected]> Cc: David Airlie <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Alexey Brodkin <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Eric Engestrom <[email protected]> Cc: Chris Wilson <[email protected]> Cc: "Ville Syrjälä" <[email protected]> Cc: Rob Clark <[email protected]> Cc: Philippe Cornu <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Sushmita Susheelendra <[email protected]> Cc: Archit Taneja <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Philipp Zabel <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Hellstrom <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Archit Taneja <[email protected]> Acked-by: Philippe Cornu <[email protected]> Tested-by: Philippe Cornu <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Acked-by: Thomas Hellstrom <[email protected]>
2017-08-08drm/omap: Rework the rotation-on-crtc hackMaarten Lankhorst1-39/+85
I want/need to rework the core property handling, and this hack is getting in the way. But since it's a non-standard propety only used by legacy userspace we know that this will only every be called from ioctl code. And never on some other free-standing state struct, where this old hack wouldn't work either. v2: don't forget zorder and get_property! v3: Shadow the legacy state to avoid locking issues in get_property (Maarten). v4: Review from Laurent - Move struct omap_crtc_state into omap_crtc.c - Clean up comments. - Don't forget to copy the shadowed state over on duplicate. v5: Don't forget to update the reset handler (Maarten). v6: Update omap_crtc_state shadow values in omap_crtc_atomic_check (Maarten). v7: - Fix get_property to return 0 and set value in *val (Maarten). - Update comment in set_property for changes in v6 (Maarten). Reviewed-by: Laurent Pinchart <[email protected]> (v4) Cc: Maarten Lankhorst <[email protected]> Cc: Tomi Valkeinen <[email protected] Cc: Laurent Pinchart <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> (v4) Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-08-01drm: Plumb modifiers through plane initBen Widawsky1-1/+1
This is the plumbing for supporting fb modifiers on planes. Modifiers have already been introduced to some extent, but this series will extend this to allow querying modifiers per plane. Based on this, the client to enable optimal modifications for framebuffers. This patch simply allows the DRM drivers to initialize their list of supported modifiers upon initializing the plane. v2: A minor addition from Daniel v3: * Updated commit message * s/INVALID/DRM_FORMAT_MOD_INVALID (Liviu) * Remove some excess newlines (Liviu) * Update comment for > 64 modifiers (Liviu) v4: Minor comment adjustments (Liviu) v5: Some new platforms added due to rebase v6: Add some missed plane inits (or maybe they're new - who knows at this point) (Daniel) Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Daniel Stone <[email protected]> (v2) Reviewed-by: Liviu Dudau <[email protected]> Signed-off-by: Daniel Stone <[email protected]>
2017-08-01drm/omapdrm: Fix omap_atomic_wait_for_completionMaarten Lankhorst1-3/+3
Use the new iterator macro and look for crtc_state->active instead of enable, only crtc_state->active implies that vblanks will happen. Signed-off-by: Maarten Lankhorst <[email protected]> Cc: Tomi Valkeinen <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-07-29drm/omapdrm: Use the drm_driver.dumb_destroy defaultNoralf Trønnes1-1/+0
drm_gem_dumb_destroy() is the drm_driver.dumb_destroy default, so no need to set it. Cc: Tomi Valkeinen <[email protected]> Signed-off-by: Noralf Trønnes <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-07-26drm/<drivers>: Drop fbdev info flagsDaniel Vetter1-1/+0
- FBINFO_CAN_FORCE_OUTPUT has been a lie ever since we nerfed&removed the entire panic handling code in our fbdev emulation. We might restore kms panic output, but not through the bazillion of legacy code layers called fbdev/fbcon, there's just no way to make that work safely. - With the module check change FBINFO_DEFAULT is always 0, so can be removed too. That removes another change to cargo-cult stuff in kms drivers, yay! Reviewed-by: Sean Paul <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Daniel Vetter <[email protected]>
2017-07-14drm: handle HDMI 2.0 VICs in AVI info-framesShashank Sharma1-1/+2
HDMI 1.4b support the CEA video modes as per range of CEA-861-D (VIC 1-64). For any other mode, the VIC filed in AVI infoframes should be 0. HDMI 2.0 sinks, support video modes range as per CEA-861-F spec, which is extended to (VIC 1-107). This patch adds a bool input variable, which indicates if the connected sink is a HDMI 2.0 sink or not. This will make sure that we don't pass a HDMI 2.0 VIC to a HDMI 1.4 sink. This patch touches all drm drivers, who are callers of this function drm_hdmi_avi_infoframe_from_display_mode but to make sure there is no change in current behavior, is_hdmi2 is kept as false. In case of I915 driver, this patch: - checks if the connected display is HDMI 2.0. - HDMI infoframes carry one of this two type of information: - VIC for 4K modes for HDMI 1.4 sinks - S3D information for S3D modes As CEA-861-F has already defined VICs for 4K videomodes, this patch doesn't allow sending HDMI infoframes for HDMI 2.0 sinks, until the mode is 3D. Cc: Ville Syrjala <[email protected]> Cc: Jose Abreu <[email protected]> Cc: Andrzej Hajda <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Daniel Vetter <[email protected]> PS: This patch touches a few lines in few files, which were already above 80 char, so checkpatch gives 80 char warning again. - gpu/drm/omapdrm/omap_encoder.c - gpu/drm/i915/intel_sdvo.c V2: Rebase, Added r-b from Andrzej V3: Addressed review comment from Ville: - Do not send VICs in both AVI-IF and HDMI-IF send only one of it. V4: Rebase V5: Added r-b from Neil. Addressed review comments from Ville - Do not block HDMI vendor IF, instead check for VIC while handling AVI infoframes V6: Rebase V7: Rebase Reviewed-by: Andrzej Hajda <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Shashank Sharma <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2017-06-30drm: Convert atomic drivers from CRTC .disable() to .atomic_disable()Laurent Pinchart1-2/+3
The CRTC .disable() helper operation is deprecated for atomic drivers, the new .atomic_disable() helper operation being preferred. Convert all atomic drivers to .atomic_disable() to avoid cargo-cult use of .disable() in new drivers. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Maxime Ripard <[email protected]> # for sun4i Acked-by: Philipp Zabel <[email protected]> # for mediatek Acked-by: Alexey Brodkin <[email protected]> # for arcpgu Acked-by: Boris Brezillon <[email protected]> # for atmel-hlcdc Tested-by: Philippe Cornu <[email protected]> # for stm Acked-by: Philippe Cornu <[email protected]> # for stm Acked-by: Vincent Abriou <[email protected]> # for sti Reviewed-by: Thomas Hellstrom <[email protected]> # for vmwgfx Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-06-30drm: Add old state pointer to CRTC .enable() helper functionLaurent Pinchart1-2/+3
The old state is useful for drivers that need to perform operations at enable time that depend on the transition between the old and new states. While at it, rename the operation to .atomic_enable() to be consistent with .atomic_disable(), as the .enable() operation is used by atomic helpers only. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Maxime Ripard <[email protected]> # for sun4i Acked-by: Philipp Zabel <[email protected]> # for imx-drm and mediatek Acked-by: Alexey Brodkin <[email protected]> # for arcpgu Acked-by: Boris Brezillon <[email protected]> # for atmel-hlcdc Acked-by: Liviu Dudau <[email protected]> # for hdlcd and mali-dp Acked-by: Stefan Agner <[email protected]> # for fsl-dcu Tested-by: Philippe Cornu <[email protected]> # for stm Acked-by: Philippe Cornu <[email protected]> # for stm Acked-by: Vincent Abriou <[email protected]> # for sti Reviewed-by: Thomas Hellstrom <[email protected]> # for vmwgfx Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-06-02drm/omap: fix tiled buffer stride calculationsTomi Valkeinen1-2/+2
omap_gem uses page alignment for buffer stride. The related calculations are a bit off, though, as byte stride of 4096 gets aligned to 8192, instead of 4096. This patch changes the code to use DIV_ROUND_UP(), which fixes those calculations and makes them more readable. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[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 Valkeinen2-2/+32
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: pass rotation to dispcTomi Valkeinen1-0/+2
The omapdrm driver has not passed the rotation value to the dispc driver. This doesn't affect RGB formats, but YUV formats don't work without dispc knowing the orientation. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: DRM_MODE_REFLECT_* instead of mirror booleanTomi Valkeinen3-17/+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 Valkeinen3-39/+31
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: remove omap_drm_winTomi Valkeinen3-52/+21
struct omap_drm_window is only used to pass plane setup data to omap_framebuffer_update_scanout(). This can as well be accomplished by just passing the DRM state. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: add drm_rotation_to_tiler helper()Tomi Valkeinen1-25/+31
Add a helper function to convert DRM rotation to TILER rotation. Also drop a error print that can never happen, as the DRM framework makes sure the rotation is valid. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: rename color_mode to fourccTomi Valkeinen5-63/+58
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: cleanup formats arrayTomi Valkeinen1-29/+20
omap_fb.c has a table with DSS and DRM formats, used to convert between them. This is no longer needed, so we can change the array to a plain array of DRM_FORMAT_* values which contain all possible pixel formats supported by any DSS IP version. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm/omap: remove omap_framebuffer_get_formats()Tomi Valkeinen3-32/+7
We now get a fourcc array from dispc when asking for a plane's supported pixel formats, so we can drop omap_framebuffer_get_formats() which was used to convert between DSS and DRM pixel formats. 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 Valkeinen4-160/+148
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 Valkeinen6-35/+35
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 Valkeinen6-72/+103
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 Valkeinen6-265/+10
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: ratelimit OCP errorTomi Valkeinen1-3/+4
Use dev_err_ratelimited() when an OCP error happens, to slightly easen the flood. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-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 Valkeinen12-42/+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 Valkeinen9-51/+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 Valkeinen3-36/+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 Valkeinen3-43/+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]>