From patchwork Mon Sep 24 16:22:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Wang X-Patchwork-Id: 10612667 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 DBF4A1390 for ; Mon, 24 Sep 2018 16:22:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C738529C92 for ; Mon, 24 Sep 2018 16:22:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBC4929CA7; Mon, 24 Sep 2018 16:22:36 +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 6357829C92 for ; Mon, 24 Sep 2018 16:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728744AbeIXWZb (ORCPT ); Mon, 24 Sep 2018 18:25:31 -0400 Received: from mail-yb1-f195.google.com ([209.85.219.195]:45426 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbeIXWZb (ORCPT ); Mon, 24 Sep 2018 18:25:31 -0400 Received: by mail-yb1-f195.google.com with SMTP id d9-v6so8457477ybr.12 for ; Mon, 24 Sep 2018 09:22:35 -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=W3jy9BpLUwfcVGQGC37i4dL8ZKVoGwTwqXx82QQCEyE=; b=DS5ftCpoDDNfl23FDfrAe0C/jv01KWiTAow3g2Ij44HKCvhQnH4O5ve8J6kDIcCPj9 a8pa7xZ3X5wYT6SJ+0olAOZBoQhwkstyNO81xqls95XsmrtQuBhgujz0N+q/EdMpAeF+ ne+UpFjQV4jGOR8b1XoInLyk7EiGJ9rWb58i0= 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=W3jy9BpLUwfcVGQGC37i4dL8ZKVoGwTwqXx82QQCEyE=; b=sxTM4RXB/QZb9TdqSEI+e0WrQUcQZiu3j/mSJ/rd/rk8J3l9YDZb7ZfwqygeIDwKa4 oo3FKHaS79AfJs8KKQan4B006iwiW9QdnSN5NzcrrgYJGjV/+nlzYPtzQgaQI2CR+DMc +P0hOVRFIik0mE6hzczMRglv+V6RwXlot08ArEq8N6XDexHbL3eIRb7BjCg/M4aQps5g zV9j7jwVXtEtopnXg8dnyOn3SKPk+4d5zNEJf4YAWzzezzilOns4Yq3lO41TBTc6zT5G X66rJNUYItSoOSrddIn3GJ94KYaIQixeif7kEtc0zUjirfhASueIZRYtl0PA7OAwKLzn Y1/A== X-Gm-Message-State: ABuFfogj1LSFNV2cCjcPmmXdSIrlRMzfcXEJGTwyRl/nEebh1NGZ4wBx o8u1a/dCBzj7J3Jat2sreBpzqA== X-Google-Smtp-Source: ACcGV634WHYxvcU8FrDuBJMwZb6iTBvyws0Gh/qN053+2MoVkA86yEviAq2NufxqVMFEraAxD5X3wg== X-Received: by 2002:a25:bc92:: with SMTP id e18-v6mr5317394ybk.182.1537806154725; Mon, 24 Sep 2018 09:22:34 -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.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Sep 2018 09:22:33 -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 2/7] drm/msm/dpu: Clean up plane atomic disable/update Date: Mon, 24 Sep 2018 12:22:23 -0400 Message-Id: <20180924162228.180689-3-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 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 Reviewed-by: Jordan Crouse --- 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 8f986ea10963..dd27bb925547 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -1043,8 +1043,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); @@ -1157,27 +1156,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); @@ -1201,9 +1184,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); } }