Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2287082iof; Wed, 8 Jun 2022 01:28:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy65PGyXWUheAZLfKyElgglGwjifx35opSmBL4cYM2fPNaRObaAL9VUc64ilVdOBZyo3nV8 X-Received: by 2002:a65:6bcc:0:b0:3f6:1815:f541 with SMTP id e12-20020a656bcc000000b003f61815f541mr28184651pgw.183.1654676924792; Wed, 08 Jun 2022 01:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654676924; cv=none; d=google.com; s=arc-20160816; b=DxOIU2iuWqrRfcBJ5l+d+m4rnyrK/t4ocNZt0etERz4yvWGdw0rkN14qF3IPkcf9GB uIHIkxXmwgBbQQ6tOaUE1zXHJSovOjxTQ8TbI/GuKHM3cgFKpob8lpy0cShcBkbmEDE+ 2lGghEX3zkhtUFcEinCBS+N/bW2/KQ0wQn97krRI18A5LOMRDihKBlNgFp1C+USh/Z5P H8/3STOJaWzh4K6opQcmDGol2Ty+0/z4nkS0403mT5FI6DBTxrcs1jfyfGZVDwqDFmTO IuV8Fv15z83X8My0dMroDWMxs8cjwao7i0QYXRhFe388zH9iqn3/FeZpM1mI/37UQOAd nY1w== 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=m81WY5Kopyi5gJSKmlP1rP1xoglNpoiqXTEBo86wj+8=; b=Q4Pldwvi6gQScrDJ8RhYkTVNSw20dSqXMjbemiKvY4q+0CZm2l7WW06du6zzMhuRik sEMCyAYhT8MKpPzWf5zmzwDL7HLd7oq0wtTdLlR3Nenq4GkOCSP4DfifCoA0nlNVqlLc ggvhML0Py/wrAwbAhF5stYSFJCCatlF238P1XYejDvr9XJ9Gej77CvL2BjAuSJVmZgXk tVV1wEOc6MBVepGC2KI3cqU8y8g9fKfDB1U/CD+Wb4LAs0zDB/wA8mFszde99rJxK8T2 yZUD8DRVCCvXwmNSSb+ezYQnYd2T1OWnveiCRbYOyVqtz+6HCHu4aBeSDfZint27xxGW yFJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vASabPSJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id x18-20020a656ab2000000b003fc85d9bc40si27892544pgu.161.2022.06.08.01.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:28:44 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vASabPSJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 06296EE8F1; Wed, 8 Jun 2022 00:57:53 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379048AbiFGUwv (ORCPT + 99 others); Tue, 7 Jun 2022 16:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358612AbiFGTwp (ORCPT ); Tue, 7 Jun 2022 15:52:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C30D331374; Tue, 7 Jun 2022 11:21:27 -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 74A92B82368; Tue, 7 Jun 2022 18:21:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D147AC385A5; Tue, 7 Jun 2022 18:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654626085; bh=Aq7vSxKcjetfj93aKlRfrOrn3yESDQPRup+E2ckv/ac=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vASabPSJBsihLSViFASSXL54vkjy/KLKUMIMWCGi6Rnue2CiXElGFnEvHS69WUQ8A q+kua9bJXRcBHnOU19bFBOqLkozKVdMZdBtpxBexpWoU4aB0/Qf94QbZvYo87F/sbf gaxw3ljY4TzTjAprFl9OYhKiAKztqRfVIYfvZKAI= 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.17 250/772] drm/vc4: txp: Force alpha to be 0xff if its disabled Date: Tue, 7 Jun 2022 18:57:22 +0200 Message-Id: <20220607164956.393497105@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164948.980838585@linuxfoundation.org> References: <20220607164948.980838585@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 ace2d03649ba..82beb8c159f2 100644 --- a/drivers/gpu/drm/vc4/vc4_txp.c +++ b/drivers/gpu/drm/vc4/vc4_txp.c @@ -304,6 +304,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