Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2238481ybi; Mon, 1 Jul 2019 08:32:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGWltLY80C/e5169R9JhVWIJUyBfF8/KRcWsdS5eFxLzIAksPAXCFMbHCdWnfp/uj+1xAo X-Received: by 2002:a63:f346:: with SMTP id t6mr26382970pgj.203.1561995158991; Mon, 01 Jul 2019 08:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561995158; cv=none; d=google.com; s=arc-20160816; b=ylWMVH4kayLaR8x46fPlJkMxF4F0EL2wvcNoVIbV7Q93IFAwPfAodbDHS2v5kv8SRb pAoTnKLhlfJIuOCNvKh4X43Ul8fCGExFVI8VkptxlSshSW0SvlGfgEV1mGg2X/VCcFJn fpUZtqp3C8Gen1Cj25+pO6ssr1t2YoGXYgKosgxA2gRHYSsYs+XEfDFNIqqpA987CBSW G6Y6yKxvUzIEgNn1r1BqRIzZwUIKWfFP0Y5CQ/yGCveCIXEhqoXolNjfZz4VwT81Cdo9 ABtz5smvA3haztgd6nvA2pL5xFV7JgZyi9nqwlbI8FUfVJU4H30TUyst6yHJWUMuDcl1 ltJQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature; bh=waGXTwVYhiXlkezzgxvqWvD1EDvzOF9IHIkvRNcxPEY=; b=LNuFv+y5bBW639EjwFG38rrHZZzRv8DbZnu1LZzKisUzahKoGr16vm1U4IlKTTD/gQ ta2KJttqy4SgwmEgK9XTn+b31RIEwGBXsjS4i06ynZh/hAKRrAryzSvQ4B0yZILqIunc MkV2tb7n83SVTX5tQMt0vS3ru19gY/TzQJYArqsC35JJc/IrGVbTjtdOTJRqlFSFX2YB 8ORQCikKqccbAWsjQycNvHEvKJIHo51umb5+INtqhOlwrM7vgFdnHtUYoUH6At0LVhay CA35CLCoFP7wLW3xt4uYduvB3OA7ArsRvohDqn2qLf8zyeZYCB+jPaIstHOA9RK7Qweq CMEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=lrgYOWob; dkim=pass header.i=@codeaurora.org header.s=default header.b=SthwBwae; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d62si10368362pga.447.2019.07.01.08.32.20; Mon, 01 Jul 2019 08:32:38 -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=@codeaurora.org header.s=default header.b=lrgYOWob; dkim=pass header.i=@codeaurora.org header.s=default header.b=SthwBwae; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729419AbfGAO2u (ORCPT + 99 others); Mon, 1 Jul 2019 10:28:50 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43026 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728145AbfGAO2t (ORCPT ); Mon, 1 Jul 2019 10:28:49 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E173B6081E; Mon, 1 Jul 2019 14:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561991327; bh=u0R2SfGKnaTI/lQP8v2+57GTBRdtXGY/4LgRzV/KLso=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=lrgYOWobMtniBi1gRY3XX4xCP/3y5QrW9TjwxbmT6+6mmAvVzHms16vCvBD+LvjGZ m/7hzUw/jlO37dmm6frFNQ1PJOcQyNw66MmRkjcpFIRwSZohUPDTdQrQPcLs5fg0oj P4iDNyzZKz6XtnqJG3TYAFzMA4qHdOqWxPdNkCt0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from [10.226.58.28] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jhugo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D8DE5601D7; Mon, 1 Jul 2019 14:28:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561991326; bh=u0R2SfGKnaTI/lQP8v2+57GTBRdtXGY/4LgRzV/KLso=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=SthwBwaeknA166KVZ2VvbXRXvgZYL2ZBCrHJFMYlBnNdrPu9rJwGZbvdTVr5Ry5GG 2hZsE0rBIHTmGfSBNbM29+qV39K/wY6zGJc5z8kT+wIwXgHlUWmRSrXzGqPGdOgDqP AMusXqgHjMVe5jS+0F9Wc0GNwUl0GSGP+Y5hl3qs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D8DE5601D7 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jhugo@codeaurora.org Subject: Re: [PATCH 1/4] dt-bindings: chosen: document panel-id binding To: Rob Herring , Rob Clark Cc: dri-devel , linux-arm-msm , freedreno , aarch64-laptops@lists.linaro.org, Rob Clark , Mark Rutland , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" References: <20190630203614.5290-1-robdclark@gmail.com> <20190630203614.5290-2-robdclark@gmail.com> From: Jeffrey Hugo Message-ID: Date: Mon, 1 Jul 2019 08:28:45 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/1/2019 8:03 AM, Rob Herring wrote: > On Sun, Jun 30, 2019 at 2:36 PM Rob Clark wrote: >> >> From: Rob Clark >> >> The panel-id property in chosen can be used to communicate which panel, >> of multiple possibilities, is installed. >> >> Signed-off-by: Rob Clark >> --- >> Documentation/devicetree/bindings/chosen.txt | 69 ++++++++++++++++++++ >> 1 file changed, 69 insertions(+) > > I need to update this file to say it's moved to the schema repository... > > But I don't think that will matter... > >> diff --git a/Documentation/devicetree/bindings/chosen.txt b/Documentation/devicetree/bindings/chosen.txt >> index 45e79172a646..d502e6489b8b 100644 >> --- a/Documentation/devicetree/bindings/chosen.txt >> +++ b/Documentation/devicetree/bindings/chosen.txt >> @@ -68,6 +68,75 @@ on PowerPC "stdout" if "stdout-path" is not found. However, the >> "linux,stdout-path" and "stdout" properties are deprecated. New platforms >> should only use the "stdout-path" property. >> >> +panel-id >> +-------- >> + >> +For devices that have multiple possible display panels (multi-sourcing the >> +display panels is common on laptops, phones, tablets), this allows the >> +bootloader to communicate which panel is installed, e.g. > > How does the bootloader figure out which panel? Why can't the kernel > do the same thing? Its platform specific. In the devices that Rob Clark seems interested in, there are multiple mechanisms in place - read a gpio, enable the DSI and send a specific command to the panel controller asking for its panel id, or read some efuses. The efuses may not be accessible by Linux. The DSI solution is problematic because it causes a chicken and egg situation where linux needs the DT to probe the DSI driver to query the panel, in order to edit the DT to probe DSI/panel. In the systems Rob Clark is interested in, the FW already provides a specific EFI variable with the panel id encoded in it for HLOS to use (although this is broken on some of the devices), but this is a specific vendor's solution. The FW/bootloader has probably already figured out the panel details and brought up the display for a boot splash, bios menu, etc. I'm not sure it makes a lot of sense to define N mechanisms for linux to figure out the same across every platform/vendor. > >> + >> +/ { >> + chosen { >> + panel-id = <0xc4>; >> + }; >> + >> + ivo_panel { >> + compatible = "ivo,m133nwf4-r0"; >> + power-supply = <&vlcm_3v3>; >> + no-hpd; >> + >> + ports { >> + port { >> + ivo_panel_in_edp: endpoint { >> + remote-endpoint = <&sn65dsi86_out_ivo>; >> + }; >> + }; >> + }; >> + }; >> + >> + boe_panel { >> + compatible = "boe,nv133fhm-n61"; > > Both panels are going to probe. So the bootloader needs to disable the > not populated panel setting 'status' (or delete the node). If you do > that, do you even need 'panel-id'? > >> + power-supply = <&vlcm_3v3>; >> + no-hpd; >> + >> + ports { >> + port { >> + boe_panel_in_edp: endpoint { >> + remote-endpoint = <&sn65dsi86_out_boe>; >> + }; >> + }; >> + }; >> + }; >> + >> + display_or_bridge_device { >> + >> + ports { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + ... >> + >> + port@0 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + reg = <0>; >> + >> + endpoint@c4 { >> + reg = <0xc4>; > > What does this number represent? It is supposed to be defined by the > display_or_bridge_device, not a specific panel. Its the specific FW/bootloader defined panel id, that matches the above defined panel-id property. > > We also need to consider how the DSI case with panels as children of > the DSI controller would work and how this would work with multiple > displays each having multiple panel options. > > Rob > -- Jeffrey Hugo Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.