All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/stm: attach gem fence to atomic state
@ 2019-07-12  8:42 Lucas Stach
  2019-07-19 13:35 ` Philippe CORNU
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas Stach @ 2019-07-12  8:42 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard, Vincent Abriou
  Cc: kernel, Ahmad Fatoum, linux-stm32, dri-devel, patchwork-lst

From: Ahmad Fatoum <a.fatoum@pengutronix.de>

To properly synchronize with other devices the fence from the GEM
object backing the framebuffer needs to be attached to the atomic
state, so the commit work can wait on fence signaling.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/gpu/drm/stm/ltdc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 2fe6c4a8d915..3ab4fbf8eb0d 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -26,6 +26,7 @@
 #include <drm/drm_fb_cma_helper.h>
 #include <drm/drm_fourcc.h>
 #include <drm/drm_gem_cma_helper.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_of.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_probe_helper.h>
@@ -922,6 +923,7 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
 };
 
 static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
+	.prepare_fb = drm_gem_fb_prepare_fb,
 	.atomic_check = ltdc_plane_atomic_check,
 	.atomic_update = ltdc_plane_atomic_update,
 	.atomic_disable = ltdc_plane_atomic_disable,
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/stm: attach gem fence to atomic state
  2019-07-12  8:42 [PATCH] drm/stm: attach gem fence to atomic state Lucas Stach
@ 2019-07-19 13:35 ` Philippe CORNU
  2019-07-25 10:06   ` Benjamin Gaignard
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe CORNU @ 2019-07-19 13:35 UTC (permalink / raw)
  To: Lucas Stach, Yannick FERTRE, Benjamin Gaignard, Vincent ABRIOU
  Cc: kernel, Ahmad Fatoum, linux-stm32, dri-devel, patchwork-lst

Hi Lucas & Ahmad,

Many thanks for your patch,

Tested successfully on stm32mp157-dk2 (weston & drm).

Acked-by: Philippe Cornu <philippe.cornu@st.com>
Tested-by: Philippe Cornu <philippe.cornu@st.com>

Philippe :-)

On 7/12/19 10:42 AM, Lucas Stach wrote:
> From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> 
> To properly synchronize with other devices the fence from the GEM
> object backing the framebuffer needs to be attached to the atomic
> state, so the commit work can wait on fence signaling.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 2fe6c4a8d915..3ab4fbf8eb0d 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -26,6 +26,7 @@
>   #include <drm/drm_fb_cma_helper.h>
>   #include <drm/drm_fourcc.h>
>   #include <drm/drm_gem_cma_helper.h>
> +#include <drm/drm_gem_framebuffer_helper.h>
>   #include <drm/drm_of.h>
>   #include <drm/drm_plane_helper.h>
>   #include <drm/drm_probe_helper.h>
> @@ -922,6 +923,7 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
>   };
>   
>   static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
> +	.prepare_fb = drm_gem_fb_prepare_fb,
>   	.atomic_check = ltdc_plane_atomic_check,
>   	.atomic_update = ltdc_plane_atomic_update,
>   	.atomic_disable = ltdc_plane_atomic_disable,
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/stm: attach gem fence to atomic state
  2019-07-19 13:35 ` Philippe CORNU
@ 2019-07-25 10:06   ` Benjamin Gaignard
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Gaignard @ 2019-07-25 10:06 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Ahmad Fatoum, dri-devel, patchwork-lst, Yannick FERTRE, kernel,
	Vincent ABRIOU, linux-stm32

Le ven. 19 juil. 2019 à 15:35, Philippe CORNU <philippe.cornu@st.com> a écrit :
>
> Hi Lucas & Ahmad,
>
> Many thanks for your patch,
>
> Tested successfully on stm32mp157-dk2 (weston & drm).
>
> Acked-by: Philippe Cornu <philippe.cornu@st.com>
> Tested-by: Philippe Cornu <philippe.cornu@st.com>

Applied on drm-misc-next.
Thanks,
Benjamin

>
> Philippe :-)
>
> On 7/12/19 10:42 AM, Lucas Stach wrote:
> > From: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >
> > To properly synchronize with other devices the fence from the GEM
> > object backing the framebuffer needs to be attached to the atomic
> > state, so the commit work can wait on fence signaling.
> >
> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> >   drivers/gpu/drm/stm/ltdc.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> > index 2fe6c4a8d915..3ab4fbf8eb0d 100644
> > --- a/drivers/gpu/drm/stm/ltdc.c
> > +++ b/drivers/gpu/drm/stm/ltdc.c
> > @@ -26,6 +26,7 @@
> >   #include <drm/drm_fb_cma_helper.h>
> >   #include <drm/drm_fourcc.h>
> >   #include <drm/drm_gem_cma_helper.h>
> > +#include <drm/drm_gem_framebuffer_helper.h>
> >   #include <drm/drm_of.h>
> >   #include <drm/drm_plane_helper.h>
> >   #include <drm/drm_probe_helper.h>
> > @@ -922,6 +923,7 @@ static const struct drm_plane_funcs ltdc_plane_funcs = {
> >   };
> >
> >   static const struct drm_plane_helper_funcs ltdc_plane_helper_funcs = {
> > +     .prepare_fb = drm_gem_fb_prepare_fb,
> >       .atomic_check = ltdc_plane_atomic_check,
> >       .atomic_update = ltdc_plane_atomic_update,
> >       .atomic_disable = ltdc_plane_atomic_disable,
> >
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-07-25 10:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12  8:42 [PATCH] drm/stm: attach gem fence to atomic state Lucas Stach
2019-07-19 13:35 ` Philippe CORNU
2019-07-25 10:06   ` Benjamin Gaignard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.