From patchwork Tue Oct 9 04:27:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeykumar Sankaran X-Patchwork-Id: 10631853 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 BBCC43CF1 for ; Tue, 9 Oct 2018 04:28:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACA4729876 for ; Tue, 9 Oct 2018 04:28:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0F7429A4D; Tue, 9 Oct 2018 04:28:23 +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 43E5129A5C for ; Tue, 9 Oct 2018 04:28:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726103AbeJILnU (ORCPT ); Tue, 9 Oct 2018 07:43:20 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60142 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbeJILnU (ORCPT ); Tue, 9 Oct 2018 07:43:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8B96860DAF; Tue, 9 Oct 2018 04:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539059301; bh=WzzUTSEb+fwBFYjvIUBUnKwW68TYIgHsnCNUTmMr/fs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SnIhAjqaLrjJl2g+CCyT/yVdTgnwWTxHxSreTHO38ip2pConHpaC5bk7G6T736dzD lqfJUU0b09Ht0pujqi3OzhNv3mOZEje/9buNYRzrP3+WBKjiBhCQCVZ/mY1kfCWvyX IZTZhy8f/ZIudLeAbrnwEZ7cwYjDenmdoOmrPM9A= 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 6B98E60D82; Tue, 9 Oct 2018 04:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539059283; bh=WzzUTSEb+fwBFYjvIUBUnKwW68TYIgHsnCNUTmMr/fs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TCtAEWkswgBrj7Wo/KaId8ALRgNZPiUyEww9mbH7cO33SxMLVS83/F+8MALtJvAWt +S8IX2D8RjK9zpG8HTa/+vYcWzR2t0OinfHO3knO/8Mny2Jrz0ZxqYcvjXnWgy/Q3c G3bp00AnZHJabv6wE1WbnM3LPdeRmJRLryL5CrEs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6B98E60D82 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 11/25] drm/msm/dpu: remove reserve in encoder mode_set Date: Mon, 8 Oct 2018 21:27:28 -0700 Message-Id: <1539059262-8326-12-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 Now that we have crtc state tracking the reserved HW resources, we have access to them after atomic swap. So avoid reserving the resources in mode_set. Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index a8fd14e..dd482ca 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -636,7 +636,6 @@ static int dpu_encoder_virt_atomic_check( topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); - /* Reserve dynamic resources now. Indicating AtomicTest phase */ if (!ret) { /* * Avoid reserving resources when mode set is pending. Topology @@ -645,7 +644,7 @@ static int dpu_encoder_virt_atomic_check( 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, true); + topology, false); dpu_enc->mode_set_complete = false; } } @@ -1002,8 +1001,7 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, struct list_head *connector_list; struct drm_connector *conn = NULL, *conn_iter; struct dpu_crtc_state *dpu_cstate; - struct msm_display_topology topology; - int i = 0, ret; + int i = 0; if (!drm_enc) { DPU_ERROR("invalid encoder\n"); @@ -1031,17 +1029,6 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, return; } - topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); - - /* Reserve dynamic resources now. Indicating non-AtomicTest phase */ - ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, drm_enc->crtc->state, - topology, false); - if (ret) { - DPU_ERROR_ENC(dpu_enc, - "failed to reserve hw resources, %d\n", ret); - return; - } - dpu_cstate = to_dpu_crtc_state(drm_enc->crtc->state); for (i = 0; i < dpu_enc->num_phys_encs; i++) {