From patchwork Tue Oct 9 04:27:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeykumar Sankaran X-Patchwork-Id: 10631865 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 7E688112B for ; Tue, 9 Oct 2018 04:28:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F1AB29876 for ; Tue, 9 Oct 2018 04:28:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6327129A51; Tue, 9 Oct 2018 04:28:38 +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 EEE6E29876 for ; Tue, 9 Oct 2018 04:28:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726445AbeJILnf (ORCPT ); Tue, 9 Oct 2018 07:43:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60816 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726434AbeJILnf (ORCPT ); Tue, 9 Oct 2018 07:43:35 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D3E0260DA5; Tue, 9 Oct 2018 04:28:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539059316; bh=/dkPxxF5Vzu2zyW+DRyLqWNcF+s7Qw0URXInsu3DKVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LN/eM5gW1nZwSEtfpv4wVefKIP4RMj0NebglnyRXSXlkG91WF3z3vaM+rDtnU8Usn HROWXC5DOymtf+RdzzeE2lqyK57gJdgIw/RTSvzMlI7aTRgaqrtZzW64a/XYORSuDI aMW1ZO5tXtQ2nugv8s1cJkRzoHwzgaUEBbwSyyZc= 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 155F660DA8; Tue, 9 Oct 2018 04:28:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539059291; bh=/dkPxxF5Vzu2zyW+DRyLqWNcF+s7Qw0URXInsu3DKVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PgZ+n3y7evJbHp4/vBxOZiJlEn+LqeAGwKvtDwx0VPFMmGFhz7Q3tK/igWK1VjdH+ /7e7AzYlfmaLEHo7fGnFR8SCWJEz1su07Iv/V9YZrbHpMn8M2ymtlVU/w88EDOjqP2 NqJ58q7xRJucWdQnpfSPKZV8uuqYoIPo0jpv4v8A= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 155F660DA8 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 16/25] drm/msm/dpu: clean up test_only flag for RM reservation Date: Mon, 8 Oct 2018 21:27:33 -0700 Message-Id: <1539059262-8326-17-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 Encoder uses test_only flag to differentiate RM reservations invoked from atomic check and atomic_commit phases. After reserving the HW blocks, if test_only was set, RM releases the reservation. Retains them if not. Since we got rid of RM reserve call from atomic_commit path, get rid of this flag. Signed-off-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 13 +++---------- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 4 +--- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 468b8fd0..dd17528 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -636,7 +636,7 @@ static int dpu_encoder_virt_atomic_check( if (!ret && drm_atomic_crtc_needs_modeset(crtc_state)) ret = dpu_rm_reserve(&dpu_kms->rm, drm_enc, crtc_state, - topology, false); + topology); if (!ret) drm_mode_set_crtcinfo(adj_mode, 0); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index 3a92a3e..1234991 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -631,8 +631,7 @@ int dpu_rm_reserve( struct dpu_rm *rm, struct drm_encoder *enc, struct drm_crtc_state *crtc_state, - struct msm_display_topology topology, - bool test_only) + struct msm_display_topology topology) { struct dpu_rm_requirements reqs; struct dpu_crtc_state *dpu_cstate = to_dpu_crtc_state(crtc_state); @@ -642,8 +641,8 @@ int dpu_rm_reserve( if (!drm_atomic_crtc_needs_modeset(crtc_state)) return 0; - DRM_DEBUG_KMS("reserving hw for enc %d crtc %d test_only %d\n", - enc->base.id, crtc_state->crtc->base.id, test_only); + DRM_DEBUG_KMS("reserving hw for enc %d crtc %d\n", + enc->base.id, crtc_state->crtc->base.id); mutex_lock(&rm->rm_lock); @@ -657,13 +656,7 @@ int dpu_rm_reserve( if (ret) { DPU_ERROR("failed to reserve hw resources: %d\n", ret); _dpu_rm_release_reservation(rm, dpu_cstate); - } else if (test_only) { - /* test_only: test the reservation and then undo */ - DPU_DEBUG("test_only: discard test [enc: %d]\n", - enc->base.id); - _dpu_rm_release_reservation(rm, dpu_cstate); } - end: mutex_unlock(&rm->rm_lock); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h index 7ac1553..415eeec 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h @@ -63,14 +63,12 @@ int dpu_rm_init(struct dpu_rm *rm, * @drm_enc: DRM Encoder handle * @crtc_state: Proposed Atomic DRM CRTC State handle * @topology: Pointer to topology info for the display - * @test_only: Atomic-Test phase, discard results (unless property overrides) * @Return: 0 on Success otherwise -ERROR */ int dpu_rm_reserve(struct dpu_rm *rm, struct drm_encoder *drm_enc, struct drm_crtc_state *crtc_state, - struct msm_display_topology topology, - bool test_only); + struct msm_display_topology topology); /** * dpu_rm_release - Given the encoder for the display chain, release any