aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tegra/plane.c
AgeCommit message (Collapse)AuthorFilesLines
2018-05-18drm/tegra: dc: Support rotation propertyThierry Reding1-0/+1
Currently only the DRM_MODE_REFLECT_Y rotation is supported. The driver already supports reflection on the Y axis via a custom flag which is not very useful because it requires custom userspace. Add the standard rotation property that supports 0 degree rotation and Y axis reflection for primary and overlay planes to provide a better interface than the custom flag. v2: keep custom flag for ABI compatibility (Dmitry) Reviewed-by: Dmitry Osipenko <[email protected]> Tested-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-05-17drm/tegra: plane: Implement zpos plane property for older TegrasDmitry Osipenko1-54/+139
Older Tegra's do not support plane's Z position handling in hardware, but the hardware provides knobs to implement it in software. Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-03-28Backmerge tag 'v4.16-rc7' into drm-nextDave Airlie1-3/+6
Linux 4.16-rc7 This was requested by Daniel, and things were getting a bit hard to reconcile, most of the conflicts were trivial though.
2018-03-21Merge tag 'drm/tegra/for-4.17-rc1' of ↵Dave Airlie1-2/+18
git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.17-rc1 This fixes mmap() for fbdev devices by providing a custom implementation based on the KMS variant. This is a fairly exotic case these days, hence why it is not flagged for stable. There is also support for dedicating one of the overlay planes to serve as a hardware cursor on older Tegra that did support hardware cursors but not RGBA formats for it. Planes will now also export the IN_FORMATS property by supporting the various block-linear tiling modifiers for RGBA pixel formats. Other than that, there's a bit of cleanup of DMA API abuse, use of the private object infrastructure for global state (rather than subclassing atomic state objects) and an implementation of ->{begin,end}_cpu_access callbacks for PRIME exported buffers, which allow users to perform cache maintenance on these buffers. * tag 'drm/tegra/for-4.17-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: prime: Implement ->{begin,end}_cpu_access() drm/tegra: gem: Map pages via the DMA API drm/tegra: hub: Use private object for global state drm/tegra: fb: Properly support linear modifier drm/tegra: plane: Support format modifiers drm/tegra: dc: Dedicate overlay plane to cursor on older Tegra's drm/tegra: plane: Make tegra_plane_get_overlap_index() static drm/tegra: fb: Implement ->fb_mmap() callback drm/tegra: gem: Make __tegra_gem_mmap() available more widely drm/tegra: gem: Reshuffle declarations
2018-03-15drm/tegra: plane: Support format modifiersThierry Reding1-0/+16
Pass the list of valid format modifiers to planes upon initialization and implement the ->format_mod_supported() callback so that userspace can query for the valid combinations of formats and modifiers. Signed-off-by: Thierry Reding <[email protected]>
2018-03-15drm/tegra: plane: Correct legacy blendingDmitry Osipenko1-3/+2
Keep old 'dependent' state of unaffected planes, this way new state takes into account current state of unaffected planes. Fixes: ebae8d07435a ("drm/tegra: dc: Implement legacy blending") Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-03-15drm/tegra: plane: Make tegra_plane_get_overlap_index() staticDmitry Osipenko1-2/+2
This function is not used outside of the file and can be static. Signed-off-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2018-03-15drm/tegra: plane: Fix RGB565 format on older TegraThierry Reding1-0/+4
The opaque/alpha format conversion code is currently only looking at XRGB formats because they have an equivalent ARGB format. The opaque format for RGB565 is RGB565 itself, much like the YUV formats map to themselves. Reported-by: Dmitry Osipenko <[email protected]> Fixes: ebae8d07435a ("drm/tegra: dc: Implement legacy blending") Signed-off-by: Thierry Reding <[email protected]>
2018-03-05drm: Don't pass clip to drm_atomic_helper_check_plane_state()Ville Syrjälä1-6/+1
Move the plane clip rectangle handling into drm_atomic_helper_check_plane_state(). Drivers no longer have to worry about such mundane details. v2: Convert armada, rcar, and sun4i as well v3: Resolve simple_kms_helper conflict Cc: Liviu Dudau <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Mali DP Maintainers <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Gustavo Padovan <[email protected]> Cc: Sean Paul <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: CK Hu <[email protected]> Cc: Neil Armstrong <[email protected]> Cc: Rob Clark <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Sandy Huang <[email protected]> Cc: "Heiko Stübner" <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thierry Reding <[email protected]> Cc: VMware Graphics <[email protected]> Cc: Sinclair Yeh <[email protected]> Cc: Thomas Hellstrom <[email protected]> Cc: Shawn Guo <[email protected]> Cc: Archit Taneja <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Russell King <[email protected]> Suggested-by: Daniel Vetter <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Reviewed-by: Archit Taneja <[email protected]> #msm Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Liviu Dudau <[email protected]> #hdlcd,malidp Acked-by: Philipp Zabel <[email protected]> #imx,mtk Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> #vmwgfx Acked-by: Neil Armstrong <[email protected]> #meson Acked-by: Shawn Guo <[email protected]> #zte
2018-01-23drm/tegra/dc: Use drm_mode_get_hv_timing() to populate plane clip rectangleVille Syrjälä1-5/+4
Use drm_mode_get_hv_timing() to fill out the plane clip rectangle. No functional changes as the code already uses crtc_state->mode to populate the clip, which is also what drm_mode_get_hv_timing() uses. Once everyone agrees on this we can move the clip handling into drm_atomic_helper_check_plane_state(). v2: Rebase due to tegra_plane_state_add() relocating to plane.c Cc: Laurent Pinchart <[email protected]> Cc: Thierry Reding <[email protected]> Cc: [email protected] Signed-off-by: Ville Syrjälä <[email protected]> Acked-by: Thierry Reding <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-01-08drm/tegra: dc: Restore YUV overlay supportThierry Reding1-0/+5
Commit ebae8d07435a ("drm/tegra: dc: Implement legacy blending") broke support for YUV overlays by accident. The reason is that YUV formats are considered opaque because they have no alpha component, but on the other hand no corresponding format with an alpha component can be returned. In the case of YUV formats, the opaque format is the same as the alpha format, so add the special case to restore YUV overlay support. Reported-by: Dmitry Osipenko <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2017-12-21drm/tegra: dc: Implement legacy blendingThierry Reding1-0/+138
This implements alpha blending on legacy display controllers (Tegra20, Tegra30 and Tegra114). While it's theoretically possible to support the zpos property to enable userspace to specify the Z-order of each plane individually, this is not currently supported and the same fixed Z- order as previously defined is used. Reverts commit 71835caa00e8 ("drm/tegra: fb: Force alpha formats") since the opaque formats are now supported. Reported-by: Dmitry Osipenko <[email protected]> Fixes: 7772fdaef939 ("drm/tegra: Support ARGB and ABGR formats") Signed-off-by: Thierry Reding <[email protected]>
2017-12-21drm/tegra: dc: Support more formatsThierry Reding1-8/+60
Also, split up formats into per-SoC lists because not all generations support all of them. Note that the list is now exhaustive for all RGB formats, but not for YUV and indexed formats. Signed-off-by: Thierry Reding <[email protected]>
2017-12-13drm/tegra: Support ARGB and ABGR formatsThierry Reding1-0/+8
These formats can easily be supported on all generations of Tegra. Note that the XRGB and XBGR formats that we supported were in fact using the ARGB and ABGR Tegra formats. This happened to work in cases where no alpha was being considered. This change is also a fix for those formats. Signed-off-by: Thierry Reding <[email protected]>
2017-12-13drm/tegra: Move common plane code to separate fileThierry Reding1-0/+180
Subsequent patches will add support for Tegra186 which has a different architecture and needs different plane code but which can share a lot of code with earlier Tegra support. Signed-off-by: Thierry Reding <[email protected]>