Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp549900imm; Wed, 8 Aug 2018 01:18:45 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy+Vq2LR+/zyQibxih7TuK5IToiw/614fRjw2XWRcuAhdUg+wGW5Vb9MHdiLe8fdvHcVtqA X-Received: by 2002:a63:1403:: with SMTP id u3-v6mr1579124pgl.13.1533716325425; Wed, 08 Aug 2018 01:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533716325; cv=none; d=google.com; s=arc-20160816; b=PrWeqPHCbmBExcPPbiZ3LjwBdFiDhAWzzLbDy7dK63OVVkFmnKHPtzn+gEvntDQmfv r5wdDh1ouS6aTW+dNKSpTpIOKXa7DVxekNQf+kcOZp9xzwQ8FbNrl/LyWCoM1XSFi/s+ ogMMNP04O3ez2FKtxAnZsx8DOUAXFCZ+A8uCh3n0IrN5H11+PZ3j2fqRALAgWvvDEvmC ge5IV/om/Y7osIAnPa2K2J+vNIm3gViywqi7ENTYJ2d0obkSdXIrQbjxjLxijBU1V0mK i99jZXy44Q5jSVHoJb8I4QUjsu0BfRr2Om9cAAeCJoZ4MP+c58/v8H5E6otIXlHnXmoj 4tFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=Qa2GkNrlQb4B7gPUXb10Yrp+W377pkyj8BVKXXnx6xM=; b=wx6D2ASB1RpAKNLgRrNwZOPeTfFzGhaq59VJy1U13v0tXS5qkGLz1Fan6tRF3GAve9 se2F8rzEWC4AQoyhHAGpjxFJ1lk3JrYMXhqbSQi0+0NnOdI1yofadV3tRt338cYBBDx0 PGuNBUCPClBS6dYc8EAeU7AP0csPNy8xEKc6AgJi9zeFbg39sznypQYoceUrOfwhdY9T B3k8i7JG2Y8g1zks0JRkzN9t8Z9Opc27XLMBcadb3jLrwDlC2Q5TBQcZwr+JfESVPfxF 5trGB/bTe1fkaK+EqQnIg4wtuIEVorWAItMXZTVNeYKsdjJ1GHYxSQwcricU5lWD7mT9 1HuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@armlinux.org.uk header.s=pandora-2014 header.b=AC7DJvXd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 194-v6si4074729pfz.101.2018.08.08.01.18.30; Wed, 08 Aug 2018 01:18:45 -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=neutral (body hash did not verify) header.i=@armlinux.org.uk header.s=pandora-2014 header.b=AC7DJvXd; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727267AbeHHKfK (ORCPT + 99 others); Wed, 8 Aug 2018 06:35:10 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:33954 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726979AbeHHKfK (ORCPT ); Wed, 8 Aug 2018 06:35:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=RdCHlGPZL4kSLu/ZOMZI2g6RaVKVoGfzQSTNBag2rl0=; b=AC7DJvXdQSO9SVFAhfLyuvgKa Da0jQIWH5U6jYyblkKL+gE01F+mHpzI70h08Ir9MMCtOS+0ELkoIT7mz4o/hYlYeWNLfR5Uj/BbLX 9nPs8o0aWjWYSAWYXYUPBO4LqaiyzrULgP4yBX4wRl74DVBFnCq/Wz9/8Bqd57ZsMhWp0=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:58466) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1fnJdh-0003B8-S8; Wed, 08 Aug 2018 09:16:18 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1fnJdc-00080k-Cj; Wed, 08 Aug 2018 09:16:13 +0100 Date: Wed, 8 Aug 2018 09:16:09 +0100 From: Russell King - ARM Linux To: Dmitry Osipenko Cc: Laurent Pinchart , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , Thierry Reding , Neil Armstrong , Maxime Ripard , dri-devel@lists.freedesktop.org, Paul Kocialkowski , Maarten Lankhorst , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Ben Skeggs , Sinclair Yeh , Thomas Hellstrom , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v4 1/2] drm: Add generic colorkey properties for display planes Message-ID: <20180808081608.GK30658@n2100.armlinux.org.uk> References: <20180807172202.1961-1-digetx@gmail.com> <20180807172202.1961-2-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180807172202.1961-2-digetx@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 07, 2018 at 08:22:01PM +0300, Dmitry Osipenko wrote: > + * Glossary: > + * > + * Destination plane: > + * Plane to which color keying properties are applied, this planes takes > + * the effect of color keying operation. The effect is determined by a > + * given color keying mode. > + * > + * Source plane: > + * Pixels of this plane are the source for color key matching operation. ... > + /** > + * @DRM_PLANE_COLORKEY_MODE_TRANSPARENT: > + * > + * Destination plane pixels are completely transparent in areas > + * where pixels of a source plane are matching a given color key > + * range, in other cases pixels of a destination plane are unaffected. > + * In areas where two or more source planes overlap, the topmost > + * plane takes precedence. > + */ This seems confusing to me. What you seem to be saying is that the "destination" plane would be the one which is (eg0 the graphic plane, and the "source" plane would be the the plane containing (eg) the video. You seem to be saying that the colorkey matches the video and determines whether the pixels in the graphic plane are opaque or transparent. Surely that is the wrong way round - in video overlay, you want to colorkey match the contents of the graphic plane to determine which pixels from the video plane to overlay. If it's the other way around (source is the graphic, destination is the video) it makes less sense to use the "source" and "destination" terms, I can't see how you could describe a plane that is being overlaid on top of another plane as a "destination". I guess the terminology has come from a thought about using a GPU to physically do the colorkeying when combining two planes - if the GPU were to write to the "destination" plane, then this would be the wrong way around. For starters, taking the above example, the video plane may well be smaller than the graphic plane. If it's the other way around, that has other problems, like destroying the colorkey in the graphic plane when writing the video plane's contents to it. So, in summary, I don't think "destination" and "source" are particularly good terms to describe the operation, and I think you have them swapped in your description of "DRM_PLANE_COLORKEY_MODE_TRANSPARENT". -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 13.8Mbps down 630kbps up According to speedtest.net: 13Mbps down 490kbps up