linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/mediatek: add plane check in async_check function
@ 2020-02-13  1:23 Bibby Hsieh
  2020-02-13  1:23 ` [PATCH 2/2] drm/mediatek: add fb swap in async_update Bibby Hsieh
  2020-02-13  3:54 ` [PATCH 1/2] drm/mediatek: add plane check in async_check function CK Hu
  0 siblings, 2 replies; 7+ messages in thread
From: Bibby Hsieh @ 2020-02-13  1:23 UTC (permalink / raw)
  To: David Airlie, Matthias Brugger, Daniel Vetter, dri-devel, linux-mediatek
  Cc: drinkcat, Bibby Hsieh, srv_heupstream, linux-kernel, tfiga,
	CK Hu, Thierry Reding, Philipp Zabel, linux-arm-kernel

MTK do rotation checking and transferring in layer check function,
but we do not check that in atomic_check,
so add back in atomic_check function.

Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update")

Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
index 189744d34f53..d32b494ff1de 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
@@ -81,6 +81,7 @@ static int mtk_plane_atomic_async_check(struct drm_plane *plane,
 					struct drm_plane_state *state)
 {
 	struct drm_crtc_state *crtc_state;
+	int ret;
 
 	if (plane != state->crtc->cursor)
 		return -EINVAL;
@@ -91,6 +92,11 @@ static int mtk_plane_atomic_async_check(struct drm_plane *plane,
 	if (!plane->state->fb)
 		return -EINVAL;
 
+	ret = mtk_drm_crtc_plane_check(state->crtc, plane,
+				       to_mtk_plane_state(state));
+	if (ret)
+		return ret;
+
 	if (state->state)
 		crtc_state = drm_atomic_get_existing_crtc_state(state->state,
 								state->crtc);
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-18  7:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13  1:23 [PATCH 1/2] drm/mediatek: add plane check in async_check function Bibby Hsieh
2020-02-13  1:23 ` [PATCH 2/2] drm/mediatek: add fb swap in async_update Bibby Hsieh
2020-02-13  4:06   ` CK Hu
2020-02-13 14:00     ` Enric Balletbo Serra
2020-02-18  7:46     ` CK Hu
2020-02-13  3:54 ` [PATCH 1/2] drm/mediatek: add plane check in async_check function CK Hu
2020-02-18  7:45   ` CK Hu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).