From patchwork Wed Mar 3 13:42:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 392066 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp5132801jap; Wed, 3 Mar 2021 05:43:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuEbp6P7XWEB9vAwv1BlCEQdVqf63TxyrpOHh5cbKSUTpgzD2sNMOYP9rZDL7M/sKhluT7 X-Received: by 2002:a63:c601:: with SMTP id w1mr16791360pgg.11.1614779029071; Wed, 03 Mar 2021 05:43:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614779029; cv=none; d=google.com; s=arc-20160816; b=dleK9jfGNqbhtOQ+uQld8YcR9ctBlaPqqkDepD47mRnjoXw/Hz2ZvL5lXwRNhVuZXl sN6NVEo2ne1Ydi8E6062S9iRi491dlG5SxkNZz84ACizsr7X56IYhFsoTGDKZHGdGLb+ 7X+s+U2bx5F3rovtv7aBQYtxQiwcC9VmvozbG0Goqb70Nup/PqUlAMMHZsOj9qmvxwJ6 /0W2IKlbnd4NmIVrCJFZYwI8TFXHN18VyE+uxt79SIDMWyk2EaQw+ijtw9UYuZdS210f CVSVSDj8+8wzuhnXaijAlocURGQjcj61hh5HbQebT0N12MpWnRGiV3eXffJDMx1hECuA 2yEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=Iuud5cLp2BT70WR+fBTpmPa5rz5CiAtPlEr71+1JxO0=; b=TxDcMdnLcdrNZIZEd+IfbyiK3rjCt7vAa0I+4IboIvETQpHHPXdeHxfgBwzQZAvDqX 8TnrXiK6ygdTJWyJ+N56LSsnX1IWmGT7hGqrddSSJEhUVF86ad3Ua7WhmzvC9NFqT73W 39vkTVJvmFKVaftajylvxvwnubtpQhViIIZBveRyWFSsfcKD3L+aJ+vfyOwq4kjDxKFr 5NGoNWOYsvgEvgnD5AOz5aHliPVPu6VyE1wqULMYRlZSYctSDUUlioshjl2NfwUa5l3M 7LIgfcECQyjru7iBeExq/3JLpkWyBg3vXwpa5ZDEcQWVS2+qb4zr4hdyKECXTu0mGwtM FDpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ycKjNwxV; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 18si1288970pll.183.2021.03.03.05.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 05:43:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ycKjNwxV; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7F066E869; Wed, 3 Mar 2021 13:43:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by gabe.freedesktop.org (Postfix) with ESMTPS id B5BA86E86D for ; Wed, 3 Mar 2021 13:43:35 +0000 (UTC) Received: by mail-wm1-x32a.google.com with SMTP id i9so5240226wml.0 for ; Wed, 03 Mar 2021 05:43:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sSYYF9avR+ibuwGTDH+u4wL/4B2uArbe+K5Pi6OSJeE=; b=ycKjNwxVRbCbFBAENcOkX967iuzNILRBy64Agv/v6AoZsMb6fh2R8wRdvYyJH6Cj2D TgcS8VnsiDfrUZ4+cXJGZ7euWyTdOdLNdKMr+YOK635Vr7OgrzD4hBE02dgD7nopt4ZM w0Lut7zaa1OSOrPr2NtQ7k3kyGq7LnzgpWxg/3jlkxOLCPITPG/yUPcRKl6OLgvuy9yI AMlLutx1kgcc7QtPN/Xk2FNrgBpBoYKNVwWWNI0+HI/7NtZ9Vvkzae0XtKZKuVpk3BQ5 fDtXc95a7S4ZQr7B2TODC9Z/hm0uLpjbMGGrYxonprBaU5PcGThm2OYN0sDp65mrMGI5 7v2w== 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=sSYYF9avR+ibuwGTDH+u4wL/4B2uArbe+K5Pi6OSJeE=; b=SszQzcdIK0RysD1Uc6E+OLrG/6q/aN64IXML0n2x+sjPmZ0CW+cs9rUQPrjccccoWR q38kpjswDVsgr9Utzcj2Y/Pbs8Cdow51hOe77ZJHjcPppbvQrNF1bmwmNYoTMVQv2XoX G5ty6ufU3VFIHMSgWDtpd3f8sAlGuy+j7JMCE0/n9QA33CK2LCBJAA3swG/6X0XaCb4m HTC4Glidocz9bvB0taf3+o0V6YF/W1WPodYnTzCOsTGoUEz67DTdQ6BwKYF7i7yZna0N WrOCP7sdYCjvzL2RgBf2hHK4CyrSNnURb5XmooHOE4v+UhcxPIyLkEvS9zIJEIFJpIH4 BXhg== X-Gm-Message-State: AOAM530O5S+VMdfy4hBZ+Rg7kVti1do2+fXYr1oAzULCg1apGuMVucv9 nVsx5NR+vun6FDFjgIJj1o6Zjw== X-Received: by 2002:a1c:68c5:: with SMTP id d188mr8916602wmc.119.1614779014483; Wed, 03 Mar 2021 05:43:34 -0800 (PST) Received: from dell.default ([91.110.221.155]) by smtp.gmail.com with ESMTPSA id w18sm6109524wrr.7.2021.03.03.05.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 05:43:34 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 05/53] include: drm: drm_atomic: Make use of 'new_plane_state' Date: Wed, 3 Mar 2021 13:42:31 +0000 Message-Id: <20210303134319.3160762-6-lee.jones@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210303134319.3160762-1-lee.jones@linaro.org> References: <20210303134319.3160762-1-lee.jones@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In the macro for_each_oldnew_plane_in_state() 'new_plane_state' is provided as a container for state->planes[i].new_state, but is not utilised in some use-cases, so we fake-use it instead. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_commit_cursors’: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:7649:44: warning: variable ‘new_plane_state’ set but not used [-Wunused-but-set-variable] Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Rob Clark Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- include/drm/drm_atomic.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index ce7023e9115d7..a71c19e1d785c 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -867,7 +867,8 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); ((plane) = (__state)->planes[__i].ptr, \ (void)(plane) /* Only to avoid unused-but-set-variable warning */, \ (old_plane_state) = (__state)->planes[__i].old_state,\ - (new_plane_state) = (__state)->planes[__i].new_state, 1)) + (new_plane_state) = (__state)->planes[__i].new_state, \ + (void)(new_plane_state) /* Only to avoid unused-but-set-variable warning */, 1)) /** * for_each_oldnew_plane_in_state_reverse - iterate over all planes in an atomic