From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 009D63FA5C4 for ; Fri, 5 Jun 2026 10:30:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780655407; cv=none; b=Oe/+BkZ2bJkv2yB7eVlMj5mz0udZW3mXabjoMeKpkuNmPtxbtuHmxXmTbXYN1Lx00El1cD8x7M3hpMSsnPLfDut7/Ojh/cyJSHCZSrIDQy0cRZTPIYqyf02eqFlFy3VUq73jL5p/vVpucQ0FaTjQzh+9xz7+YEzanpqdKxG2LKc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780655407; c=relaxed/simple; bh=l5XPrdnvXRn0Y9bhoXgXDo2kdLCPso1A+0xVqL4ZDJc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=fBHuMNLo4XHXY+lvQ0xw0zfEycNxl2BSCNZcaU6+3yyUvTi2wqPt+QTPNAv6FPxPDsTBpobtClkQVMVOZUeYHL1EIoeAR1k+Y7EjaUvxJSKK+QygI1vkUfTgFbDPaHLwxlKXRE7jSFH2+VnKroozJZIuQiYGTjMXxG3QIGLg/2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=ny9xg6XC; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="ny9xg6XC" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2C20C4CEF; Fri, 5 Jun 2026 03:29:58 -0700 (PDT) Received: from [10.1.31.21] (e122027.cambridge.arm.com [10.1.31.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2A6713F632; Fri, 5 Jun 2026 03:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1780655403; bh=l5XPrdnvXRn0Y9bhoXgXDo2kdLCPso1A+0xVqL4ZDJc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ny9xg6XCs67fm5c1dlmk3M1pMfJA3tjrXoXLYCKZeTS1x/rDJqfk3e1+NSU+ZBDhM MoULuUDgJfb5fgrE1Dy5Cm3gDVQkL0NaN+ysn75ePhktMuRq9DyzWnAoJRlUAuNyCx PXH+Kl7/E161kUuDP6HgDba6XBOnFa5DQ99WhRzE= Message-ID: Date: Fri, 5 Jun 2026 11:29:57 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/7] drm/panfrost: Check another bo field for cache option query To: =?UTF-8?Q?Adri=C3=A1n_Larumbe?= , Boris Brezillon , Rob Herring , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Faith Ekstrand , "Marty E. Plummer" , Tomeu Vizoso , Eric Anholt , Alyssa Rosenzweig , Robin Murphy Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Collabora Kernel Team , Neil Armstrong , Claude References: <20260604-claude-fixes-v2-0-57c6bd4c1655@collabora.com> <20260604-claude-fixes-v2-1-57c6bd4c1655@collabora.com> From: Steven Price Content-Language: en-GB In-Reply-To: <20260604-claude-fixes-v2-1-57c6bd4c1655@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 04/06/2026 18:35, Adrián Larumbe wrote: > When querying the properties of a BO, whether it was created in > Writeback caching mode for userspace mappings, is recorded in a Panfrost > BO's wb_mmap field. > > Reported-by: Claude > Closes: https://gitlab.freedesktop.org/panfrost/linux/-/work_items/88 > Signed-off-by: Adrián Larumbe > Fixes: 62eedf1ccba5 ("drm/panfrost: Add flag to map GEM object Write-Back Cacheable") This is a subtle change in uABI because bo->base.map_wc reflects the actual properties of the buffer. So on a coherent device this will change. But it does match the intention/documentation of the ioctl (returning the creation flags), and I don't think user space could have been usefully relying on the current behaviour. Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c > index 3d0bdba2a474..cb8e5015847f 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_drv.c > +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c > @@ -659,7 +659,7 @@ static int panfrost_ioctl_query_bo_info(struct drm_device *dev, void *data, > if (bo->is_heap) > args->create_flags |= PANFROST_BO_HEAP; > > - if (!bo->base.map_wc) > + if (bo->wb_mmap) > args->create_flags |= PANFROST_BO_WB_MMAP; > } > >