Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4626133ybi; Tue, 11 Jun 2019 09:39:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFOnMVCtd/nEOAM1ImZgfuXvdfLhOoak3s46gRanTApnomYATjyWreM/3DOxzKTOvaGrn6 X-Received: by 2002:a17:90a:9a83:: with SMTP id e3mr14008258pjp.105.1560271158737; Tue, 11 Jun 2019 09:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560271158; cv=none; d=google.com; s=arc-20160816; b=Igj81GW4XZMCKbfe5hgYusd/uKzotOOgYCpBXcHWXJSlaximrjXaUDpSfiDiVF0kdO b+lP9r0fGGdRH3W0yQzftOwjrG2wZo8m3v+Awoz4HWe5/TEwbphjzb8BEFbSvL122eK6 k5Xx1ewodG1s29rkmln8sBR+2+zqw9kyIcHzEH7/dfVGDCtvWbO45efgtHmfCJQWsk1C j/ia53P0yzdb+ZuKNBp5dnC/ubnFuT/O7qmTjS8dUEZ7Sko+ePXYcjLWpOG8Y8W+V1Mz tsOrf94gbOQePoiEx0Ah3kapRhrEsrDIRBX8rdF7OUiipbD+pRajG9t4Wgar2DLIUEiv ixCw== 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=tiXl7pNcvy3Z6URp4AnaC3T5sxiSoPr9c6E7yDyAb3g=; b=SH3dXpxssUBOU55FdW+8lzsd7mXLfomX7UhJIR2Rnjg/fQ8gOHnlpfvqTetHvfr6dn 1vwrc2+FDVWj4l069e9J2uXZiYkhm63mQdP6CGZTPVKAkEnqoIuqOdvgZZcjf4tXi+0H Cv141UpsMV2roji6tk9LEK5e2d5nVcp1gPWh7asDVJ7FF5jx0/MM9iyb5/ca/NBejTR5 8J1HO8mHzac8NhJLRXn5jnxeqpowDfn9ACweBfVz0JsUFU5GaVpX89Xkz6Dnq8r6k80W g9fwu3AAPWERxkMYfTymORyZPqYxQWNOSln1W+6EatCJb412YdZMtrpAYI2R++Mx0FQp X0tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CdshHLDg; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si13688804pfa.36.2019.06.11.09.39.03; Tue, 11 Jun 2019 09:39: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=@kernel.org header.s=default header.b=CdshHLDg; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404927AbfFKPZv (ORCPT + 99 others); Tue, 11 Jun 2019 11:25:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:57090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404914AbfFKPZv (ORCPT ); Tue, 11 Jun 2019 11:25:51 -0400 Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 096C12175B; Tue, 11 Jun 2019 15:25:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560266750; bh=d/VaFO2GopJ/soJKDMYISKQ69HFRcP7EG77tPBICDJk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CdshHLDgJ7Z/1d5LTs2sVuwWCODL2x/qXUFAMEQPKZm794Tm7ad0pFwve7BIfoo62 4WDI7usTGjFy11bRMh+JpMTO5ZOpdW4p4qrqu8N+4vInTl3LBXaRd+8FMIxGt33wcR dracVjyhFWQwwtHdPHeCNubvSPz6pWMOO7QqSbIQ= Received: by mail-qt1-f173.google.com with SMTP id x2so14119711qtr.0; Tue, 11 Jun 2019 08:25:49 -0700 (PDT) X-Gm-Message-State: APjAAAUt1VyCPDS7csClK3rBa+ptPGd0IZFSzOGVilRwnQCh22/ntpa7 mt/Nneh4KOfFyyPreX3VBEZRhmKqnI6nqpvKCw== X-Received: by 2002:a05:6214:248:: with SMTP id k8mr29740285qvt.200.1560266749174; Tue, 11 Jun 2019 08:25:49 -0700 (PDT) MIME-Version: 1.0 References: <20190611040350.90064-1-dbasehore@chromium.org> <20190611040350.90064-3-dbasehore@chromium.org> In-Reply-To: <20190611040350.90064-3-dbasehore@chromium.org> From: Rob Herring Date: Tue, 11 Jun 2019 09:25:37 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/5] dt-bindings: display/panel: Expand rotation documentation To: Derek Basehore 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 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. > + > +The panel driver may apply the rotation at the TCON level, which will What's TCON? Something Mediatek specific IIRC. > +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. > + > +Example: This file is a collection of common properties. It shouldn't have an example especially as this example is mostly non-common properties. > + 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. > + 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 >