From patchwork Fri Dec 13 17:26:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11291897 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D1F6E14DB for ; Fri, 13 Dec 2019 22:32:19 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B260220706 for ; Fri, 13 Dec 2019 22:32:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UhdDvWmm"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="SgCyprn+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B260220706 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Go4FiqrMD4jHx8Ob1wUg1xnZSVnJQeZkV/AtzS+peQY=; b=UhdDvWmm72pDdC D/Q6HaeJMqLADW23i04i5sZpKQ7MShikc4JuV+HLsGsxUWFomBtuDhVpudhcnQX2GLTooatYCuoDr 40LsBbZHSsVCJfZpiHrGIrYKrWt1+WIBCs8XTbmj1gmm43NZgbqjDdTF2ir+2iCbA9yyQcVZg3XDa 3NR6nI82I/5YLjehyuAq6Mm82rkqzRHZ31ZFiVkwHWnEcvKvnp0VhVHyhpSudFNJ/sjBEbnV6XJzM tUsnFLvEyDhb2FxowWlDgt+dFs3F4rJ1YSfLXuQvaPpgsBG4AvHrSqk1uQO/3r1HhGvQ9UQrQ9aD5 9b7LG6sORVwMbxlX32Fg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifoim-0006Q7-Ko; Fri, 13 Dec 2019 17:27:20 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifoht-0005YI-J1 for linux-rockchip@lists.infradead.org; Fri, 13 Dec 2019 17:26:27 +0000 Received: by mail-wr1-x444.google.com with SMTP id w15so281531wru.4 for ; Fri, 13 Dec 2019 09:26:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gBZaJnQ4T1pfuiYbNCV33pBAl/MiKps57aCdhCCq5GA=; b=SgCyprn+TJhfzJrAyOElFygAGYPjDOq49M6+F+et6rfEOdkuMx54OxKa1htCbgaOvN XHYlumbXc2snqLMJhb/p1vhbxd2+u7uERrXewvnV9bJZZAN1XYVqQ3i95Lj/8ZnI1QbX wBlGUBqXY5npseRH3RKCUbJy/msPwKjx28JhE= 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=gBZaJnQ4T1pfuiYbNCV33pBAl/MiKps57aCdhCCq5GA=; b=CQJdHULeivb8XoL6k/Ieo+zY/DPrgVFhDj41P3a1fTrKVwsaUeSenKcCUiO3t9GuM8 BfFCbJloYe5+c9wKyZhIDmgsBwJdzWX5vMSO8HIbmRfvkTrfFF/x4PwMIdk6sv/ArgMO rn/V6PqndLPauSwNx3lca7+Yb0SRd1caFIb1InjxVmkOj5rRdduy0E+rhU8/fU9AUy/t tKXieEKqVJowNw5Hxi31YjRs6P3oqY2rH0knZxkp3ApXcUzweiiTRejDzRVEgiE4x6oE lKsNqTmiJcVqOMAMke8icDS/8hyaZ1fmUIlA0F5dRhb0BX8KYpp7pwKYGmiKYuwAGWVS fqOw== X-Gm-Message-State: APjAAAUDqyQPyC+X0cpvHgFYKpHo7lVLRacdXkKXZ2+pBwYkDU42x+7s nNWtUD6gN+I5s32aT4AJYQBy5w== X-Google-Smtp-Source: APXvYqySnMsLeoZE9VQ1vmqK71rJv5VV+5cxXaKC6Jepc5ChVNTPeNt0FFqW4uks4ZmZYYpHvNA/fQ== X-Received: by 2002:adf:e609:: with SMTP id p9mr13492290wrm.397.1576257984206; Fri, 13 Dec 2019 09:26:24 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:564b:0:7567:bb67:3d7f:f863]) by smtp.gmail.com with ESMTPSA id q15sm10689669wrr.11.2019.12.13.09.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2019 09:26:23 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 06/10] drm/xrockchip: plane_state->fb iff plane_state->crtc Date: Fri, 13 Dec 2019 18:26:08 +0100 Message-Id: <20191213172612.1514842-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213172612.1514842-1-daniel.vetter@ffwll.ch> References: <20191213172612.1514842-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191213_092625_623774_3B6502D0 X-CRM114-Status: GOOD ( 10.76 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Heiko_St=C3=BCbner?= , Daniel Vetter , Sandy Huang , linux-rockchip@lists.infradead.org, Daniel Vetter , linux-arm-kernel@lists.infradead.org Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Checking both is one too much, so wrap a WARN_ON around it to stope the copypasta. Signed-off-by: Daniel Vetter Cc: Sandy Huang Cc: "Heiko Stübner" Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index d04b3492bdac..cecb2cc781f5 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -724,7 +724,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane, int max_scale = win->phy->scl ? FRAC_16_16(8, 1) : DRM_PLANE_HELPER_NO_SCALING; - if (!crtc || !fb) + if (!crtc || WARN_ON(!fb)) return 0; crtc_state = drm_atomic_get_existing_crtc_state(state->state, crtc);