Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5207566ybi; Tue, 11 Jun 2019 21:47:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwB/pEWgTCfrHCQ4ILea8Bk9yXaCujIvAs5GdtIebqrZfgICRjTgXewu+0jOBCPa7gz0ikc X-Received: by 2002:a62:5801:: with SMTP id m1mr85100576pfb.32.1560314838292; Tue, 11 Jun 2019 21:47:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560314838; cv=none; d=google.com; s=arc-20160816; b=VmroSOW2hTeScoJ9FrbCANe163Z7f/waA2kVSmW4DZijvQBQQut9BP83WyZjUNgtk6 IH0kPwItibuRjuCURFqB1r046/DQJ4+VAkO81QXeXcYUquZ12CYqm2HbvM5xOPyYYqo9 EKZ6rIRQMobW2q6tvJ6HhPm3Cd9J8O0HFz/Gf7hKFFG1DO3qs1yKb+yb9MPqKZcd1uZJ Xt3ut+9M9vZnq1SDx10oYXikhC/QbqqJSXMifbZ4VPnAhpw6sa+2zFy+4TwiJRIMP+G1 Ofv9cgZa+8WLk+wwmLyhKJMqslJrhy32w6J6ewQXFqAxvmuTm03IHphKrARMRq2CmmwD 49Sw== 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=R9aK4K+mYhxsBGuDL1wSkT9a9QdB+QJqvCcQqCRoZqk=; b=euQ3+njuH2J09sGpRHD8Qo5TUOrKky4dLIALKeyM4Q1qpnTlu+Qwzf7QfB3IMuAsRh V98dGfOlINlD/tRD19kistP5RtdLBWMlDwMtPbginQmlsHVGOatEQ5VWXtZvHljmLwRm 91SU+x2o9t7V0ABuDFqrvAZUy8uLRvg6VnmkzZOQfXzzeYoyRbaMgcYtG63d2vXkQDkV ejoCBKZgKUZi2GENiLOg2jKyYhscWpiCzLcEAO2wgE3hVRMIGjpiULa/+7xwp48P+6jw 0K574WD6efecL0Q8s+GfnHj24aQSV2F+DkzB8ZoZlpyz3BR8al0Z/e463quoX9mVO6lX ZWVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jynV4LeL; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si3452759pfl.254.2019.06.11.21.47.03; Tue, 11 Jun 2019 21:47:18 -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=@chromium.org header.s=google header.b=jynV4LeL; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436703AbfFKWCB (ORCPT + 99 others); Tue, 11 Jun 2019 18:02:01 -0400 Received: from mail-vs1-f68.google.com ([209.85.217.68]:43847 "EHLO mail-vs1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436695AbfFKWCB (ORCPT ); Tue, 11 Jun 2019 18:02:01 -0400 Received: by mail-vs1-f68.google.com with SMTP id d128so8971922vsc.10 for ; Tue, 11 Jun 2019 15:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=R9aK4K+mYhxsBGuDL1wSkT9a9QdB+QJqvCcQqCRoZqk=; b=jynV4LeLSkp8mY/yMLs3t4Pg5sizpYJiXBSRzIWuITTAmY09IkU049XMUREkVXni+g JYmm1KjaWGlZolbGVaL1OfPnf3JRGs5E9Tzrgf9suFhpZzr0hUOGtfsAg/LWhL40oakz 62yF0xRTAYPtIkJav7muvoNoGgY8jAOJHKSgg= 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=R9aK4K+mYhxsBGuDL1wSkT9a9QdB+QJqvCcQqCRoZqk=; b=HTRVqJrQas6YpNC6CR0cxJ0LVUXtWQJe7ctfgaG3gytZdTcB2OFCM6Alz6p5/El6CK wNq4yX6VT4cuyT918fwURU44WoPdOa9aEVBHdXY1isuEMz6NPquRXFthvVqReFIfGvU0 NBzqle4vl51o7ijz//rkikPYZgHuAwNDtz60V0UFVyqVpZwqEZ8aA1Xgx+vCd1Cra4ll NaRpaUgKDa26uDro+6rQm+xXfuaLDzCHhrQdod81wWvz6T5yVoyNpSvg1gTMsLOh/NRc DKq4R1Iu7rvpMKxBUcQUqrpZdkqdYtFlTViDKzjpEInwQ+H9hlVrcnT4P7cXT3s0p1Se A6Dw== X-Gm-Message-State: APjAAAXGW32Tw70PbKmjk3vze8QILENLTH8i06Sy/MCOtLBA4u5QyaDi K5ha9sGIJmEjbBVqWwNI5h6NlbWyZdouCOLyW+zaqg== X-Received: by 2002:a67:d384:: with SMTP id b4mr9315081vsj.152.1560290519746; Tue, 11 Jun 2019 15:01:59 -0700 (PDT) MIME-Version: 1.0 References: <20190611040350.90064-1-dbasehore@chromium.org> <20190611040350.90064-3-dbasehore@chromium.org> In-Reply-To: From: "dbasehore ." Date: Tue, 11 Jun 2019 15:01:48 -0700 Message-ID: Subject: Re: [PATCH 2/5] dt-bindings: display/panel: Expand rotation documentation To: Rob Herring Cc: "linux-kernel@vger.kernel.org" , Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Mark Rutland , Maarten Lankhorst , Maxime Ripard , Sean Paul , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , CK Hu , Philipp Zabel , Matthias Brugger , dri-devel , devicetree@vger.kernel.org, Intel Graphics , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "moderated list:ARM/Mediatek SoC support" 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 On Tue, Jun 11, 2019 at 8:25 AM Rob Herring wrote: > > On Mon, Jun 10, 2019 at 10:03 PM Derek Basehore wrote: > > > > This adds to the rotation documentation to explain how drivers should > > use the property and gives an example of the property in a devicetree > > node. > > > > Signed-off-by: Derek Basehore > > --- > > .../bindings/display/panel/panel.txt | 32 +++++++++++++++++++ > > 1 file changed, 32 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/display/panel/panel.txt b/Documentation/devicetree/bindings/display/panel/panel.txt > > index e2e6867852b8..f35d62d933fc 100644 > > --- a/Documentation/devicetree/bindings/display/panel/panel.txt > > +++ b/Documentation/devicetree/bindings/display/panel/panel.txt > > @@ -2,3 +2,35 @@ Common display properties > > ------------------------- > > > > - rotation: Display rotation in degrees counter clockwise (0,90,180,270) > > + > > +Property read from the device tree using of of_drm_get_panel_orientation > > Don't put kernel specifics into bindings. Will remove that. I'll clean up the documentation to indicate that this binding creates a panel orientation property unless the rotation is handled in the Timing Controller on the panel if that sounds fine. > > > + > > +The panel driver may apply the rotation at the TCON level, which will > > What's TCON? Something Mediatek specific IIRC. The TCON is the Timing controller, which is on the panel. Every panel has one. I'll add to the doc that the TCON is in the panel, etc. > > > +make the panel look like it isn't rotated to the kernel and any other > > +software. > > + > > +If not, a panel orientation property should be added through the SoC > > +vendor DRM code using the drm_connector_init_panel_orientation_property > > +function. > > The 'rotation' property should be defined purely based on how the > panel is mounted relative to a device's orientation. If the display > pipeline has some ability to handle rotation, that's a feature of the > display pipeline and not the panel. This is how the panel orientation property is already handled in the kernel. See drivers/gpu/drm/i915/vlv_dsi.c for more details. > > > + > > +Example: > > This file is a collection of common properties. It shouldn't have an > example especially as this example is mostly non-common properties. Just copied one of our DTS entries that uses the property. I'll remove everything under compatible except for rotation and status. > > > + panel: panel@0 { > > + compatible = "boe,himax8279d8p"; > > + reg = <0>; > > + enable-gpios = <&pio 45 0>; > > > + pp33-gpios = <&pio 35 0>; > > + pp18-gpios = <&pio 36 0>; > > BTW, are these upstream because they look like GPIO controlled > supplies which we model with gpio-regulator binding typically. The boe,himax8279 driver was sent upstream, but it doesn't appear to be merged. I'll look into it on that thread. > > > + pinctrl-names = "default", "state_3300mv", "state_1800mv"; > > + pinctrl-0 = <&panel_pins_default>; > > + pinctrl-1 = <&panel_pins_3300mv>; > > + pinctrl-2 = <&panel_pins_1800mv>; > > + backlight = <&backlight_lcd0>; > > + rotation = <180>; > > + status = "okay"; > > + > > + port { > > + panel_in: endpoint { > > + remote-endpoint = <&dsi_out>; > > + }; > > + }; > > + }; > > -- > > 2.22.0.rc2.383.gf4fbbf30c2-goog > >