From patchwork Wed Sep 19 15:44:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Wang X-Patchwork-Id: 10606041 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 632F8913 for ; Wed, 19 Sep 2018 15:44:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53C25286DC for ; Wed, 19 Sep 2018 15:44:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 475072874A; Wed, 19 Sep 2018 15:44:30 +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 E324E286DC for ; Wed, 19 Sep 2018 15:44:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732507AbeISVW7 (ORCPT ); Wed, 19 Sep 2018 17:22:59 -0400 Received: from mail-yw1-f68.google.com ([209.85.161.68]:36992 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732294AbeISVW7 (ORCPT ); Wed, 19 Sep 2018 17:22:59 -0400 Received: by mail-yw1-f68.google.com with SMTP id x83-v6so2456404ywd.4 for ; Wed, 19 Sep 2018 08:44:28 -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=xguB8uq+grSv3UIrFRlfF2AQzoRtxM+dUdZJImz3VFQ=; b=kz3BXxySSeTC/Kt8VVH6QdCpNk/+YDqJWVEPCsRSw7FGEf3q87BcO/0kbTMR9FEh4+ U20IjwAx2GdvcBlD+5JlukreziuJgC2vSzY66jXmNGR+Iw81cTTV4CWjbD7wuNQjQgI5 qOujQ+2E8gc5Z8vuHPaL8QSSs9tljPP896gNY= 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=xguB8uq+grSv3UIrFRlfF2AQzoRtxM+dUdZJImz3VFQ=; b=LkmNz1QlfSB2wawHJ8qEgWP/rfCWWGGwLEzft8Nb94mr1LzLuhdWxLA05Z+i3HLiw3 5yskhbHiY8WLNZ4xk+LRca75kSxnV/iBorxqg+u5oRIJh9BYa1vRYOmFAQ2ESEWlOqud aepybBDIq9ncauceLdy+9zh6I0CCUi2uDxuul0BoLfEA2pOx7Bi0BgUbiM/sF1ECvFtm 59+so2vk2DhSpKIEm8mq0CxxOWJBrtf4fTNwczi2+P9DqN+zwaE4TZ8WXOkB33ship7b WabtUkmNKg0uLwm9WmqZm/VRzPyIhWhRcO4flF0xKpaEj3HjPCRtZcpoHwnRLSzpM2C4 PgsQ== X-Gm-Message-State: APzg51DIb244foYzm1xWBx1n/OD91xWrKZSupVfJsvlWiNtWgbXd+NGF ciDayVSkwtgQxh67S14NkmEAEw== X-Google-Smtp-Source: ANB0VdZl4ri9xYPz0Xv9VhxyJybRV0ddKHYvWDpdAJ2pGdcuqOF6sLgrmAmHpoWiYRwelEmon+DMzg== X-Received: by 2002:a0d:f902:: with SMTP id j2-v6mr15436405ywf.62.1537371867783; Wed, 19 Sep 2018 08:44:27 -0700 (PDT) Received: from bzwang.cnc.corp.google.com ([2620:0:1013:11:6f9e:dcbe:41ef:a61]) by smtp.gmail.com with ESMTPSA id h10-v6sm4425921ywa.35.2018.09.19.08.44.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Sep 2018 08:44:26 -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, Bruce Wang Subject: [PATCH 2/5] drm/msm/dpu: Clean up plane atomic disable/update Date: Wed, 19 Sep 2018 11:44:12 -0400 Message-Id: <20180919154415.131292-3-bzwang@chromium.org> X-Mailer: git-send-email 2.19.0.397.gdd90340f6a-goog In-Reply-To: <20180919154415.131292-1-bzwang@chromium.org> References: <20180919154415.131292-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 Removes unnecessary checks from dpu_plane_atomic_disable, old_state argument for both dpu_plane_atomic_disable and dpu_plane_sspp_atomic_update is removed as it is no longer used. Signed-off-by: Bruce Wang Reviewed-by: Sean Paul --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 31 +++++------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index a8d00f57f06a..7f6046166626 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -1157,8 +1157,7 @@ void dpu_plane_set_error(struct drm_plane *plane, bool error) pdpu->is_error = error; } -static void dpu_plane_sspp_atomic_update(struct drm_plane *plane, - struct drm_plane_state *old_state) +static void dpu_plane_sspp_atomic_update(struct drm_plane *plane) { uint32_t src_flags; struct dpu_plane *pdpu = to_dpu_plane(plane); @@ -1271,27 +1270,11 @@ static void dpu_plane_sspp_atomic_update(struct drm_plane *plane, _dpu_plane_set_qos_remap(plane); } -static void _dpu_plane_atomic_disable(struct drm_plane *plane, - struct drm_plane_state *old_state) +static void _dpu_plane_atomic_disable(struct drm_plane *plane) { - struct dpu_plane *pdpu; - struct drm_plane_state *state; - struct dpu_plane_state *pstate; - - if (!plane) { - DPU_ERROR("invalid plane\n"); - return; - } else if (!plane->state) { - DPU_ERROR("invalid plane state\n"); - return; - } else if (!old_state) { - DPU_ERROR("invalid old state\n"); - return; - } - - pdpu = to_dpu_plane(plane); - state = plane->state; - pstate = to_dpu_plane_state(state); + struct dpu_plane *pdpu = to_dpu_plane(plane); + struct drm_plane_state *state = plane->state; + struct dpu_plane_state *pstate = to_dpu_plane_state(state); trace_dpu_plane_disable(DRMID(plane), is_dpu_plane_virtual(plane), pstate->multirect_mode); @@ -1315,9 +1298,9 @@ static void dpu_plane_atomic_update(struct drm_plane *plane, DPU_DEBUG_PLANE(pdpu, "\n"); if (!state->visible) { - _dpu_plane_atomic_disable(plane, old_state); + _dpu_plane_atomic_disable(plane); } else { - dpu_plane_sspp_atomic_update(plane, old_state); + dpu_plane_sspp_atomic_update(plane); } }