From patchwork Tue Apr 30 09:37:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10923059 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 4CB771390 for ; Tue, 30 Apr 2019 09:37:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CCBF28387 for ; Tue, 30 Apr 2019 09:37:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3138928A15; Tue, 30 Apr 2019 09:37:55 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 D25FF28387 for ; Tue, 30 Apr 2019 09:37:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E86F788FA4; Tue, 30 Apr 2019 09:37:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 12B1488FA4 for ; Tue, 30 Apr 2019 09:37:53 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id k8so12114283lja.8 for ; Tue, 30 Apr 2019 02:37:52 -0700 (PDT) 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=Ug09hZ4eYYnkShE0Xn5KTs+gkypuHyMBpZHpCmxzczc=; b=QDR+iDmIjmMlT551p233MX9+aovkUW1I4VhfLGRoZCOo+Zks7o7YyY6T8WTAvbBlZM TCSROY8jHSY7rEgqPYT7pbcQWZCdNtr287iKtRqo/dV/Q4t4J4QvJlz2FwA+ACwtlTWv iE2HzUfzWO84dEa9Ncf07NyNNUs7AD2NMbSm4vIctivX3XpCBln22E0WEzqbctfR/ZAu RDiNwZxgqxFXZe/X1QZDT7KTns+Tnxqj2lF3UtsxdFUMFv9IuZn+fDNcY0iBgTGD1hHl FKq03c4KYQiS99ystlcjOfd/nzuLdzPsL5o94akcZIA7Xaap79UU92RNlypylvs3P9AB pzHQ== X-Gm-Message-State: APjAAAU+n3SKu8EAL0+m5l3fWyUnc7lfXV9oaadJoN+RtWtHiIha2TyO M0MyeuuGnUFit1VWhrTlchSuJ/RtIAk= X-Google-Smtp-Source: APXvYqx7jqIeE5ASFCMSvu20xJCQn/59cK4BmlyEGTK2jomO2LkXrwTMl7CvRVqYoq83iUMRO6FJvA== X-Received: by 2002:a2e:9c0a:: with SMTP id s10mr18458421lji.162.1556617071239; Tue, 30 Apr 2019 02:37:51 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id y23sm7677210lfy.31.2019.04.30.02.37.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Apr 2019 02:37:50 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Daniel Vetter , Sam Ravnborg Subject: [PATCH] drm/atomic-helper: Bump vblank timeout to 100 ms Date: Tue, 30 Apr 2019 11:37:46 +0200 Message-Id: <20190430093746.26485-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Ug09hZ4eYYnkShE0Xn5KTs+gkypuHyMBpZHpCmxzczc=; b=yvCyASVrVDX4wNmvcOAJniMdPJ1vM118ZLkqRahj7vNECWCt2q1aRNYxxF8pdBIIMI kEI9V5nPuTjHt+sRSzqAYNV2k390/ON8PSgkQZWDlvVbwT1Jv0R6zJ15Pdj2x3mmwB/0 LBBaPfLuJ/PFNYa/JLaPR2+H3ml7HJfdw67nXXuXnDpAL6v9x4rhuPFMpLut+H2FsAMd OSagQT4ZpyG02Lk+x3m9xqIUl0lHXCLXy3K651sHfsbfPtLswUuRqaOQmPSXS22M8pH1 3bPggsmMv0Ya0b/Kz114X1AR792OeqignQHcNwb5WXT25P0swE11fl2spDBYoVCK2J/J ZC/A== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Paul Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The 50 ms default timeout waiting for vblanks is too small for the first vblank from the ST-Ericsson MCDE display controller over DSI. Presumably this is because the DSI display is command-mode only and the state machine will take some time setting up its state for the first display update, and we hit a timeout. 100 ms makes it pass without problems. Signed-off-by: Linus Walleij Reviewed-by: Ville Syrjälä Reviewed-by: Daniel Vetter --- After a quite prolonged hunting for the cause of missed vblanks in the MCDE driver I finally realized it timed out because it was simply taking some time on the first vblank. 50 ms makes sense on 60Hz monitors for sure, but an embedded DSI state machine can be slow, as it turns out. Tell me if this should be a per-driver variable and I will think of something. --- drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 40ac19848034..f0aa7b195d79 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1424,7 +1424,7 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev, ret = wait_event_timeout(dev->vblank[i].queue, old_state->crtcs[i].last_vblank_count != drm_crtc_vblank_count(crtc), - msecs_to_jiffies(50)); + msecs_to_jiffies(100)); WARN(!ret, "[CRTC:%d:%s] vblank wait timed out\n", crtc->base.id, crtc->name);