From: Boris Brezillon <boris.brezillon@collabora.com>
To: "Boris Brezillon" <boris.brezillon@collabora.com>,
"Steven Price" <steven.price@arm.com>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: dri-devel@lists.freedesktop.org, kernel@collabora.com
Subject: Re: [PATCH v3 0/2] drm/panthor: Fix panthor+FEX-Emu
Date: Fri, 6 Jun 2025 11:37:22 +0200 [thread overview]
Message-ID: <20250606113722.48082b43@collabora.com> (raw)
In-Reply-To: <20250606080932.4140010-1-boris.brezillon@collabora.com>
On Fri, 6 Jun 2025 10:09:30 +0200
Boris Brezillon <boris.brezillon@collabora.com> wrote:
> Hello,
>
> This is an attempt a couple bugs exposed by FEX-Emu. The first one
> is pretty trivial and should be uncontroversial, since it's just
> a missing padding field in one of our uAPI structs. We are getting
> away with it on arm32 because of the alignment rules provided by
> the Arm ABI, but x86 has relaxed constraints for u64 fields, and
> this bug is definitely hit when running a 32-bit x86 mesa binary
> under FEX Emu.
>
> The second fix is addressing a problem we have because FEX-Emu is
> an aarch64 process executing 32-bit x86 code, meaning the check
> we do on the is-32bit-task check we do to figure out the MMIO
> offset seen by the user won't work. In order to fix that, we add
> an ioctl to let the user explicitly set this offset. The offset
> can only be set early on, if no MMIO range has been mapped before.
>
> With those, and the mesa MR at [1], I managed to run a 32-bit x86
> glmark2 through FEX without using the host mesa (if we were to use
> the thunked mesa lib, both the kernel and mesa would use
> MMIO_OFFSET_64BIT, and the problem doesn't exist anymore).
>
> Regards,
>
> Boris
>
> Changes in v2:
> - Simplify the logic in patch2 to have a lockless solution that's
> still safe for what we need
>
> Changes in v3:
> - Fix a comment
>
> [1]https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34573
>
> Boris Brezillon (2):
> drm/panthor: Add missing explicit padding in drm_panthor_gpu_info
> drm/panthor: Fix the user MMIO offset logic for emulators
Queued to drm-misc-next.
>
> drivers/gpu/drm/panthor/panthor_device.h | 18 ++++++++
> drivers/gpu/drm/panthor/panthor_drv.c | 56 +++++++++++++++++-------
> include/uapi/drm/panthor_drm.h | 41 +++++++++++++++++
> 3 files changed, 99 insertions(+), 16 deletions(-)
>
prev parent reply other threads:[~2025-06-06 9:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 8:09 [PATCH v3 0/2] drm/panthor: Fix panthor+FEX-Emu Boris Brezillon
2025-06-06 8:09 ` [PATCH v3 1/2] drm/panthor: Add missing explicit padding in drm_panthor_gpu_info Boris Brezillon
2025-06-06 8:09 ` [PATCH v3 2/2] drm/panthor: Fix the user MMIO offset logic for emulators Boris Brezillon
2025-06-06 9:37 ` Boris Brezillon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250606113722.48082b43@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=adrian.larumbe@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=liviu.dudau@arm.com \
--cc=steven.price@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.