[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACu1E7HYdq2a3phPoXHwDYXGQX6G36hCiyu1LMpyY6G+M4HuWg@mail.gmail.com>
Date: Fri, 9 May 2025 10:52:49 -0400
From: Connor Abbott <cwabbott0@...il.com>
To: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
Cc: Konrad Dybcio <konradybcio@...nel.org>, Bjorn Andersson <andersson@...nel.org>,
Rob Clark <robdclark@...il.com>, Abhinav Kumar <quic_abhinavk@...cinc.com>,
Dmitry Baryshkov <lumag@...nel.org>, Akhil P Oommen <quic_akhilpo@...cinc.com>, Sean Paul <sean@...rly.run>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Marijn Suijten <marijn.suijten@...ainline.org>, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org
Subject: Re: [PATCH RFT 10/14] drm/msm/a6xx: Stop tracking macrotile_mode (again)
On Fri, May 9, 2025 at 8:45 AM Konrad Dybcio
<konrad.dybcio@....qualcomm.com> wrote:
>
> On 5/8/25 8:33 PM, Connor Abbott wrote:
> > On Thu, May 8, 2025 at 2:14 PM Konrad Dybcio <konradybcio@...nel.org> wrote:
> >>
> >> From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
> >>
> >> SC8180X (A680) and SA8775P (A663) require a write to that register,
> >> while other SKUs are fine with the default value. Don't overwrite it
> >> needlessly, requiring the developer to read the value back from
> >> hardware just to put it in the driver again, introducing much more room
> >> for error.
> >
> > I'm not sure I understand that last sentence. The original reason I
> > always wrote it was that for host image copy we need to know the value
> > of macrotile_mode, so again the value exposed to userspace must match
> > what's set in the HW. We can't read the value from the HW and send it
> > to userspace, because userspace queries this when creating the
> > physical device during device enumeration and we really don't want to
> > spuriously turn on the device then. That means the safest thing is to
> > always program it, guaranteeing that it always matches. Otherwise we
> > just have to hope that the default value matches what we expect it to
> > be.
> >
> > I know you're copying this from kgsl, but kgsl doesn't expose the
> > macrotile_mode to userspace. I expect that HIC was added afterwards
> > and only works via hacks there (if it's even supported at all on the
> > relevant SoCs).
>
> Alright, I think I'll include it in the common UBWC config (even though
> it only concerns the GPU), as IIUC it may differ between platforms
> implementing the same GPU SKU
>
> Konrad
It most definitely does not concern just the GPU. It determines the
way tiles are swizzled within a macrotile so it also has to be in sync
between blocks.
Also, as said in the comments it's introduced with UBWC 3.1, so you
could turn this into another getter based on the version if you
introduce UBWC_3_1. In a future where we have proper modifiers derived
from this config struct instead of the current lie that everything is
the same, it would save us a bit.
Connor
Powered by blists - more mailing lists