Re: [PATCH 16/16] drm/vc4: Call drm_dev_register() after all setup is done

2019-04-03 Thread Noralf Trønnes


Den 27.03.2019 17.36, skrev Eric Anholt:
> Noralf Trønnes  writes:
> 
>> drm_dev_register() initializes internal clients like bootsplash as the
>> last thing it does, so all setup needs to be done at this point.
>>
>> Fix by calling vc4_kms_load() before registering.
>> Also check the error code returned from that function.
>>
>> Cc: Eric Anholt 
>> Signed-off-by: Noralf Trønnes 
> 
> Reviewed-by: Eric Anholt 
> 

Applied to drm-misc-next.

Noralf.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 16/16] drm/vc4: Call drm_dev_register() after all setup is done

2019-03-27 Thread Eric Anholt
Noralf Trønnes  writes:

> drm_dev_register() initializes internal clients like bootsplash as the
> last thing it does, so all setup needs to be done at this point.
>
> Fix by calling vc4_kms_load() before registering.
> Also check the error code returned from that function.
>
> Cc: Eric Anholt 
> Signed-off-by: Noralf Trønnes 

Reviewed-by: Eric Anholt 


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [Intel-gfx] [PATCH 16/16] drm/vc4: Call drm_dev_register() after all setup is done

2019-03-26 Thread Daniel Vetter
On Tue, Mar 26, 2019 at 06:55:46PM +0100, Noralf Trønnes wrote:
> drm_dev_register() initializes internal clients like bootsplash as the
> last thing it does, so all setup needs to be done at this point.
> 
> Fix by calling vc4_kms_load() before registering.
> Also check the error code returned from that function.
> 
> Cc: Eric Anholt 
> Signed-off-by: Noralf Trønnes 

Looks like this has been slightly backwards ever since vc4 landed. I guess
would have needed the split between kms setup and fbdev setup (which is
now done with the generic fbdev).

Reviewed-by: Daniel Vetter 

> ---
>  drivers/gpu/drm/vc4/vc4_drv.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
> index 4daf44fd4548..ba87b2dfa767 100644
> --- a/drivers/gpu/drm/vc4/vc4_drv.c
> +++ b/drivers/gpu/drm/vc4/vc4_drv.c
> @@ -280,11 +280,13 @@ static int vc4_drm_bind(struct device *dev)
>  
>   drm_fb_helper_remove_conflicting_framebuffers(NULL, "vc4drmfb", false);
>  
> - ret = drm_dev_register(drm, 0);
> + ret = vc4_kms_load(drm);
>   if (ret < 0)
>   goto unbind_all;
>  
> - vc4_kms_load(drm);
> + ret = drm_dev_register(drm, 0);
> + if (ret < 0)
> + goto unbind_all;
>  
>   drm_fbdev_generic_setup(drm, 16);
>  
> -- 
> 2.20.1
> 
> ___
> Intel-gfx mailing list
> intel-...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 16/16] drm/vc4: Call drm_dev_register() after all setup is done

2019-03-26 Thread Noralf Trønnes
drm_dev_register() initializes internal clients like bootsplash as the
last thing it does, so all setup needs to be done at this point.

Fix by calling vc4_kms_load() before registering.
Also check the error code returned from that function.

Cc: Eric Anholt 
Signed-off-by: Noralf Trønnes 
---
 drivers/gpu/drm/vc4/vc4_drv.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 4daf44fd4548..ba87b2dfa767 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -280,11 +280,13 @@ static int vc4_drm_bind(struct device *dev)
 
drm_fb_helper_remove_conflicting_framebuffers(NULL, "vc4drmfb", false);
 
-   ret = drm_dev_register(drm, 0);
+   ret = vc4_kms_load(drm);
if (ret < 0)
goto unbind_all;
 
-   vc4_kms_load(drm);
+   ret = drm_dev_register(drm, 0);
+   if (ret < 0)
+   goto unbind_all;
 
drm_fbdev_generic_setup(drm, 16);
 
-- 
2.20.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel