[PATCH v2 4/5] drm/msm: move KMS aspace init to the separate helper
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Thu Jun 16 08:07:05 UTC 2022
On 16/06/2022 05:34, Stephen Boyd wrote:
> Quoting Dmitry Baryshkov (2022-05-04 17:16:04)
>> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
>> index a37a3bbc04d9..98ae0036ab57 100644
>> --- a/drivers/gpu/drm/msm/msm_drv.c
>> +++ b/drivers/gpu/drm/msm/msm_drv.c
>> @@ -262,6 +263,46 @@ static int msm_drm_uninit(struct device *dev)
>>
>> #include <linux/of_address.h>
>>
>> +struct msm_gem_address_space *msm_kms_init_aspace(struct drm_device *dev)
>> +{
> [...]
>> + }
>> +
>> + aspace = msm_gem_address_space_create(mmu, "mdp_kms",
>> + 0x1000, 0x100000000 - 0x1000);
>> + if (IS_ERR(aspace)) {
>> + mmu->funcs->destroy(mmu);
>
>
>> + return aspace;
>> + }
>> +
>> + return aspace;
>
> This can be 'return aspace' one time instead of two.
Yes. I was just always in favour of explicit error returns rather than
falling through. I'll send v2.
>
>> +}
>> +
>> bool msm_use_mmu(struct drm_device *dev)
>> {
>> struct msm_drm_private *priv = dev->dev_private;
--
With best wishes
Dmitry
More information about the dri-devel
mailing list