[PATCH] drm/vkms: fix xrgb on compute crc

0 views
Skip to first unread message

Melissa Wen

unread,
Jul 30, 2020, 4:25:33 PM7/30/20
to Rodrigo Siqueira, Haneen Mohammed, Daniel Vetter, David Airlie, Rodrigo Siqueira, twoe...@gmail.com, dri-...@lists.freedesktop.org, linux-...@vger.kernel.org, kerne...@googlegroups.com
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")

Signed-off-by: Melissa Wen <melis...@gmail.com>
---
drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
index 4af2f19480f4..b8b060354667 100644
--- a/drivers/gpu/drm/vkms/vkms_composer.c
+++ b/drivers/gpu/drm/vkms/vkms_composer.c
@@ -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));
}
--
2.27.0

dan...@ffwll.ch

unread,
Jul 31, 2020, 5:28:16 AM7/31/20
to Rodrigo Siqueira, Haneen Mohammed, Daniel Vetter, David Airlie, Rodrigo Siqueira, twoe...@gmail.com, dri-...@lists.freedesktop.org, linux-...@vger.kernel.org, kerne...@googlegroups.com
On Thu, Jul 30, 2020 at 05:25:24PM -0300, Melissa Wen wrote:
> 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")
>
> Signed-off-by: Melissa Wen <melis...@gmail.com>

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

> ---
> drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
> index 4af2f19480f4..b8b060354667 100644
> --- a/drivers/gpu/drm/vkms/vkms_composer.c
> +++ b/drivers/gpu/drm/vkms/vkms_composer.c
> @@ -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
> crc = crc32_le(crc, vaddr_out + src_offset,
> sizeof(u32));
> }
> --
> 2.27.0
>

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Reply all
Reply to author
Forward
0 new messages