Skip to contentSkip to conversation

drm/vkms: fix xrgb on compute crc

PATCH Applied Melissa Wen 2 participants 2 messages Jul 30, 2020 – Jul 31, 2020

Subsystems (3)
lore
Share & tools
lore

Melissa Wen

author reviewer
#0 lore raw

PATCH 1/1 drm/vkms: fix xrgb on compute crc

The previous memset operation was not correctly zeroing the alpha channel to compute the crc, and as a result, the IGT subtest kms_cursor_crc/pipe-A-cursor-alpha-transparent fails.

Fixes db7f419c06d7c ("drm/vkms: Compute CRC with Cursor Plane")
---
 drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vkms/vkms_composer.c +1 -1
index 4af2f19480f4..b8b060354667 100644
@@ -33,7 +33,7 @@ static uint32_t compute_crc(void *vaddr_out, struct vkms_composer *composer)
 				     + (i * composer->pitch)
 				     + (j * composer->cpp);
 			/* XRGB format ignores Alpha channel */
-			memset(vaddr_out + src_offset + 24, 0,  8);
+			bitmap_clear(vaddr_out + src_offset, 24, 8);
 			crc = crc32_le(crc, vaddr_out + src_offset,
 				       sizeof(u32));
 		}
Signature · 6 lines
2.27.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 7 lines · Melissa Wen

The previous memset operation was not correctly zeroing the alpha channel to compute the crc, and as a result, the IGT subtest kms_cursor_crc/pipe-A-cursor-alpha-transparent fails.

Fixes db7f419c06d7c ("drm/vkms: Compute CRC with Cursor Plane")

Applied to drm-misc-next, thanks for your patch.

Quoted 9 lines
---
 drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vkms/vkms_composer.c +0 -0
index 4af2f19480f4..b8b060354667 100644

drivers/gpu/drm/vkms/vkms_composer.c static uint32_t compute_crc(void *vaddr_out, struct vkms_composer *composer) · line 36

Quoted 5 lines
drivers/gpu/drm/vkms/vkms_composer.c +1 -1
@@ -33,7 +33,7 @@ static uint32_t compute_crc(void *vaddr_out, struct vkms_composer *composer)
 				     + (i * composer->pitch)
 				     + (j * composer->cpp);
 			/* XRGB format ignores Alpha channel */
-			memset(vaddr_out + src_offset + 24, 0,  8);
+			bitmap_clear(vaddr_out + src_offset, 24, 8);

Yeah that's a pretty good "oops" oversight on review, nice catch!

Cheers, Daniel

Quoted 6 lines
drivers/gpu/drm/vkms/vkms_composer.c +0 -0
 			crc = crc32_le(crc, vaddr_out + src_offset,
 				       sizeof(u32));
 		}
Signature · 1 line
2.27.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel