[PATCH 2/2] drm/vkms: Modify memset() in compute_crc function
Mamta Shukla
mamtashukla555 at gmail.com
Thu Jan 24 04:54:24 UTC 2019
Replace memset(vaddr_out + src_offset + 24, 0, 8) with
memset(vaddr_out + src_offset + 3, 0, 1) because memset fills
memory in bytes and not in bits.
Signed-off-by: Mamta Shukla <mamtashukla555 at gmail.com>
---
drivers/gpu/drm/vkms/vkms_crc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vkms/vkms_crc.c b/drivers/gpu/drm/vkms/vkms_crc.c
index 13d5ffed9135..886a520300db 100644
--- a/drivers/gpu/drm/vkms/vkms_crc.c
+++ b/drivers/gpu/drm/vkms/vkms_crc.c
@@ -29,7 +29,7 @@ static uint32_t compute_crc(void *vaddr_out, struct vkms_crc_data *crc_out)
+ (i * crc_out->pitch)
+ (j * crc_out->cpp);
/* XRGB format ignores Alpha channel */
- memset(vaddr_out + src_offset + 24, 0, 8);
+ memset(vaddr_out + src_offset + 3, 0, 1);
crc = crc32_le(crc, vaddr_out + src_offset,
sizeof(u32));
}
--
2.17.1
More information about the dri-devel
mailing list