Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10209132ybi; Thu, 11 Jul 2019 01:30:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVF9RjY41XT2WuzJd63JwRP4V9XswTdNjOEmqOrtVqyJsInMLb9Ence4FSUf3mXrfzl67o X-Received: by 2002:a17:902:5a2:: with SMTP id f31mr3259169plf.72.1562833801432; Thu, 11 Jul 2019 01:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562833801; cv=none; d=google.com; s=arc-20160816; b=sOV/VzfeHhCjKctwxCK8PaFWCFhYX8oB+DsQ0TnsK7C3Yy7jru9aEfOym24hbe8SzN BkWQIw5T4Sq2huyWP51k6R2/IbQ0Ukq9SOXnc0FXqJqoeshyxXA2Qa7kZz1TKrDWAx/I gz51/2od6dsxUl1fGkfI1lbgBWo6aqivfEqiwg6AzdABkek3YbJW7720pwaPw2WCegmI Q/XhXLWpfBnDNH4a51Q7vJoDjNjWYU4Anj1Sr3+h97gN5SCLepwTbe1yJ/NaYvmzkEG0 a7Ot9O6Jy47E5WJNr5tx8y0fRBbZ2Ko9hk2NGenSeyxEISE77PNo7xZS1xoMXHPCehEv zkPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:reply-to:cc :from:to:dkim-signature:date; bh=uO/ecoIZ2xzNWLdcDpPcmeAWP8zlhJ3RlT1sV4HBWmw=; b=z01mR7BwGUEZARCAb17IKD+PbC7t8d46jrV5ixSvZ7PZ9AxXEJs3OaR1rJRRO45tmC 4OYflycIFyYh4f/R0qPAE67wKesgoTZxassdWazyq4Crp78AWzeDG1TH7YJybJuSnZqI JQweoLBgKHHtmKU6FxScAmodrWEmT4pklK18PqLXGvvPDfbhHvmdWxbUI0fG0xkzEeVJ oqVrW3OPTAayLaAmmO8AY4maWy1I1pcefjt3dzTpw0FlNmtAFl+01q3AI65LRQTrgBz/ 0MM9TAc3DyvGMuHwQFRnzjVubMlj8dVgzoUqMN1xr3TzO6F6euCAOwiV+D0WW5wp11Yg j8GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail header.b=iRvRu6fn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d32si4971013pgm.570.2019.07.11.01.29.45; Thu, 11 Jul 2019 01:30:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail header.b=iRvRu6fn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728190AbfGKI23 (ORCPT + 99 others); Thu, 11 Jul 2019 04:28:29 -0400 Received: from mail1.protonmail.ch ([185.70.40.18]:34316 "EHLO mail1.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725963AbfGKI22 (ORCPT ); Thu, 11 Jul 2019 04:28:28 -0400 Date: Thu, 11 Jul 2019 08:28:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail; t=1562833706; bh=uO/ecoIZ2xzNWLdcDpPcmeAWP8zlhJ3RlT1sV4HBWmw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=iRvRu6fn8uLULxJGDBqYbkw16kiVfajS53oG9l4Krbq11GjnhOYVHxR9/vbDD+A8K tAc81R2aMl37+/3IvtzLPPP6Ic+CHW3G3yYBfgRUHhZTsIBVthtfHrhKqUNS3rscM7 pl2UfCfEt8Bm6//efUUusEn9PiOqGt9I42Uaao+Q= To: Daniel Vetter From: Simon Ser Cc: Rodrigo Siqueira , Brian Starkey , Liviu Dudau , Haneen Mohammed , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Reply-To: Simon Ser Subject: Re: [PATCH V3 4/5] drm/vkms: Compute CRC without change input data Message-ID: In-Reply-To: <20190711082105.GI15868@phenom.ffwll.local> References: <20190711082105.GI15868@phenom.ffwll.local> Feedback-ID: FsVprHBOgyvh0T8bxcZ0CmvJCosWkwVUg658e_lOUQMnA9qynD8O1lGeniuBDfPSkDAUuhiKfOIXUZBfarMyvA==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, July 11, 2019 11:21 AM, Daniel Vetter wrote: > On Tue, Jun 25, 2019 at 10:38:31PM -0300, Rodrigo Siqueira wrote: > > > The compute_crc() function is responsible for calculating the > > framebuffer CRC value; due to the XRGB format, this function has to > > ignore the alpha channel during the CRC computation. Therefore, > > compute_crc() set zero to the alpha channel directly in the input > > framebuffer, which is not a problem since this function receives a copy > > of the original buffer. However, if we want to use this function in a > > context without a buffer copy, it will change the initial value. This > > patch makes compute_crc() calculate the CRC value without modifying the > > input framebuffer. > > Uh why? For writeback we're writing the output too, so we can write > whatever we want to into the alpha channel. For writeback we should never > accept a pixel format where alpha actually matters, that doesn't make > sense. You can't see through a real screen either, they are all opaque :-= ) I'm not sure about that. See e.g. https://en.wikipedia.org/wiki/See-through_display Many drivers already accept FBs with alpha channels for the primary plane. https://drmdb.emersion.fr/formats?plane=3D1 Just making sure we aren't painting ourselves into a corner. :P