From patchwork Mon Sep 24 16:22:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Wang X-Patchwork-Id: 10612675 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 408E81390 for ; Mon, 24 Sep 2018 16:22:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C9B329C92 for ; Mon, 24 Sep 2018 16:22:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20BB129CA7; Mon, 24 Sep 2018 16:22:43 +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 C491129C92 for ; Mon, 24 Sep 2018 16:22:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726139AbeIXWZh (ORCPT ); Mon, 24 Sep 2018 18:25:37 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:35695 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbeIXWZh (ORCPT ); Mon, 24 Sep 2018 18:25:37 -0400 Received: by mail-yw1-f65.google.com with SMTP id y76-v6so1507533ywd.2 for ; Mon, 24 Sep 2018 09:22:41 -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=htmcCDYxottGJuVS31af0d5vlL7L9JN03/LDNrfqs6k=; b=O6L8mR3CZQ9uqnYJgNTsA+A2ngW98DAgCpg3Pk4/18KCeQGdfiZ/Y6g0h04kC09iye okAMVtfSH2CZxa52Y/0/G9q8I4tiXQSw+m45APFNbWCn1j95BEfxJsjA6qDsiqjQO7cc At86zloeF0zbU50JBqsfT6kRqTjgFyfT9oqd8= 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=htmcCDYxottGJuVS31af0d5vlL7L9JN03/LDNrfqs6k=; b=Hjz5y3o/GIjMGaq/xBk724gg3B4ug2YYQ22VlAMLzXX+/SbMoUj75OCA1WXxIg+Ouh UdcT1Jv+YgFE05/RZ6xgUOK3rk+FHXY01/gXorCHk0GxKQU5zRhp6iov+8gANA1hrVAZ wLs6rWvWUFLvn5gUCEbnMLILr5i5bNLkvDG0cCINmR7ITB2WypVxh2aoD6KWCbqcAe5h /f+GyDvmlHshfR8XmSKdgSX6W2WOp5z4LwobbmoFweC0SKpk0e9sGx1qa2WrYmHkBygm ku1pgtcnzfS9/IZ7a9jt/zqiVkxGV5rY1FMBYXvugV9OpklPIgJ65P7jKZiSaA6ZLvUU kcMw== X-Gm-Message-State: APzg51DBDS+FghYyE3GUMDFlhSmVcdfpDSZylNASGXtZKj098y//BAye 7umxRdmCQLilEaR+bh+r26Oo45cBHLU= X-Google-Smtp-Source: ANB0VdaLiJzqptlHalu7lE2+iuVRtHy7rw0CiqK68oANBMv+kFZ225rObo+kei4ZrS7TkCOFMSXvjQ== X-Received: by 2002:a0d:c845:: with SMTP id k66-v6mr4896736ywd.135.1537806161188; Mon, 24 Sep 2018 09:22:41 -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.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Sep 2018 09:22:40 -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 6/7] drm/msm/dpu: Make dpu_plane_danger_signal_ctrl void Date: Mon, 24 Sep 2018 12:22:27 -0400 Message-Id: <20180924162228.180689-7-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 Removed all impossible checks from the function, which eliminates the need for a return value. This function is also never used outside of dpu_plane.c, so the function is made static. v3: Using helper function _dpu_plane_get_kms() instead of doing it locally. Signed-off-by: Bruce Wang Reviewed-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 26 ++++------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index dd27bb925547..924e321a5ac4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -363,35 +363,17 @@ static void _dpu_plane_set_qos_ctrl(struct drm_plane *plane, &pdpu->pipe_qos_cfg); } -int dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) +static void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) { - struct dpu_plane *pdpu; - struct msm_drm_private *priv; - struct dpu_kms *dpu_kms; - - if (!plane || !plane->dev) { - DPU_ERROR("invalid arguments\n"); - return -EINVAL; - } - - priv = plane->dev->dev_private; - if (!priv || !priv->kms) { - DPU_ERROR("invalid KMS reference\n"); - return -EINVAL; - } - - dpu_kms = to_dpu_kms(priv->kms); - pdpu = to_dpu_plane(plane); + struct dpu_plane *pdpu = to_dpu_plane(plane); + struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane); if (!pdpu->is_rt_pipe) - goto end; + return; pm_runtime_get_sync(&dpu_kms->pdev->dev); _dpu_plane_set_qos_ctrl(plane, enable, DPU_PLANE_QOS_PANIC_CTRL); pm_runtime_put_sync(&dpu_kms->pdev->dev); - -end: - return 0; } /**