Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1983098ybt; Mon, 15 Jun 2020 14:53:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4z4fWbuQJN2az886uR5NnD+MyF+22/jFXbAOrjhG6BtFlWq974xxXQPewfrHlV+U47Jv4 X-Received: by 2002:a17:906:abca:: with SMTP id kq10mr28974263ejb.390.1592258008244; Mon, 15 Jun 2020 14:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592258008; cv=none; d=google.com; s=arc-20160816; b=GApS3DlMvXEnFfIWOp6qtdnLWCeqgA1z1MVvu+EwWkZcgtF64En/1Dx+ar/RivfY71 leMQKuIkpPCmwTxYBMInKYtOZ9lHMdXk7KIy3pi4lR1IbGt7d0+qhWChz3cBC2dVjM+P WQOyfr+w4XdGnblzvQ0PVMkjum6kf63PqQ/yHJPOeEJwOs9ZWOIpkb5fH8Rlfb1379xx 8jyzj/a9DsWuElCyIw3P9Mobkd54dHOiBRv3VWAVxLFhGJCtH2zwp0+LsSR/LA9mrRlV n4NvL6jaxYCZ5kXlXLOxa7r4dkg/gCnVTu39WI/ooXeyowd4TK/V5sqdhLqD+QmOg4Lw zMgQ== 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=qgketSwNHBH9JjKBViUJC5dtablUpG9gaeko3bA7e1g=; b=Z6ppAp+/b8sWHIgoLbsx2VJ7qNtwhw8LMIhGaBm2AcI/msg84AjSQFrwp1tmoVXAYR XyprbQcUkIbC24m/vTBo1l8cDdhjVSM4HwTBI45qANrQA/WOX4lfj322C0WlayrHnQ42 skFDk9uHMUcYJfYMonp/6N8tU5A5Y/mP6yKb9KVVwBW68ZwLFpXo1dXcQ5KeRlsW2Oea n0nIARezUqIRREeb/ystzVvqHc4DHzZY8OtpIu4UPMI8MmCLJnzRIY02rs9r1qT9GQ0U 0x9yEmHKTd0nrpG4KfsD9vBOZeU/Ag6gycucDQ9QkwRFU5YyOo8Rn5sESXPG9U6fBsQp HF7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kF+GOarz; 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 t3si9315040edr.560.2020.06.15.14.53.05; Mon, 15 Jun 2020 14:53:28 -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=kF+GOarz; 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 S1726362AbgFOVvT (ORCPT + 99 others); Mon, 15 Jun 2020 17:51:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbgFOVvT (ORCPT ); Mon, 15 Jun 2020 17:51:19 -0400 Received: from mail-vs1-xe43.google.com (mail-vs1-xe43.google.com [IPv6:2607:f8b0:4864:20::e43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47FC0C061A0E; Mon, 15 Jun 2020 14:51:19 -0700 (PDT) Received: by mail-vs1-xe43.google.com with SMTP id q2so10270446vsr.1; Mon, 15 Jun 2020 14:51:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qgketSwNHBH9JjKBViUJC5dtablUpG9gaeko3bA7e1g=; b=kF+GOarzfpIuy/JohE32cXP4Vd2JnpxHM6h0pYme+S7/RWHhC/TmS14r6nlHzUA7+H s338WjKce/rQdZZlsDASW3HB7VCWcETvbyXs5Ia+aeWjOfo2+BUJGG2Fxb36GrbjhXrp jSuaGAHywJk+9Yvu636+61kzkxBZNPZywBqUJLXOBQfAwAhROHIsoXp6Du9Z6Mtqxc96 AmJxrsalGzepTrvbjQHDzP3eAh6alhDAJx2EhVaWiQWYgykER/4i2ofnR1OF7vVHz4q/ +pBMozwuGP4nTI9vBVOIcndY/I2eL2OkLca321sNh+qPYUJM6wM03a2MSLl/2VkmBCmS /DjQ== 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=qgketSwNHBH9JjKBViUJC5dtablUpG9gaeko3bA7e1g=; b=Kvt3V1oGNqFsQtQxJJYhn3ST/33jQ2AVrA09WbuDqCtRvBnHiE+nKM1LoZaSWK9/B2 mSC8l3wRrxo0dkydoAA/orVuOljsB8ONe4ycU9RSSrb4SvH+0qSd55hIA2211GSdq0DS 75YvRuCcNQNOwshPtW5XfDzCV68c6RVWsot7kTn8+ZTp+irThCagNl6Wz3Ia0ESKZU24 TqoquTuqWTeoNIeGt1W94++81cGajBgIsjGr3xO/wugmft0OPZv8XNjRkbMN1X89FeH2 BvqSF5Ewuk2++ujb56zTSAunKo/2QY+H6aLmmotDOJXK0jk+LElj/ks0d/2dvyQJV7D8 FJtg== X-Gm-Message-State: AOAM5308otkTayKyQg3zIRkzzIaH6cApD9HS6O4nwWM+ui9sMMB/Alip qN7hxWLijQRO7bIicUTJwRMmHHhGjBq2WKoBFp0= X-Received: by 2002:a67:b149:: with SMTP id z9mr20210130vsl.85.1592257878077; Mon, 15 Jun 2020 14:51:18 -0700 (PDT) MIME-Version: 1.0 References: <20200614200121.14147-1-digetx@gmail.com> <20200614200121.14147-6-digetx@gmail.com> In-Reply-To: <20200614200121.14147-6-digetx@gmail.com> From: Emil Velikov Date: Mon, 15 Jun 2020 22:47:37 +0100 Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BPATCH_v2_5=2F5=5D_drm=2Ftegra=3A_plane=3A_Support_180=C2=B0_r?= =?UTF-8?Q?otation?= To: Dmitry Osipenko 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 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 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? -Emil