Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6DB37C433FE for ; Mon, 28 Mar 2022 15:37:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E70610ED57; Mon, 28 Mar 2022 15:37:16 +0000 (UTC) Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0176C10ED55 for ; Mon, 28 Mar 2022 15:37:13 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 06DFE3200C10; Mon, 28 Mar 2022 11:37:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 28 Mar 2022 11:37:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; bh=HBkfY1Fguy3iaXPfpX0Lv3YYI1mCcP xE0pURKL9eteI=; b=QCpk7J/a/KDVIdn1czsiHhqS1IEGhGb4aTd6NiCJeJGHN6 WstNGKy2E0Wf56Mvk40O4R8TWatAc7VnO1mvhsGeljDJD5M2qi229rDMrPPW84OV UhPYtWeXtCAOWIYGgoirVQfMh+qx3ufhWAZCh/9IA/GAlSjWghSU5jCK/kxkSlbJ q8eTFghMMGGNeC7WxbwVJY5ZLBpFS2+h5ahMMeAG9K9YSPYa6CPrk2LoUpnBriGh vWvUSYdkZu1JZ4LmKhopMEscsm1a6CV/I3jNv52qhuwjrcJez8am9OpMbDHNACiH L+feQ3wuvqaOWRJNYw6/KzQZ9JCsiBpWIsI+Zasw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=HBkfY1 Fguy3iaXPfpX0Lv3YYI1mCcPxE0pURKL9eteI=; b=Frc6fAgfYbULDzfZx2gVU2 L1ltBSEH0A71JOzsAldBBD1Qij4eNy1DT8Rudny1j26Hm5Ri9MEROKQw0EZbz0C0 foihZDDvo8fs9YkWyHEwXzfDiMDVEVJOguwtoDJm/S+4oxt4zRtKd+Dx1LO1wgr0 J+4QMa1/9hMFs+g1vczmzCzlT9GEZqk+Ohzi+PrVNGmeOHgvWzTOT7b6G28QW8Bn M1RZ9LKwduNkKfa1REoCatxiqfxOLTpD8UUjkKoK1OC7YdoPyLL+Sw+WUa4X98qJ u30qbJ5obVzYNbCsbblcQD2ow01UXkr5TLEikghim/jQxFpjC0qfVKtnJauGubVg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudehjedgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Mar 2022 11:37:12 -0400 (EDT) From: Maxime Ripard To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/6] drm/vc4: txp: Force alpha to be 0xff if it's disabled Date: Mon, 28 Mar 2022 17:36:56 +0200 Message-Id: <20220328153659.2382206-4-maxime@cerno.tech> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220328153659.2382206-1-maxime@cerno.tech> References: <20220328153659.2382206-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Daniel Vetter , Maxime Ripard , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" If we use a format that has padding instead of the alpha component (such as XRGB8888), it appears that the Transposer will fill the padding to 0, disregarding what was stored in the input buffer padding. This leads to issues with IGT, since it will set the padding to 0xff, but will then compare the CRC of the two frames which will thus fail. Another nice side effect is that it is now possible to just use the buffer as ARGB. Fixes: 008095e065a8 ("drm/vc4: Add support for the transposer block") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_txp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c index ace2d03649ba..5b4dd644214f 100644 --- a/drivers/gpu/drm/vc4/vc4_txp.c +++ b/drivers/gpu/drm/vc4/vc4_txp.c @@ -304,6 +304,8 @@ static void vc4_txp_connector_atomic_commit(struct drm_connector *conn, if (fb->format->has_alpha) ctrl |= TXP_ALPHA_ENABLE; + else + ctrl |= TXP_ALPHA_INVERT; gem = drm_fb_cma_get_gem_obj(fb, 0); TXP_WRITE(TXP_DST_PTR, gem->paddr + fb->offsets[0]); -- 2.35.1