From patchwork Tue Sep 14 20:21:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 12494663 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCB6CC433F5 for ; Tue, 14 Sep 2021 20:22:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F6FB61163 for ; Tue, 14 Sep 2021 20:22:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9F6FB61163 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 768956E7FE; Tue, 14 Sep 2021 20:22:45 +0000 (UTC) Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4F8D56E7F1 for ; Tue, 14 Sep 2021 20:22:39 +0000 (UTC) Received: by mail-pl1-x635.google.com with SMTP id n18so158826plp.7 for ; Tue, 14 Sep 2021 13:22:39 -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=rzFpNJqBOGrvK8PxTEisk5vASJ81UtyTd+SuH+Jj6C4=; b=DLM6eGapNxE2vVc3P4C/IXZ7ewDC2TZAzbBclSO9gAO+g3JjjVDgx9Xk2xGLZmSyPH N+5Mhsv+LxHtby729s8U9pukPgT0vbL6ulWqBCO+Bj6l3Ui4h8sOSg11KomCnOBFwOv/ gTtVKSWGY0KJFBkzwniJNF+9O9yI0QI709x2o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rzFpNJqBOGrvK8PxTEisk5vASJ81UtyTd+SuH+Jj6C4=; b=D1qiFOKG0+23FJN6hgBW/paBAFYdRd5d5fAghSRJXg0ThYVgJQ+TM3eOp5x+PfTjwx AaIvDny2lZgvdlC5PB4t/NhTsF/2nTXkxgh4+S5R12FmcXQb8cEaBb8hRRXIvSRAIk2X OsxnT4ZQ4YdhIxKnltzm0Np0ltpJLM9w0dngbE2jNbt7KchdEKzVHKlEfK8VoVV8IPM6 lqw95LfhlzF8MaLPbU1I+cebBkv4+E8ptvVehyPIjwul9BmKS3WYQ0qOTYbPd5/tVNby evTpAKjnxrlgZZH8P/l1iIyb8jVGwaQIQTNAsQZhJhLYSyt9nrMx6HLTn0eedASKM0R1 c8Jw== X-Gm-Message-State: AOAM532WYOdVCYklkR9P+QSXzGNcvtRHfy3ED88Pc2ScjNK6YRJHfMyf u57FZsaNHEg6l7i8xTQSqpKlHQ== X-Google-Smtp-Source: ABdhPJy8i/dFscfXlM3GCb7yl0yPY+U0rw+Ib7iozR9Nz10ZdHDtYe4aRkU+gU9znARPbJw7KL2xoQ== X-Received: by 2002:a17:902:6546:b0:13a:339a:6616 with SMTP id d6-20020a170902654600b0013a339a6616mr16644770pln.34.1631650958848; Tue, 14 Sep 2021 13:22:38 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:f38f:9d0f:3eba:f8c4]) by smtp.gmail.com with ESMTPSA id 141sm12185393pgg.16.2021.09.14.13.22.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 13:22:38 -0700 (PDT) From: Douglas Anderson To: Thierry Reding , Rob Herring , Sam Ravnborg Cc: devicetree@vger.kernel.org, Steev Klimaszewski , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, David Airlie , Maarten Lankhorst , Thomas Zimmermann , Linus W , Bjorn Andersson , Daniel Vetter , Maxime Ripard , Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH v5 12/15] drm/panel-edp: hpd_reliable shouldn't be subtraced from hpd_absent Date: Tue, 14 Sep 2021 13:21:59 -0700 Message-Id: <20210914132020.v5.12.I2522235fca3aa6790ede0bf22a93d79a1f694e6b@changeid> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210914202202.1702601-1-dianders@chromium.org> References: <20210914202202.1702601-1-dianders@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Now that the delays are named / described with eDP-centric names, it becomes clear that we should really specify the "hpd_reliable" and "hpd_absent" separately without taking the other into account. Let's fix it. This should be a no-op change and just adjust how we specify things. The actual delays should be the same before and after for the one panel that currently species both "hpd_reliable" and "hpd_absent". Signed-off-by: Douglas Anderson Acked-by: Sam Ravnborg --- (no changes since v4) Changes in v4: - panel-simple-edp => panel-edp drivers/gpu/drm/panel/panel-edp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c index 1547e4797594..80a37a4e5750 100644 --- a/drivers/gpu/drm/panel/panel-edp.c +++ b/drivers/gpu/drm/panel/panel-edp.c @@ -423,7 +423,7 @@ static int panel_edp_prepare_once(struct panel_edp *p) delay = p->desc->delay.hpd_reliable; if (p->no_hpd) - delay += p->desc->delay.hpd_absent; + delay = max(delay, p->desc->delay.hpd_absent); if (delay) msleep(delay); @@ -1039,15 +1039,13 @@ static const struct panel_desc boe_nv133fhm_n61 = { * spike on the HPD line. It was explained that this spike * was until the TCON data download was complete. On * one system this was measured at 8 ms. We'll put 15 ms - * in the prepare delay just to be safe and take it away - * from the hpd_absent (which would otherwise be 200 ms) - * to handle this. That means: + * in the prepare delay just to be safe. That means: * - If HPD isn't hooked up you still have 200 ms delay. * - If HPD is hooked up we won't try to look at it for the * first 15 ms. */ .hpd_reliable = 15, - .hpd_absent = 185, + .hpd_absent = 200, .unprepare = 500, },