From: Doug Brown <doug@schmorgal.com>
To: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: dri-devel@lists.freedesktop.org,
Russell King <linux+etnaviv@armlinux.org.uk>,
etnaviv@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/etnaviv: fix power register offset on GC300
Date: Mon, 5 Sep 2022 14:05:37 -0700 [thread overview]
Message-ID: <6e97587f-e101-13cd-0d40-fa3dc4c625c9@schmorgal.com> (raw)
In-Reply-To: <CAH9NwWd1Q6iGUZoB7j3zAd-Pj_vq4WueguyfhKeWdWo6SPJ+PQ@mail.gmail.com>
Hi Christian,
On 9/3/2022 4:49 AM, Christian Gmeiner wrote:
> I had a quick look at what vivantes kernel driver did. It uses a per
> gpu instance variable powerBaseAddress
> that gets set accordingly. I am not sure if I really like the
> gpu_fix_reg_address(..) idea, as it gets called on every
> register read and write. For me I see two other possible solutions:
>
> 1) Add two seperate helpers ala gpu_read_power() and gpu_write_power()
> where we do the if beast.
> 2) Add a power register offset variable to etnaviv_gpu and explicitly
> use it on for reads and writes - like the Vivante driver does.
>
> But that's just my personal opinion. Can't wait to hear what Lucas thinks.
>
Thanks for reviewing so fast! I honestly agree. It felt kind of dirty
modifying gpu_write and gpu_read. The reason I went for it is I was
thinking that in most cases the compiler is going to optimize the ugly
"if" out.
The two solutions listed above both sound good. They would need a
special case in etnaviv_core_dump_registers, but that's probably much
less nasty than modifying gpu_read and gpu_write. Any preferences from
everyone on which of the other two options I should do? The
gpu_read_power and gpu_write_power approach sounds pretty clean to me.
Also, dropping David Airlie from the chain -- his email address bounced
on my original patch messages.
Doug
next prev parent reply other threads:[~2022-09-05 21:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-03 6:05 [PATCH 0/2] drm/etnaviv: GC300 fixes Doug Brown
2022-09-03 6:05 ` [PATCH 1/2] drm/etnaviv: add missing quirks for GC300 Doug Brown
2022-09-03 11:38 ` Christian Gmeiner
2022-09-03 6:05 ` [PATCH 2/2] drm/etnaviv: fix power register offset on GC300 Doug Brown
2022-09-03 11:49 ` Christian Gmeiner
2022-09-05 21:05 ` Doug Brown [this message]
2022-09-06 8:12 ` Lucas Stach
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=6e97587f-e101-13cd-0d40-fa3dc4c625c9@schmorgal.com \
--to=doug@schmorgal.com \
--cc=christian.gmeiner@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=linux+etnaviv@armlinux.org.uk \
/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