Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2675396ybt; Tue, 16 Jun 2020 12:01:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykAEIUYU1DsDliXvdf9Xm6/JqadjzSUZtrP0Hcrwpa7qJC3qp05U5GgTNHLYGSMdpbwFhH X-Received: by 2002:a05:6402:6d6:: with SMTP id n22mr4055789edy.362.1592334084195; Tue, 16 Jun 2020 12:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592334084; cv=none; d=google.com; s=arc-20160816; b=MhoyAj9tQDjhwo0dBKL0BqnHBsQ163KLPLUmN1OUcbhmtqKKTMxGDJPBDMb4aZYi43 DZlgBhL6zdk97du8e/wLqke7YH9n5tw0uvoiKJ2Qxj8K13G2NS49upPPucFZtnP2jrPl S7fcaCZxuux2z1OY+nO5SuRLwduGYQ/flR5FLfS3C/RUaTZMDgMTnVdJLSx1lhzXybE2 jtzU0mzo/nKbYkT3tawa5luTTcZPPRdZ1KzmDYsYWDIGO15Qql0vuupJ/aNRHXTmM3F+ TrhzO7sHGTZvehL2EVg8SwAw2mEe2IGTLCKsCqpBLio4fZ7eWVm8q0Uwu8IKeF8fWkxe vTPw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=++LLNhIunq6DJtsYt7QZbdqySyg8Go49MpsG3rgmJFk=; b=E1+OcBcZnVTqj2/HnzunDObUvyddITtORYg1uNpk7Ze5u2QXwl5Tnzl/A4WzsypRwh JGCuMC4owbiCNCymEgYy4H2gVm+FczkJS0EcHXUJAQj5qVGAwP1nOxU3WNJr7rpfyXXh FlenYGogdrTPPUmm2WvjSWZQJeOnMK7nxRe5o6Ut31/FIyI3LncdSv9ovDWkikrd5TTC nyC3ECtWKwq8Mbp/VHENwMFwNNViOKuk2kbu+Y7a1MJVtvF+yMCy5B5c420cUL21NSjI vOFUOuyFp/M91ZqQ2Dslur66T3wsaEIPwFdYg4kOYlp1dlNFmjaRVw0nPk9s3B7D6xrn 8J9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ucqd3uRf; 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 k6si9594198ejr.212.2020.06.16.12.01.00; Tue, 16 Jun 2020 12:01:24 -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=ucqd3uRf; 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 S1730563AbgFPS5t (ORCPT + 99 others); Tue, 16 Jun 2020 14:57:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730543AbgFPS5s (ORCPT ); Tue, 16 Jun 2020 14:57:48 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19A70C061573; Tue, 16 Jun 2020 11:57:48 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id g44so7267023uae.12; Tue, 16 Jun 2020 11:57:48 -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:content-transfer-encoding; bh=++LLNhIunq6DJtsYt7QZbdqySyg8Go49MpsG3rgmJFk=; b=ucqd3uRfFrWWfhaWf9cHHzOjFfxjf+pM4uKzNCUtF/d+yZgJyda2W8vRmNZTm1bayL ApfngBOpOMdN6PzBTFTDn5ZDvzQ+hZTx/O5Bc61BarswK4M3/TWkbP3G/EDw7yFl6FfN b0WGuUH8p94o8xa78M0Pw5GtNyBAXLSbVfEAZ3JVVtxB52wjpaXUrbWmvhrHK7amPaTC I89MkXxWZL+P9zfwnOofiMiR05w0LUtemmqwx9eF7rxbYZV5LbvLH4BW4vn5xvvlZeKa rO44opmN0Vbscb9rd2pRP5SMuncZsYxio5xx/pJuIGqU3W5RlSOKaL20wL3KjIhGOarv eIKQ== 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:content-transfer-encoding; bh=++LLNhIunq6DJtsYt7QZbdqySyg8Go49MpsG3rgmJFk=; b=GRIC7JJ91raUgO2YCmNEzq1WuxJgiG5Rgj4dbdbe/LGMW4hteZwH8a4+ACGxmS+Rqt /RFK8UEoLBxDMRGmR0MkS/VaAC85aCfwh3d7P7idNbQsF12eI1DII3ylI8ROcs9mXQxl zfhIgY2JCpZBvIOh8pdGOiH8xlvZNFbC4PE5mcGail2+7MyW+EL4YAMPf0+EJabvqCxt ICglS+iRiGa6V0EGO5uRabtqnF5LA9a5gdOkmCWZ2Fgx6Dccble4GkH3xQh5kxR82aqj ucRu33D8zqyJUWw/o7xcct7l4kQVrpgkHJHYp+yhOgUtlg1ZO0U923DU0RmrmjWdIVpX 0g5w== X-Gm-Message-State: AOAM533D7f1ElUVAShSB/Yxy6wZlyGv+tB0dDCncPJqdxW5N6GJohFWq 7hL3QU2HZcv+Zuv9dhdRhy4aMc2k6/TdJlWbIQE= X-Received: by 2002:ab0:71ce:: with SMTP id n14mr3669545uao.46.1592333867137; Tue, 16 Jun 2020 11:57:47 -0700 (PDT) MIME-Version: 1.0 References: <20200614200121.14147-1-digetx@gmail.com> <8f789ef5-bebf-c869-784d-afda70fc1fb8@gmail.com> <646b3f37-0f72-7f3b-388f-f71dbcdd5c84@gmail.com> In-Reply-To: <646b3f37-0f72-7f3b-388f-f71dbcdd5c84@gmail.com> From: Emil Velikov Date: Tue, 16 Jun 2020 19:54:04 +0100 Message-ID: Subject: Re: [PATCH v2 0/5] 180 degrees rotation support for NVIDIA Tegra DRM 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" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Jun 2020 at 18:20, Dmitry Osipenko wrote: > > 16.06.2020 18:48, Emil Velikov =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > On Tue, 16 Jun 2020 at 12:40, Dmitry Osipenko wrote: > >> > >> 16.06.2020 01:26, Emil Velikov =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >>> Hi Dmitry, > >>> > >>> On Mon, 15 Jun 2020 at 08:28, Dmitry Osipenko wrot= e: > >>>> > >>>> Hello! > >>>> > >>>> This series adds 180=C2=B0 display plane rotation support to the NVI= DIA Tegra > >>>> DRM driver which is needed for devices that have display panel physi= cally > >>>> mounted upside-down, like Nexus 7 tablet device for example [1]. Sin= ce > >>>> DRM panel rotation is a new thing for a userspace, currently only > >>>> Opentegra Xorg driver handles the rotated display panel [2], but thi= s > >>>> is good enough for the start. > >>>> > >>>> Note that later on it should be possible to implement a transparent = 180=C2=B0 > >>>> display rotation for Tegra DRM driver which will remove the need to = have > >>>> a bleeding edge userspace that knows how to rotate display planes an= d I'm > >>>> slowly working on it. For the starter we can go with the minimal rot= ation > >>>> support, so it's not a blocker. > >>>> > >>>> This series is based on the work that was made by Derek Basehore for= the > >>>> Mediatek driver [3], his patch is included into this patchset. I add= ed > >>>> my tested-by tag to the Derek's patch. > >>>> > >>>> Please review and apply, thanks in advance! > >>>> > >>>> [1] https://patchwork.ozlabs.org/project/linux-tegra/patch/202006071= 54327.18589-3-digetx@gmail.com/ > >>>> [2] https://github.com/grate-driver/xf86-video-opentegra/commit/28eb= 20a3959bbe5bc3a3b67e55977093fd5114ca > >>>> [3] https://lkml.org/lkml/2020/3/5/1119 > >>>> > >>>> Changelog: > >>>> > >>>> v2: - Dropped "drm/panel: Set display info in panel attach" patch, w= hich > >>>> turned out to be obsolete now. > >>>> > >>>> - Renamed the cover-latter, hopefully this will fix the bouncing= emails. > >>>> > >>>> Derek Basehore (1): > >>>> drm/panel: Add helper for reading DT rotation > >>>> > >>>> Dmitry Osipenko (4): > >>>> drm/panel: lvds: Set up panel orientation > >>> > >>> IMHO it's perfectly reasonable to report the panel orientation to > >>> userspace, which can apply plane rotation as needed. > >>> > >>> Although I see that this series, alike Derek's, has a couple of issue= s: > >>> - only a single panel driver is updated > >>> - rotation is _not_ listed as supported property, in said panel > >>> driver device-tree bindings > >>> > >>> My personal inclination is that we should aim for a comprehensive sol= ution: > >>> - wire all panel drivers, as currently documented (quick grep list b= elow) > >>> - document and wire-up the lvds and boe panels - as proposed by you > >>> and Derek respectively > >>> > >>> HTH > >>> Emil > >>> > >>> Documentation/devicetree/bindings/display/himax,hx8357d.txt:2 > >>> Documentation/devicetree/bindings/display/ilitek,ili9225.txt:2 > >>> Documentation/devicetree/bindings/display/ilitek,ili9341.txt:2 > >>> Documentation/devicetree/bindings/display/ilitek,ili9486.yaml:2 > >>> Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt:2 > >>> Documentation/devicetree/bindings/display/panel/panel-common.yaml:2 > >>> Documentation/devicetree/bindings/display/sitronix,st7586.txt:1 > >>> Documentation/devicetree/bindings/display/sitronix,st7735r.yaml:2 > >> > >> Rotation is a common DT panel property that is described in the > >> panel-common.yaml. > > The property was introduced almost exclusively for tiny drm panels. > > Those ones are a bit different from the rest (in panel/) - > > MIPI-DBI/SPI w/o (not connected at least) an actual GPU. > > > > To make it a bit better, the rotation is seemingly performed in the > > tiny driver itself ouch. > > > >> This property is supported by all panel bindings > >> because these bindings inherent the common properties from the > >> panel-common.yaml. > >> > > Seems like that was an unintentional change with the conversion to YAML= . > > Beforehand only a few selected panels had rotation. Upon closer look - > > some panels do have follow-up fixes, to remove/limit the implicit > > inclusion. > > Interesting.. my understanding that the rotation property is supposed to > be a generic property which represents physical orientation of a display > panel and hence it should be applicable to all panels. > You're spot on - it is/should be a generic property. I believe that in general many panels were mounted in the correct orientation so the property, kernel and userspace were slow to catch up. In some cases panels will use flip x+y to denote 180 rotation, yet lacking the rotation property. The s6e8aa0 is an example of the last oddity. To make it better, the two dts in-tree always set both flip x and y. Tl;Dr: Hysterical raisins > > Sam seems like you've done most of the YAML conversion. IMHO it would > > make sense to revisit the patches and inherit common properties only > > as applicable. > > > >> I don't think that it makes sense to wire up rotation property to all > >> panel drivers at once because those drivers will be untested, at least= I > >> don't know anything about those other panels and can't test them. It > >> will be much better to support the rotation on by as-needed basis for > >> each panel driver individually. > > > > How about CCing the author and reviewer asking them to test the patch? > > The only place where the patches might cause an issue is with tiny, > > although patches would still be appreciated. > > There are quite a lot of panel drivers and I'm a bit doubtful that at > least half of devices that use those panels have any real use for the > rotation property. I could write the patches.. but in the end it could > be a wasted effort if nobody needs it, so I'd prefer not to do it. That's why I mentioned the rotation introduction or "confusion" if I may. Skimming through the pre/post YAML device tree bindings and grep through the panel themselves will greatly reduce the list. In other words: if neither binding documentation/in-tree dts nor panel mentions rotation - omit it. -Emil