From patchwork Tue Oct 9 04:27:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeykumar Sankaran X-Patchwork-Id: 10631847 X-Patchwork-Delegate: agross@codeaurora.org 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 E104D112B for ; Tue, 9 Oct 2018 04:28:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D27CA29876 for ; Tue, 9 Oct 2018 04:28:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C500C29A51; Tue, 9 Oct 2018 04:28: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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 689C829876 for ; Tue, 9 Oct 2018 04:28:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725991AbeJILnN (ORCPT ); Tue, 9 Oct 2018 07:43:13 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59784 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbeJILnN (ORCPT ); Tue, 9 Oct 2018 07:43:13 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D0C0760D7F; Tue, 9 Oct 2018 04:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539059295; bh=Wi82D59WjO3H0LSdBrgzjvggk5DE/y6pWdPI44kIf/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dl8H9C8BhE7SqEoTMARbkgDDO2E8GJIxTZ0LPOcCkLQyISa8MrqcHkfArEsdabrZl 2pbF8rHqZaloWeqZTqjRp32aytTSfBCLKgow1Ax9xUVReTMi65bbmw/qsbGYUdAERP 2abEumXi7a2hNKYa1nHmk7C1EsL+U+E1mF9NpbtQ= Received: from jeykumar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jsanka@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 892F360D95; Tue, 9 Oct 2018 04:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539059285; bh=Wi82D59WjO3H0LSdBrgzjvggk5DE/y6pWdPI44kIf/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gyt6cz3r1RaSx9Qc9ES6MQ05791+YteEIhRFn+cRzbtcQBzN6jMDcRuMbpV1Daskf c25QeRHsn7eP1iTLvbgtx3libF6v8oxZgVJuGmZzxvR926rg90Jz3hKDXhmBmGjKPy 6sv1EbjnU7tcleM4T3IGW5OrS44WMXA1wD9YBd7k= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 892F360D95 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jsanka@codeaurora.org From: Jeykumar Sankaran To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: Jeykumar Sankaran , seanpaul@chromium.org, robdclark@gmail.com, hoegsberg@google.com, jcrouse@codeaurora.org Subject: [PATCH 12/25] drm/msm/dpu: remove mode_set_complete Date: Mon, 8 Oct 2018 21:27:29 -0700 Message-Id: <1539059262-8326-13-git-send-email-jsanka@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1539059262-8326-1-git-send-email-jsanka@codeaurora.org> References: <1539059262-8326-1-git-send-email-jsanka@codeaurora.org> 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 This flag was introduced as a fix to notify modeset complete when hw reservations were happening in both atomic_check and atomic_commit paths. Now that we are reserving only in atomic_check, we can get rid of this flag. Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index dd482ca..468b8fd0 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -167,7 +167,6 @@ enum dpu_enc_rc_states { * clks and resources after IDLE_TIMEOUT time. * @vsync_event_work: worker to handle vsync event for autorefresh * @topology: topology of the display - * @mode_set_complete: flag to indicate modeset completion * @idle_timeout: idle timeout duration in milliseconds */ struct dpu_encoder_virt { @@ -204,7 +203,6 @@ struct dpu_encoder_virt { struct kthread_delayed_work delayed_off_work; struct kthread_work vsync_event_work; struct msm_display_topology topology; - bool mode_set_complete; u32 idle_timeout; }; @@ -636,18 +634,9 @@ static int dpu_encoder_virt_atomic_check( topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); - if (!ret) { - /* - * Avoid reserving resources when mode set is pending. Topology - * info may not be available to complete reservation. - */ - if (drm_atomic_crtc_needs_modeset(crtc_state) - && dpu_enc->mode_set_complete) { - ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, crtc_state, - topology, false); - dpu_enc->mode_set_complete = false; - } - } + if (!ret && drm_atomic_crtc_needs_modeset(crtc_state)) + ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, crtc_state, + topology, false); if (!ret) drm_mode_set_crtcinfo(adj_mode, 0); @@ -1060,8 +1049,6 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, phys->ops.mode_set(phys, mode, adj_mode); } } - - dpu_enc->mode_set_complete = true; } static void _dpu_encoder_virt_enable_helper(struct drm_encoder *drm_enc)