All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	aarch64-laptops@lists.linaro.org
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Vasily Khoruzhick <anarsoul@gmail.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Jeffrey Hugo <jhugo@codeaurora.org>,
	Rob Clark <robdclark@chromium.org>,
	devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
	FLATTENED DEVICE TREE BINDINGS),
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Jonas Karlman <jonas@kwiboo.se>,
	linux-kernel@vger.kernel.org (open list),
	Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 0/4] drm+dt: multi panel selection and yoga c630 display
Date: Sat,  7 Dec 2019 12:35:49 -0800	[thread overview]
Message-ID: <20191207203553.286017-1-robdclark@gmail.com> (raw)

From: Rob Clark <robdclark@chromium.org>

It is not uncommon for devices to use one of several possible panels.
The Lenovo Yoga C630 laptop is one such device.  This patchset
introduces an optional "panel-id" property which can be used by the
firmware to find the correct panel node to enable.  The second patch
adds support in drm/of to automatically pick the enabled endpoint, to
avoid adding the same logic in multiple bridges/drivers.  The last
patch uses this mechanism to enable display support for the Yoga C630.

An example usage:

  boe_panel {
      compatible = "boe,nv133fhm-n61";
      panel-id = <0xc4>;
      /* fw will change status to "Ok" if this panel is installed */
      status = "disabled";

      ports {
          port {
              boe_panel_in_edp: endpoint {
                  remote-endpoint = <&sn65dsi86_out_boe>;
              };
          };
      };
  };

  ivo_panel {
      compatible = "ivo,m133nwf4-r0";
      panel-id = <0xc5>;
      /* fw will change status to "Ok" if this panel is installed */
      status = "disabled";

      ports {
          port {
              ivo_panel_in_edp: endpoint {
                  remote-endpoint = <&sn65dsi86_out_ivo>;
              };
          };
      };
  };

  sn65dsi86: bridge@2c {
      compatible = "ti,sn65dsi86";

      ports {
          #address-cells = <1>;
          #size-cells = <0>;

          port@0 {
              reg = <0>;
              sn65dsi86_in_a: endpoint {
                  remote-endpoint = <&dsi0_out>;
              };
          };

          port@1 {
              reg = <1>;

              sn65dsi86_out_boe: endpoint@c4 {
                  remote-endpoint = <&boe_panel_in_edp>;
              };

              sn65dsi86_out_ivo: endpoint@c5 {
                  remote-endpoint = <&ivo_panel_in_edp>;
              };
          };
      };
  };

This replaces an earlier proposal[1] to use chosen/panel-id to select the
installed panel, in favor of adding support[2] to an EFI driver module
(DtbLoader.efi) to find the installed panel, locate it in dtb via the
'panel-id' property, and update it's status to "Ok".

[1] https://patchwork.kernel.org/cover/11024613/
[2] https://github.com/robclark/edk2/commits/dtbloader

In this case, DtbLoader, which is somewhat generic (ie. this mechanism
applies to all snapdragon based devices which orignally ship with
windows), determines the panel-id of the installed panel from the
UEFIDisplayInfo variable.

As I understand, a similar situation exists with the pine64 laptops.  A
similar scheme could be used to support this, by loading the panel-id
from a u-boot variable.

In other cases (phones), a more device specific shim would be needed to
determine the panel-id by reading some GPIOs, or some other more device-
specific mechanism.

Bjorn Andersson (1):
  arm64: dts: qcom: c630: Enable display

Rob Clark (3):
  dt-bindings: display: panel: document panel-id
  drm/of: add support to find any enabled endpoint
  drm/bridge: ti-sn65dsi86: find any enabled endpoint

 .../bindings/display/panel/panel-common.yaml  |  26 +++
 .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 165 ++++++++++++++++++
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |   2 +-
 drivers/gpu/drm/drm_of.c                      |  41 ++++-
 4 files changed, 232 insertions(+), 2 deletions(-)

-- 
2.23.0


WARNING: multiple messages have this Message-ID (diff)
From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	aarch64-laptops@lists.linaro.org
Cc: Rob Clark <robdclark@chromium.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jeffrey Hugo <jhugo@codeaurora.org>,
	open list <linux-kernel@vger.kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Vasily Khoruzhick <anarsoul@gmail.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 0/4] drm+dt: multi panel selection and yoga c630 display
Date: Sat,  7 Dec 2019 12:35:49 -0800	[thread overview]
Message-ID: <20191207203553.286017-1-robdclark@gmail.com> (raw)

From: Rob Clark <robdclark@chromium.org>

It is not uncommon for devices to use one of several possible panels.
The Lenovo Yoga C630 laptop is one such device.  This patchset
introduces an optional "panel-id" property which can be used by the
firmware to find the correct panel node to enable.  The second patch
adds support in drm/of to automatically pick the enabled endpoint, to
avoid adding the same logic in multiple bridges/drivers.  The last
patch uses this mechanism to enable display support for the Yoga C630.

An example usage:

  boe_panel {
      compatible = "boe,nv133fhm-n61";
      panel-id = <0xc4>;
      /* fw will change status to "Ok" if this panel is installed */
      status = "disabled";

      ports {
          port {
              boe_panel_in_edp: endpoint {
                  remote-endpoint = <&sn65dsi86_out_boe>;
              };
          };
      };
  };

  ivo_panel {
      compatible = "ivo,m133nwf4-r0";
      panel-id = <0xc5>;
      /* fw will change status to "Ok" if this panel is installed */
      status = "disabled";

      ports {
          port {
              ivo_panel_in_edp: endpoint {
                  remote-endpoint = <&sn65dsi86_out_ivo>;
              };
          };
      };
  };

  sn65dsi86: bridge@2c {
      compatible = "ti,sn65dsi86";

      ports {
          #address-cells = <1>;
          #size-cells = <0>;

          port@0 {
              reg = <0>;
              sn65dsi86_in_a: endpoint {
                  remote-endpoint = <&dsi0_out>;
              };
          };

          port@1 {
              reg = <1>;

              sn65dsi86_out_boe: endpoint@c4 {
                  remote-endpoint = <&boe_panel_in_edp>;
              };

              sn65dsi86_out_ivo: endpoint@c5 {
                  remote-endpoint = <&ivo_panel_in_edp>;
              };
          };
      };
  };

This replaces an earlier proposal[1] to use chosen/panel-id to select the
installed panel, in favor of adding support[2] to an EFI driver module
(DtbLoader.efi) to find the installed panel, locate it in dtb via the
'panel-id' property, and update it's status to "Ok".

[1] https://patchwork.kernel.org/cover/11024613/
[2] https://github.com/robclark/edk2/commits/dtbloader

In this case, DtbLoader, which is somewhat generic (ie. this mechanism
applies to all snapdragon based devices which orignally ship with
windows), determines the panel-id of the installed panel from the
UEFIDisplayInfo variable.

As I understand, a similar situation exists with the pine64 laptops.  A
similar scheme could be used to support this, by loading the panel-id
from a u-boot variable.

In other cases (phones), a more device specific shim would be needed to
determine the panel-id by reading some GPIOs, or some other more device-
specific mechanism.

Bjorn Andersson (1):
  arm64: dts: qcom: c630: Enable display

Rob Clark (3):
  dt-bindings: display: panel: document panel-id
  drm/of: add support to find any enabled endpoint
  drm/bridge: ti-sn65dsi86: find any enabled endpoint

 .../bindings/display/panel/panel-common.yaml  |  26 +++
 .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 165 ++++++++++++++++++
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |   2 +-
 drivers/gpu/drm/drm_of.c                      |  41 ++++-
 4 files changed, 232 insertions(+), 2 deletions(-)

-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2019-12-07 20:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-07 20:35 Rob Clark [this message]
2019-12-07 20:35 ` [PATCH 0/4] drm+dt: multi panel selection and yoga c630 display Rob Clark
2019-12-07 20:35 ` [PATCH 1/4] dt-bindings: display: panel: document panel-id Rob Clark
2019-12-07 20:35   ` Rob Clark
2019-12-07 21:13   ` Sam Ravnborg
2019-12-07 21:13     ` Sam Ravnborg
2019-12-07 21:34     ` Rob Clark
2019-12-07 21:34       ` Rob Clark
2019-12-08  9:39   ` Sam Ravnborg
2019-12-08  9:39     ` Sam Ravnborg
2019-12-08 14:45   ` Laurent Pinchart
2019-12-08 14:45     ` Laurent Pinchart
2019-12-08 16:50     ` Rob Clark
2019-12-08 16:50       ` Rob Clark
2019-12-08 18:27       ` Laurent Pinchart
2019-12-08 18:27         ` Laurent Pinchart
2019-12-08 21:23         ` Rob Clark
2019-12-08 21:23           ` Rob Clark
2019-12-09 11:05           ` Laurent Pinchart
2019-12-09 11:05             ` Laurent Pinchart
2019-12-09 15:31           ` Rob Herring
2019-12-09 15:31             ` Rob Herring
2019-12-09 15:57             ` Rob Clark
2019-12-09 15:57               ` Rob Clark
2019-12-07 20:35 ` [PATCH 2/4] drm/of: add support to find any enabled endpoint Rob Clark
2019-12-07 20:35   ` Rob Clark
2019-12-08  9:31   ` Sam Ravnborg
2019-12-08  9:31     ` Sam Ravnborg
2019-12-07 20:35 ` [PATCH 3/4] drm/bridge: ti-sn65dsi86: " Rob Clark
2019-12-07 20:35   ` Rob Clark
2019-12-07 20:35 ` [PATCH 4/4] arm64: dts: qcom: c630: Enable display Rob Clark
2019-12-07 20:35   ` Rob Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191207203553.286017-1-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=aarch64-laptops@lists.linaro.org \
    --cc=anarsoul@gmail.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jhugo@codeaurora.org \
    --cc=jonas@kwiboo.se \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@chromium.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.