Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp569220iog; Mon, 13 Jun 2022 08:18:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRHYeZlmXvxr1D6jpYLUtottO3n9qLkNKPA1v8xzrf3i9TtZeIwknXkPG+XzIDHnHIIpf8 X-Received: by 2002:a17:906:7a5c:b0:712:38a6:9ac0 with SMTP id i28-20020a1709067a5c00b0071238a69ac0mr293336ejo.713.1655133533373; Mon, 13 Jun 2022 08:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655133533; cv=none; d=google.com; s=arc-20160816; b=L1C/yicSRbYLEpUN672Fw37/xJEv3Zw6Qtd5zyCTy4NjjhIvmSbXN04xRXy5joXK02 ndt1rivfoNqqZlx+X7WIgXHzIerem555WJimM6H2LYXn+dm5fbpF+ojWCSPQQdXiixnd 4PkwTxAvODoeLcdmETEBk5/bV37H7h2X7o+S31q1KEiX+3G3Hk5H0vZO9QEE15BYh1E1 iLBoi8ersoug8B/80iv+8O+7jc8/zk3rMdPFhTVDTdYXR12GtKTZ054EH4G5xN3CFx6r lY9bGX3znn29JY3cCezSl7NuyoQ3K5RlWdkDoYmkCizWMtM8wgMW6B7bAzVcTW00EDxM Kw/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=urr3Kjn44HTLT1zSxvm7WQ14A8ChvdxKWZ2cICIAUmo=; b=myVI4ilATQs3r3J0ZhlG+/MAPghBqqmX/f8KEk1i1QqEbwf00/s0t1rIRbueKXjv4J RhbvZ7hsYsR8/2XsI8n+LsHdJ5/H9l3WTKV+zptcliOjkIXxtBOf0cjS4TITV8xl1O6y 8RsnyVokZiP/8KgCLODGfjjSRKSSvXZx1Zvf80RS/b35aXPCJVUk36QzvNEnB1rx3sP8 RpSQz9Aed1E42rzaZcNRDvvcbQXgcFZ1qGdGKzFT7mA+Go3d2nua4j7fZVEWxwj+cLME NJ7720b2gxRG/iRcVBgPU6JmLQt4b1dyKtXOXzx/tEA0cj587RxOEoBJ/GzNJgvvRDxI KH9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fWSz6cHB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc12-20020a1709071c0c00b007117f5643c5si9556468ejc.267.2022.06.13.08.18.28; Mon, 13 Jun 2022 08:18:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fWSz6cHB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350934AbiFMLJp (ORCPT + 99 others); Mon, 13 Jun 2022 07:09:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351841AbiFMLFI (ORCPT ); Mon, 13 Jun 2022 07:05:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E1A127FC1; Mon, 13 Jun 2022 03:34:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EB7A2B80E5C; Mon, 13 Jun 2022 10:34:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5901CC34114; Mon, 13 Jun 2022 10:34:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116453; bh=4MhuP+PzGuPC0rV50BO8x+3UT4LdGj2SK5oU1LoYP6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fWSz6cHBVRnC2a7V9uU/140LvThNMpy92ADM+/VHmUt8eZNSMIX6sET2+yTItbTWf vWC6WDyaLDkQArlvLGh38aVeU6024qLORvHzRA/GzV/1cjslreXwgRAS3VKfD4SoFy eRKNCvV8x+XorcFSovjClWQI6omM0B/p5cJZCsEI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maxime Ripard , Thomas Zimmermann , Sasha Levin Subject: [PATCH 5.4 089/411] drm/vc4: txp: Force alpha to be 0xff if its disabled Date: Mon, 13 Jun 2022 12:06:02 +0200 Message-Id: <20220613094931.350002662@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Ripard [ Upstream commit 5453343a88ede8b12812fced81ecd24cb888ccc3 ] 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 Acked-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20220328153659.2382206-4-maxime@cerno.tech Signed-off-by: Sasha Levin --- drivers/gpu/drm/vc4/vc4_txp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c index 2342b49c16dd..0d9263f65d95 100644 --- a/drivers/gpu/drm/vc4/vc4_txp.c +++ b/drivers/gpu/drm/vc4/vc4_txp.c @@ -291,6 +291,12 @@ static void vc4_txp_connector_atomic_commit(struct drm_connector *conn, if (fb->format->has_alpha) ctrl |= TXP_ALPHA_ENABLE; + else + /* + * If TXP_ALPHA_ENABLE isn't set and TXP_ALPHA_INVERT is, the + * hardware will force the output padding to be 0xff. + */ + 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