Linux-Amlogic Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro
@ 2020-07-23  9:05 Neil Armstrong
  2020-07-23  9:05 ` [PATCH 2/2] drm/meson: overlay: fix Amlogic Compressed Framebuffer modifier layout extract Neil Armstrong
  2020-07-26 17:25 ` [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro Sam Ravnborg
  0 siblings, 2 replies; 4+ messages in thread
From: Neil Armstrong @ 2020-07-23  9:05 UTC (permalink / raw)
  To: daniel; +Cc: khilman, Neil Armstrong, linux-kernel, dri-devel, linux-amlogic

Fix the Amlogic Video Framebuffer Compression modifier macro to
correctly add the layout options, a pair of parenthesis was missing.

Fixes: d6528ec88309 ("drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 include/uapi/drm/drm_fourcc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index 4bee7de5f306..82f327801267 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -1004,7 +1004,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
 #define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \
 	fourcc_mod_code(AMLOGIC, \
 			((__layout) & __fourcc_mod_amlogic_layout_mask) | \
-			((__options) & __fourcc_mod_amlogic_options_mask \
+			(((__options) & __fourcc_mod_amlogic_options_mask) \
 			 << __fourcc_mod_amlogic_options_shift))
 
 /* Amlogic FBC Layouts */
-- 
2.22.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCH 2/2] drm/meson: overlay: fix Amlogic Compressed Framebuffer modifier layout extract
  2020-07-23  9:05 [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro Neil Armstrong
@ 2020-07-23  9:05 ` Neil Armstrong
  2020-07-26 17:25 ` [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro Sam Ravnborg
  1 sibling, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2020-07-23  9:05 UTC (permalink / raw)
  To: daniel; +Cc: khilman, Neil Armstrong, linux-kernel, dri-devel, linux-amlogic

The bitwise operation worked because the result is casted in a lower bits
integer, and was not changed after the modifier defines rework.

Use the correct operation as already used in meson_overlay_atomic_update().

Fixes: e860785d5730 ("drm/meson: overlay: setup overlay for Amlogic FBC")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 drivers/gpu/drm/meson/meson_overlay.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/meson/meson_overlay.c b/drivers/gpu/drm/meson/meson_overlay.c
index a8bcc70644df..83ec613bbfb6 100644
--- a/drivers/gpu/drm/meson/meson_overlay.c
+++ b/drivers/gpu/drm/meson/meson_overlay.c
@@ -756,8 +756,7 @@ static bool meson_overlay_format_mod_supported(struct drm_plane *plane,
 	if ((modifier & DRM_FORMAT_MOD_AMLOGIC_FBC(0, 0)) ==
 			DRM_FORMAT_MOD_AMLOGIC_FBC(0, 0)) {
 		unsigned int layout = modifier &
-			DRM_FORMAT_MOD_AMLOGIC_FBC(
-				__fourcc_mod_amlogic_layout_mask, 0);
+			__fourcc_mod_amlogic_layout_mask;
 		unsigned int options =
 			(modifier >> __fourcc_mod_amlogic_options_shift) &
 			__fourcc_mod_amlogic_options_mask;
-- 
2.22.0


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro
  2020-07-23  9:05 [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro Neil Armstrong
  2020-07-23  9:05 ` [PATCH 2/2] drm/meson: overlay: fix Amlogic Compressed Framebuffer modifier layout extract Neil Armstrong
@ 2020-07-26 17:25 ` Sam Ravnborg
  2020-07-27  7:28   ` Neil Armstrong
  1 sibling, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2020-07-26 17:25 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: khilman, dri-devel, linux-kernel, daniel, linux-amlogic

Hi Neil.

On Thu, Jul 23, 2020 at 11:05:50AM +0200, Neil Armstrong wrote:
> Fix the Amlogic Video Framebuffer Compression modifier macro to
> correctly add the layout options, a pair of parenthesis was missing.
> 
> Fixes: d6528ec88309 ("drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Looks correct just looking at the patch below.
Acked-by: Sam Ravnborg <sam@ravnborg.org>

I assume you will apply the patch.

	Sam

> ---
>  include/uapi/drm/drm_fourcc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
> index 4bee7de5f306..82f327801267 100644
> --- a/include/uapi/drm/drm_fourcc.h
> +++ b/include/uapi/drm/drm_fourcc.h
> @@ -1004,7 +1004,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
>  #define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \
>  	fourcc_mod_code(AMLOGIC, \
>  			((__layout) & __fourcc_mod_amlogic_layout_mask) | \
> -			((__options) & __fourcc_mod_amlogic_options_mask \
> +			(((__options) & __fourcc_mod_amlogic_options_mask) \
>  			 << __fourcc_mod_amlogic_options_shift))
>  
>  /* Amlogic FBC Layouts */
> -- 
> 2.22.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro
  2020-07-26 17:25 ` [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro Sam Ravnborg
@ 2020-07-27  7:28   ` Neil Armstrong
  0 siblings, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2020-07-27  7:28 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: khilman, dri-devel, linux-kernel, daniel, linux-amlogic

On 26/07/2020 19:25, Sam Ravnborg wrote:
> Hi Neil.
> 
> On Thu, Jul 23, 2020 at 11:05:50AM +0200, Neil Armstrong wrote:
>> Fix the Amlogic Video Framebuffer Compression modifier macro to
>> correctly add the layout options, a pair of parenthesis was missing.
>>
>> Fixes: d6528ec88309 ("drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression")
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> Looks correct just looking at the patch below.
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
> 
> I assume you will apply the patch.

Yes, indeed

Thanks !
Neil

> 
> 	Sam
> 
>> ---
>>  include/uapi/drm/drm_fourcc.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
>> index 4bee7de5f306..82f327801267 100644
>> --- a/include/uapi/drm/drm_fourcc.h
>> +++ b/include/uapi/drm/drm_fourcc.h
>> @@ -1004,7 +1004,7 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier)
>>  #define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \
>>  	fourcc_mod_code(AMLOGIC, \
>>  			((__layout) & __fourcc_mod_amlogic_layout_mask) | \
>> -			((__options) & __fourcc_mod_amlogic_options_mask \
>> +			(((__options) & __fourcc_mod_amlogic_options_mask) \
>>  			 << __fourcc_mod_amlogic_options_shift))
>>  
>>  /* Amlogic FBC Layouts */
>> -- 
>> 2.22.0
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23  9:05 [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro Neil Armstrong
2020-07-23  9:05 ` [PATCH 2/2] drm/meson: overlay: fix Amlogic Compressed Framebuffer modifier layout extract Neil Armstrong
2020-07-26 17:25 ` [PATCH 1/2] drm/fourcc: fix Amlogic Video Framebuffer Compression macro Sam Ravnborg
2020-07-27  7:28   ` Neil Armstrong

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org
	public-inbox-index linux-amlogic

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git