From patchwork Thu Feb 2 23:38:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 9553349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2A47F60236 for ; Thu, 2 Feb 2017 23:39:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CC822847F for ; Thu, 2 Feb 2017 23:39:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DECA284D4; Thu, 2 Feb 2017 23:39:09 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9BC3A2847F for ; Thu, 2 Feb 2017 23:39:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6880E6EAF2; Thu, 2 Feb 2017 23:39:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 358F36EAF0 for ; Thu, 2 Feb 2017 23:39:05 +0000 (UTC) Received: by mail-pf0-x22d.google.com with SMTP id 189so823858pfu.3 for ; Thu, 02 Feb 2017 15:39:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=JwoSGwj+BtYuvHaziN0UYZF3x4d68ovZ9foQJk/XeNU=; b=YHdb5vE3I3OqfQqzRG8G8+kiAln5Bb7pjEbc7k9zLWQgQ7KeLEPi3qmjKvAza3zDSa zafjVgJ/DWjUgvvsEpWWjjp+N7CZpfkivRjIMb8KuG0Ue0cJX/kXb0uie3C4uTXVyawd 1Ffbpg4DzQb38yuQWlvBKu0Zd/cuG94O8Fapk= 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; bh=JwoSGwj+BtYuvHaziN0UYZF3x4d68ovZ9foQJk/XeNU=; b=DKAQPH25wQWw316yUfr9ZrJPI6+EkeuHb5I+yuCmh6ZlMUFIfh2CWfqohK8Gbqa27E fd3wSumQB7KuenKariIJkHEDGWK9+cv7YImgTJ1ULBWr71WYtn4tkRnWsOwaWH31woUD xBia6YNZlo9XSQ40bCQZLFQWzVh7RyZVJB4Jsv4apqrZIqf1TDhXbH7zQR+sMNFFEf4q MUJ/QV0BqXC8+uJhgVUZe6xIJfZmFSV8JquCchPP8glh175Dwcs2L4CKqR7QBW5C4GBe 39fde3mP9ZGf0qbXhxNKiIklDs4WWQOmD95hoim1Tblcvw/KXkyzEgPbgybOgXO4GrAW lQVA== X-Gm-Message-State: AIkVDXJiE0Z7Qx7Fy5eUw00k/AgOBsWJ4tKqp7bP9z68icJvm1dvG0J7uy16LgNr3zYtuIr4 X-Received: by 10.98.1.213 with SMTP id 204mr14100710pfb.61.1486078744798; Thu, 02 Feb 2017 15:39:04 -0800 (PST) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id f188sm61230775pfa.35.2017.02.02.15.39.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 02 Feb 2017 15:39:03 -0800 (PST) From: Douglas Anderson To: thierry.reding@gmail.com Subject: [PATCH] drm/panel: simple: ensure Sharp lq123p1jx31 isn't turned off too soon Date: Thu, 2 Feb 2017 15:38:53 -0800 Message-Id: <20170202233853.13818-1-dianders@chromium.org> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog Cc: briannorris@chromium.org, Douglas Anderson , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, hoegsberg@google.com, marcheu@chromium.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The Sharp lq123p1jx31 has a requirement that the VDD is on for at least 300 ms before being turned off. At the moment nothing anywhere in the kernel is ensuring this. The simplest way to ensure this is to add a "disable" timing of 150 ms. With this the we know that there will be at least 300 ms between the regulator/gpio being turned on and being turned off. Specifically, here's what happens after this change: * prepare: enable regulator, delay 110 ms (10 for regulator, then 100) * enable: delay 50 ms * disable: delay 150 ms, then disable regulator * unprepare: delay 550 ms (50 for regulator, 500 to off=>on too quick) As you can see, even giving the regulator 10 ms (the max the panel spec allows) for ramping up we are sure that the regulator was on for 300 ms now. Signed-off-by: Douglas Anderson --- 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 89eb0422821c..dbaadfa6b823 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1622,6 +1622,7 @@ static const struct panel_desc sharp_lq123p1jx31 = { .delay = { .prepare = 110, .enable = 50, + .disable = 150, .unprepare = 550, }, };