From: Alice Ryhl <aliceryhl@google.com>
To: "Onur Özkan" <work@onurozkan.dev>
Cc: daniel.almeida@collabora.com, dakr@kernel.org, airlied@gmail.com,
simona@ffwll.ch, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v1] drm/tyr: gpu: fix GpuInfo::log model/version decoding
Date: Tue, 24 Feb 2026 07:42:21 +0000 [thread overview]
Message-ID: <aZ1WXYhM8meuCZkM@google.com> (raw)
In-Reply-To: <20260210183812.261142-1-work@onurozkan.dev>
On Tue, Feb 10, 2026 at 09:38:12PM +0300, Onur Özkan wrote:
> GpuInfo::log() was decoding GPU_ID like this:
>
> major = (self.gpu_id >> 16) & 0xff;
> minor = (self.gpu_id >> 8) & 0xff;
> status = self.gpu_id & 0xff;
>
> That does not match the Mali GPU_ID layout and mixes unrelated
> fields. Due to that, model detection becomes `mali-unknown` on
> rk3588s which is wrong.
>
> We can already get all the version information with a single
> GpuId::from call (less code and cleaner), so this patch uses it.
>
> Also renamed `GpuModels` fields from `major/minor` to
> `arch_major/prod_major` to reflect their real meaning.
>
> This change was tested on Orange Pi 5 (rk3588s) board and the
> results are as follows:
>
> Before this change:
>
> $ dmesg | grep 'tyr'
> [ 19.698338] tyr fb000000.gpu: mali-unknown id 0xa867 major 0x67 minor 0x0 status 0x5
> [ 19.699050] tyr fb000000.gpu: Features: L2:0x7120306 Tiler:0x809 Mem:0x301 MMU:0x2830 AS:0xff
> [ 19.699817] tyr fb000000.gpu: shader_present=0x0000000000050005 l2_present=0x0000000000000001 tiler_present=0x0000000000000001
> [ 19.702493] tyr fb000000.gpu: Tyr initialized correctly.
>
> After this change:
>
> $ dmesg | grep 'tyr'
> [ 19.591692] tyr fb000000.gpu: mali-g610 id 0xa867 major 0x0 minor 0x0 status 0x5
> [ 19.592374] tyr fb000000.gpu: Features: L2:0x7120306 Tiler:0x809 Mem:0x301 MMU:0x2830 AS:0xff
> [ 19.593141] tyr fb000000.gpu: shader_present=0x0000000000050005 l2_present=0x0000000000000001 tiler_present=0x0000000000000001
> [ 19.595831] tyr fb000000.gpu: Tyr initialized correctly.
>
> Signed-off-by: Onur Özkan <work@onurozkan.dev>
Applied to drm-rust-next. Thanks!
prev parent reply other threads:[~2026-02-24 7:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 18:38 [PATCH v1] drm/tyr: gpu: fix GpuInfo::log model/version decoding Onur Özkan
2026-02-11 7:33 ` 孙科
2026-02-12 12:25 ` Boris Brezillon
2026-02-24 7:42 ` Alice Ryhl [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=aZ1WXYhM8meuCZkM@google.com \
--to=aliceryhl@google.com \
--cc=airlied@gmail.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=work@onurozkan.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox