From: Alyssa Rosenzweig <alyssa@collabora.com>
To: Adri??n Larumbe <adrian.larumbe@collabora.com>
Cc: alyssa.rosenzweig@collabora.com, dri-devel@lists.freedesktop.org,
steven.price@arm.com
Subject: Re: [PATCH 2/2] drm/panfrost: replace endian-specific types with generic ones
Date: Tue, 20 Sep 2022 18:13:23 -0400 [thread overview]
Message-ID: <Yyo7A1eolIBssv/i@maud> (raw)
In-Reply-To: <20220920211545.1017355-2-adrian.larumbe@collabora.com>
Tentative r-b, but we *do* need to make a decision on how we want to
handle endianness. I don't have strong feelings but the results of that
discussion should go in the commit message.
On Tue, Sep 20, 2022 at 10:15:45PM +0100, Adri??n Larumbe wrote:
> __le32 and __l64 endian-specific types aren't portable and not available on
> FreeBSD, for which there's a uAPI compatible reimplementation of Panfrost.
>
> Replace these specific types with more generic unsigned ones, to prevent
> FreeBSD Mesa build errors.
>
> Bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7252
> Fixes: 730c2bf4ad39 ("drm/panfrost: Add support for devcoredump")
> Signed-off-by: Adri??n Larumbe <adrian.larumbe@collabora.com>
> ---
> include/uapi/drm/panfrost_drm.h | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/include/uapi/drm/panfrost_drm.h b/include/uapi/drm/panfrost_drm.h
> index bd77254be121..c1a10a9366a9 100644
> --- a/include/uapi/drm/panfrost_drm.h
> +++ b/include/uapi/drm/panfrost_drm.h
> @@ -236,24 +236,24 @@ struct drm_panfrost_madvise {
> #define PANFROSTDUMP_BUF_TRAILER (PANFROSTDUMP_BUF_BO + 1)
>
> struct panfrost_dump_object_header {
> - __le32 magic;
> - __le32 type;
> - __le32 file_size;
> - __le32 file_offset;
> + __u32 magic;
> + __u32 type;
> + __u32 file_size;
> + __u32 file_offset;
>
> union {
> struct {
> - __le64 jc;
> - __le32 gpu_id;
> - __le32 major;
> - __le32 minor;
> - __le64 nbos;
> + __u64 jc;
> + __u32 gpu_id;
> + __u32 major;
> + __u32 minor;
> + __u64 nbos;
> } reghdr;
>
> struct {
> - __le32 valid;
> - __le64 iova;
> - __le32 data[2];
> + __u32 valid;
> + __u64 iova;
> + __u32 data[2];
> } bomap;
>
> /*
> @@ -261,14 +261,14 @@ struct panfrost_dump_object_header {
> * with new fields and also keep it 512-byte aligned
> */
>
> - __le32 sizer[496];
> + __u32 sizer[496];
> };
> };
>
> /* Registers object, an array of these */
> struct panfrost_dump_registers {
> - __le32 reg;
> - __le32 value;
> + __u32 reg;
> + __u32 value;
> };
>
> #if defined(__cplusplus)
> --
> 2.37.0
>
next prev parent reply other threads:[~2022-09-20 22:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-12 16:44 [PATCH] drm/panfrost: Give name to anonymous coredump object union Adrián Larumbe
2022-09-12 22:59 ` Alyssa Rosenzweig
2022-09-13 8:45 ` Steven Price
2022-09-19 6:44 ` Adrián Larumbe
2022-09-20 13:26 ` Steven Price
2022-09-20 14:58 ` Alyssa Rosenzweig
2022-09-20 21:15 ` [PATCH 1/2] drm/panfrost: Remove type name from internal structs Adrián Larumbe
2022-09-20 21:15 ` [PATCH 2/2] drm/panfrost: replace endian-specific types with generic ones Adrián Larumbe
2022-09-20 22:13 ` Alyssa Rosenzweig [this message]
2022-09-21 8:48 ` Steven Price
2022-09-21 9:55 ` Robin Murphy
2022-09-21 12:26 ` Alyssa Rosenzweig
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=Yyo7A1eolIBssv/i@maud \
--to=alyssa@collabora.com \
--cc=adrian.larumbe@collabora.com \
--cc=alyssa.rosenzweig@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--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.