summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tidss/tidss_dispc.h
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2020-02-27 15:00:52 +0300
committerJyri Sarha <jsarha@ti.com>2020-02-28 15:48:58 +0300
commitb33b54748866f7bc29696837c472f49413169d4e (patch)
tree85563d8f0987887e553b6bd537a8f55eee128490 /drivers/gpu/drm/tidss/tidss_dispc.h
parentd6b8bbca6bc83b9c57e528b28df6177b9b57e19d (diff)
downloadlinux-b33b54748866f7bc29696837c472f49413169d4e.tar.xz
drm/tidss: dispc: Fix broken plane positioning code
The old implementation of placing planes on the CRTC while configuring the planes was naive and relied on the order in which the planes were configured, enabled, and disabled. The situation where a plane's zpos was changed on the fly was completely broken. The usual symptoms of this problem was scrambled display and a flood of sync lost errors, when a plane was active in two layers at the same time, or a missing plane, in case when a layer was accidentally disabled. The rewrite takes a more straight forward approach when HW is concerned. The plane positioning registers are in the CRTC (or actually OVR) register space and it is more natural to configure them in a one go when configuring the CRTC. To do this we need make sure we have all the planes on the updated CRTCs in the new atomic state. The untouched planes on CRTCs that need plane position update are added to the atomic state in tidss_atomic_check(). Signed-off-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200227120052.23168-1-jsarha@ti.com
Diffstat (limited to 'drivers/gpu/drm/tidss/tidss_dispc.h')
-rw-r--r--drivers/gpu/drm/tidss/tidss_dispc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tidss/tidss_dispc.h b/drivers/gpu/drm/tidss/tidss_dispc.h
index e65e6a2bb821..a4a68249e44b 100644
--- a/drivers/gpu/drm/tidss/tidss_dispc.h
+++ b/drivers/gpu/drm/tidss/tidss_dispc.h
@@ -94,6 +94,11 @@ extern const struct dispc_features dispc_j721e_feats;
void dispc_set_irqenable(struct dispc_device *dispc, dispc_irq_t mask);
dispc_irq_t dispc_read_and_clear_irqstatus(struct dispc_device *dispc);
+void dispc_ovr_set_plane(struct dispc_device *dispc, u32 hw_plane,
+ u32 hw_videoport, u32 x, u32 y, u32 layer);
+void dispc_ovr_enable_layer(struct dispc_device *dispc,
+ u32 hw_videoport, u32 layer, bool enable);
+
void dispc_vp_prepare(struct dispc_device *dispc, u32 hw_videoport,
const struct drm_crtc_state *state);
void dispc_vp_enable(struct dispc_device *dispc, u32 hw_videoport,