lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPj87rMT-YsUj2gyfoCUFUPx0BWxAhcz8LgvAhco0-JzhKeXxQ@mail.gmail.com>
Date: Wed, 18 Dec 2024 14:33:04 +0000
From: Daniel Stone <daniel@...ishbar.org>
To: eric.smith@...labora.com
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, 
	kernel@...labora.com, dri-devel@...ts.freedesktop.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm: add modifiers for MediaTek tiled formats

Hi Eric,

On Fri, 13 Dec 2024 at 18:47, <eric.smith@...labora.com> wrote:
> MediaTek (MTK) uses some unique tiled memory formats
> for video decoding. Add these to the uapi drm_fourcc.h
> so that we can use them in Mesa, GStreamer, and other
> tools/libraries.

Thanks for pushing these upstream!

> +/* MediaTek layouts */
> +
> +/*
> + * MediaTek Tiled Modifier
> + * This is a tiled layout using tiles of 16x32 pixels in a row-major layout.
> + * For chroma planes this becomes 16x16 tiles.
> + */
> +#define DRM_FORMAT_MOD_MTK_16L_32S_TILE  fourcc_mod_code(MTK, (1ULL << 0))

I think this probably wants to be something like the tiling mode
defined in AMD/Arm modifiers, i.e. reserve a few bits in the range to
select the tile size, rather than using a single bit here.

> +/*
> + * MediaTek Compressed Modifier
> + * Indicates the planes are compressed.
> + * Implementation may be platform and base-format specific.
> + */
> +#define DRM_FORMAT_MOD_MTK_COMPRESSED  fourcc_mod_code(MTK, (1ULL << 1))

Ditto for compression.

> +/*
> + * MediaTek 10-bit Modifier
> + * Indicates that the 2 LSBs of the 10 bit pixels are stored
> + * separately and tiled.
> + */
> +#define DRM_FORMAT_MOD_MTK_LSBTILED    fourcc_mod_code(MTK, (1ULL << 2))
> +
> +/*
> + * MediaTek 10-bit Modifier
> + * Indicates that the 2 LSBs of 10 bit pixels are stored
> + * separately in raster order.
> + */
> +#define DRM_FORMAT_MOD_MTK_LSBRASTER   fourcc_mod_code(MTK, (1ULL << 3))

Ditto for 10bpc packing.

So this would ultimately look something like:
mod = (DRM_FORMAT_MOD_MTK_TILE_SIZE(16L32S) |
DRM_FORMAT_MOD_MTK_COMPRESSION(V1) |
DRM_FORMAT_MOD_MTK_10BPC_PACK(RASTER))

Cheers,
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ