[Freedreno] [PATCH 6/6] drm/msm/gpu: add ocmem init/cleanup functions
Brian Masney
masneyb at onstation.org
Mon Jun 17 00:18:51 UTC 2019
Hi Bjorn,
On Sun, Jun 16, 2019 at 11:06:33AM -0700, Bjorn Andersson wrote:
> > diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> > index 6f7f4114afcf..e0a9409c8a32 100644
> > --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> > +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
> > @@ -29,6 +29,10 @@
> > #include "msm_gem.h"
> > #include "msm_mmu.h"
> >
> > +#ifdef CONFIG_QCOM_OCMEM
> > +# include <soc/qcom/ocmem.h>
> > +#endif
>
> This file exists (after the previous patch), so no need to make its
> inclusion conditional.
>
> > +
> > static bool zap_available = true;
> >
> > static int zap_shader_load_mdt(struct msm_gpu *gpu, const char *fwname,
> > @@ -897,6 +901,43 @@ static int adreno_get_pwrlevels(struct device *dev,
> > return 0;
> > }
> >
> > +int adreno_gpu_ocmem_init(struct device *dev, struct adreno_gpu *adreno_gpu,
> > + struct adreno_ocmem *adreno_ocmem)
> > +{
> > +#ifdef CONFIG_QCOM_OCMEM
>
> No need to make this conditional.
I have these #ifdefs for the a5xx and a6xx GPUs that don't have ocmem
in the SoC. Without the #ifdefs, those systems would need to have the
ocmem driver in their kernel.
Thanks for the quick review on the patch set!
Brian
More information about the Freedreno
mailing list