Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp952252lqp; Thu, 23 May 2024 05:15:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXYtfgygqggZiYmR0VGdnsEAIw0NS1G0tJVmm1fdPxWio9VO3pRJuCFdySB+cjmBUiD4p/Mk/n+Bzw13K7cHyMoqki3vfUHf4rZSk08ag== X-Google-Smtp-Source: AGHT+IHYFSA65UiS72ROY/PWrD238wd8k7+JeTFwKEQa5360WeKKfzP4jwJhELDe8nnUIWI+hOIL X-Received: by 2002:a05:6359:2d05:b0:18d:7b30:eec1 with SMTP id e5c5f4694b2df-19791f23572mr416044755d.19.1716466510373; Thu, 23 May 2024 05:15:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716466510; cv=pass; d=google.com; s=arc-20160816; b=PRFXCZSf7CwyqYBzBdPDR9eSUafr7ekg3TNCy0B/eW3O9vSKFc1/EkZFhbQweAhmh5 hmr87DCl/yaBkY/Dr+X1fi13GBPbXT9nFfuYzwaC2glrBNUWE9dgBJPTYFZ+3m//Jly6 mCYVsuD15clKhWAVs+ERRl37uCtUfZTIDYT8tnzH/hMm9EbIzuCL+gkl5q2CwXygfxRZ HJrQgavV8yFmaK9v0q6sYiKjVwh5XyEZq4u36u2AgMhnV8eex/RPNHpl31KL/O2x9B0e OrGe1fE7rOzkc6czvdiTL+SMELB2Uo67k4ZHCnaOuILxfSSDKyu+dqjJomv5miG+VQdv hNBQ== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=kq0lTrq9XXQTpP98h+cmfqMlDlHhzZMjx8s3D8y2jvA=; fh=PUgK/+R5zKTCmY4zd/8A6YXkla42L9Z29s0jfB5hlew=; b=NktPjoZrnGKABp8o8oSWocaWVZypJ4WLTVRUpVFSnKhMJWmVZvz0n/RAMD6xFtA9il gbfrrErCZfAZo0aQdccMY2OcunjKmIbKQgWuBbRBL8GZ0SKsGqM6qGOqwx+vtmCCbD1O zdkhuDuilgXcGdNqhaD3qd/uTRLjdsHPcjlhcG7h/VCWwJsFZ4UGmJtsFopUJDODMUy9 xlM+EsDV0qBo3ztlFPbvA88oiiGgO90AGSyUdyN4Yf9HnWKkE0oyf2M6ZZnr9kBoUGAC bBQ8V4BFDF0s8Q78Bg8kcEem2Twupo7szRO/J2mDhl7oVtrcXMpTgzWyPazgQ4EhjlCk kaYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=A8b03q1K; 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-187449-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187449-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 d75a77b69052e-43df56cce8bsi184954151cf.649.2024.05.23.05.15.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 05:15:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187449-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=A8b03q1K; 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-187449-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187449-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 1B8C41C209F1 for ; Thu, 23 May 2024 12:15:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 14E101487D5; Thu, 23 May 2024 12:13:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="A8b03q1K" 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 D0916148316; Thu, 23 May 2024 12:13:33 +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=1716466415; cv=none; b=CKi1Db0nkyAYbiTgwSxpWAFwqKCyATzy41eVRDYy8r+4JAqDIaKNe60kZeWTquleqGUYuHnteAzJW+dSvJo1paj1OL3JHuhovE0aXFhclOhDgGN90SaD+VJHUoDX9mqPF5yoiIAsekdeXZIohWUHAv/S4DOrHpSmJ2u6wsZ1ZBE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716466415; c=relaxed/simple; bh=aeQ1eCV/OYFIzW5W9o7Rm16kTK0XBOoJtW9zhuyRyP8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nhzHvQ01a1fmXR2k/VwoZgsF7SYr4gSnYutejOqTsYZPZo+kE3dsA8kQ/cfa5yF4OB2IHSj8DB1aexIYzj8/Nx7kfJlTPP6/ZWLJS/L+mWvMDUicpr1Sc3lmC2ucw3PkFgpTsMqbX9KeFO9dIvoVrsE6FyvrPXn80pHWsrxSFxM= 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=A8b03q1K; 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=1716466412; bh=aeQ1eCV/OYFIzW5W9o7Rm16kTK0XBOoJtW9zhuyRyP8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=A8b03q1KO14uSrOcZ3mHzaAeHTBDeHvQe/MMVymQnmpdB95Ft2Pj4Tz7l2+gV5Efa hwXMCx3zq5IE0i+Cf2J5tA1PvtcLmHIubxjeU1yJSUMD9c5GrFnxBFh4FDHb4TNrw0 VFuBaMLSYtRoR2NeC41NFRYW3nagRYP+CK0Riv/kHmIJIspDl0x6QQS9uNI3wotrL1 esMzAHieAWHFvjebc6Fcb2EmEqCyB0Uu2yXTW4IzvS4YOdPKFvajZchcOtx4i0WFGW t8V6t3igizvZrC+3MpLYH6iitiMa0jieFmilN78VSdQ4FVO3l9z1RmEnvHqNedxCNR v9qAbRFXIsYlw== Received: from localhost (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: bbrezillon) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 5A6E13782039; Thu, 23 May 2024 12:13:31 +0000 (UTC) Date: Thu, 23 May 2024 14:13:30 +0200 From: Boris Brezillon To: =?UTF-8?B?QWRyacOhbg==?= Larumbe Cc: Rob Herring , Steven Price , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Sumit Semwal , Christian =?UTF-8?B?S8O2bmln?= , Dmitry Osipenko , Zack Rusin , kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org Subject: Re: [PATCH v4 3/3] drm/gem-shmem: Add import attachment warning to locked pin function Message-ID: <20240523141330.374fb505@collabora.com> In-Reply-To: <20240523113236.432585-4-adrian.larumbe@collabora.com> References: <20240523113236.432585-1-adrian.larumbe@collabora.com> <20240523113236.432585-4-adrian.larumbe@collabora.com> Organization: Collabora X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-redhat-linux-gnu) 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: quoted-printable On Thu, 23 May 2024 12:32:19 +0100 Adri=C3=A1n Larumbe wrote: > 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. >=20 > Cc: Thomas Zimmermann > Cc: Dmitry Osipenko > Cc: Boris Brezillon > Fixes: a78027847226 ("drm/gem: Acquire reservation lock in drm_gem_{pin/u= npin}()") > Signed-off-by: Adri=C3=A1n Larumbe Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/drm_gem_shmem_helper.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > 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_obj= ect *shmem) > =20 > dma_resv_assert_held(shmem->base.resv); > =20 > + drm_WARN_ON(shmem->base.dev, shmem->base.import_attach); > + > ret =3D drm_gem_shmem_get_pages(shmem); > =20 > return ret;