drm/fourcc: fix Amlogic Video Framebuffer Compression macro
PATCH 1/2 drm/fourcc: fix Amlogic Video Framebuffer Compression macro
Fix the Amlogic Video Framebuffer Compression modifier macro to correctly add the layout options, a pair of parenthesis was missing.
--- include/uapi/drm/drm_fourcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/drm/drm_fourcc.h +1 -1
@@ -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 */
Signature · 6 lines
2.22.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm/meson: overlay: fix Amlogic Compressed Framebuffer modifier layout extract
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().
--- drivers/gpu/drm/meson/meson_overlay.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/meson/meson_overlay.c +1 -2
@@ -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;
Signature · 6 lines
2.22.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Neil.
Quoted 5 lines · Neil Armstrong
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 <[email protected]>
Looks correct just looking at the patch below.
I assume you will apply the patch.
Sam
Quoted 24 lines
--- include/uapi/drm/drm_fourcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/drm/drm_fourcc.h +1
-1@@ -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 */ Signature · 6 lines
2.22.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Sam Ravnborg
Hi Neil.
Quoted 3 lines · Neil Armstrong
Fix the Amlogic Video Framebuffer Compression modifier macro to correctly add the layout options, a pair of parenthesis was missing.
Quoted 6 lines
Quoted 2 lines
Fixes d6528ec88309 ("drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression")Signed-off-by Neil Armstrong <[email protected]>Looks correct just looking at the patch below.
Acked-by Sam Ravnborg <[email protected]>I assume you will apply the patch.
Yes, indeed
Thanks !
Neil
Quoted 19 lines
Sam
Quoted 16 lines
--- include/uapi/drm/drm_fourcc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/drm/drm_fourcc.h +1
-1@@ -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))
Quoted 8 lines
Quoted 8 lines
include/uapi/drm/drm_fourcc.h +0
-0/* Amlogic FBC Layouts */ Signature · 6 lines
2.22.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel