diff mbox series

drm/meson: Add implicit fencing support for primary and overlay planes

Message ID 1542621759-26413-1-git-send-email-koen@dominion.thruhere.net (mailing list archive)
State New, archived
Headers show
Series drm/meson: Add implicit fencing support for primary and overlay planes | expand

Commit Message

Koen Kooi Nov. 19, 2018, 10:02 a.m. UTC
Suggested by Qiang Yu <yuq825@gmail.com> to fix tearing artefacts in the
Kodi GUI.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 drivers/gpu/drm/meson/meson_overlay.c | 2 ++
 drivers/gpu/drm/meson/meson_plane.c   | 2 ++
 2 files changed, 4 insertions(+)

Comments

Neil Armstrong Nov. 20, 2018, 9:21 a.m. UTC | #1
Hi Koen,

On 19/11/2018 11:02, Koen Kooi wrote:
> Suggested by Qiang Yu <yuq825@gmail.com> to fix tearing artefacts in the
> Kodi GUI.

Thanks, indeed this fixes implicit fencing when using Lima on Amlogic Meson SoCs.

Any objection to merge this ?

Neil

> 
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
>  drivers/gpu/drm/meson/meson_overlay.c | 2 ++
>  drivers/gpu/drm/meson/meson_plane.c   | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/meson/meson_overlay.c b/drivers/gpu/drm/meson/meson_overlay.c
> index 9aebc5e..691a9fd 100644
> --- a/drivers/gpu/drm/meson/meson_overlay.c
> +++ b/drivers/gpu/drm/meson/meson_overlay.c
> @@ -16,6 +16,7 @@
>  #include <drm/drm_plane_helper.h>
>  #include <drm/drm_gem_cma_helper.h>
>  #include <drm/drm_fb_cma_helper.h>
> +#include <drm/drm_gem_framebuffer_helper.h>
>  #include <drm/drm_rect.h>
>  
>  #include "meson_overlay.h"
> @@ -532,6 +533,7 @@ static const struct drm_plane_helper_funcs meson_overlay_helper_funcs = {
>  	.atomic_check	= meson_overlay_atomic_check,
>  	.atomic_disable	= meson_overlay_atomic_disable,
>  	.atomic_update	= meson_overlay_atomic_update,
> +	.prepare_fb	= drm_gem_fb_prepare_fb,
>  };
>  
>  static const struct drm_plane_funcs meson_overlay_funcs = {
> diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c
> index 12a47b4..8ee2cf9 100644
> --- a/drivers/gpu/drm/meson/meson_plane.c
> +++ b/drivers/gpu/drm/meson/meson_plane.c
> @@ -32,6 +32,7 @@
>  #include <drm/drm_plane_helper.h>
>  #include <drm/drm_gem_cma_helper.h>
>  #include <drm/drm_fb_cma_helper.h>
> +#include <drm/drm_gem_framebuffer_helper.h>
>  #include <drm/drm_rect.h>
>  
>  #include "meson_plane.h"
> @@ -322,6 +323,7 @@ static const struct drm_plane_helper_funcs meson_plane_helper_funcs = {
>  	.atomic_check	= meson_plane_atomic_check,
>  	.atomic_disable	= meson_plane_atomic_disable,
>  	.atomic_update	= meson_plane_atomic_update,
> +	.prepare_fb	= drm_gem_fb_prepare_fb,
>  };
>  
>  static const struct drm_plane_funcs meson_plane_funcs = {
>
Neil Armstrong Nov. 21, 2018, 11:21 a.m. UTC | #2
On 20/11/2018 10:21, Neil Armstrong wrote:
> Hi Koen,
> 
> On 19/11/2018 11:02, Koen Kooi wrote:
>> Suggested by Qiang Yu <yuq825@gmail.com> to fix tearing artefacts in the
>> Kodi GUI.
> 
> Thanks, indeed this fixes implicit fencing when using Lima on Amlogic Meson SoCs.
> 
> Any objection to merge this ?
> 
> Neil
> 
>>
>> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
>> ---
>>  drivers/gpu/drm/meson/meson_overlay.c | 2 ++
>>  drivers/gpu/drm/meson/meson_plane.c   | 2 ++
>>  2 files changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/meson/meson_overlay.c b/drivers/gpu/drm/meson/meson_overlay.c
>> index 9aebc5e..691a9fd 100644
>> --- a/drivers/gpu/drm/meson/meson_overlay.c
>> +++ b/drivers/gpu/drm/meson/meson_overlay.c
>> @@ -16,6 +16,7 @@
>>  #include <drm/drm_plane_helper.h>
>>  #include <drm/drm_gem_cma_helper.h>
>>  #include <drm/drm_fb_cma_helper.h>
>> +#include <drm/drm_gem_framebuffer_helper.h>
>>  #include <drm/drm_rect.h>
>>  
>>  #include "meson_overlay.h"
>> @@ -532,6 +533,7 @@ static const struct drm_plane_helper_funcs meson_overlay_helper_funcs = {
>>  	.atomic_check	= meson_overlay_atomic_check,
>>  	.atomic_disable	= meson_overlay_atomic_disable,
>>  	.atomic_update	= meson_overlay_atomic_update,
>> +	.prepare_fb	= drm_gem_fb_prepare_fb,
>>  };
>>  
>>  static const struct drm_plane_funcs meson_overlay_funcs = {
>> diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c
>> index 12a47b4..8ee2cf9 100644
>> --- a/drivers/gpu/drm/meson/meson_plane.c
>> +++ b/drivers/gpu/drm/meson/meson_plane.c
>> @@ -32,6 +32,7 @@
>>  #include <drm/drm_plane_helper.h>
>>  #include <drm/drm_gem_cma_helper.h>
>>  #include <drm/drm_fb_cma_helper.h>
>> +#include <drm/drm_gem_framebuffer_helper.h>
>>  #include <drm/drm_rect.h>
>>  
>>  #include "meson_plane.h"
>> @@ -322,6 +323,7 @@ static const struct drm_plane_helper_funcs meson_plane_helper_funcs = {
>>  	.atomic_check	= meson_plane_atomic_check,
>>  	.atomic_disable	= meson_plane_atomic_disable,
>>  	.atomic_update	= meson_plane_atomic_update,
>> +	.prepare_fb	= drm_gem_fb_prepare_fb,
>>  };
>>  
>>  static const struct drm_plane_funcs meson_plane_funcs = {
>>
> 

Acked-by: Neil Armstrong <narmstrong@baylibre.com>

Added Suggested-by tag when applied to drm-misc-next.

Thanks,
Neil
diff mbox series

Patch

diff --git a/drivers/gpu/drm/meson/meson_overlay.c b/drivers/gpu/drm/meson/meson_overlay.c
index 9aebc5e..691a9fd 100644
--- a/drivers/gpu/drm/meson/meson_overlay.c
+++ b/drivers/gpu/drm/meson/meson_overlay.c
@@ -16,6 +16,7 @@ 
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_rect.h>
 
 #include "meson_overlay.h"
@@ -532,6 +533,7 @@  static const struct drm_plane_helper_funcs meson_overlay_helper_funcs = {
 	.atomic_check	= meson_overlay_atomic_check,
 	.atomic_disable	= meson_overlay_atomic_disable,
 	.atomic_update	= meson_overlay_atomic_update,
+	.prepare_fb	= drm_gem_fb_prepare_fb,
 };
 
 static const struct drm_plane_funcs meson_overlay_funcs = {
diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c
index 12a47b4..8ee2cf9 100644
--- a/drivers/gpu/drm/meson/meson_plane.c
+++ b/drivers/gpu/drm/meson/meson_plane.c
@@ -32,6 +32,7 @@ 
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_fb_cma_helper.h>
+#include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_rect.h>
 
 #include "meson_plane.h"
@@ -322,6 +323,7 @@  static const struct drm_plane_helper_funcs meson_plane_helper_funcs = {
 	.atomic_check	= meson_plane_atomic_check,
 	.atomic_disable	= meson_plane_atomic_disable,
 	.atomic_update	= meson_plane_atomic_update,
+	.prepare_fb	= drm_gem_fb_prepare_fb,
 };
 
 static const struct drm_plane_funcs meson_plane_funcs = {