Received: by 10.192.165.156 with SMTP id m28csp293621imm; Tue, 17 Apr 2018 10:12:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+IlvAA+m2j6b2HErz+a//jZ/SnXQDS5iNIvOHbk0EFLS+iAtthEACMqu19dekLbwOtLaDB X-Received: by 10.98.9.72 with SMTP id e69mr2684391pfd.197.1523985166674; Tue, 17 Apr 2018 10:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523985166; cv=none; d=google.com; s=arc-20160816; b=RwDnith0abN2hSuh/JuCiTgss7D4v1F9l/T9roIhWrLBpuTgOgzW/52VMQy7HYxUGv OQYqaoLSh5biXL6R3mh9QhMSswFJQ63i9WfveSZOOEURboPe782lRVWrqeEvo2W0gFVg STiAZ2COh1U/Mbb08XxE8Oai2/3VrZf8mwmfkdG/4H4OGZ0t6pw1L/2q60x53DFrZKsg 1kEAIrxKveYsE9/9atj3miPovklGo1N8sTMbxCMMFiCmHuJvmcAy99PcAjgOMHewxcrn KY0a9HK6Pp1dMI+QbuXKlWurVX0hqWGPNFoheV2ZCr4FHsGcbSpYSpF87jVHI9e/doU0 sg9A== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:to:subject :dkim-signature:arc-authentication-results; bh=znoiqY6eBJtkA9SUQ5kVam5hf1XNLQeZZSKtVPVMYzI=; b=tyFzn0XJKm+j/sWQ9jWcdgWTOcFRnhllcOPO/HcCkorW/nVbvD9quzhiDMO//kefgk KbOZrYGi4DnXaQ7pAcqG8WvsbIzp+H7udnI+dF3BL3V3Hw9ErkelKKlEVOsNcFWsXI0b ltMnjj0RUO57c/RnimGa8dMKd4kGlCAca7V8CVrEArQ81BsP3TH6x2bOq1FJ1BDQIfqb cxA836dzDj8RkAPfKlNfIClxMS+GjnlAEYMFB/gY+qivzkTjbxRKsZiAsrTgkCCy/rrk bqSEUKQ66B97/wKr59LaOplJMerDM/lfDGppZSfs3kgrWO0nW4oDuxD4IKqDm2X0a3Sl 5yqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ruw6V08F; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si11793248pgp.564.2018.04.17.10.12.32; Tue, 17 Apr 2018 10:12:46 -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=@gmail.com header.s=20161025 header.b=ruw6V08F; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753425AbeDQRJm (ORCPT + 99 others); Tue, 17 Apr 2018 13:09:42 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:44937 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753875AbeDQRIb (ORCPT ); Tue, 17 Apr 2018 13:08:31 -0400 Received: by mail-lf0-f66.google.com with SMTP id g203-v6so28413420lfg.11; Tue, 17 Apr 2018 10:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=znoiqY6eBJtkA9SUQ5kVam5hf1XNLQeZZSKtVPVMYzI=; b=ruw6V08FAxKC1yYg1yNXx3sWvbI6ftTpyy0BH8FyTi74YzkxyAqDj6X1cKQ8UFA7qs zuTzeZ3e+gjbYi5kGwLCtjpvlPW+1oDrtgTWkuDX/FZlChHE0Bbk5RV+eNjg1843uMfG wduKMZdqoJniqsWgtgCzweqEeVxR4Tdkh/H5LHYqMLdZjV5lVwUPyY2aaYNawoZV9/ls Ma+po5CwFN418eT93spjBszBIOvrYBSa1hkWiLMdeAXNVpb3ys/OrcOyMcWlOW+nmSyo 2h8A2KJGg86wm19RloL6kB7uNDLkEJ79zZ7lBnVGFGerhJqBDmclFfX9okPXSHEe7bsQ ys9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=znoiqY6eBJtkA9SUQ5kVam5hf1XNLQeZZSKtVPVMYzI=; b=goSZl36SOrTAPxPx9qEMZWvQtDbH9VdPwlEXRicBmG92LNDEgqxNk405x644T+mtLM LBh+dLU1CKFSb3zmAf/rVcVm82Vp2/KuZkZMRm6xhlcR2XFfpAIawYdLFe1k6PD5If0q A9/yhvCydKdPH7qdfbYJ2VvT1Qx1oZhweTJ9I9cIszfxXvE6lqlYeo7PSRxiNJrXGpGb HrZPyrVbnYp5BpIPdefmjJDlT3HBG7ZFZJaYW4Os2fmCntW+yXVmUWyPMYlWu6V+79ts IUqw3rzmRyz3tgYqvOFgFocfALZqKygbaUzF4Oe3sGmLCUJcf1eDPFDmCKor7S7rPEwS Smjw== X-Gm-Message-State: ALQs6tDQKgfTnO2wB/aCffB/YSIziCwaNdTjMpQWk1oiNRqMiCBtnSL5 6RtzADjzVfkdaxG0GwF8ta8= X-Received: by 2002:a19:1d12:: with SMTP id d18-v6mr2106557lfd.128.1523984910129; Tue, 17 Apr 2018 10:08:30 -0700 (PDT) Received: from [192.168.1.145] (ppp109-252-91-201.pppoe.spdop.ru. [109.252.91.201]) by smtp.googlemail.com with ESMTPSA id r26-v6sm3008202lfd.32.2018.04.17.10.08.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 10:08:29 -0700 (PDT) Subject: Re: [PATCH v1 3/4] drm/tegra: plane: Add custom colorkey properties for older Tegra's To: Thierry Reding , linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20180417090040.GY31310@phenom.ffwll.local> From: Dmitry Osipenko Openpgp: preference=signencrypt Autocrypt: addr=digetx@gmail.com; prefer-encrypt=mutual; keydata= xsBNBFpX5TwBCADQhg+lBnTunWSPbP5I+rM9q6EKPm5fu2RbqyVAh/W3fRvLyghdb58Yrmjm KpDYUhBIZvAQoFLEL1IPAgJBtmPvemO1XUGPxfYNh/3BlcDFBAgERrI3BfA/6pk7SAFn8u84 p+J1TW4rrPYcusfs44abJrn8CH0GZKt2AZIsGbGQ79O2HHXKHr9V95ZEPWH5AR0UtL6wxg6o O56UNG3rIzSL5getRDQW3yCtjcqM44mz6GPhSE2sxNgqureAbnzvr4/93ndOHtQUXPzzTrYB z/WqLGhPdx5Ouzn0Q0kSVCQiqeExlcQ7i7aKRRrELz/5/IXbCo2O+53twlX8xOps9iMfABEB AAHNIkRtaXRyeSBPc2lwZW5rbyA8ZGlnZXR4QGdtYWlsLmNvbT7CwJQEEwEIAD4WIQSczHcO 3uc4K1eb3yvTNNaPsNRzvAUCWlflPAIbAwUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIeAQIX gAAKCRDTNNaPsNRzvFjTCACqAh1M9/YPq73/ai5h2ExDquTgJnjegL8KL2yHL3G+XINwzN5E nPI7esoYm+zVWDJbv3UuRqylpookLNSRA01yyvkaMcipB/B128UnqmUiGRqezj9QE20yIauo uHRuwHPE2q+UkfUhRX9iuOaEyQtZDiCa0myMjmRkJ+Z8ZetclEPG8dYZu47w04phuMlu1QAt a0gkZOaMKvXgj21ushALS6nYnvm7HiIPQXfnEXThartatRvFdmbG4PCn0IoICkQBizwJtXrL HEjELIFap0M8krVJlUoZTFaZnaZkGpUDWikeFtAuie2KuIxmVBYPM4X7pM3eP3AVvIPGS7EE UUFuzsBNBFpX5TwBCADFNDou220thijaLLGaQsebWjzc/gPRxMixIpk856MRyRaQin+IbGD6 YskMb5ZSD3nS88LIKNfY4MMH0LwfYztI++ICG2vdFLkbBt78E+LqEa+kZ9072l4W5KO3mWQo +jMfxXbpgGlc7iuEReDgl8iyZ27r51kSW665CYvvu2YJhLqgdj6QM1lN2D1UnhEhkkU+pRAj 1rJVOxdfJaQNQS4+204p3TrURovzNGkN/brqakpNIcqGOAGQqb8F0tuwwuP7ERq/BzDNkbdr qJOrVC/wkHRq1jfabQczWKf8MwYOvivR3HY8d3CpSQxmUXDtdOWfg0XGm1dxYnVfqPjuJaZt ABEBAAHCwHwEGAEIACYWIQSczHcO3uc4K1eb3yvTNNaPsNRzvAUCWlflPAIbDAUJA8JnAAAK CRDTNNaPsNRzvJzuB/9d+sxcwHbO8ZDcgaLX9N+bXFqN9fIRVmBUyWa+qqTSREA4uVAtYcRT lfPE2OQ7aMFxaYPwo+/z5SLpu8HcEhN/FG9uIkfYwK0mdCO0vgvlfvBJm4VHe7C6vyAeEPJQ DKbBvdgeqFqO+PsLkk2sawF/9sontMJ5iFfjNDj4UeAo4VsdlduTBZv5hHFvIbv/p7jKH6OT 90FsgUSVbShh7SH5OzAcgqSy4kxuS1AHizWo6P3f9vei987LZWTyhuEuhJsOfivDsjKIq7qQ c5eR+JJtyLEA0Jt4cQGhpzHtWB0yB3XxXzHVa4QUp00BNVWyiJ/t9JHT4S5mdyLfcKm7ddc9 Message-ID: <6ff89658-28e4-fa9f-173d-4e9a885a7962@gmail.com> Date: Tue, 17 Apr 2018 20:08:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180417090040.GY31310@phenom.ffwll.local> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17.04.2018 12:00, Daniel Vetter wrote: > On Mon, Apr 16, 2018 at 03:16:27PM +0300, Dmitry Osipenko wrote: >> Colorkey'ing allows to draw on top of overlapping planes, like for example >> on top of a video plane. Older Tegra's have a limited colorkey'ing >> capability such that blending features are reduced when colorkey'ing is >> enabled. In particular dependent weighting isn't possible, meaning that >> cursors plane can't be displayed properly. In most cases it is more useful >> to display content on top of video overlay, sacrificing mouse cursor >> in the area of three planes intersection with colorkey mismatch. This >> patch adds a custom colorkey properties to primary plane and CRTC's of >> older Tegra's, allowing userspace like Opentegra Xorg driver to implement >> colorkey support for XVideo extension. >> >> Signed-off-by: Dmitry Osipenko > > Since this is your own uapi, where's the userspace per > > https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements Userspace patches for colorkey and CSC utilization are in my personal github repos for now [0][1]. The longterm plan is to get Opentegra driver / libdrm bits of [2] to repos on freedesktop.org, which should be considered as upstream. We have everything depending on libdrm-tegra and it is currently on hold because of upcoming massive rework of Tegra DRM UAPI with further de-staging of jobs submission UAPI, that reworking should start with 4.18 kernel. For now I wanted to get initial input on the patches. Once everyone is in agreement, I'd like to have colorkey / CSC supported by the upstream DRM driver, so that at least grate-driver projects could utilize them right now. > And why wo we need a tegra-private colorkey property here? I thought > other's have been discussing this in the context of other drivers. At least older Tegra's have limitations in regards to colorkey, like planes blending capabilities are reduced a lot when colorkey'ing is enabled. I'm not sure whether we'd want to have it as a generic property, because generic userspace should be aware of those limitations, otherwise there is a good chance to get undesirable result using colorkey. Though I'm not really sure how widely colorkey property could be utilize by userspace and what kind of applications that userspace could have for it, maybe having colorkey as a generic property would be good enough after all. I've looked up the DRI ML archive and seems the most recent colorkey-related patches are [3]. These patches are a bit odd to me because by generic property I assume a property that is HW-agnostic and the patchset does opposite to it. Maybe I'm misunderstanding what is meant by 'generic' property then? Anyway I've applied [3] and made Tegra to use that generic property, it works fine. I'll be happy to switch to a generic property if we'll consider that it is a viable way. [0] https://github.com/digetx/xf86-video-opentegra/commits/ckey [1] https://github.com/digetx/libvdpau-tegra/commits/ckey [2] https://github.com/grate-driver [3] https://patchwork.kernel.org/patch/10117593/