2020-02-13 01:24:44

by Bibby Hsieh

[permalink] [raw]
Subject: [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.

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(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
index d32b494ff1de..e084c36fdd8a 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
@@ -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);
--
2.18.0


2020-02-13 04:08:18

by CK Hu (胡俊光)

[permalink] [raw]
Subject: Re: [PATCH 2/2] drm/mediatek: add fb swap in async_update

Hi, Bibby:

On Thu, 2020-02-13 at 09:23 +0800, Bibby Hsieh wrote:
> Besides x, y position, width and height,
> fb also need updating in async update.
>

Reviewed-by: CK Hu <[email protected]>

> 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(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> index d32b494ff1de..e084c36fdd8a 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> @@ -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]>

2020-02-13 14:01:43

by Enric Balletbo Serra

[permalink] [raw]
Subject: Re: [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:
>
> Hi, Bibby:
>
> On Thu, 2020-02-13 at 09:23 +0800, Bibby Hsieh wrote:
> > Besides x, y position, width and height,
> > fb also need updating in async update.
> >
>
> Reviewed-by: CK Hu <[email protected]>
>
> > 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,

Tested-by: Enric Balletbo i Serra <[email protected]>

[1] https://lkml.org/lkml/2020/2/13/286

> > drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > index d32b494ff1de..e084c36fdd8a 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > @@ -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

2020-02-18 07:48:09

by CK Hu (胡俊光)

[permalink] [raw]
Subject: Re: [PATCH 2/2] drm/mediatek: add fb swap in async_update

Hi, Bibby:

On Thu, 2020-02-13 at 12:06 +0800, CK Hu wrote:
> Hi, Bibby:
>
> On Thu, 2020-02-13 at 09:23 +0800, Bibby Hsieh wrote:
> > 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

> > 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(+)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > index d32b494ff1de..e084c36fdd8a 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
> > @@ -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);
>