<div dir="ltr"><div>Only for you: Attached.</div><div><br></div><div>Marek<br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Dec 15, 2024 at 6:37 PM Joshua Ashton <<a href="mailto:joshua@froggi.es">joshua@froggi.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You should just re-send the whole patch, probably.<br>
<br>
On 12/15/24 8:54 PM, Marek Olšák wrote:<br>
> Missed 2 lines from the diff:<br>
> <br>
> +#define DRM_FORMAT_MOD_LINEAR_PITCH_ALIGN_128B fourcc_mod_code(NONE, 2)<br>
> +#define DRM_FORMAT_MOD_LINEAR_PITCH_ALIGN_256B fourcc_mod_code(NONE, 3)<br>
> <br>
> Marek<br>
> <br>
> On Sun, Dec 15, 2024 at 3:53 PM Marek Olšák <<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a> <br>
> <mailto:<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>>> wrote:<br>
> <br>
> The comment explains the problem with DRM_FORMAT_MOD_LINEAR.<br>
> <br>
> Signed-off-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a><br>
> <mailto:<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a>>><br>
> <br>
> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/<br>
> drm_fourcc.h<br>
> index 78abd819fd62e..8ec4163429014 100644<br>
> --- a/include/uapi/drm/drm_fourcc.h<br>
> +++ b/include/uapi/drm/drm_fourcc.h<br>
> @@ -484,9 +484,27 @@ extern "C" {<br>
> * modifier (e.g. not setting DRM_MODE_FB_MODIFIERS in the<br>
> DRM_ADDFB2 ioctl),<br>
> * which tells the driver to also take driver-internal information<br>
> into account<br>
> * and so might actually result in a tiled framebuffer.<br>
> + *<br>
> + * WARNING:<br>
> + * There are drivers out there that expose DRM_FORMAT_MOD_LINEAR,<br>
> but only<br>
> + * support a certain pitch alignment and can't import images with<br>
> this modifier<br>
> + * if the pitch alignment isn't exactly the one supported. They can<br>
> however<br>
> + * allocate images with this modifier and other drivers can import<br>
> them only<br>
> + * if they support the same pitch alignment. Thus,<br>
> DRM_FORMAT_MOD_LINEAR is<br>
> + * fundamentically incompatible across devices and is the only<br>
> modifier that<br>
> + * has a chance of not working. The PITCH_ALIGN modifiers should be<br>
> used<br>
> + * instead.<br>
> */<br>
> #define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0)<br>
> <br>
> +/* Linear layout modifiers with an explicit pitch alignment in bytes.<br>
> + * Exposing this modifier requires that the pitch alignment is exactly<br>
> + * the number in the definition.<br>
> + */<br>
> +#define DRM_FORMAT_MOD_LINEAR_PITCH_ALIGN_64B fourcc_mod_code(NONE, 1)<br>
> <br>
<br>
- Joshie 🐸✨<br>
<br>
</blockquote></div>