From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF2D0C36011 for ; Thu, 27 Mar 2025 13:51:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2656410E0F2; Thu, 27 Mar 2025 13:51:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="b3zbp2vC"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE6A910E0A6; Thu, 27 Mar 2025 13:51:30 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 459C9435AB; Thu, 27 Mar 2025 13:51:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AF8DC4CEDD; Thu, 27 Mar 2025 13:51:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743083489; bh=MfBm0ARJgTYvHs/SLl+TW6RGQHEr5XhW8mIQcvpQV/M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b3zbp2vCLZn9ZlT2QEbh1A0R7IEjqDiIznyRlG+JaVlPo9CdrAQWF841fTJQT7PXD bFrglbFD1lxaZ7/tvE14qFs3+puZcuX7rf7bltfMFOdm30DloW7ZF/+5gv5tsD43i0 DQ7ZU57m3+jUMwU1FELZhnzb+CIOVEN3tR6bcvLC/b3nbRumukVf+65+uryUPEcnwm OCQz9O9EVzlWbdTUnLgD2A+AP/E8NJ6j7nv28BO1IzrlNXGty776djdcgJ2YmNh857 rDd8R3ohbKz8F1RGxIDPXBZmN1M4RYW0iMY4zEhp3PohA2MQeQDJECw8jX3dZCva2c 49mlgwALUGspw== Date: Thu, 27 Mar 2025 14:51:25 +0100 From: Danilo Krummrich To: M Henning Cc: Karol Herbst , Lyude Paul , Faith Ekstrand , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Subject: Re: [PATCH 1/2] drm/nouveau: Add DRM_IOCTL_NOUVEAU_GET_ZCULL_INFO Message-ID: References: <20250312213746.228042-1-mhenning@darkrefraction.com> <20250312213746.228042-2-mhenning@darkrefraction.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On Fri, Mar 21, 2025 at 06:06:34PM -0400, M Henning wrote: > On Thu, Mar 20, 2025 at 2:18 PM Danilo Krummrich 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.