[PATCH] drm/msm: allow returning NULL from crete_address_space
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Mon Sep 9 11:25:00 UTC 2024
On Mon, 9 Sept 2024 at 13:34, Konrad Dybcio <konradybcio at kernel.org> wrote:
>
> On 8.09.2024 7:59 PM, Dmitry Baryshkov wrote:
> > Under some circumstance
>
> Under what circumstances?
>
> This branch is only taken if there's a .create_private_address_space
> callback and it only seems to be there on a[67]xx.
Existing code doesn't. I stumbled upon it while debugging private
address space translation. And that's why I wrote 'it might be
required' rather than 'the function returns'.
So yes, there is no issue with the current code. And at the same time
not having this in place makes debugging more difficult.
> a6xx_create_address_space returns:
>
> - an ERR_PTR if msm_iommu_pagetable_create() fails
> - retval of msm_gem_address_space_create() otherwise
> - retval of msm_iommu_pagetable_create() is nullchecked here
> again because we apparently we want to be double sure
> - err_ptr(-enomem) is returned if allocating aspace fails
> - otherwise aspace is allocated somewhere
>
> Konrad
--
With best wishes
Dmitry
More information about the dri-devel
mailing list