Re: [PATCH 4/6] drm/msm/a7xx: Initialize a750 "software fuse"

Dmitry Baryshkov
2024-04-26T13:29:04Z

On Fri, 26 Apr 2024 at 15:46, Rob Clark <robdclark@gmail.com> wrote:
>
> On Thu, Apr 25, 2024 at 4:02 PM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
> >
> > On Thu, 25 Apr 2024 at 16:44, Connor Abbott <cwabbott0@gmail.com> wrote:
> > >
> > > On all Qualcomm platforms with a7xx GPUs, qcom_scm provides a method to
> > > initialize cx_mem. Copy this from downstream (minus BCL which we
> > > currently don't support). On a750, this includes a new "fuse" register
> > > which can be used by qcom_scm to fuse off certain features like
> > > raytracing in software. The fuse is default off, and is initialized by
> > > calling the method. Afterwards we have to read it to find out which
> > > features were enabled.
> > >
> > > Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
> > > ---
> > > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 89 ++++++++++++++++++++++++-
> > > drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 +
> > > 2 files changed, 90 insertions(+), 1 deletion(-)
> > >

[...]

> > > + gpu_req |= QCOM_SCM_GPU_TSENSE_EN_REQ;
> > > +
> > > + ret = qcom_scm_gpu_init_regs(gpu_req);
> > > + if (ret)
> > > + return ret;
> > > +
> > > + /* On a750 raytracing may be disabled by the firmware, find out whether
> > > + * that's the case. The scm call above sets the fuse register.
> > > + */
> > > + if (adreno_is_a750(adreno_gpu)) {
> > > + fuse_val = a6xx_llc_read(a6xx_gpu, REG_A7XX_CX_MISC_SW_FUSE_VALUE);
> >
> > This register isn't accessible with the current sm8650.dtsi. Since DT
> > and driver are going through different trees, please add safety guards
> > here, so that the driver doesn't crash if used with older dtsi
> > (not to mention that dts is considered to be an ABI and newer kernels
> > are supposed not to break with older DT files).
>
> I'd be happy if older kernels consistently worked with newer dtb, the
> other direction is too much to ask.

Well, we guarantee that newer kernels work with older dts.

> If necessary we can ask for ack
> to land the dts fix thru msm-next somehow, but since the gpu is newly
> enabled device landing in the same merge window I think that is not
> necessary.

This might work too.

--
With best wishes
Dmitry