Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp710920ybt; Wed, 17 Jun 2020 11:53:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKDaZevUedE8jv8DtrtPMOi54XoNLhlLtIha52a1lVgaRAK41HEaVDfBo7M+wKdDKcM+pB X-Received: by 2002:a17:906:68c5:: with SMTP id y5mr539860ejr.436.1592420014980; Wed, 17 Jun 2020 11:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592420014; cv=none; d=google.com; s=arc-20160816; b=oxf5tyUcEaOupxAAsKkJbl8mPRaxgmlw5W9tVtEpSn6AsmdAvArhdst3PK/AHZBa02 BMAHFYBe+sFZLVPnNb/4HzRqv1IlZA+zcdoXOb2OnXLwfQ8o/Dk6X7UqA1fmDseLmbKd x1alHhoZbjgyC1CO2gdi6C4VUDIPQQPUwVdKBPj/Is0b8GL4JiAo+IsrjNdu3fhZj09e MeUSKz4blAYbl4iAxiHJgCtUdg93k4zuawGD0VSCdOEKJ0NFRfoiV2omi2ik7+iKTs9V TreofUICREpkJSGsnj8j4cPsJtDZmd+AC+Vi03uY5joD1bsejAsc6IzVeTqTvxDcSfNj sSig== 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:references:cc:to:from:subject:dkim-signature; bh=niGCVV02yGmCTRiNUXF586GuPtEiVqmlf9Dj30WKY8I=; b=ygZl9PMOrhYPcHkaR+2VLN7ePPBOGB2r25SHZugZ7s5uWc1d8Uv6h3AWHUMJSmxUWn lmgi27TU40cs2BfCjLgxsJleZosd7hDazpYdLTD8uZeYGf9/pZC+1dpUZPeWdO9vHcHR qSRuSzYfW8isiP0kMRLTraKmKNOvYRRCTd+tdE1KGuc2QeUcpFPjgtya1QuC8X/adQcF wEcYNTYiJIObqxGTg4h+D20wdfyqYT7z6HZwj+9sBs31E47Q8Lfib4xwsglndvZHdAl9 ucjrEieGCd034fEEMIHUY/lWHNO8M6U4ebTSxoRhXPaT3RWMOfqo90KJt5aqOdLeV8jI rCLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M8QbXD3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id q8si535640edn.403.2020.06.17.11.53.12; Wed, 17 Jun 2020 11:53:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=M8QbXD3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727802AbgFQSur (ORCPT + 99 others); Wed, 17 Jun 2020 14:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726851AbgFQSur (ORCPT ); Wed, 17 Jun 2020 14:50:47 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7754BC06174E; Wed, 17 Jun 2020 11:50:45 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id x18so4204910lji.1; Wed, 17 Jun 2020 11:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=niGCVV02yGmCTRiNUXF586GuPtEiVqmlf9Dj30WKY8I=; b=M8QbXD3dhMgoC9HGZspqf7XvjFgGe8WazwwUzCVArg0/V4J/2jzwL8H4RGbmNBNkwD R8wGcFDnf2lOnU41m/g9QNA/9d+ub6zNKxZNXZWQ8tvxe8mZUd8MMFDtixbRyq/Pc/BF PIlXs0P58oAy4Q0Hx7D0IDtf6qGVRToB7UUTEKeWrh2FvdpOJVARsCgHhh3DM2YDYITG yv2i+lxcsBl69kQVaF0qbqTQ0Q5+tPfaYHxiZHxuDl7GF//mofzMEAyRhY5MUNk0ZEEC ecIvPUB2Ri/1v20pzwyv+rz8M4vudDHoEqRG2l6oEitpvq6n6iLOMI6v2o8SNoiAejZ8 ZauQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=niGCVV02yGmCTRiNUXF586GuPtEiVqmlf9Dj30WKY8I=; b=U2+gxQS7UexMuXU93D9tcwVFGURVgTOryPuJp05WfPX68eKYAftCDrtmuYErkGg6M4 vjVLxZcXOHyc8SOEY8MRT6AZdPOLYek5QD9Mj0wW4xCg3/G9bituUG7ZIQk+P0AflvL4 sTrvZR0YS3nxvG55gvFUXsp0T1ZvJYaZXwhewQlg8OPZhkhIBVUrwJtZ7jF37zYSr+Tb 4kN3jCTZWCb1O126ZLAKWAu/SOUcnynkqHnWwRsAOQL5WitX+izYWgNpbqh2OAJW/LTp 62RBHlmBzVyBbsD6p+SiLQp0ZcHnBS13IQaiQnSlTmRfsQ1W8OTKPrC6DfAlffPbuON9 QLlg== X-Gm-Message-State: AOAM530sL807Jevi4UHrOMTVkOftGz8z7aH2g90ZnhEnC1qqSBfkzozl +C0M7E64I5Lq0tMaz8QD21M= X-Received: by 2002:a05:651c:544:: with SMTP id q4mr348194ljp.310.1592419843008; Wed, 17 Jun 2020 11:50:43 -0700 (PDT) Received: from [192.168.2.145] (79-139-237-54.dynamic.spd-mgts.ru. [79.139.237.54]) by smtp.googlemail.com with ESMTPSA id r15sm119829ljm.31.2020.06.17.11.50.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Jun 2020 11:50:42 -0700 (PDT) Subject: =?UTF-8?Q?Re=3a_=5bPATCH_v2_5/5=5d_drm/tegra=3a_plane=3a_Support_18?= =?UTF-8?Q?0=c2=b0_rotation?= From: Dmitry Osipenko To: Emil Velikov Cc: Thierry Reding , Thomas Zimmermann , Derek Basehore , Sam Ravnborg , Laurent Pinchart , Sean Paul , linux-tegra@vger.kernel.org, "Linux-Kernel@Vger. Kernel. Org" , ML dri-devel References: <20200614200121.14147-1-digetx@gmail.com> <20200614200121.14147-6-digetx@gmail.com> Message-ID: <2a004826-a505-75e4-b922-c74618404166@gmail.com> Date: Wed, 17 Jun 2020 21:50:41 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: 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 16.06.2020 14:25, Dmitry Osipenko пишет: > 16.06.2020 00:47, Emil Velikov пишет: >> Hi all, >> >> Perhaps a silly question: >> >> On Mon, 15 Jun 2020 at 08:28, Dmitry Osipenko wrote: >>> >>> Combining horizontal and vertical reflections gives us 180 degrees of >>> rotation. >>> >>> Signed-off-by: Dmitry Osipenko >>> --- >>> drivers/gpu/drm/tegra/dc.c | 13 ++++++++++++- >>> 1 file changed, 12 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c >>> index f31bca27cde4..ddd9b88f8fce 100644 >>> --- a/drivers/gpu/drm/tegra/dc.c >>> +++ b/drivers/gpu/drm/tegra/dc.c >> >>> + if (rotation & DRM_MODE_ROTATE_180) { >>> + plane_state->reflect_x = !plane_state->reflect_x; >>> + plane_state->reflect_y = !plane_state->reflect_y; >>> + } >>> + >> As mentioned by Ville the above is already handled by >> drm_rotation_simplify() ... although it makes me wonder: >> >> >>> err = drm_plane_create_rotation_property(&plane->base, >>> DRM_MODE_ROTATE_0, >>> DRM_MODE_ROTATE_0 | >>> + DRM_MODE_ROTATE_180 | >>> DRM_MODE_REFLECT_X | >>> DRM_MODE_REFLECT_Y); >> >> Would it make sense for drm_plane_create_rotation_property() itself, >> to add DRM_MODE_ROTATE_180, when both reflections are supported? > > Hello Emil, > > That's a good point! All DRM_MODE_ROTATE_180 should be removed because > Tegra can't do 180° + reflected-x. The DRM core takes care of 180° > rotation when both x/y reflections are supported. > I just found out that I forgot to drop the WIP patches which added transparent rotation support while was checking whether these plane DRM_MODE_ROTATE_180 could be dropped and it's actually need to be set for the planes, otherwise 180 rotation support is filtered out by the atomic check.