Skip to content
Snippets Groups Projects
Commit 1a5401ec authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Tvrtko Ursulin
Browse files

drm/i915/fb: Relax clear color alignment to 64 bytes


Mesa changed its clear color alignment from 4k to 64 bytes
without informing the kernel side about the change. This
is now likely to cause framebuffer creation to fail.

The only thing we do with the clear color buffer in i915 is:
1. map a single page
2. read out bytes 16-23 from said page
3. unmap the page

So the only requirement we really have is that those 8 bytes
are all contained within one page. Thus we can deal with the
Mesa regression by reducing the alignment requiment from 4k
to the same 64 bytes in the kernel. We could even go as low as
32 bytes, but IIRC 64 bytes is the hardware requirement on
the 3D engine side so matching that seems sensible.

Note that the Mesa alignment chages were partially undone
so the regression itself was already fixed on userspace
side.

Cc: stable@vger.kernel.org
Cc: Sagar Ghuge <sagar.ghuge@intel.com>
Cc: Nanley Chery <nanley.g.chery@intel.com>
Reported-by: default avatarXi Ruoyao <xry111@xry111.site>
Closes: #13057
Closes: https://lore.kernel.org/all/45a5bba8de009347262d86a4acb27169d9ae0d9f.camel@xry111.site/
Link: mesa/mesa@17f97a69
Link: mesa/mesa@888f63cf


Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241129065014.8363-2-ville.syrjala@linux.intel.com


Tested-by: default avatarXi Ruoyao <xry111@xry111.site>
Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
(cherry picked from commit ed3a892e)
Signed-off-by: default avatarTvrtko Ursulin <tursulin@ursulin.net>
parent 5bc55a33
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment