From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.0 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 autolearn=unavailable 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 503A3C433E0 for ; Wed, 12 Aug 2020 06:34:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EEC620768 for ; Wed, 12 Aug 2020 06:34:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rSttAuP0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZoXBSqpm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EEC620768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ewj50DRP/kp3YMowrER1XMpYZVmybyMrQHscCgMr4U4=; b=rSttAuP0qgciNGREbGFHBslAn vbZlnt2ElZVqGf17rHtF+1sveRfT/Qp/2ES4x+hBjUJlI+CHWlN/ZgY0L66ECKXvljEDwy110Vh7M CslQTHmunwFBO3MvTH8x1p1S56YbLDBToa/as8OqEhxLgvzjyp4u/Q70xs6kArnd0Whfp52I/cp+B veze+UTsksH52TniEoe2F+xvu2AJ6Jyh4AK0PcYYG+n0t9TUtKKylqnXsPU2p6+tCR+Ufz5ynA03o m+PR8ZHaEOUOCIbGgWK24klcy5isvGU9QIqS3iapRuf+GJtoTmEd5kzsUHmLdx1S8XuNWIMAzjf+s QljIrNKjA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5kIq-00049z-UY; Wed, 12 Aug 2020 06:32:00 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5kIo-00049B-Dv; Wed, 12 Aug 2020 06:31:59 +0000 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 6F7AF20768; Wed, 12 Aug 2020 06:31:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597213917; bh=aSKIYDCe9tCyqEEVWCR4TOBC4YZZ/qu7KDEDekxFTko=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZoXBSqpm1KpbUGNJjLg471ehyQ0rOqZl77C3TpyrozdKhrpJaBpDOWgwMFtkYBu4s VBb6Ta6yv989xsvQxX2xY6izCalYXxRHKGtAsR5skSZ2gFlVwZf+KvgAxKbPdY4+ul X2A5CLjS7m4ArqQ5o9dXfKGv+XlH92cGMnxQlRxo= Date: Wed, 12 Aug 2020 08:31:54 +0200 From: Greg KH To: Alyssa Rosenzweig Subject: Re: [PATCH] drm/rockchip: Require the YTR modifier for AFBC Message-ID: <20200812063154.GB1300894@kroah.com> References: <20200811202631.3603-1-alyssa.rosenzweig@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200811202631.3603-1-alyssa.rosenzweig@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200812_023158_659012_EC8A419B X-CRM114-Status: GOOD ( 23.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heiko@sntech.de, airlied@linux.ie, hjc@rock-chips.com, stable@vger.kernel.org, andrzej.p@collabora.com, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, linux-arm-kernel@lists.infradead.org, daniels@collabora.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Aug 11, 2020 at 04:26:31PM -0400, Alyssa Rosenzweig wrote: > The AFBC decoder used in the Rockchip VOP assumes the use of the > YUV-like colourspace transform (YTR). YTR is lossless for RGB(A) > buffers, which covers the RGBA8 and RGB565 formats supported in > vop_convert_afbc_format. Use of YTR is signaled with the > AFBC_FORMAT_MOD_YTR modifier, which prior to this commit was missing. As > such, a producer would have to generate buffers that do not use YTR, > which the VOP would erroneously decode as YTR, leading to severe visual > corruption. > > The upstream AFBC support was developed against a captured frame, which > failed to exercise modifier support. Prior to bring-up of AFBC in Mesa > (in the Panfrost driver), no open userspace respected modifier > reporting. As such, this change is not expected to affect broken > userspaces. > > Tested on RK3399 with Panfrost and Weston. > > Signed-off-by: Alyssa Rosenzweig > --- > drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h > index 4a2099cb5..857d97cdc 100644 > --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h > @@ -17,9 +17,20 @@ > > #define NUM_YUV2YUV_COEFFICIENTS 12 > > +/* AFBC supports a number of configurable modes. Relevant to us is block size > + * (16x16 or 32x8), storage modifiers (SPARSE, SPLIT), and the YUV-like > + * colourspace transform (YTR). 16x16 SPARSE mode is always used. SPLIT mode > + * could be enabled via the hreg_block_split register, but is not currently > + * handled. The colourspace transform is implicitly always assumed by the > + * decoder, so consumers must use this transform as well. > + * > + * Failure to match modifiers will cause errors displaying AFBC buffers > + * produced by conformant AFBC producers, including Mesa. > + */ > #define ROCKCHIP_AFBC_MOD \ > DRM_FORMAT_MOD_ARM_AFBC( \ > AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 | AFBC_FORMAT_MOD_SPARSE \ > + | AFBC_FORMAT_MOD_YTR \ > ) > > enum vop_data_format { > -- > 2.28.0 > This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel