From patchwork Thu Oct 25 22:21:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10656747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4204114DE for ; Thu, 25 Oct 2018 22:22:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 350882C627 for ; Thu, 25 Oct 2018 22:22:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 290762C62B; Thu, 25 Oct 2018 22:22:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C56102C627 for ; Thu, 25 Oct 2018 22:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727250AbeJZG4g (ORCPT ); Fri, 26 Oct 2018 02:56:36 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34043 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726787AbeJZG4g (ORCPT ); Fri, 26 Oct 2018 02:56:36 -0400 Received: by mail-pl1-f195.google.com with SMTP id f10-v6so4534001plr.1 for ; Thu, 25 Oct 2018 15:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6+LgcWkQxncFqD35FDqpvfp7mOi58SqLpjOIXD6LCUY=; b=XnFg+twccYS6WPM5VAT3U7gHPAvWqMtdXR0uo97VxhfAtJAFcG6BrqhGvGrnXkHUR5 MQ/gYWyf9J+GZK6xEZme1/8Tzu/PrXJ00bvMR8eklmus60hhYHEK2WiiTH1ED+ilIiqz fo4G7iDuiaJrq8im72wIn17mtO5EjPCysivGQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6+LgcWkQxncFqD35FDqpvfp7mOi58SqLpjOIXD6LCUY=; b=bYHc7M+RdKz2w6K04HDCK+dfG0Fy9KgRt41pvbrlusx6B9Ofko7NgrFL4cqeCiL1EQ NwcUvSnZj1AzJxzLnEBJ7OZBw46lOQ8A1pi1Bjo1KCl9hGKz5BNIw+oa5g/tJH9ejKoq JzK3ECJIpte3HcJI5vS2H8BGKNBDy6AcDLmb7qe8u7h5PaN1nEaxzg1r3CEx0qcL2AH3 0c4Vd1lTED5PaWcH/NDO0pZm18mvQBLp6MDWof0nsxte0BNNFyCUl05ph7r/N3jHxznR oDWtHU6XrCIkp06cUSja8dEESdv/MaGnpnghwNYARzYW7oW2Lnj9oiklkOoMAsuMuLGP Wp3A== X-Gm-Message-State: AGRZ1gJ/Z+Vx0oJLoUj/B3iqEFBhRUBILP0KQJIMXOBI7OND4s45nrE9 KD1y1Mj0WiQwmqFjr/TTrZaDaQ== X-Google-Smtp-Source: AJdET5eBvm0W+ZrjAgVekK9Dk6m4WXSwBmTEZY+9sHXXYPpvaQPioUmALvOOTipUaIPSH7SISaiPjQ== X-Received: by 2002:a17:902:2808:: with SMTP id e8-v6mr882658plb.327.1540506127727; Thu, 25 Oct 2018 15:22:07 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id x73-v6sm19813778pfk.139.2018.10.25.15.22.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 15:22:06 -0700 (PDT) From: Douglas Anderson To: Sean Paul , Thierry Reding , Sandeep Panda Cc: linux-arm-msm@vger.kernel.org, Laurent Pinchart , jsanka@codeaurora.org, ryandcase@chromium.org, Douglas Anderson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , David Airlie , Mark Rutland Subject: [PATCH v2 1/6] dt-bindings: drm/panel: simple: Add no-hpd property Date: Thu, 25 Oct 2018 15:21:29 -0700 Message-Id: <20181025222134.174583-1-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some eDP panels that are designed to be always connected to a board use their HPD signal to signal that they've finished powering on and they're ready to be talked to. However, for various reasons it's possible that the HPD signal from the panel isn't actually hooked up. In the case where the HPD isn't hooked up you can look at the timing diagram on the panel datasheet and insert a delay for the maximum amount of time that the HPD might take to come up. Let's add a property in the device tree for this concept. Signed-off-by: Douglas Anderson Reviewed-by: Sean Paul Reviewed-by: Rob Herring --- Changes in v2: None .../devicetree/bindings/display/panel/simple-panel.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt index 45a457ad38f0..b2b872c710f2 100644 --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt @@ -11,6 +11,9 @@ Optional properties: - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - enable-gpios: GPIO pin to enable or disable the panel - backlight: phandle of the backlight device attached to the panel +- no-hpd: This panel is supposed to communicate that it's ready via HPD + (hot plug detect) signal, but the signal isn't hooked up so we should + hardcode the max delay from the panel spec when powering up the panel. Example: From patchwork Thu Oct 25 22:21:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10656727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32E0F17DE for ; Thu, 25 Oct 2018 22:22:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2472C2C627 for ; Thu, 25 Oct 2018 22:22:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 181742C62B; Thu, 25 Oct 2018 22:22:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1DD92C627 for ; Thu, 25 Oct 2018 22:22:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727534AbeJZG4i (ORCPT ); Fri, 26 Oct 2018 02:56:38 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:46518 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727518AbeJZG4h (ORCPT ); Fri, 26 Oct 2018 02:56:37 -0400 Received: by mail-pf1-f193.google.com with SMTP id r64-v6so4876585pfb.13 for ; Thu, 25 Oct 2018 15:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=neUKq1cuoz4/oKiks/GsHVXngMnTcPnfmEeTBUxyFyg=; b=MShnanCg69KmxODEm+UD+bcmQMTz4pzjVCGBcXmoP7oKfcst2ZTAgw9Ubo8bm1EwpA sHjX+BoGsmck7iFweAoCrQF6pOxBmLCQTBDg46RCtvuyE9tCWfM0/TI7K9nYtxbFf5so i2RXA1fQUmDluKfru+9GuZXhokVFARfSq6zSU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=neUKq1cuoz4/oKiks/GsHVXngMnTcPnfmEeTBUxyFyg=; b=jkt9/aUC4eoQ/WkDOQ/tAFvnMKBLmeb4kLGUdjfIDjTbKMaMFmb1qaCLjyc9nWJVDG lZHZh3leDYh59EGpgpWB4gT1c6gXL7HrwGCKTwNChEGVDEPPQ3sAPPrWF4WzvisyuQjx j0D0SplyGb3bvoapSTCS0IsMoreL/yb1GbEx/kIFcBWY1syC9ciZD1yOovalirdEN/nQ 3HIIIbd/gi09WJU3l8mp/S1g/qWk6NSZod7VLeJtR3eWuBDivjdnnqghEEOD4z5rOP2N P7csyhbTwPDo4ScbEqLR0tb0V7Hx/y0PAQH2BpPBOE1wj8Ic2fk46NwZn9I2euPVTfdD vUcw== X-Gm-Message-State: AGRZ1gLcS9pSsKz2WHre3F0qrryQoNTbMW+ou6mETOlUJV9G1jzh/vwy qCzIwoCuTDfkJp3BoWz7s6y4KA== X-Google-Smtp-Source: AJdET5dTvtSUFcfnEqsE47nbgEmd/VJ9nhPqfZeCLGcdyEot1aGHtkJlLeEzIzTqRmdWS/eqfcs07A== X-Received: by 2002:a63:9343:: with SMTP id w3-v6mr883015pgm.343.1540506129169; Thu, 25 Oct 2018 15:22:09 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id x73-v6sm19813778pfk.139.2018.10.25.15.22.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 15:22:08 -0700 (PDT) From: Douglas Anderson To: Sean Paul , Thierry Reding , Sandeep Panda Cc: linux-arm-msm@vger.kernel.org, Laurent Pinchart , jsanka@codeaurora.org, ryandcase@chromium.org, Douglas Anderson , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/6] drm/panel: simple: Support panels with HPD where HPD isn't connected Date: Thu, 25 Oct 2018 15:21:30 -0700 Message-Id: <20181025222134.174583-2-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog In-Reply-To: <20181025222134.174583-1-dianders@chromium.org> References: <20181025222134.174583-1-dianders@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some eDP panels that are designed to be always connected to a board use their HPD signal to signal that they've finished powering on and they're ready to be talked to. However, for various reasons it's possible that the HPD signal from the panel isn't actually hooked up. In the case where the HPD isn't hooked up you can look at the timing diagram on the panel datasheet and insert a delay for the maximum amount of time that the HPD might take to come up. Let's add support in simple-panel for this concept. At the moment we will co-opt the existing "prepare" delay to keep track of the delay and we'll use a boolean to specify that a given panel should only apply the delay if the "no-hpd" property was specified. Signed-off-by: Douglas Anderson Reviewed-by: Sean Paul --- Changes in v2: - Use "hpd_absent_delay" property instead of a bool + prepare delay drivers/gpu/drm/panel/panel-simple.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 97964f7f2ace..687fd087b9fc 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -56,6 +56,8 @@ struct panel_desc { /** * @prepare: the time (in milliseconds) that it takes for the panel to * become ready and start receiving video data + * @hpd_absent_delay: Add this to the prepare delay if we know Hot + * Plug Detect isn't used. * @enable: the time (in milliseconds) that it takes for the panel to * display the first valid frame after starting to receive * video data @@ -66,6 +68,7 @@ struct panel_desc { */ struct { unsigned int prepare; + unsigned int hpd_absent_delay; unsigned int enable; unsigned int disable; unsigned int unprepare; @@ -79,6 +82,7 @@ struct panel_simple { struct drm_panel base; bool prepared; bool enabled; + bool no_hpd; const struct panel_desc *desc; @@ -202,6 +206,7 @@ static int panel_simple_unprepare(struct drm_panel *panel) static int panel_simple_prepare(struct drm_panel *panel) { struct panel_simple *p = to_panel_simple(panel); + unsigned int delay; int err; if (p->prepared) @@ -215,8 +220,11 @@ static int panel_simple_prepare(struct drm_panel *panel) gpiod_set_value_cansleep(p->enable_gpio, 1); - if (p->desc->delay.prepare) - msleep(p->desc->delay.prepare); + delay = p->desc->delay.prepare; + if (p->no_hpd) + delay += p->desc->delay.hpd_absent_delay; + if (delay) + msleep(delay); p->prepared = true; @@ -305,6 +313,8 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc) panel->prepared = false; panel->desc = desc; + panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd"); + panel->supply = devm_regulator_get(dev, "power"); if (IS_ERR(panel->supply)) return PTR_ERR(panel->supply); From patchwork Thu Oct 25 22:21:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10656745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8256414BB for ; Thu, 25 Oct 2018 22:22:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 748502C627 for ; Thu, 25 Oct 2018 22:22:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 687F92C62B; Thu, 25 Oct 2018 22:22:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 124462C627 for ; Thu, 25 Oct 2018 22:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727570AbeJZG4j (ORCPT ); Fri, 26 Oct 2018 02:56:39 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:42338 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727530AbeJZG4i (ORCPT ); Fri, 26 Oct 2018 02:56:38 -0400 Received: by mail-pf1-f194.google.com with SMTP id f26-v6so4878741pfn.9 for ; Thu, 25 Oct 2018 15:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mUTLNC4m4w91CHTqoAgeiiy9cnTlYaHM5XFwx8a4RBM=; b=OyfS1itPdAb8tmXpSb098aUZD56GNFIBqXG/ykzMRbu8TjOESundVkDzzPFN+VIDRA 9hcZj4/sfohG2TviQp1JB4QNJCO/29PmUfcp5bQAl9pM0cmMzkcwECRTCG8gtFp9tGIP 1adNJ4iyfnhPumaMH0mFdGqIsOhWGei6hsJvg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mUTLNC4m4w91CHTqoAgeiiy9cnTlYaHM5XFwx8a4RBM=; b=a99hVw8pd/qxlD45jpHyiccOACHxPBPnh/cU6O5tbKqzbV943P1xICLK5AW6/Q67Mg a2ROA4p0FVln7zPSJOm9G8YDS21DVFcrZAXz7BKIcYaQhW9q6SlbMmk+PMU5GqRTV9cc EHGpSXJpM7UiIjlz/zbUnb61dQ9dG7GCeyE2Avr3k9E9Dqo9tf6Z+ABn6ve73mtgS5AD xuNWp1db/ChmYS11bNOslbCeMzGM/fchwnsyDYZH+4ifeyIPigN4hw06jZrcYRf05J7p zvOIozxrYd0GTeKOTA+LtQKHe8BfZ4Hri3ulOFLmMIswwnFkRHnIbb65zWgociVZoh96 zZsQ== X-Gm-Message-State: AGRZ1gKTS9wt+v+Sgb41rOr+S0tVqudZz0jWKt4SmOoV6KGEvqfyYupk D6a7iBmdwwYbwHCg3q4fm8TTwqIRZkg= X-Google-Smtp-Source: AJdET5eAmWwOpqlvNaQuJlA6+B/OvhGVojTC6uUiER7tFKGjFhb9dCQMXm7X69CgldH8dSmkRY+ruQ== X-Received: by 2002:a63:5ec6:: with SMTP id s189mr871280pgb.357.1540506130519; Thu, 25 Oct 2018 15:22:10 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id x73-v6sm19813778pfk.139.2018.10.25.15.22.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 15:22:09 -0700 (PDT) From: Douglas Anderson To: Sean Paul , Thierry Reding , Sandeep Panda Cc: linux-arm-msm@vger.kernel.org, Laurent Pinchart , jsanka@codeaurora.org, ryandcase@chromium.org, Douglas Anderson , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/6] drm/panel: simple: Add "no-hpd" delay for Innolux TV123WAM Date: Thu, 25 Oct 2018 15:21:31 -0700 Message-Id: <20181025222134.174583-3-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog In-Reply-To: <20181025222134.174583-1-dianders@chromium.org> References: <20181025222134.174583-1-dianders@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the HPD signal isn't hooked up to this panel we need a 200 ms delay. In the datasheet this is shown as the maximum time that HPD will take to be asserted after power is given to the panel. Signed-off-by: Douglas Anderson Reviewed-by: Sean Paul --- Changes in v2: - Use "hpd_absent_delay" property instead of a bool + prepare delay drivers/gpu/drm/panel/panel-simple.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 687fd087b9fc..88592f9a0018 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1396,6 +1396,7 @@ static const struct panel_desc innolux_tv123wam = { .height = 173, }, .delay = { + .hpd_absent_delay = 200, .unprepare = 500, }, }; From patchwork Thu Oct 25 22:21:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10656743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 464E217DE for ; Thu, 25 Oct 2018 22:22:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 384E42C627 for ; Thu, 25 Oct 2018 22:22:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CE4E2C62B; Thu, 25 Oct 2018 22:22:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9078D2C629 for ; Thu, 25 Oct 2018 22:22:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727604AbeJZG4l (ORCPT ); Fri, 26 Oct 2018 02:56:41 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:40596 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbeJZG4k (ORCPT ); Fri, 26 Oct 2018 02:56:40 -0400 Received: by mail-pg1-f194.google.com with SMTP id o14-v6so4674278pgv.7 for ; Thu, 25 Oct 2018 15:22:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tA/+Y9/2aJwU6vkwStjbLLfZY+0s5KsUaFdKqCJw6Rw=; b=c3g0YpEpGod9nmQkJPTQ1YCgUvW6dQrgWqoMS0Hzja+mvjM9rFGsFhN5/3YyHkhYEc u2sHbl24RRDMAHf7H3iTRogqvGcFTPIyoNG3EV2cMUDCKPRRqAlgGWtB4f/GdcodXfUp EBAxZjuCLy1OBsWudyaTRowwKDd/qJUo6C3G0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tA/+Y9/2aJwU6vkwStjbLLfZY+0s5KsUaFdKqCJw6Rw=; b=IvsJaOW9Os/pC1bcVJREWx6MpKE6+aYQW8kAqTbwtaW668uRCJ4p5ehJcieuWOZ9WG E25h3v6Hf4PEiAnp/OEZZlinozDBV5i0pR/ruldZy3qzckrG0KBCPgpEDuZC1rbBqhzT uslRKL0d4ZhAPPXRFaQJo9nufdMX5W/DJVCbvj+P30bBa07jQQ3R2oeUb0ScgUggIJW+ EaFDPB9k8igdPVV86f/6CaXJ3HC/bZGIolxewJYg6A9dN1y4vWlE6YKzZ/My3qRiEaKG mWxmwAW1OJdPaDdmgpLvb4gPjQw2OBZAffwM+WBW8UEKc4VELMkcJn1PSZf025XJmOWT 2gRA== X-Gm-Message-State: AGRZ1gJvq+RrQKiMv++XmJYm382amnQABoBeGRzJGdbbjM0RRv3wJuTH bR0DgS9hzZFnQaiNZ7ou73rRoA== X-Google-Smtp-Source: AJdET5eVZ8eZKIupKVYYPIbFxQpQwC+dCTVm/4LrRZGaXkGoMcmyCtljn7hVatG0hJwf7L0nmtxo0Q== X-Received: by 2002:a62:52cc:: with SMTP id g195-v6mr986538pfb.241.1540506131936; Thu, 25 Oct 2018 15:22:11 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id x73-v6sm19813778pfk.139.2018.10.25.15.22.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 15:22:11 -0700 (PDT) From: Douglas Anderson To: Sean Paul , Thierry Reding , Sandeep Panda Cc: linux-arm-msm@vger.kernel.org, Laurent Pinchart , jsanka@codeaurora.org, ryandcase@chromium.org, Douglas Anderson , Andrzej Hajda , Archit Taneja , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Laurent Pinchart Subject: [PATCH v2 4/6] drm/bridge: ti-sn65dsi86: Remove the mystery delay Date: Thu, 25 Oct 2018 15:21:32 -0700 Message-Id: <20181025222134.174583-4-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog In-Reply-To: <20181025222134.174583-1-dianders@chromium.org> References: <20181025222134.174583-1-dianders@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Let's solve the mystery of commit bf1178c98930 ("drm/bridge: ti-sn65dsi86: Add mystery delay to enable()"). Specifically the reason we needed that mystery delay is that we weren't paying attention to HPD. Looking at the datasheet for the same panel that was tested for the original commit, I see there's a timing "t3" that times from power on to the aux channel being operational. This time is specced as 0 - 200 ms. The datasheet says that the aux channel is operational at exactly the same time that HPD is asserted. Scoping the signals on this board showed that HPD was asserted 84 ms after power was asserted. That very closely matches the magic 70 ms delay that we had. ...and actually, in my testing the 70 ms wasn't quite enough of a delay and some percentage of the time the display didn't come up until I bumped it to 100 ms (presumably 84 ms would have worked too). To solve this, we tried to hook up the HPD signal in the bridge. ...but in doing so we found that that the bridge didn't report that HPD was asserted until ~280 ms after we powered it (!). This is explained by looking at the sn65dsi86 datasheet section "8.4.5.1 HPD (Hot Plug/Unplug Detection)". Reading there we see that the bridge isn't even intended to report HPD until 100 ms after it's asserted. ...but that would have left us at 184 ms. The extra 100 ms (presumably) comes from this part in the datasheet: > The HPD state machine operates off an internal ring oscillator. The > ring oscillator frequency will vary [ ... ]. The min/max range in > the HPD State Diagram refers to the possible times based off > variation in the ring oscillator frequency. Given that the 280 ms we'll end up delaying if we hook up HPD is _slower_ than the 200 ms we could just hardcode, for now we'll solve the problem by just hardcoding a 200 ms delay in the panel driver using the patch in this series ("drm/panel: simple: Support panels with HPD where HPD isn't connected"). If we later find a panel that needs to use this bridge where we need HPD then we'll have to come up with some new code to handle it. Given the silly debouncing in the bridge chip, though, it seems unlikely. One last note is that I tried to solve this through another way: In ti_sn_bridge_enable() I tried to use various combinations of dp_dpcd_writeb() and dp_dpcd_readb() to detect when the aux channel was up. In theory that would let me detect _exactly_ when I could continue and do link training. Unfortunately even if I did an aux transfer w/out waiting I couldn't see any errors. Possibly I could keep looping over link training until it came back with success, but that seemed a little overly hacky to me. Signed-off-by: Douglas Anderson Reviewed-by: Sean Paul Reviewed-by: Andrzej Hajda --- Changes in v2: None drivers/gpu/drm/bridge/ti-sn65dsi86.c | 29 +++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index f8a931cf3665..680566d97adc 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -458,18 +458,6 @@ static void ti_sn_bridge_enable(struct drm_bridge *bridge) unsigned int val; int ret; - /* - * FIXME: - * This 70ms was found necessary by experimentation. If it's not - * present, link training fails. It seems like it can go anywhere from - * pre_enable() up to semi-auto link training initiation below. - * - * Neither the datasheet for the bridge nor the panel tested mention a - * delay of this magnitude in the timing requirements. So for now, add - * the mystery delay until someone figures out a better fix. - */ - msleep(70); - /* DSI_A lane config */ val = CHA_DSI_LANES(4 - pdata->dsi->lanes); regmap_update_bits(pdata->regmap, SN_DSI_LANES_REG, @@ -536,7 +524,22 @@ static void ti_sn_bridge_pre_enable(struct drm_bridge *bridge) /* configure bridge ref_clk */ ti_sn_bridge_set_refclk_freq(pdata); - /* in case drm_panel is connected then HPD is not supported */ + /* + * HPD on this bridge chip is a bit useless. This is an eDP bridge + * so the HPD is an internal signal that's only there to signal that + * the panel is done powering up. ...but the bridge chip debounces + * this signal by between 100 ms and 400 ms (depending on process, + * voltage, and temperate--I measured it at about 200 ms). One + * particular panel asserted HPD 84 ms after it was powered on meaning + * that we saw HPD 284 ms after power on. ...but the same panel said + * that instead of looking at HPD you could just hardcode a delay of + * 200 ms. We'll assume that the panel driver will have the hardcoded + * delay in its prepare and always disable HPD. + * + * If HPD somehow makes sense on some future panel we'll have to + * change this to be conditional on someone specifying that HPD should + * be used. + */ regmap_update_bits(pdata->regmap, SN_HPD_DISABLE_REG, HPD_DISABLE, HPD_DISABLE); From patchwork Thu Oct 25 22:21:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10656739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 13B0E14BB for ; Thu, 25 Oct 2018 22:22:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 061152C627 for ; Thu, 25 Oct 2018 22:22:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE1282C62B; Thu, 25 Oct 2018 22:22:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 800A62C627 for ; Thu, 25 Oct 2018 22:22:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727629AbeJZG4m (ORCPT ); Fri, 26 Oct 2018 02:56:42 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:45831 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727602AbeJZG4l (ORCPT ); Fri, 26 Oct 2018 02:56:41 -0400 Received: by mail-pg1-f194.google.com with SMTP id s3-v6so4661862pga.12 for ; Thu, 25 Oct 2018 15:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=79HngiBDiQu2HqmW3Dmf1zE0w4nzN+hU7+BFGeGhgIM=; b=EmNeYwP4x1HTsYsJM8cs8H59zEH38Elacy2FAYgWiikugmiTCXVNRgd9CBmueKvb7Z MPuBUGeI3IZheUGHM1p/+ST0rcK4kAqzp1sDEr8TnHawSMoovAn1lMtt2KujCI5A7QCK y+AZx6HFIenTCK+bYcoy8AEFsCCN9f6v3JH18= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=79HngiBDiQu2HqmW3Dmf1zE0w4nzN+hU7+BFGeGhgIM=; b=KXd5n0NxsA5f0PNVvQ1ubd/wmdBpDxx6kC5t81+0CLls6bp6VMAQsQ/SbfUby/bbqQ LTL603magjqdJWiW9A2pTwLvpMGhY7AE+f7BSEzBDcics5DBN5CGYiOV5zfDRPBRSCEH dmrGekqWKJmjq/6ym7kVERiK0lZAOwYd3IALULgv/m13za6yqtiZM4GS92HYYYEY0LaV 87hgldYhdnuuTKu60TJfFzQyEDqFdpa4ofAzAyosRMBUv7t2DvucwJeg5pgyQWfIKB9h StBwPn3TxdsJk/nFm3L00uRtOt7MFcI3cm0eiTzN4XtpSmbEdPKcR6DKX89JRmkxcg5Q E1RQ== X-Gm-Message-State: AGRZ1gIt5ElTlNsI3XoEQJIb98hpKLaz0YU8hLE1TNCPmhFRGQs6Aakl hzRUyBxOa5RJuoA7DQ3BpyHlWA== X-Google-Smtp-Source: AJdET5eqvzEfmkcLeUAWviq115QBMql7glcC5nEy0ys75ESrypX22pZGmtZwEnq9LDl1Aftu6rGjNQ== X-Received: by 2002:a62:9316:: with SMTP id b22-v6mr993871pfe.193.1540506133351; Thu, 25 Oct 2018 15:22:13 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id x73-v6sm19813778pfk.139.2018.10.25.15.22.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 15:22:12 -0700 (PDT) From: Douglas Anderson To: Sean Paul , Thierry Reding , Sandeep Panda Cc: linux-arm-msm@vger.kernel.org, Laurent Pinchart , jsanka@codeaurora.org, ryandcase@chromium.org, Douglas Anderson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , David Airlie , Mark Rutland Subject: [PATCH v2 5/6] dt-bindings: drm/panel: simple: Innolux TV123WAM is actually P120ZDG-BF1 Date: Thu, 25 Oct 2018 15:21:33 -0700 Message-Id: <20181025222134.174583-5-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog In-Reply-To: <20181025222134.174583-1-dianders@chromium.org> References: <20181025222134.174583-1-dianders@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As far as I can tell the bindings that were added in commit 9c04400f7ea6 ("dt-bindings: drm/panel: Document Innolux TV123WAM panel bindings") weren't actually for Innolux TV123WAM but were actually for Innolux P120ZDG-BF1. As far as I can tell the Innolux TV123WAM isn't a real panel and but it's a mosh between the TI TV123WAM and the Innolux P120ZDG-BF1. Let's unmosh. Here's my evidence: * Searching for TV123WAM on the Internet turns up a TI panel. While it's possible that an Innolux panel has the same model number as the TI Panel, it seems a little doubtful. Looking up the datasheet from the TI Panel shows that it's 1920 x 1280 and 259.2 mm x 172.8 mm. * As far as I know, the patch adding the Innolux Panel was supposed to be for the board that's sitting in front of me as I type this (support for that board is not yet upstream). On the back of that panel I see Innolux P120ZDZ-EZ1 rev B1. * Someone pointed me at a datasheet that's supposed to be for the panel in front of me (sorry, I can't share the datasheet). That datasheet has the string "p120zdg-bf1" * If I search for "P120ZDG-BF1" on the Internet I get hits for panels that are 2160x1440. They don't have datasheets, but the fact that the resolution matches is a good sign. While we doing the rename, also mention that no-hpd can be used with this panel. See the previous patch in this series ("drm/panel: simple: Add "no-hpd" delay for Innolux TV123WAM"). Fixes: 9c04400f7ea6 ("dt-bindings: drm/panel: Document Innolux TV123WAM panel bindings") Signed-off-by: Douglas Anderson Reviewed-by: Rob Herring Cc: Sandeep Panda Reviewed-by: Sean Paul Reviewed-by: Abhinav Kumar Reviewed-by: Andrzej Hajda --- Changes in v2: None .../{innolux,tv123wam.txt => innolux,p120zdg-bf1.txt} | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename Documentation/devicetree/bindings/display/panel/{innolux,tv123wam.txt => innolux,p120zdg-bf1.txt} (70%) diff --git a/Documentation/devicetree/bindings/display/panel/innolux,tv123wam.txt b/Documentation/devicetree/bindings/display/panel/innolux,p120zdg-bf1.txt similarity index 70% rename from Documentation/devicetree/bindings/display/panel/innolux,tv123wam.txt rename to Documentation/devicetree/bindings/display/panel/innolux,p120zdg-bf1.txt index a9b35265fa13..513f03466aba 100644 --- a/Documentation/devicetree/bindings/display/panel/innolux,tv123wam.txt +++ b/Documentation/devicetree/bindings/display/panel/innolux,p120zdg-bf1.txt @@ -1,20 +1,22 @@ -Innolux TV123WAM 12.3 inch eDP 2K display panel +Innolux P120ZDG-BF1 12.02 inch eDP 2K display panel This binding is compatible with the simple-panel binding, which is specified in simple-panel.txt in this directory. Required properties: -- compatible: should be "innolux,tv123wam" +- compatible: should be "innolux,p120zdg-bf1" - power-supply: regulator to provide the supply voltage Optional properties: - enable-gpios: GPIO pin to enable or disable the panel - backlight: phandle of the backlight device attached to the panel +- no-hpd: If HPD isn't hooked up; add this property. Example: panel_edp: panel-edp { - compatible = "innolux,tv123wam"; + compatible = "innolux,p120zdg-bf1"; enable-gpios = <&msmgpio 31 GPIO_ACTIVE_LOW>; power-supply = <&pm8916_l2>; backlight = <&backlight>; + no-hpd; }; From patchwork Thu Oct 25 22:21:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10656737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2C26D14BB for ; Thu, 25 Oct 2018 22:22:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EBF02C627 for ; Thu, 25 Oct 2018 22:22:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12B272C62B; Thu, 25 Oct 2018 22:22:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CE862C629 for ; Thu, 25 Oct 2018 22:22:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727596AbeJZG4n (ORCPT ); Fri, 26 Oct 2018 02:56:43 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44558 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727627AbeJZG4n (ORCPT ); Fri, 26 Oct 2018 02:56:43 -0400 Received: by mail-pf1-f193.google.com with SMTP id j2-v6so1691020pfn.11 for ; Thu, 25 Oct 2018 15:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=10BVyy4o/nnNTuseCYU3plL0bCCn/tw0RLzPJVkyKRc=; b=H1V/+lTJrK3gkHL0ufphYEaj9kDUJRpjDlzionDcUCrYXR7w1M3yueNz9qO6Zwh0WY AvTHZlduNw6sA+bZXTwnKkvpybZxA6c5x4UUvoEQ16edaxAo5yOIHff3gEYFWAWdZ5Db xZnAYanMKM6R/ZGRiVkKDc/y+W5eY/PiOmjUw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=10BVyy4o/nnNTuseCYU3plL0bCCn/tw0RLzPJVkyKRc=; b=jdVHeJvENtj4iQZ3ekBOlbTFZcOqKIHr5gPidUNJohvchWhil8rtTyYefERS8L+YSd 9s6WvgGms/cZrkk23GxJWHwm7E8T+atOa6L4PvLzaDZAogbVg+40i1BuAqgjMONb7E0B eaboKJQbWPKxWHRKQGVlK/PLeviVlewS0RUi7kfJzF8Wgu/k41hsPHBKLeEVZLWjSfLP AoJVbvKE3eFTfAjkrwmgDeas/cIDj2PSV11YtFwNhOrIhqJdmuku0Uj0TnvlLcsyKOP6 4OGc9mtrLbPTsEIBp3v0lEPAhntd/kkPvbd3Vc8UTRnt/+r/8sLFZlbuMsY0/E7f2lF/ ejIg== X-Gm-Message-State: AGRZ1gJD330HJiRKJd9lS2GsLEgntdNUfilydSN5SOQFv3TlmvUb2gsM 0aB89cLVMXkOKKVoEsEPYVx6tg== X-Google-Smtp-Source: AJdET5csPAFX3Wdl3ImPp9rZFIaCrBRRhRyvL2msAO6v/HOlJAYTLREkM+CllxyyPYDoCrpHlM9Rtw== X-Received: by 2002:a63:455e:: with SMTP id u30-v6mr944989pgk.30.1540506134690; Thu, 25 Oct 2018 15:22:14 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id x73-v6sm19813778pfk.139.2018.10.25.15.22.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Oct 2018 15:22:13 -0700 (PDT) From: Douglas Anderson To: Sean Paul , Thierry Reding , Sandeep Panda Cc: linux-arm-msm@vger.kernel.org, Laurent Pinchart , jsanka@codeaurora.org, ryandcase@chromium.org, Douglas Anderson , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/6] drm/panel: simple: Innolux TV123WAM is actually P120ZDG-BF1 Date: Thu, 25 Oct 2018 15:21:34 -0700 Message-Id: <20181025222134.174583-6-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog In-Reply-To: <20181025222134.174583-1-dianders@chromium.org> References: <20181025222134.174583-1-dianders@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As far as I can tell the panel that was added in commit da50bd4258db ("drm/panel: simple: Add Innolux TV123WAM panel driver support") wasn't actually an Innolux TV123WAM but was actually an Innolux P120ZDG-BF1. As far as I can tell the Innolux TV123WAM isn't a real panel and but it's a mosh between the TI TV123WAM and the Innolux P120ZDG-BF1. Let's unmosh. Here's my evidence: * Searching for TV123WAM on the Internet turns up a TI panel. While it's possible that an Innolux panel has the same model number as the TI Panel, it seems a little doubtful. Looking up the datasheet from the TI Panel shows that it's 1920 x 1280 and 259.2 mm x 172.8 mm. * As far as I know, the patch adding the Innolux Panel was supposed to be for the board that's sitting in front of me as I type this (support for that board is not yet upstream). On the back of that panel I see Innolux P120ZDZ-EZ1 rev B1. * Someone pointed me at a datasheet that's supposed to be for the panel in front of me (sorry, I can't share the datasheet). That datasheet has the string "p120zdg-bf1" * If I search for "P120ZDG-BF1" on the Internet I get hits for panels that are 2160x1440. They don't have datasheets, but the fact that the resolution matches is a good sign. In any case, let's update the name and also the physical size to match the correct panel. Fixes: da50bd4258db ("drm/panel: simple: Add Innolux TV123WAM panel driver support") Signed-off-by: Douglas Anderson Reviewed-by: Abhinav Kumar Cc: Sandeep Panda Reviewed-by: Sean Paul --- Changes in v2: None drivers/gpu/drm/panel/panel-simple.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 88592f9a0018..a04ffb3b2174 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1373,7 +1373,7 @@ static const struct panel_desc innolux_n156bge_l21 = { }, }; -static const struct drm_display_mode innolux_tv123wam_mode = { +static const struct drm_display_mode innolux_p120zdg_bf1_mode = { .clock = 206016, .hdisplay = 2160, .hsync_start = 2160 + 48, @@ -1387,13 +1387,13 @@ static const struct drm_display_mode innolux_tv123wam_mode = { .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC, }; -static const struct panel_desc innolux_tv123wam = { - .modes = &innolux_tv123wam_mode, +static const struct panel_desc innolux_p120zdg_bf1 = { + .modes = &innolux_p120zdg_bf1_mode, .num_modes = 1, .bpc = 8, .size = { - .width = 259, - .height = 173, + .width = 254, + .height = 169, }, .delay = { .hpd_absent_delay = 200, @@ -2456,8 +2456,8 @@ static const struct of_device_id platform_of_match[] = { .compatible = "innolux,n156bge-l21", .data = &innolux_n156bge_l21, }, { - .compatible = "innolux,tv123wam", - .data = &innolux_tv123wam, + .compatible = "innolux,p120zdg-bf1", + .data = &innolux_p120zdg_bf1, }, { .compatible = "innolux,zj070na-01p", .data = &innolux_zj070na_01p,