From patchwork Mon Jan 28 20:42:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10784729 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 DF8C0922 for ; Mon, 28 Jan 2019 20:43:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE5A02BD58 for ; Mon, 28 Jan 2019 20:43:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C299F2C376; Mon, 28 Jan 2019 20:43:20 +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 79C5D2BD58 for ; Mon, 28 Jan 2019 20:43:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A1BA06E53E; Mon, 28 Jan 2019 20:43:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb1-xb43.google.com (mail-yb1-xb43.google.com [IPv6:2607:f8b0:4864:20::b43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6BAA76E53E for ; Mon, 28 Jan 2019 20:43:15 +0000 (UTC) Received: by mail-yb1-xb43.google.com with SMTP id s17so7273416ybp.6 for ; Mon, 28 Jan 2019 12:43:15 -0800 (PST) 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=or+Cf96R5/0Rfr5iTinESdAFMcjNohnw5mvFKvf15js=; b=q7N2IG8fA5hCYpA1bKVWxAmSW12Dz5V8madFLG1lXuqAfIpoLJSnY98Pvi86Z7EskW ky+wlgOZAJPoG2nUqL/UjPtCbKBnuczqh2lGOvNI9opauRVVpF+tqJc/9OTLImJJ2dAF sjM8JXX0Rc9ZWDXdLNFdkZuuRD0XJQttHI894ULWbSx9D2Vrxp3s2cfscGdarXAR/Pm4 15kWRbAGKIVvN20kDAWFN96KJ4sF715VF96Pbyzx8mioXinhTMqTW/yg1wR2wFj1sEdr ThBDA84FYkTkdFJqtcYUio5nQhEby7Dd6UlFp7gM1KA92uJyfpQ2Qdi7n33asMA4TqRa zQTA== X-Gm-Message-State: AHQUAuZTfoUoA3eeHOPPP4RlYzLYvlw8LRDuIezfGo1Ch31ZFyBo96pp Ts0ngS/YXgyhBHeQl82P0LeC0A== X-Google-Smtp-Source: AHgI3IY81RWGV8xW/W2tKiYEtUFiji/E4PcodiK/JCvzNRowH9besQuSGCTGLUVWPJMzPfnyRxVb/g== X-Received: by 2002:a25:505:: with SMTP id 5mr6046403ybf.389.1548708194457; Mon, 28 Jan 2019 12:43:14 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id a7sm24119760ywb.18.2019.01.28.12.43.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 12:43:14 -0800 (PST) From: Sean Paul To: freedreno@lists.freedesktop.org Subject: [PATCH 4/4] drm/msm: dpu: Don't queue the frame_done watchdog for cursor Date: Mon, 28 Jan 2019 15:42:51 -0500 Message-Id: <20190128204306.95076-4-sean@poorly.run> X-Mailer: git-send-email 2.20.1.495.gaa96b0ce6b-goog In-Reply-To: <20190128204306.95076-1-sean@poorly.run> References: <20190128204306.95076-1-sean@poorly.run> MIME-Version: 1.0 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: linux-arm-msm@vger.kernel.org, Sean Paul , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul In the case of an async/cursor update, we don't wait for the frame_done event, which means handle_frame_done is never called, and the frame_done watchdog isn't canceled. Currently, this results in a frame_done timeout every time the cursor moves without a synchronous frame following it up before the timeout expires. Since we don't wait for frame_done, and don't handle it, we shouldn't modify the watchdog. Signed-off-by: Sean Paul Reviewed-by: Fritz Koenig Reviewed-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 51e46b206c73e..05145cf9fb408 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -1794,7 +1794,6 @@ void dpu_encoder_kickoff(struct drm_encoder *drm_enc, bool async) { struct dpu_encoder_virt *dpu_enc; struct dpu_encoder_phys *phys; - unsigned long timeout_ms; ktime_t wakeup_time; unsigned int i; @@ -1807,12 +1806,20 @@ void dpu_encoder_kickoff(struct drm_encoder *drm_enc, bool async) trace_dpu_enc_kickoff(DRMID(drm_enc)); - timeout_ms = DPU_ENCODER_FRAME_DONE_TIMEOUT_FRAMES * 1000 / - drm_mode_vrefresh(&drm_enc->crtc->state->adjusted_mode); + /* + * Asynchronous frames don't handle FRAME_DONE events. As such, they + * shouldn't enable the frame_done watchdog since it will always time + * out. + */ + if (!async) { + unsigned long timeout_ms; + timeout_ms = DPU_ENCODER_FRAME_DONE_TIMEOUT_FRAMES * 1000 / + drm_mode_vrefresh(&drm_enc->crtc->state->adjusted_mode); - atomic_set(&dpu_enc->frame_done_timeout_ms, timeout_ms); - mod_timer(&dpu_enc->frame_done_timer, - jiffies + msecs_to_jiffies(timeout_ms)); + atomic_set(&dpu_enc->frame_done_timeout_ms, timeout_ms); + mod_timer(&dpu_enc->frame_done_timer, + jiffies + msecs_to_jiffies(timeout_ms)); + } /* All phys encs are ready to go, trigger the kickoff */ _dpu_encoder_kickoff_phys(dpu_enc, async);