From patchwork Tue Oct 27 13:50:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 312913 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D77ACC55178 for ; Tue, 27 Oct 2020 14:33:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8CC2720773 for ; Tue, 27 Oct 2020 14:33:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809183; bh=U11Pqb5/KllwWvOKuhjO9gmtVEa+zhlzKUXrp2x5m78=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=14lJgAsboLlWGpN3v/fsbtjdQAdDxMKa179JMkzVtF+xyjSIHkviem7IgIP3pAOLc d1jWWZnmLHR+JJfpQboTg5YcjW68l1JuwqghH7QDNyOdlY1IcSkjaSVdZraq14Sr14 oClQQ1JWuaBY/TIDSy5ftvbEHAAkQJ/EUNxWCD/M= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2897325AbgJ0OdB (ORCPT ); Tue, 27 Oct 2020 10:33:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:59942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2896682AbgJ0OdA (ORCPT ); Tue, 27 Oct 2020 10:33:00 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 70F9B20773; Tue, 27 Oct 2020 14:32:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809180; bh=U11Pqb5/KllwWvOKuhjO9gmtVEa+zhlzKUXrp2x5m78=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EYZGPVgdipCqO3PyBk8Fl04qwP3nfmTSE5hCSwV5qPrKpTVXCHIX9drmok+uoudHL QiIGN2qA/kLOAOu7kbfPUUjTLUb9fMTwTSjoTKsR7nQGg0pbdCcOSuJoZh+8CBXvz3 MEyGNqMAGTPMKjXBBf5RXQYU2H5M79f2bDHYxJV0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Melissa Wen , Daniel Vetter , Sasha Levin Subject: [PATCH 5.4 104/408] drm/vkms: fix xrgb on compute crc Date: Tue, 27 Oct 2020 14:50:42 +0100 Message-Id: <20201027135459.930470954@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Melissa Wen [ Upstream commit 0986191186128b10b6bbfa5220fc587ed5725e49 ] 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 Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200730202524.5upzuh4irboru7my@smtp.gmail.com Signed-off-by: Sasha Levin --- 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 d5585695c64d1..45d6ebbdbdb22 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)); }