From patchwork Thu Feb 14 01:52:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeykumar Sankaran X-Patchwork-Id: 10811597 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 8E3B713B4 for ; Thu, 14 Feb 2019 01:52:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B4B12DF4A for ; Thu, 14 Feb 2019 01:52:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FE232DF4C; Thu, 14 Feb 2019 01:52:46 +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 21A322DF4A for ; Thu, 14 Feb 2019 01:52:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C2EEA6E836; Thu, 14 Feb 2019 01:52:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C16C6E843; Thu, 14 Feb 2019 01:52:35 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0620E60995; Thu, 14 Feb 2019 01:52:34 +0000 (UTC) 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 188C06090F; Thu, 14 Feb 2019 01:52:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 188C06090F From: Jeykumar Sankaran To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 4/4] drm/msm/dpu: remove mode_set_complete Date: Wed, 13 Feb 2019 17:52:22 -0800 Message-Id: <1550109142-28303-5-git-send-email-jsanka@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1550109142-28303-1-git-send-email-jsanka@codeaurora.org> References: <1550109142-28303-1-git-send-email-jsanka@codeaurora.org> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550109155; bh=Qi3Gr4ZvEPdc/9KfByfZBdg6tQ/2efrq4OyHB6aYEjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DWvuDAgIXcc5EEAqRfcnDfSQNhkC/vocKYfukxBoK/aJOc78bs5RvgJjZD10xO6dz aR9+mlHXPXfjrCWVDV/xC8BYcxH6Linqys3Lxkw3ifeX9xYAC19rqetFTghcfWnfXc NKA/pCE3oZ8wyk1bchewHIN1xiqwidVRpZqSnusE= X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550109153; bh=Qi3Gr4ZvEPdc/9KfByfZBdg6tQ/2efrq4OyHB6aYEjw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JDUU7jJOe81gXf0jg9DJxxCjDM4VlRLxkqInJzOim6z3MiftlO3eKwQQKggaCt7Vd tFkhg88dRw5T1zDs7ZveKBeeFaP6CkfJbZwAVgkPjLM7kPmaECPYnXhVi6xrkHRvB0 PMVRFbWPLl+kItssA8O/Qns8MAZ1Y9+AX0dGhKPo= X-Mailman-Original-Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org X-Mailman-Original-Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jsanka@codeaurora.org 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: hoegsberg@google.com, seanpaul@chromium.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. changes in v2: - none Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 86c025b..beb9f86 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -170,7 +170,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 { @@ -208,7 +207,6 @@ struct dpu_encoder_virt { struct delayed_work delayed_off_work; struct kthread_work vsync_event_work; struct msm_display_topology topology; - bool mode_set_complete; u32 idle_timeout; }; @@ -604,12 +602,7 @@ static int dpu_encoder_virt_atomic_check( } } - /* - * Avoid reserving resources when mode set is pending. Topology - * info may not be available to complete reservation. - */ - if (!ret && drm_atomic_crtc_needs_modeset(crtc_state) - && dpu_enc->mode_set_complete) { + if (!ret && drm_atomic_crtc_needs_modeset(crtc_state)) { struct msm_display_topology topology; struct dpu_private_state *dpu_priv_state; @@ -619,7 +612,6 @@ static int dpu_encoder_virt_atomic_check( ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, &dpu_priv_state->base, topology, false); - dpu_enc->mode_set_complete = false; } if (!ret) @@ -1039,8 +1031,6 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, if (phys->ops.mode_set) 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)