* [PATCH] drm/msm: call drm_mode_config_reset before drm_dev_register
@ 2020-06-10 0:46 Abhinav Kumar
2020-06-12 3:35 ` Rob Clark
0 siblings, 1 reply; 3+ messages in thread
From: Abhinav Kumar @ 2020-06-10 0:46 UTC (permalink / raw)
To: dri-devel; +Cc: linux-arm-msm, pdhaval, Abhinav Kumar, seanpaul, aravindh
As per the documentation of drm_dev_register, all drivers should
call drm_dev_register after all the initialization is completed.
This also means that drm_mode_config_reset should be done before
drm_dev_register.
Change the sequence to align with this documentation.
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
---
drivers/gpu/drm/msm/msm_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 29295dee2a2e..9e77cc7f1fa4 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -538,12 +538,12 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
}
}
+ drm_mode_config_reset(ddev);
+
ret = drm_dev_register(ddev, 0);
if (ret)
goto err_msm_uninit;
- drm_mode_config_reset(ddev);
-
#ifdef CONFIG_DRM_FBDEV_EMULATION
if (kms && fbdev)
priv->fbdev = msm_fbdev_init(ddev);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/msm: call drm_mode_config_reset before drm_dev_register
2020-06-10 0:46 [PATCH] drm/msm: call drm_mode_config_reset before drm_dev_register Abhinav Kumar
@ 2020-06-12 3:35 ` Rob Clark
2020-06-12 4:15 ` abhinavk
0 siblings, 1 reply; 3+ messages in thread
From: Rob Clark @ 2020-06-12 3:35 UTC (permalink / raw)
To: Abhinav Kumar; +Cc: linux-arm-msm, dri-devel, pdhaval, Sean Paul, aravindh
On Tue, Jun 9, 2020 at 5:47 PM Abhinav Kumar <abhinavk@codeaurora.org> wrote:
>
> As per the documentation of drm_dev_register, all drivers should
> call drm_dev_register after all the initialization is completed.
> This also means that drm_mode_config_reset should be done before
> drm_dev_register.
>
> Change the sequence to align with this documentation.
>
> Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
I assume this is just a cleanup you noticed, and not fixing a bug you
are hitting (in which case I'll pick it up next merge window, rather
than -fixes)
Reviewed-by: Rob Clark <robdclark@gmail.com>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 29295dee2a2e..9e77cc7f1fa4 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -538,12 +538,12 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
> }
> }
>
> + drm_mode_config_reset(ddev);
> +
> ret = drm_dev_register(ddev, 0);
> if (ret)
> goto err_msm_uninit;
>
> - drm_mode_config_reset(ddev);
> -
> #ifdef CONFIG_DRM_FBDEV_EMULATION
> if (kms && fbdev)
> priv->fbdev = msm_fbdev_init(ddev);
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/msm: call drm_mode_config_reset before drm_dev_register
2020-06-12 3:35 ` Rob Clark
@ 2020-06-12 4:15 ` abhinavk
0 siblings, 0 replies; 3+ messages in thread
From: abhinavk @ 2020-06-12 4:15 UTC (permalink / raw)
To: Rob Clark; +Cc: linux-arm-msm, pdhaval, Sean Paul, dri-devel, aravindh
Hi Rob
Thanks for the review.
Yes, this was a cleanup we noticed.
Abhinav
On 2020-06-11 20:35, Rob Clark wrote:
> On Tue, Jun 9, 2020 at 5:47 PM Abhinav Kumar <abhinavk@codeaurora.org>
> wrote:
>>
>> As per the documentation of drm_dev_register, all drivers should
>> call drm_dev_register after all the initialization is completed.
>> This also means that drm_mode_config_reset should be done before
>> drm_dev_register.
>>
>> Change the sequence to align with this documentation.
>>
>> Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
>
> I assume this is just a cleanup you noticed, and not fixing a bug you
> are hitting (in which case I'll pick it up next merge window, rather
> than -fixes)
>
> Reviewed-by: Rob Clark <robdclark@gmail.com>
>
>> ---
>> drivers/gpu/drm/msm/msm_drv.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/msm_drv.c
>> b/drivers/gpu/drm/msm/msm_drv.c
>> index 29295dee2a2e..9e77cc7f1fa4 100644
>> --- a/drivers/gpu/drm/msm/msm_drv.c
>> +++ b/drivers/gpu/drm/msm/msm_drv.c
>> @@ -538,12 +538,12 @@ static int msm_drm_init(struct device *dev,
>> struct drm_driver *drv)
>> }
>> }
>>
>> + drm_mode_config_reset(ddev);
>> +
>> ret = drm_dev_register(ddev, 0);
>> if (ret)
>> goto err_msm_uninit;
>>
>> - drm_mode_config_reset(ddev);
>> -
>> #ifdef CONFIG_DRM_FBDEV_EMULATION
>> if (kms && fbdev)
>> priv->fbdev = msm_fbdev_init(ddev);
>> --
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
>> Forum,
>> a Linux Foundation Collaborative Project
>>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-12 4:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 0:46 [PATCH] drm/msm: call drm_mode_config_reset before drm_dev_register Abhinav Kumar
2020-06-12 3:35 ` Rob Clark
2020-06-12 4:15 ` abhinavk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).