Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10237658ybi; Thu, 11 Jul 2019 02:02:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9Jfj7OQz8Rlt+Sd0V0+Y1eavsiKcgZC0AUZOPd8zLdqGW1d2ZPY8G5/zBseV6DKELJLVA X-Received: by 2002:a17:90a:cb18:: with SMTP id z24mr3475003pjt.108.1562835758639; Thu, 11 Jul 2019 02:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562835758; cv=none; d=google.com; s=arc-20160816; b=S2YjKbbWxyG5Y3qfOynIzaXXTpieOOFrCHA+lM59XRhNvqVtPgW+/aqCOrHb8iwR0B VlRAbXCmGrQFZOBVX/OqNExU5YGT3yVPDVZe1fkruoipGMFKr+D+Iva9Oj5p2mDQRqxu xQgytF5TZAC6wz5OGy5a0JFJxcoTmPGo8Vyyiqf7CR73Di9NVTYm99SofmzZogktg3jb LuowzXfcnDl8gFY11tszjpm9f+Tea9EXkMw+GAE8QynVYhJ+bg61iL3Y0MFx4e0MqHyj Wtnk6Hc40np6Vo1gJeWnkn9Pu/v2gPWzJnOLGixXucNH09qK4A93ml3kQKbipmvmVYLu M4wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=oeDZmXjNJ9N7oIVRGzsPot+OviyxnkTNYoPrR8aP9d0=; b=iOxHhEzsWrd6Q8BK4JRDtZ85QlK9KBHlYBKrkfFvtl4mO7tpMdqWvC5uIl2rjU/WWx yq3n0OOFoVxxvYKPYvgm4m6yu0aG7SKGPvTUC2x4bZG5Vy3q/qN5nvU39INRxAGQDkGq MGk5xcpOft4ww3lcqT0gUjlaOzVXAte2+F86h79Hw1IT3t8SCpR16vNFuT6ejd45ZeyI zWH2bpnpt/dvx+6d2M0CTnxKlEqTHtoBVX1qXxrg9sTOmLyuMNLvAx1NJtFRUU2LCMu6 nLaKJ0YEhltDhC6UxqbXTW6BdQrg3YBnI5Yu3NBO2xY5TGqLfre3p4rpPrNEVqvO/4lN kfOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=AyRT3XEN; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y34si4584795plb.423.2019.07.11.02.02.22; Thu, 11 Jul 2019 02:02:38 -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=@ffwll.ch header.s=google header.b=AyRT3XEN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728184AbfGKJBJ (ORCPT + 99 others); Thu, 11 Jul 2019 05:01:09 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:34557 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbfGKJBI (ORCPT ); Thu, 11 Jul 2019 05:01:08 -0400 Received: by mail-ot1-f66.google.com with SMTP id n5so5117487otk.1 for ; Thu, 11 Jul 2019 02:01:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oeDZmXjNJ9N7oIVRGzsPot+OviyxnkTNYoPrR8aP9d0=; b=AyRT3XENh3voNDIU9ZRTMsgyN3Zo2yZCwY7qigQgaUK9FKGX+35qABr0yhnPDp6BAq ZMS0QvIAvXjqXPAhsTcRiA0OJKJAV/5XmwZeWSQsdUXNyXZoessYbmII4RGEXPDrsM06 p2XUYh0KkwQAC4FEQBfYkTymHANoe85Nv1jTU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oeDZmXjNJ9N7oIVRGzsPot+OviyxnkTNYoPrR8aP9d0=; b=V9eXZOSGGWPS+WIakDLlmZ2AuAEj6vtMXZoW+97Go22OxtWSbi6hi8agMN1bxdM7O9 AGxMEgBLbkgppW+oJMD6F72jgKY5bVnXqwUabhkyHA+IS+57f1hHDqnffylZNcmMv+Wl sZmYLwoT0OjltY8TBdVq+6vE4P253ojj1mrO4XBvkrA+uT+LRNQueASmKucdTtuq8Gxs fN9vJE6e+BquJzXcLhSMUDU9UrbcJsHlQuPmC+IbGZwV18XFk1K6KP1rUe191oS/k+ZL YOr5Fi+7pDeR2XTAiKsSGRcqhnXs/xNpb2J/tVjPQeEL9W386Kle66PTpRqood7p+nTw uFmg== X-Gm-Message-State: APjAAAWcCm8orvYKKguCycGgvfzS7fmOiyRQrhKWulpRxFeTb+9W9tUa kmQ4PoOxSof47hB1puGV/NT3QVals4j/RJMOrNM= X-Received: by 2002:a9d:590d:: with SMTP id t13mr2620567oth.281.1562835667563; Thu, 11 Jul 2019 02:01:07 -0700 (PDT) MIME-Version: 1.0 References: <20190711082105.GI15868@phenom.ffwll.local> In-Reply-To: From: Daniel Vetter Date: Thu, 11 Jul 2019 11:00:56 +0200 Message-ID: Subject: Re: [PATCH V3 4/5] drm/vkms: Compute CRC without change input data To: Simon Ser Cc: Rodrigo Siqueira , Brian Starkey , Liviu Dudau , Haneen Mohammed , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 11, 2019 at 10:28 AM Simon Ser wrote: > > 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 They have variable opaqueness, independent of the color value? > Many drivers already accept FBs with alpha channels for the primary > plane. > https://drmdb.emersion.fr/formats?plane=1 If you have a background color (we assume it to be black) that makes sense. Still doesn't mean we render transparent output, we don't. > Just making sure we aren't painting ourselves into a corner. :P You can add ARGB to your writeback format support list, there is no corner here at all to get into (at least in the abstract sense). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch