Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp294350lqm; Tue, 30 Apr 2024 23:57:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCULB++uRNWnNC5i8d/pca7Ram6bvqh05Yo6nqAFZMIZ7qRPD3YLx18pWs8HWRmqh4tEh1mYd7JTRgf1zVsnzOyc8ZOEYbbeKR4MyuQfFQ== X-Google-Smtp-Source: AGHT+IHRdxkTfgzpuGWYfu7MWUa0W3g8MFAtMKq30DFJGxFdXxt3emVqLEY3RluBIPTMZjsYDfsp X-Received: by 2002:a05:620a:46a6:b0:790:fc62:efc2 with SMTP id bq38-20020a05620a46a600b00790fc62efc2mr1740432qkb.39.1714546649912; Tue, 30 Apr 2024 23:57:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714546649; cv=pass; d=google.com; s=arc-20160816; b=wlBuYH43B0lkTjxaXJG/WVigJ/mxoi9nixePS8JOy1odaWTz9IarV7hw7A5eYdjwLg JTl6DWYrJc587CnOrcF3qn1kdZXAAUo32DpoDXEfzfybA4EJq/OgFBKHRSwCPeTDLHCH SFs8GVPhu1oJAy03nxHfOU0UOBcywAZ9Osiel0iFaEtg7Sx0ROaVBmfsSlVd4a7wI3Bx wKjQSgB4vwd04ksdBla1ckVFfQpAhfNUJqSMNoPuz/bC5KyKTi9jqhM2IWgP+OGJB5Au pQVisF6euXl3362FZdi7R3tGnJlMi+Ygxk7E6INcevKZPFX/YR7JhqwCKAUtPq9eh2MA fYCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ofZQrOY3vainSl1bLxGK6Pfi7iAKF9TEzkhT5tzxXfE=; fh=fGR18h///lMTyOyjB82q8MVWSVd5rH5g9ytunXdvZDY=; b=tXiPnLR9h14wGCjPdVbd2SOpv8Ano6dgKvnODCbW3yB1PqfnQCOpQgBJ9lxAQd55Gf yzMSBtnfIzdXlmfSlyOM2y/48ZFwZa8riiup2d+olCOvavpaanVURmdhkPattSl/m0Ny qZ/RZD8RZJFRuRE/YWAUfsY2nOPvJSrIhys6jQe7zRVB7Xyw/E5cVIBxacOTx6ZoLkRB o/ldnfCbHSKcWSgNT3VHyjcec3XXjuqsJibIgYadIG6OqP2zg+iRBvhZ0nZ6/p39m3Lz hd/Rp5IykLluhQxXUN7CgbKCRIeZbu/Z1Z9vK5a7+i0FFCnbikqBOwiHZQ4/oijTZ9Xz ftVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=shC5Vw2f; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-164979-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p24-20020a05620a22f800b0079100dfcd69si4377417qki.629.2024.04.30.23.57.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 23:57:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164979-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=shC5Vw2f; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-164979-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164979-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A1A771C220F8 for ; Wed, 1 May 2024 06:57:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0AED4EB38; Wed, 1 May 2024 06:57:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="shC5Vw2f" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69E384CDEC; Wed, 1 May 2024 06:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714546622; cv=none; b=ce8JC2cwYWyxiSlv37ooKtAs7jms/jZXCaWp4FnqDnL8PrBPNgFi3iDjWmJhWn+L8vzOX4zx4axHMda20gp+uEa1REcu5DD7NdxBp6MBIr0zMucuZm7EdQ/ekFlebkq/a8ai/WEWUWcW9uhucdBBOCCeNe0WSMshBprRn09ynBE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714546622; c=relaxed/simple; bh=ukkgFqr7kd/xxXpDV8+eo6AgFXA9F66NcJ7LrIizHhM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=khifqRj1EqcoHj66yEAuOCTa9iZdpBdI/lduyiYjcASOOuJBJLsSxZ5NVIo6dnSNl9NhJ7xJ9n5/6elTdv08EWNO8xnbjrszMZld2/yLnoIbYEBm+yzmLFtMT6VXPjr5qjw6J95yMvPB5cQFGINsRKZBAsX/PuYQfAyRxfOkvPg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=shC5Vw2f; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1714546619; bh=ukkgFqr7kd/xxXpDV8+eo6AgFXA9F66NcJ7LrIizHhM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=shC5Vw2fvwzdtpBhsMxO4K3ScFhrjk5bLn15g5Nmmhn/NDP1XFd3k+6m/NQWkyLY0 GWFEyGw93nG9ga7lHShbcfTDcy1DLrEXC2SOlxT0nPvHUT0t3twi09rLvWUtE7AXhn mZFbPWLFPzsxCL2J7rgOxzDnwVl5h63t1NUWUoH7Hh4d/5j0WfxK9lPdsgHkuwZhS7 AegulK7GQbWEZSRh5j1n9EbYJtml57lBuB21Mu6B2PzoBMXnJt8O/ze/1at+RBH9ac pEx+mIetasKpidIc1WC+9hW30KRi5j8PlAm3f9Fv8jTvLgQH8tV2NPn0GKLPs2jZVV jP+ZtgavsUH6Q== Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alarumbe) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 738F337820FB; Wed, 1 May 2024 06:56:58 +0000 (UTC) From: =?UTF-8?q?Adri=C3=A1n=20Larumbe?= To: Qiang Yu , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Boris Brezillon , Rob Herring , Steven Price , Sumit Semwal , Christian Koenig= , Dmitry Osipenko , Zack Rusin Cc: kernel@collabora.com, Adrian Larumbe , dri-devel@lists.freedesktop.org, lima@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH v3 2/2] drm/gem-shmem: Add import attachment warning to locked pin function Date: Wed, 1 May 2024 07:56:00 +0100 Message-ID: <20240501065650.2809530-3-adrian.larumbe@collabora.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240501065650.2809530-1-adrian.larumbe@collabora.com> References: <20240501065650.2809530-1-adrian.larumbe@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit ec144244a43f ("drm/gem-shmem: Acquire reservation lock in GEM pin/unpin callbacks") moved locking DRM object's dma reservation to drm_gem_shmem_object_pin, and made drm_gem_shmem_pin_locked public, so we need to make sure the non-NULL check warning is also added to the latter. Signed-off-by: Adrián Larumbe --- drivers/gpu/drm/drm_gem_shmem_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index 177773bcdbfd..ad5d9f704e15 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -233,6 +233,8 @@ int drm_gem_shmem_pin_locked(struct drm_gem_shmem_object *shmem) dma_resv_assert_held(shmem->base.resv); + drm_WARN_ON(shmem->base.dev, shmem->base.import_attach); + ret = drm_gem_shmem_get_pages(shmem); return ret; -- 2.44.0