From patchwork Thu Feb 14 01:52:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeykumar Sankaran X-Patchwork-Id: 10811589 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 4CF3713B4 for ; Thu, 14 Feb 2019 01:52:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39F432DF4B for ; Thu, 14 Feb 2019 01:52:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DE972DF4A; Thu, 14 Feb 2019 01:52:39 +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 C08172DF4B for ; Thu, 14 Feb 2019 01:52:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391741AbfBNBwi (ORCPT ); Wed, 13 Feb 2019 20:52:38 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:35032 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391675AbfBNBwi (ORCPT ); Wed, 13 Feb 2019 20:52:38 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 65A9160988; Thu, 14 Feb 2019 01:52:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550109157; bh=3hSgksllw6ddPpAnL5gCtR2/rgcMMjCY40Nj2CZhBL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KvDWfUUC5eQ3ZEAS7KedPOlu1XqGmLFaZxN7AI76PIgCLVs3En9YhVu/Ro0eJOAd1 F5+MwEP9Rmzw6VoGrRDwhzYtJomGqcgrEwntUZzjonQvymwRlwNeXCpbq2h8HEt6Kr rGo0MHD84rTe0xvnqATvP8xcKF4rUaHia9IKiiJI= 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 2DDF5608FD; Thu, 14 Feb 2019 01:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1550109152; bh=3hSgksllw6ddPpAnL5gCtR2/rgcMMjCY40Nj2CZhBL8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mHq65YWzucA2Dc33Rz4dukp2n8WkyllJrsRi2/ik5yduqvYsw3Ba/gcmuPFsULcVJ X+XoQ1i5ln2KoKT49vsFQF81aQSIQQ74q4puzHltF2nOOuTCGz0Od4Q7v1i45yMeI1 mPyCgqsMuZmd+7IZgjJZf4pO2JITPOVf3R6BDhVE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2DDF5608FD 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 Subject: [PATCH v2 3/4] drm/msm/dpu: remove reserve in encoder mode_set Date: Wed, 13 Feb 2019 17:52:21 -0800 Message-Id: <1550109142-28303-4-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> 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 dpu private state tracking the reserved HW resources, we have access to them after atomic swap. So avoid reserving the resources in mode_set. changes in v2: - removal applied on private object based reservation Signed-off-by: Jeykumar Sankaran Reviewed-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 18 ++---------------- 1 file changed, 2 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 bd646c5..86c025b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -605,8 +605,6 @@ static int dpu_encoder_virt_atomic_check( } /* - * Reserve dynamic resources now. Indicating AtomicTest phase - * * Avoid reserving resources when mode set is pending. Topology * info may not be available to complete reservation. */ @@ -620,7 +618,7 @@ static int dpu_encoder_virt_atomic_check( to_dpu_crtc(crtc_state->crtc)); ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, - &dpu_priv_state->base, topology, true); + &dpu_priv_state->base, topology, false); dpu_enc->mode_set_complete = false; } @@ -966,10 +964,9 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, struct drm_connector *conn = NULL, *conn_iter; struct drm_crtc *drm_crtc; struct dpu_crtc_state *dpu_cstate; - struct msm_display_topology topology; struct dpu_crtc *dpu_crtc; struct dpu_private_state *dpu_private_state; - int i, j, ret; + int i, j; if (!drm_enc) { DPU_ERROR("invalid encoder\n"); @@ -1001,18 +998,7 @@ static void dpu_encoder_virt_mode_set(struct drm_encoder *drm_enc, if (drm_crtc->state->encoder_mask & drm_encoder_mask(drm_enc)) break; - topology = dpu_encoder_get_topology(dpu_enc, dpu_kms, adj_mode); dpu_crtc = to_dpu_crtc(drm_crtc); - - /* Reserve dynamic resources now. Indicating non-AtomicTest phase */ - ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, dpu_crtc->priv_obj.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_crtc->state); dpu_private_state = container_of(dpu_crtc->priv_obj.state, struct dpu_private_state, base);