From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 F2E6F3033C8 for ; Mon, 26 Jan 2026 09:05:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769418359; cv=none; b=ool9Bj0Whd4ZLxAFq9v89r0qPQzMMw3TENmkA5/uCdJ7Ohr6kPq4ewVvYd02K754VGVJljOZFffYDaQ0Wxiucr74DKM/UPDA8BhlcBybgYL/aAEA1PjVOwb/ZxSOzTFHfFXVxnyGDeJM2ud0dSqtuLp5ieIwaV+TXNlHOHZ4Tew= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769418359; c=relaxed/simple; bh=65QIe7iiCGPbQ5akzOl/Jh9cUnPpMNp0fShoBHLv1B4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Nf5hSJAZg6otG5xEEXfBo98PSDBpOxmX04cOpWChPGfkRJ76eZ+xn+XHaQjd9MFHfer6JxQ1WHnqwjGnRaw0YA5FqAUZaYKGrnEI+ZU+KLg2k89TR2dXGO32tpcOycI+szebRuLl5TX83KlZZAr8LFMU/naqLv4zM/ZudUmLpO0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none 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=euomdtMe; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="euomdtMe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1769418349; bh=65QIe7iiCGPbQ5akzOl/Jh9cUnPpMNp0fShoBHLv1B4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=euomdtMeYC0CWdaWTBQwbTyHD8miuU8+lg4D52YJKw0I+OdjGHSGKdCrNUtiqPAQX m0IOw//b0wV+yOYmsBYFZ1nfJjdbN5EbaqrWOiQz0kVuNfu4osS4+B0Yvn/YebszbT c927tQeNq/DnQXCAIU3FzZeYJnZeXbvKqPFcFvJlFzF9Vect0dzbCXvPTLac/sWGTE P5l0acHikx9gCvmkg0XsrD0IdnNnS1YLBY4bHN4eik4C4IOZkJMamzFxHiutaQStDr DUKYX6wsEzUDLGa0qgFb/uFvvtvRYN3hxGzLGNghl23/nLAIgtt/WLYPsm9zyOt3om B1qY3gHOKm3lw== Received: from fedora (unknown [IPv6:2a01:e0a:2c:6930:d919:a6e:5ea1:8a9f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 170B217E0E42; Mon, 26 Jan 2026 10:05:49 +0100 (CET) Date: Mon, 26 Jan 2026 10:05:45 +0100 From: Boris Brezillon To: Caterina Shablia Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , kernel@collabora.com, "Steven Price" , "Liviu Dudau" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] drm: add ARM interleaved 64k modifier Message-ID: <20260126100545.08a4ffd1@fedora> In-Reply-To: <20260123212327.83064-1-caterina.shablia@collabora.com> References: <20260123212327.83064-1-caterina.shablia@collabora.com> Organization: Collabora X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; 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=US-ASCII Content-Transfer-Encoding: 7bit Hello Caterina, On Fri, 23 Jan 2026 21:23:25 +0000 Caterina Shablia wrote: > This modifier is intended to be used by panvk to implement sparse > partially-resident images with better map and unmap performance, > and no worse access performance, compared to implementing them in > terms of U-interleaved. > > With this modifier, the arrangement of texel blocks is very similar > to block U-interleaved. Tiles are laid out linearly. Tiles are > always 64k bytes in size and are 1:1-sided rectangles when texel > block is 1 byte or a multiple of 4 bytes, and 2:1-sided otherwise. It's not all that clear that we're dealing with mega tiles formed with a set of U-interleaved tiles. Also, the 1:1-sided rectangle sounds like a complex way to qualify a square. " This modifier is a exposing mega tiles of 64 KiB. It's formed of U-interleaved tiles laid out linearly to cover a square or a rectangle whose width is twice the height. " > Only power of two byte texel blocks can be used with this modifier. > Within a single tile, texels are arranged according to U-interleaving. > > Unlike block U-interleaved, the layout depends solely on texel block > size and doesn't change depending on whether the image format is > compressed or not. Hm, are you sure of that? I'd assume the inner tile size to still depend on compressed vs !compressed, meaning the overall layout is also dependent on the compressed vs !compressed property. > > The hardware features corresponding to this modifier are available > starting with v10 (second gen Valhall.) > > The corresponding panvk MR can be found at: > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38986 > > Signed-off-by: Caterina Shablia > --- > include/uapi/drm/drm_fourcc.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > index e527b24bd824..0da2c880e08c 100644 > --- a/include/uapi/drm/drm_fourcc.h > +++ b/include/uapi/drm/drm_fourcc.h > @@ -1422,6 +1422,16 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) > #define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED \ > DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL) > > +/* > + * ARM 64k interleaved modifier > + * > + * This is used by ARM Mali v10+ GPUs. It's basically the same as 16x16 block > + * U-interleaved, but within 64k-byte 1:1 or 2:1 -sided tiles. Again, it's not clear from this description that this modifier is exposing "mega" tiles formed with a set of U-interleaved tiles spanning a 64KiB section. The way I read this is that it's U-interleaved, but over a bigger region, like 256x256 U-interleaved. Regards, Boris > Tiles themselves > + * are laid out linearly. > + */ > +#define DRM_FORMAT_MOD_ARM_INTERLEAVED_64K \ > + DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 2ULL) > + > /* > * Allwinner tiled modifier > * > > base-commit: f08f665f8cda9520d98ee24545d306a92f386616