[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <739f05b1-a72f-40df-bcb9-28f33aced5ff@nvidia.com>
Date: Tue, 14 Oct 2025 17:10:21 -0700
From: James Jones <jajones@...dia.com>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Lyude Paul <lyude@...hat.com>,
Faith Ekstrand <faith.ekstrand@...labora.com>,
nouveau@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Joel Fernandes <joelagnelf@...dia.com>
Subject: Re: [PATCH 1/3] drm: define NVIDIA DRM format modifiers for GB20x
On 9/2/25 06:41, Danilo Krummrich wrote:
> On 8/12/25 12:00 AM, James Jones wrote:
>> The layout of bits within the individual tiles
>> (referred to as sectors in the
>> DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D() macro)
>> changed for 8 and 16-bit surfaces starting in
>> Blackwell 2 GPUs (With the exception of GB10).
>> To denote the difference, extend the sector field
>> in the parametric format modifier definition used
>> to generate modifier values for NVIDIA hardware.
>>
>> Without this change, it would be impossible to
>> differentiate the two layouts based on modifiers,
>> and as a result software could attempt to share
>> surfaces directly between pre-GB20x and GB20x
>> cards, resulting in corruption when the surface
>> was accessed on one of the GPUs after being
>> populated with content by the other.
>>
>> Of note: This change causes the
>> DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D() macro to
>> evaluate its "s" parameter twice, with the side
>> effects that entails. I surveyed all usage of the
>> modifier in the kernel and Mesa code, and that
>> does not appear to be problematic in any current
>> usage, but I thought it was worth calling out.
>>
>> Signed-off-by: James Jones <jajones@...dia.com>
>
> Having a second look on this, isn't this (and patch 3) a fix as well?
Sorry, it was just pointed out that I missed this email. Apologies.
I suppose they could be considered a fix for 6cc6e08d4542
("drm/nouveau/kms: add support for GB20x"). Would you like me to send
out a rebased v2 with a Fixes tag?
Thanks,
-James
Powered by blists - more mailing lists