drm/mediatek: add plane check in async_check function
Subsystems (3)
PATCH 1/2 drm/mediatek: add plane check in async_check function
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.
--- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +6 -0
@@ -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);
Signature · 1 line
2.18.0
PATCH 2/2 drm/mediatek: add fb swap in async_update
Besides x, y position, width and height,
fb also need updating in async update.
--- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/mediatek/mtk_drm_plane.c +1 -0
@@ -122,6 +122,7 @@ static void mtk_plane_atomic_async_update(struct drm_plane *plane, plane->state->src_y = new_state->src_y; plane->state->src_h = new_state->src_h; plane->state->src_w = new_state->src_w; +swap (plane->state->fb, new_state->fb); state->pending.async_dirty = true;mtk_drm_crtc_async_update (new_state->crtc, plane, new_state);
Signature · 1 line
2.18.0
Re: [PATCH 2/2] drm/mediatek: add fb swap in async_update
Hi, Bibby:
Quoted 3 lines · Bibby Hsieh
Besides x, y position, width and height,
fb also need updating in async update.
Quoted 19 lines
Fixes 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update")Signed-off-by Bibby Hsieh <[email protected]>--- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/mediatek/mtk_drm_plane.c +1
-0@@ -122,6 +122,7 @@ static void mtk_plane_atomic_async_update(struct drm_plane *plane, plane->state->src_y = new_state->src_y; plane->state->src_h = new_state->src_h; plane->state->src_w = new_state->src_w; +swap (plane->state->fb, new_state->fb); state->pending.async_dirty = true;mtk_drm_crtc_async_update (new_state->crtc, plane, new_state);
Signature · 1 line
CK Hu <[email protected]>
Enric Balletbo Serra
Tested-by Enric Balletbo i SerraRe: [PATCH 2/2] drm/mediatek: add fb swap in async_update
Hi,
Missatge de CK Hu <[email protected]> del dia dj., 13 de febr. 2020 a les 5:06:
Quoted 14 lines
Hi, Bibby:
Quoted 3 lines · Bibby Hsieh
Besides x, y position, width and height,
fb also need updating in async update.Reviewed-by CK Hu <[email protected]>Quoted 4 lines
Fixes 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update")Signed-off-by Bibby Hsieh <[email protected]>---
This patch actually fixes two issues as explained in [1], I send the patch without seeing that another one was already sent. Both do the same thing. So,
[1] https://lkml.org/lkml/2020/2/13/286
Quoted 22 lines
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/mediatek/mtk_drm_plane.c +0
-0drivers/gpu/drm/mediatek/mtk_drm_plane.c static void mtk_plane_atomic_async_update(struct drm_plane *plane, · line 128
Quoted 7 lines
drivers/gpu/drm/mediatek/mtk_drm_plane.c +1
-0@@ -122,6 +122,7 @@ static void mtk_plane_atomic_async_update(struct drm_plane *plane, plane->state->src_y = new_state->src_y; plane->state->src_h = new_state->src_h; plane->state->src_w = new_state->src_w; +swap (plane->state->fb, new_state->fb); state->pending.async_dirty = true;mtk_drm_crtc_async_update (new_state->crtc, plane, new_state);--
CK Hu <[email protected]>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
CK Hu
AppliedRe: [PATCH 2/2] drm/mediatek: add fb swap in async_update
In reply to CK HuHi, Bibby:
Quoted 9 lines · CK Hu
Hi, Bibby:
Quoted 3 lines · Bibby Hsieh
Besides x, y position, width and height,
fb also need updating in async update.Reviewed-by CK Hu <[email protected]>
Applied to mediatek-drm-fixes-5.6 [1], thanks.
[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-fixes-5.6
Regards,
CK
Quoted 18 lines
Quoted 18 lines
Fixes 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update")Signed-off-by Bibby Hsieh <[email protected]>--- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/mediatek/mtk_drm_plane.c +1
-0@@ -122,6 +122,7 @@ static void mtk_plane_atomic_async_update(struct drm_plane *plane, plane->state->src_y = new_state->src_y; plane->state->src_h = new_state->src_h; plane->state->src_w = new_state->src_w; +swap (plane->state->fb, new_state->fb); state->pending.async_dirty = true;
Quoted 2 lines
drivers/gpu/drm/mediatek/mtk_drm_plane.c static void mtk_plane_atomic_async_update(struct drm_plane *plane, · line 128
Quoted 1 line
drivers/gpu/drm/mediatek/mtk_drm_plane.c +0
-0mtk_drm_crtc_async_update (new_state->crtc, plane, new_state);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi, Bibby:
Quoted 4 lines · Bibby Hsieh
MTK do rotation checking and transferring in layer check function, but we do not check that in
atomic_check,
so add back inatomic_checkfunction.
Quoted 21 lines
Fixes 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update")Signed-off-by Bibby Hsieh <[email protected]>--- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/mediatek/mtk_drm_plane.c +1
-0@@ -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)
drivers/gpu/drm/mediatek/mtk_drm_plane.c static int mtk_plane_atomic_async_check(struct drm_plane *plane, · line 102
Quoted 10 lines
drivers/gpu/drm/mediatek/mtk_drm_plane.c +5
-0return -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);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
CK Hu
AppliedHi, Bibby:
Quoted 10 lines · CK Hu
Hi, Bibby:
Quoted 4 lines · Bibby Hsieh
MTK do rotation checking and transferring in layer check function, but we do not check that in
atomic_check,
so add back inatomic_checkfunction.Reviewed-by CK Hu <[email protected]>
Applied to mediatek-drm-fixes-5.6 [1], thanks.
[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-fixes-5.6
Regards,
CK
Quoted 23 lines
Quoted 23 lines
Fixes 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update")Signed-off-by Bibby Hsieh <[email protected]>--- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/mediatek/mtk_drm_plane.c +1
-0@@ -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 ;
Quoted 9 lines
drivers/gpu/drm/mediatek/mtk_drm_plane.c static int mtk_plane_atomic_async_check(struct drm_plane *plane, · line 102
Quoted 8 lines
drivers/gpu/drm/mediatek/mtk_drm_plane.c +5
-0+ 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);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel