From patchwork Mon Sep 24 16:22:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Wang X-Patchwork-Id: 10612679 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 D227917D2 for ; Mon, 24 Sep 2018 16:22:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD03929C92 for ; Mon, 24 Sep 2018 16:22:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B17ED29CA7; Mon, 24 Sep 2018 16:22:44 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 60D8B29C92 for ; Mon, 24 Sep 2018 16:22:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728167AbeIXWZj (ORCPT ); Mon, 24 Sep 2018 18:25:39 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:44091 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbeIXWZj (ORCPT ); Mon, 24 Sep 2018 18:25:39 -0400 Received: by mail-yb1-f193.google.com with SMTP id y12-v6so5243351ybj.11 for ; Mon, 24 Sep 2018 09:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tn65olbjEisbgRx84AHVd8RtBlDFqDYyvZcZNx1mb+o=; b=lg3vpbJ5gzxybx4pAT4w2ECdjggtCVpGvcneer/dwWNHReKIjkiH6ZD6wTcwuETU5j lps9hGj2f2k9rYtuSBVNe8wpqAlQc938+JAH+43q92x4dSJRli8i7/DBxoIPHCFb5seR 4rUImpVgf+R0KGNUPMrv2Dy0tVUrWtqzL4yVo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Tn65olbjEisbgRx84AHVd8RtBlDFqDYyvZcZNx1mb+o=; b=K2g89COZCi3/niJd1aN81MslbcCYydzwxy/veilZBPOW6Oh6sy4zh9ZPGUPKg+myar mWbaHsJJrkdoU3yaKVljyY2FkM9MBQUSe5ikccNqjSf6+EZpYGSq1z2R8RObvUlzL3tk 4k2SzoPbYxW9M9u/QleLJ4PYJjcqks9YU4FCOl5+z8QCuhdg/EolJKXqpT3qenXsmbqW LIyF6HUalsKAkDnjvbLtTFw2oR2P67PUAtzi9rL9s7TnbwHFO2qCnAefrVxrbO0ChWHm X3U7yaPdcrgPmVxEMB1Lmf8THMnK4y/V2Sc/GfPc3ZK2y5f0Vo/0T/3rliIKkTiimcMO MXbw== X-Gm-Message-State: ABuFfogKqo9XI1Qo9NPdCJu/Yt1oxDQGHuBpu0QbPed0N0kMnhv7RpjT WkB0bZivjglxA3jv2S0UOvpz7w== X-Google-Smtp-Source: ACcGV60HJL6iXdP4SMXrVKWgt9IfM8TKFv2979w1eONWIwbVgJGTh4gnBvSML26LNVSEvb1A2yZ5ng== X-Received: by 2002:a25:4c03:: with SMTP id z3-v6mr5065035yba.156.1537806163000; Mon, 24 Sep 2018 09:22:43 -0700 (PDT) Received: from bzwang.cnc.corp.google.com ([2620:0:1013:11:6f9e:dcbe:41ef:a61]) by smtp.gmail.com with ESMTPSA id v34-v6sm9791001ywh.45.2018.09.24.09.22.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Sep 2018 09:22:41 -0700 (PDT) From: Bruce Wang To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: seanpaul@chromium.org, jsanka@codeaurora.org, robdclark@gmail.com, abhinavk@codeaurora.org, jcrouse@codeaurora.org Subject: [PATCH v3 7/7] drm/msm/dpu: _dpu_plane_get_aspace returns Date: Mon, 24 Sep 2018 12:22:28 -0400 Message-Id: <20180924162228.180689-8-bzwang@chromium.org> X-Mailer: git-send-email 2.19.0.444.g18242da7ef-goog In-Reply-To: <20180924162228.180689-1-bzwang@chromium.org> References: <20180924162228.180689-1-bzwang@chromium.org> MIME-Version: 1.0 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 Remove unneeded checks from _dpu_plane_get_aspace. The function no longer needs to return anything so it is changed to void. v3: Made return value of function struct msm_gem_address_space* instead of passing one in to reflect the purpose of the function. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index 924e321a5ac4..2ed8bc741139 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -431,23 +431,14 @@ static void _dpu_plane_set_qos_remap(struct drm_plane *plane) /** * _dpu_plane_get_aspace: gets the address space */ -static int _dpu_plane_get_aspace( +static void _dpu_plane_get_aspace( struct dpu_plane *pdpu, struct dpu_plane_state *pstate, struct msm_gem_address_space **aspace) { - struct dpu_kms *kms; - - if (!pdpu || !pstate || !aspace) { - DPU_ERROR("invalid parameters\n"); - return -EINVAL; - } - - kms = _dpu_plane_get_kms(&pdpu->base); + struct dpu_kms *kms = _dpu_plane_get_kms(&pdpu->base); *aspace = kms->base.aspace; - - return 0; } static inline void _dpu_plane_set_scanout(struct drm_plane *plane, @@ -824,11 +815,7 @@ static int dpu_plane_prepare_fb(struct drm_plane *plane, DPU_DEBUG_PLANE(pdpu, "FB[%u]\n", fb->base.id); - ret = _dpu_plane_get_aspace(pdpu, pstate, &aspace); - if (ret) { - DPU_ERROR_PLANE(pdpu, "Failed to get aspace\n"); - return ret; - } + _dpu_plane_get_aspace(pdpu, pstate, &aspace); /* cache aspace */ pstate->aspace = aspace;