public inbox for nouveau@lists.freedesktop.org
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Dave Airlie <airlied@gmail.com>, Danilo Krummrich <dakr@kernel.org>
Cc: bskeggs@nvidia.com, Faith Ekstrand <faith.ekstrand@collabora.com>,
	dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO
Date: Wed, 4 Feb 2026 18:13:42 -0800	[thread overview]
Message-ID: <11e38ec6-05bf-4ebe-9bd2-d7786699ff1d@nvidia.com> (raw)
In-Reply-To: <CAPM=9txXG=tqrDjhXXvfQ+eMRnsVab=xz4CBOd1Nzwu3XR+DyA@mail.gmail.com>

On 2/4/26 5:16 PM, Dave Airlie wrote:
> On Fri, 28 Mar 2025 at 21:09, Danilo Krummrich <dakr@kernel.org> wrote:
>>
>> (CC: Ben, John)
>>
>> On Thu, Mar 27, 2025 at 02:03:21PM -0400, M Henning wrote:
>>> On Thu, Mar 27, 2025 at 9:51 AM Danilo Krummrich <dakr@kernel.org> wrote:
>>>>
>>>> On Fri, Mar 21, 2025 at 06:06:34PM -0400, M Henning wrote:
>>>>> On Thu, Mar 20, 2025 at 2:18 PM Danilo Krummrich <dakr@kernel.org> wrote:
>>>>>> On Wed, Mar 12, 2025 at 05:36:14PM -0400, Mel Henning wrote:
>>>>>>> +     __u32 width_align_pixels;
>>>>>>> +     __u32 height_align_pixels;
>>>>>>> +     __u32 pixel_squares_by_aliquots;
>>>>>>> +     __u32 aliquot_total;
>>>>>>> +     __u32 zcull_region_byte_multiplier;
>>>>>>> +     __u32 zcull_region_header_size;
>>>>>>> +     __u32 zcull_subregion_header_size;
>>>>>>> +     __u32 subregion_count;
>>>>>>> +     __u32 subregion_width_align_pixels;
>>>>>>> +     __u32 subregion_height_align_pixels;
>>>>>>> +
>>>>>>> +     __u32 ctxsw_size;
>>>>>>> +     __u32 ctxsw_align;
>>>>>>> +};
>>>>>>
>>>>>> What if this ever changes between hardware revisions or firmware versions?
>>>>>
>>>>> There was some previous discussion of that here:
>>>>> https://gitlab.freedesktop.org/mesa/mesa/-/issues/12596#note_2796853
>>>>>
>>>>> From what I can tell, this structure hasn't really changed since
>>>>> FERMI_C (circa 2011), so I'm not too worried about it changing on us
>>>>> too quickly. When it does change, we have the option of appending more
>>>>> members to this struct in the usual way, or if the change is more
>>>>> fundamental we can return an error from this ioctl and add a new
>>>>> interface. Userspace needs to handle an error from this ioctl
>>>>> gracefully anyway since whether it works or not depends on the gpu
>>>>> generation and what firmware is loaded right now.
>>>>
>>>> We could also define it as
>>>>
>>>>         struct drm_nouveau_get_zcull_info {
>>>>                 __u32 version;
>>>>                 __u32 _pad;
>>>>
>>>>                 union {
>>>>                         struct drm_nouveau_get_zcull_info_v1 info;
>>>>                 }
>>>>         }
>>>>
>>>> just to be safe.
>>>
>>> We can do that, although I don't see any other drm drivers using a
>>> similar pattern anywhere.
>>
>> I think it's a bit cleaner than adding new members, leave existing ones unset or
>> add a new IOCTL in the worst case.
>>
>> Maybe the NVIDIA folks can give us some hint on whether this is expected to
>> change at some point?

"Predictions are hard, especially about the future." :)

> 
> I think it's an ioctl, let's just leave out version/pad, adding a new
> ioctl isn't a major trouble if the world decides we need to do it.
> 
> Also you can extend ioctls with new fields at the end without
> problems, so if it's just extra info it'll likely be hw specific and
> be part of enabling a new GPU.
> 

That seems reasonable to me.

thanks,
-- 
John Hubbard


  reply	other threads:[~2026-02-05  2:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12 21:36 [PATCH 0/2] drm/nouveau: ZCULL support Mel Henning
2025-03-12 21:36 ` [PATCH 1/2] drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO Mel Henning
2025-03-20 18:18   ` Danilo Krummrich
2025-03-20 18:37     ` Danilo Krummrich
2025-03-20 19:57     ` Ben Skeggs
2025-03-20 20:01       ` Danilo Krummrich
2025-03-25 23:40         ` M Henning
2025-03-27 12:56           ` Danilo Krummrich
2025-03-27 18:26             ` M Henning
2025-03-28 11:04               ` Danilo Krummrich
2026-02-05  0:43                 ` Dave Airlie
2026-02-05 10:58                   ` Danilo Krummrich
2025-03-21 22:06     ` M Henning
2025-03-27 13:51       ` Danilo Krummrich
2025-03-27 18:03         ` M Henning
2025-03-28 11:09           ` Danilo Krummrich
2026-02-05  1:16             ` Dave Airlie
2026-02-05  2:13               ` John Hubbard [this message]
2026-02-05 10:46               ` Danilo Krummrich
2025-03-12 21:36 ` [PATCH 2/2] drm/nouveau: DRM_NOUVEAU_SET_ZCULL_CTXSW_BUFFER Mel Henning
2025-03-20 18:34   ` Danilo Krummrich
2025-03-21 23:00     ` M Henning
2025-03-27 13:58       ` Danilo Krummrich
2025-03-27 19:01         ` M Henning
2025-03-28 11:48           ` Danilo Krummrich
2025-08-01  2:15             ` M Henning

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11e38ec6-05bf-4ebe-9bd2-d7786699ff1d@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=bskeggs@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=faith.ekstrand@collabora.com \
    --cc=nouveau@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox