From patchwork Thu Sep 20 16:49:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Wang X-Patchwork-Id: 10608219 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 5C6F015E8 for ; Thu, 20 Sep 2018 16:49:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AF982E179 for ; Thu, 20 Sep 2018 16:49:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F1FB2E1A1; Thu, 20 Sep 2018 16:49:41 +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 339352E179 for ; Thu, 20 Sep 2018 16:49:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731209AbeITWeB (ORCPT ); Thu, 20 Sep 2018 18:34:01 -0400 Received: from mail-yw1-f68.google.com ([209.85.161.68]:42431 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730936AbeITWeB (ORCPT ); Thu, 20 Sep 2018 18:34:01 -0400 Received: by mail-yw1-f68.google.com with SMTP id h134-v6so860967ywc.9 for ; Thu, 20 Sep 2018 09:49:39 -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=MTHaHxrfy6ma7MJ0xhaX0bUNbo5FChV3K2yTw2WJo38=; b=CPPd0xrnzBH6UW8hP+fEiomdKCByvnoc+t4uKFvQp2YKbZQezRM77hl2toCcHc6/A1 2PqulgDS+4V6g/FWGhwaGyGEDhcn86LfbxxYUHVz6dep1qcEHN+86/wpwKpNcK6uKRbI QH2FJOm/uwhPCMDW4JRJxEr4bSvnFBOGNgGwU= 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=MTHaHxrfy6ma7MJ0xhaX0bUNbo5FChV3K2yTw2WJo38=; b=oslK5BPJvS5JFKL9JA4R7bVQQLfSqkcx0ca0drLOKMHMhL8UgiBi91orFVr2xJ/rhD P19jRf++Zc5YH2O8mTtmB/KibtGPMrU8KsCIqWANgdhJGGSrtGze0pMbNF2/KDgnIsNx I7EHkW5AcbGsuyL2K3d9PqWRRqMhqjinXoz8syk+lPFkhoThEdasxlsiUWSiNCbR8TFv H2WE2MbtOKZZIrt8yqtv5dyUW29bySFgK9q9D27dQlzxdWQNmUoBIFEcluKxzVQbY6GX fF0rbpHbIbyPYIOhp1hziMgkd9G4kVgkg5cSErd9AMZz6au/e6JdlWiB3jKDE4msojp+ aLvg== X-Gm-Message-State: APzg51DDB6DRRpYWJg2gkMVhSWJNUaLL+w48Qho5N4hJMUPEasvfCmvH vMQcEls9JwJvJ+40ll27wlWcDg== X-Google-Smtp-Source: ANB0VdZyg7pL+8A8r/HDK5FG9ooDFaaAkbbzWRxtVnfMCG65h71bMeZuwoR3D1vqa5JRswCZeP+ncQ== X-Received: by 2002:a81:3796:: with SMTP id e144-v6mr1353894ywa.513.1537462178526; Thu, 20 Sep 2018 09:49:38 -0700 (PDT) Received: from bzwang.cnc.corp.google.com ([2620:0:1013:11:6f9e:dcbe:41ef:a61]) by smtp.gmail.com with ESMTPSA id e126-v6sm6332688ywf.72.2018.09.20.09.49.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Sep 2018 09:49:37 -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 Subject: [PATCH v2 7/7] drm/msm/dpu: Make _dpu_plane_get_aspace void Date: Thu, 20 Sep 2018 12:49:24 -0400 Message-Id: <20180920164924.225847-8-bzwang@chromium.org> X-Mailer: git-send-email 2.19.0.444.g18242da7ef-goog In-Reply-To: <20180920164924.225847-1-bzwang@chromium.org> References: <20180920164924.225847-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. Signed-off-by: Bruce Wang --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 25 ++++------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index f9e65acdf87e..59f019685658 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -434,23 +434,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, @@ -471,11 +462,7 @@ static inline void _dpu_plane_set_scanout(struct drm_plane *plane, pdpu = to_dpu_plane(plane); - ret = _dpu_plane_get_aspace(pdpu, pstate, &aspace); - if (ret) { - DPU_ERROR_PLANE(pdpu, "Failed to get aspace %d\n", ret); - return; - } + _dpu_plane_get_aspace(pdpu, pstate, &aspace); ret = dpu_format_populate_layout(aspace, fb, &pipe_cfg->layout); if (ret == -EAGAIN) @@ -836,11 +823,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;