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: 10784723 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 5F711922 for ; Mon, 28 Jan 2019 20:43:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D2A52C378 for ; Mon, 28 Jan 2019 20:43:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41ABE2C388; Mon, 28 Jan 2019 20:43:16 +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 D973C2C378 for ; Mon, 28 Jan 2019 20:43:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726878AbfA1UnP (ORCPT ); Mon, 28 Jan 2019 15:43:15 -0500 Received: from mail-yb1-f193.google.com ([209.85.219.193]:44409 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726719AbfA1UnP (ORCPT ); Mon, 28 Jan 2019 15:43:15 -0500 Received: by mail-yb1-f193.google.com with SMTP id k189so7257473yba.11 for ; Mon, 28 Jan 2019 12:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=or+Cf96R5/0Rfr5iTinESdAFMcjNohnw5mvFKvf15js=; b=AdbSA8I4n9GGJ+TF1HOWeLvcPxaQqn+Lj3RfyHiG+Tsu5KBauc/CUlouWYE/Sk/Pzp jiN4AVKzcjx+KvG/2w+j+1PSVeJbhl+LrLpAkAh1tyu2xYxCiCpRtPt9KmTX59dYiY/P 3M2fL4QiNHVjrzclqnW2kKygiW39UqFkSR+IbYn7oQindeF8oxO+xYCS4f5eUsfnxTQy tmq3xIUTquYi9q9wNnLm58NcOtn4xIFGlMzdXoW8D/YuetOYOoUMf25YuuS6ir57EU4D /ISjF//iAbjAQRNMixoajluXgqMtENiq/QOH6emKmkJ1D+QrkHBoL+9YuKjhGGUjhHAO gIiw== 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=YBVlZNA90Nc6v8dTbvFlAW+aNLfJKoA0R3An290Zzi/q+ri0VpMSvmkx+K1EwY2UYw foACRfvoIv751afVPijcTDRi730fi5drZ82ibyaX5lMmIh5OTuZ7ow7NW7w3tJLuZiqY CRRRhWVta7GdNd7lgZtdwxuqmYRJ4xLsZUaZ3KdgvmDrczMg4JogSkUWB4LA20PPdSaP Ef7wkWDx+7jU4xl1ljguZG5jrvyveU41T8ZqPZU8mvWYsKhgNBey12BSwVf+WMnY2Z/z L5HoBLnqd97RYN2HbJ7YXGeNtY5ZyKSXSarCKjMoNTkopsGJ5ZL4AktMfO+SLnhiz44D JrHg== X-Gm-Message-State: AHQUAuY+rt+XWD9kt4x1YBaClqa/v3I62vpq0nRvc3sd957MOjjhFJjW v52FBI/rC5sT9gWfLJOX5jeu+Q== 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 Cc: robdclark@gmail.com, Sean Paul , linux-arm-msm@vger.kernel.org, dri-devel@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 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 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);