All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, Sean Paul <sean@poorly.run>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm: mcde: Fix display initialization problem
Date: Sun, 14 Jun 2020 09:44:41 +0200	[thread overview]
Message-ID: <20200614074441.GA220677@ravnborg.org> (raw)
In-Reply-To: <20200613223027.4189309-1-linus.walleij@linaro.org>

Hi Linus.

On Sun, Jun 14, 2020 at 12:30:26AM +0200, Linus Walleij wrote:
> The following bug appeared in the MCDE driver/display
> initialization during the recent merge window.
> 
> First the place we call drm_fbdev_generic_setup() in the
> wrong place: this needs to be called AFTER calling
> drm_dev_register() else we get this splat:
> 
>  ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 1 at ../drivers/gpu/drm/drm_fb_helper.c:2198 drm_fbdev_generic_setup+0x164/0x1a8
> mcde a0350000.mcde: Device has not been registered.
> Modules linked in:
> Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support)
> [<c010e704>] (unwind_backtrace) from [<c010a86c>] (show_stack+0x10/0x14)
> [<c010a86c>] (show_stack) from [<c0414f38>] (dump_stack+0x9c/0xb0)
> [<c0414f38>] (dump_stack) from [<c0121c8c>] (__warn+0xb8/0xd0)
> [<c0121c8c>] (__warn) from [<c0121d18>] (warn_slowpath_fmt+0x74/0xb8)
> [<c0121d18>] (warn_slowpath_fmt) from [<c04b154c>] (drm_fbdev_generic_setup+0x164/0x1a8)
> [<c04b154c>] (drm_fbdev_generic_setup) from [<c04ed278>] (mcde_drm_bind+0xc4/0x160)
> [<c04ed278>] (mcde_drm_bind) from [<c04f06b8>] (try_to_bring_up_master+0x15c/0x1a4)
> (...)
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Yup, this is the right way to do it.

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

One small thing to consider, see below. But for another patch.

> ---
>  drivers/gpu/drm/mcde/mcde_drv.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
> index 84f3e2dbd77b..80082d6dce3a 100644
> --- a/drivers/gpu/drm/mcde/mcde_drv.c
> +++ b/drivers/gpu/drm/mcde/mcde_drv.c
> @@ -209,7 +209,6 @@ static int mcde_modeset_init(struct drm_device *drm)
>  
>  	drm_mode_config_reset(drm);
>  	drm_kms_helper_poll_init(drm);
> -	drm_fbdev_generic_setup(drm, 32);
>  
>  	return 0;
>  }
> @@ -264,6 +263,8 @@ static int mcde_drm_bind(struct device *dev)
>  	if (ret < 0)
>  		goto unbind;
>  
> +	drm_fbdev_generic_setup(drm, 32);
Consider using mode_config.preferred_depth, then you can pass 0 here.


> +
>  	return 0;
>  
>  unbind:
> -- 
> 2.26.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, Sean Paul <sean@poorly.run>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm: mcde: Fix display initialization problem
Date: Sun, 14 Jun 2020 09:44:41 +0200	[thread overview]
Message-ID: <20200614074441.GA220677@ravnborg.org> (raw)
In-Reply-To: <20200613223027.4189309-1-linus.walleij@linaro.org>

Hi Linus.

On Sun, Jun 14, 2020 at 12:30:26AM +0200, Linus Walleij wrote:
> The following bug appeared in the MCDE driver/display
> initialization during the recent merge window.
> 
> First the place we call drm_fbdev_generic_setup() in the
> wrong place: this needs to be called AFTER calling
> drm_dev_register() else we get this splat:
> 
>  ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 1 at ../drivers/gpu/drm/drm_fb_helper.c:2198 drm_fbdev_generic_setup+0x164/0x1a8
> mcde a0350000.mcde: Device has not been registered.
> Modules linked in:
> Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support)
> [<c010e704>] (unwind_backtrace) from [<c010a86c>] (show_stack+0x10/0x14)
> [<c010a86c>] (show_stack) from [<c0414f38>] (dump_stack+0x9c/0xb0)
> [<c0414f38>] (dump_stack) from [<c0121c8c>] (__warn+0xb8/0xd0)
> [<c0121c8c>] (__warn) from [<c0121d18>] (warn_slowpath_fmt+0x74/0xb8)
> [<c0121d18>] (warn_slowpath_fmt) from [<c04b154c>] (drm_fbdev_generic_setup+0x164/0x1a8)
> [<c04b154c>] (drm_fbdev_generic_setup) from [<c04ed278>] (mcde_drm_bind+0xc4/0x160)
> [<c04ed278>] (mcde_drm_bind) from [<c04f06b8>] (try_to_bring_up_master+0x15c/0x1a4)
> (...)
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Yup, this is the right way to do it.

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

One small thing to consider, see below. But for another patch.

> ---
>  drivers/gpu/drm/mcde/mcde_drv.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
> index 84f3e2dbd77b..80082d6dce3a 100644
> --- a/drivers/gpu/drm/mcde/mcde_drv.c
> +++ b/drivers/gpu/drm/mcde/mcde_drv.c
> @@ -209,7 +209,6 @@ static int mcde_modeset_init(struct drm_device *drm)
>  
>  	drm_mode_config_reset(drm);
>  	drm_kms_helper_poll_init(drm);
> -	drm_fbdev_generic_setup(drm, 32);
>  
>  	return 0;
>  }
> @@ -264,6 +263,8 @@ static int mcde_drm_bind(struct device *dev)
>  	if (ret < 0)
>  		goto unbind;
>  
> +	drm_fbdev_generic_setup(drm, 32);
Consider using mode_config.preferred_depth, then you can pass 0 here.


> +
>  	return 0;
>  
>  unbind:
> -- 
> 2.26.2
> 
> _______________________________________________
> 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

  parent reply	other threads:[~2020-06-14  7:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13 22:30 [PATCH 1/2] drm: mcde: Fix display initialization problem Linus Walleij
2020-06-13 22:30 ` Linus Walleij
2020-06-13 22:30 ` [PATCH 2/2] drm: mcde: Fix forgotten user of drm->dev_private Linus Walleij
2020-06-13 22:30   ` Linus Walleij
2020-06-14  7:48   ` Sam Ravnborg
2020-06-14  7:48     ` Sam Ravnborg
2020-06-14  7:44 ` Sam Ravnborg [this message]
2020-06-14  7:44   ` [PATCH 1/2] drm: mcde: Fix display initialization problem Sam Ravnborg
2020-06-14 21:29   ` Linus Walleij
2020-06-14 21:29     ` Linus Walleij
2020-06-15 15:51     ` Daniel Vetter
2020-06-15 15:51       ` Daniel Vetter
2020-06-15 23:31 ` Emil Velikov
2020-06-15 23:31   ` Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200614074441.GA220677@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=sean@poorly.run \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.