All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Fabio Estevam <festevam@gmail.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Kees Cook <keescook@chromium.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	John Youn <John.Youn@synopsys.com>,
	Bing Yuan <Bing.Yuan@synopsys.com>,
	"linux-mediatek@lists.infradead.org" 
	<linux-mediatek@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: Kconfig CONFIG_FB dependency regression
Date: Thu, 3 Feb 2022 08:18:17 +0100	[thread overview]
Message-ID: <CAK8P3a27RtHxYwtj=rjxcDzkMdKhC-w9ho=SApHpczma_vU8JQ@mail.gmail.com> (raw)
In-Reply-To: <b44de208-6d5f-3fcd-0e36-f05745297747@synopsys.com>

On Thu, Feb 3, 2022 at 12:55 AM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> Arnd Bergmann wrote:
> > On Wed, Feb 2, 2022 at 1:14 AM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> >> Fabio Estevam wrote:
> >
> > CONFIG_FB should not normally be needed for booting, so unless
> > you have a graphical application in your initramfs that requires the /dev/fb0
> > device to work, it is not supposed to make a difference.
> >
>
> I'm not sure, but it seems like the setup we have isn't the only one
> that needed it. Fabio also noted that the imx_v6_v7_defconfig also needs
> to have CONFIG_FB set.

No, that one is different: the change for imx_v6_v7_defconfig was
done because they actually use a framebuffer console on some devices,
so the patch just adds the symbol to enable the drivers they are using.

This is expected with my original patch that doesn't implicitly enable
the framebuffer layer any more. What is not expected is for the kernel
to hang during boot as you reported for your unidentified platform.

> > Are there any other differences in your .config before and after the patch?
> > It's possible that you use some other driver that in turn depends on
> > CONFIG_FB. Does your machine have any graphical output device?
> > If yes, which driver do you use?
>
> I don't have the answer to those questions yet. Need more investigation.
> I'm new to this particular test setup.

Do you mean you don't know if there is a screen attached to the system?

> >
> > You may also want to make sure that you have 9d6366e743f3 ("drm:
> > fb_helper: improve CONFIG_FB dependency") in your kernel, which
> > fixes a minor problem with my original patch.
> >
>
> The issue also occurs in mainline, which has your minor fix commit
> above. The revert isn't clean for the latest kernel version. I also have
> to revert some of the changes along with CONFIG_FB. The revert looks
> more like this for the latest kernel:
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index b1f22e457fd0..7cbc733a8569 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -118,8 +118,9 @@ config DRM_DEBUG_MODESET_LOCK
>
>  config DRM_FBDEV_EMULATION
>         bool "Enable legacy fbdev support for your modesetting driver"
> -       depends on DRM_KMS_HELPER
> -       depends on FB=y || FB=DRM_KMS_HELPER
> +       depends on DRM
> +       select DRM_KMS_HELPER
> +       select FB
>         select FB_CFB_FILLRECT
>         select FB_CFB_COPYAREA
>         select FB_CFB_IMAGEBLIT
>
>
>
> I attached the configs for kernel v5.17-rc1. The "bad" config is without
> any revert, the "good" config is with the change above.

Looking at the config, I see that this is for an x86 machine,
and you have the FB_EFI driver and EFI_EARLYCON enabled.

What I suspec is going on is that you are looking at a screen rather
than a serial console, and the kernel doesn't actually hang but you
just don't see any more messages after the DRM driver takes
over from EFI_EARLYCON because there is no console driver.

In this case, what you see is the intended behavior, not a bug.
If you want a graphical console in your system, you need to
enable the support for this in your config.

       Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Fabio Estevam <festevam@gmail.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	 Kees Cook <keescook@chromium.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	 "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	John Youn <John.Youn@synopsys.com>,
	Bing Yuan <Bing.Yuan@synopsys.com>,
	 "linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	 "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: Kconfig CONFIG_FB dependency regression
Date: Thu, 3 Feb 2022 08:18:17 +0100	[thread overview]
Message-ID: <CAK8P3a27RtHxYwtj=rjxcDzkMdKhC-w9ho=SApHpczma_vU8JQ@mail.gmail.com> (raw)
In-Reply-To: <b44de208-6d5f-3fcd-0e36-f05745297747@synopsys.com>

On Thu, Feb 3, 2022 at 12:55 AM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> Arnd Bergmann wrote:
> > On Wed, Feb 2, 2022 at 1:14 AM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> >> Fabio Estevam wrote:
> >
> > CONFIG_FB should not normally be needed for booting, so unless
> > you have a graphical application in your initramfs that requires the /dev/fb0
> > device to work, it is not supposed to make a difference.
> >
>
> I'm not sure, but it seems like the setup we have isn't the only one
> that needed it. Fabio also noted that the imx_v6_v7_defconfig also needs
> to have CONFIG_FB set.

No, that one is different: the change for imx_v6_v7_defconfig was
done because they actually use a framebuffer console on some devices,
so the patch just adds the symbol to enable the drivers they are using.

This is expected with my original patch that doesn't implicitly enable
the framebuffer layer any more. What is not expected is for the kernel
to hang during boot as you reported for your unidentified platform.

> > Are there any other differences in your .config before and after the patch?
> > It's possible that you use some other driver that in turn depends on
> > CONFIG_FB. Does your machine have any graphical output device?
> > If yes, which driver do you use?
>
> I don't have the answer to those questions yet. Need more investigation.
> I'm new to this particular test setup.

Do you mean you don't know if there is a screen attached to the system?

> >
> > You may also want to make sure that you have 9d6366e743f3 ("drm:
> > fb_helper: improve CONFIG_FB dependency") in your kernel, which
> > fixes a minor problem with my original patch.
> >
>
> The issue also occurs in mainline, which has your minor fix commit
> above. The revert isn't clean for the latest kernel version. I also have
> to revert some of the changes along with CONFIG_FB. The revert looks
> more like this for the latest kernel:
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index b1f22e457fd0..7cbc733a8569 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -118,8 +118,9 @@ config DRM_DEBUG_MODESET_LOCK
>
>  config DRM_FBDEV_EMULATION
>         bool "Enable legacy fbdev support for your modesetting driver"
> -       depends on DRM_KMS_HELPER
> -       depends on FB=y || FB=DRM_KMS_HELPER
> +       depends on DRM
> +       select DRM_KMS_HELPER
> +       select FB
>         select FB_CFB_FILLRECT
>         select FB_CFB_COPYAREA
>         select FB_CFB_IMAGEBLIT
>
>
>
> I attached the configs for kernel v5.17-rc1. The "bad" config is without
> any revert, the "good" config is with the change above.

Looking at the config, I see that this is for an x86 machine,
and you have the FB_EFI driver and EFI_EARLYCON enabled.

What I suspec is going on is that you are looking at a screen rather
than a serial console, and the kernel doesn't actually hang but you
just don't see any more messages after the DRM driver takes
over from EFI_EARLYCON because there is no console driver.

In this case, what you see is the intended behavior, not a bug.
If you want a graphical console in your system, you need to
enable the support for this in your config.

       Arnd

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Kees Cook <keescook@chromium.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Randy Dunlap <rdunlap@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	John Youn <John.Youn@synopsys.com>,
	Bing Yuan <Bing.Yuan@synopsys.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: Kconfig CONFIG_FB dependency regression
Date: Thu, 3 Feb 2022 08:18:17 +0100	[thread overview]
Message-ID: <CAK8P3a27RtHxYwtj=rjxcDzkMdKhC-w9ho=SApHpczma_vU8JQ@mail.gmail.com> (raw)
In-Reply-To: <b44de208-6d5f-3fcd-0e36-f05745297747@synopsys.com>

On Thu, Feb 3, 2022 at 12:55 AM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> Arnd Bergmann wrote:
> > On Wed, Feb 2, 2022 at 1:14 AM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> >> Fabio Estevam wrote:
> >
> > CONFIG_FB should not normally be needed for booting, so unless
> > you have a graphical application in your initramfs that requires the /dev/fb0
> > device to work, it is not supposed to make a difference.
> >
>
> I'm not sure, but it seems like the setup we have isn't the only one
> that needed it. Fabio also noted that the imx_v6_v7_defconfig also needs
> to have CONFIG_FB set.

No, that one is different: the change for imx_v6_v7_defconfig was
done because they actually use a framebuffer console on some devices,
so the patch just adds the symbol to enable the drivers they are using.

This is expected with my original patch that doesn't implicitly enable
the framebuffer layer any more. What is not expected is for the kernel
to hang during boot as you reported for your unidentified platform.

> > Are there any other differences in your .config before and after the patch?
> > It's possible that you use some other driver that in turn depends on
> > CONFIG_FB. Does your machine have any graphical output device?
> > If yes, which driver do you use?
>
> I don't have the answer to those questions yet. Need more investigation.
> I'm new to this particular test setup.

Do you mean you don't know if there is a screen attached to the system?

> >
> > You may also want to make sure that you have 9d6366e743f3 ("drm:
> > fb_helper: improve CONFIG_FB dependency") in your kernel, which
> > fixes a minor problem with my original patch.
> >
>
> The issue also occurs in mainline, which has your minor fix commit
> above. The revert isn't clean for the latest kernel version. I also have
> to revert some of the changes along with CONFIG_FB. The revert looks
> more like this for the latest kernel:
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index b1f22e457fd0..7cbc733a8569 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -118,8 +118,9 @@ config DRM_DEBUG_MODESET_LOCK
>
>  config DRM_FBDEV_EMULATION
>         bool "Enable legacy fbdev support for your modesetting driver"
> -       depends on DRM_KMS_HELPER
> -       depends on FB=y || FB=DRM_KMS_HELPER
> +       depends on DRM
> +       select DRM_KMS_HELPER
> +       select FB
>         select FB_CFB_FILLRECT
>         select FB_CFB_COPYAREA
>         select FB_CFB_IMAGEBLIT
>
>
>
> I attached the configs for kernel v5.17-rc1. The "bad" config is without
> any revert, the "good" config is with the change above.

Looking at the config, I see that this is for an x86 machine,
and you have the FB_EFI driver and EFI_EARLYCON enabled.

What I suspec is going on is that you are looking at a screen rather
than a serial console, and the kernel doesn't actually hang but you
just don't see any more messages after the DRM driver takes
over from EFI_EARLYCON because there is no console driver.

In this case, what you see is the intended behavior, not a bug.
If you want a graphical console in your system, you need to
enable the support for this in your config.

       Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: Fabio Estevam <festevam@gmail.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	 Kees Cook <keescook@chromium.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	 "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	John Youn <John.Youn@synopsys.com>,
	Bing Yuan <Bing.Yuan@synopsys.com>,
	 "linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	 "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: Kconfig CONFIG_FB dependency regression
Date: Thu, 3 Feb 2022 08:18:17 +0100	[thread overview]
Message-ID: <CAK8P3a27RtHxYwtj=rjxcDzkMdKhC-w9ho=SApHpczma_vU8JQ@mail.gmail.com> (raw)
In-Reply-To: <b44de208-6d5f-3fcd-0e36-f05745297747@synopsys.com>

On Thu, Feb 3, 2022 at 12:55 AM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> Arnd Bergmann wrote:
> > On Wed, Feb 2, 2022 at 1:14 AM Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> >> Fabio Estevam wrote:
> >
> > CONFIG_FB should not normally be needed for booting, so unless
> > you have a graphical application in your initramfs that requires the /dev/fb0
> > device to work, it is not supposed to make a difference.
> >
>
> I'm not sure, but it seems like the setup we have isn't the only one
> that needed it. Fabio also noted that the imx_v6_v7_defconfig also needs
> to have CONFIG_FB set.

No, that one is different: the change for imx_v6_v7_defconfig was
done because they actually use a framebuffer console on some devices,
so the patch just adds the symbol to enable the drivers they are using.

This is expected with my original patch that doesn't implicitly enable
the framebuffer layer any more. What is not expected is for the kernel
to hang during boot as you reported for your unidentified platform.

> > Are there any other differences in your .config before and after the patch?
> > It's possible that you use some other driver that in turn depends on
> > CONFIG_FB. Does your machine have any graphical output device?
> > If yes, which driver do you use?
>
> I don't have the answer to those questions yet. Need more investigation.
> I'm new to this particular test setup.

Do you mean you don't know if there is a screen attached to the system?

> >
> > You may also want to make sure that you have 9d6366e743f3 ("drm:
> > fb_helper: improve CONFIG_FB dependency") in your kernel, which
> > fixes a minor problem with my original patch.
> >
>
> The issue also occurs in mainline, which has your minor fix commit
> above. The revert isn't clean for the latest kernel version. I also have
> to revert some of the changes along with CONFIG_FB. The revert looks
> more like this for the latest kernel:
>
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index b1f22e457fd0..7cbc733a8569 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -118,8 +118,9 @@ config DRM_DEBUG_MODESET_LOCK
>
>  config DRM_FBDEV_EMULATION
>         bool "Enable legacy fbdev support for your modesetting driver"
> -       depends on DRM_KMS_HELPER
> -       depends on FB=y || FB=DRM_KMS_HELPER
> +       depends on DRM
> +       select DRM_KMS_HELPER
> +       select FB
>         select FB_CFB_FILLRECT
>         select FB_CFB_COPYAREA
>         select FB_CFB_IMAGEBLIT
>
>
>
> I attached the configs for kernel v5.17-rc1. The "bad" config is without
> any revert, the "good" config is with the change above.

Looking at the config, I see that this is for an x86 machine,
and you have the FB_EFI driver and EFI_EARLYCON enabled.

What I suspec is going on is that you are looking at a screen rather
than a serial console, and the kernel doesn't actually hang but you
just don't see any more messages after the DRM driver takes
over from EFI_EARLYCON because there is no console driver.

In this case, what you see is the intended behavior, not a bug.
If you want a graphical console in your system, you need to
enable the support for this in your config.

       Arnd

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

  parent reply	other threads:[~2022-02-03  7:18 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 23:01 Kconfig CONFIG_FB dependency regression Thinh Nguyen
2022-02-01 23:01 ` Thinh Nguyen
2022-02-01 23:01 ` Thinh Nguyen
2022-02-01 23:01 ` Thinh Nguyen
2022-02-01 23:06 ` Randy Dunlap
2022-02-01 23:06   ` Randy Dunlap
2022-02-01 23:06   ` Randy Dunlap
2022-02-01 23:06   ` Randy Dunlap
2022-02-01 23:59   ` Fabio Estevam
2022-02-01 23:59     ` Fabio Estevam
2022-02-01 23:59     ` Fabio Estevam
2022-02-01 23:59     ` Fabio Estevam
2022-02-02  0:14     ` Thinh Nguyen
2022-02-02  0:14       ` Thinh Nguyen
2022-02-02  0:14       ` Thinh Nguyen
2022-02-02  0:14       ` Thinh Nguyen
2022-02-02  7:46       ` Arnd Bergmann
2022-02-02  7:46         ` Arnd Bergmann
2022-02-02  7:46         ` Arnd Bergmann
2022-02-02  7:46         ` Arnd Bergmann
2022-02-02 23:55         ` Thinh Nguyen
2022-02-02 23:55           ` Thinh Nguyen
2022-02-02 23:55           ` Thinh Nguyen
2022-02-03  3:15           ` Randy Dunlap
2022-02-03  3:15             ` Randy Dunlap
2022-02-03  3:15             ` Randy Dunlap
2022-02-03  3:15             ` Randy Dunlap
2022-02-03  4:23             ` Thinh Nguyen
2022-02-03  4:23               ` Thinh Nguyen
2022-02-03  4:23               ` Thinh Nguyen
2022-02-03  4:23               ` Thinh Nguyen
2022-02-03  7:18           ` Arnd Bergmann [this message]
2022-02-03  7:18             ` Arnd Bergmann
2022-02-03  7:18             ` Arnd Bergmann
2022-02-03  7:18             ` Arnd Bergmann
2022-02-04  3:21             ` Thinh Nguyen
2022-02-04  3:21               ` Thinh Nguyen
2022-02-04  3:21               ` Thinh Nguyen
2022-02-04  3:21               ` Thinh Nguyen
2022-02-04  4:02               ` Randy Dunlap
2022-02-04  4:02                 ` Randy Dunlap
2022-02-04  4:02                 ` Randy Dunlap
2022-02-04  4:02                 ` Randy Dunlap
2022-02-08 20:10                 ` Thinh Nguyen
2022-02-08 20:10                   ` Thinh Nguyen
2022-02-08 20:10                   ` Thinh Nguyen
2022-02-08 20:10                   ` Thinh Nguyen
2022-02-08 20:45                   ` Randy Dunlap
2022-02-08 20:45                     ` Randy Dunlap
2022-02-08 20:45                     ` Randy Dunlap
2022-02-08 20:45                     ` Randy Dunlap
2022-02-08 22:42                     ` Thinh Nguyen
2022-02-08 22:42                       ` Thinh Nguyen
2022-02-08 22:42                       ` Thinh Nguyen
2022-02-08 22:42                       ` Thinh Nguyen
2022-02-09  7:06                       ` Arnd Bergmann
2022-02-09  7:06                         ` Arnd Bergmann
2022-02-09  7:06                         ` Arnd Bergmann
2022-02-09  7:06                         ` Arnd Bergmann
2022-02-15  2:52                         ` Thinh Nguyen
2022-02-15  2:52                           ` Thinh Nguyen
2022-02-15  2:52                           ` Thinh Nguyen
2022-02-15  2:52                           ` Thinh Nguyen

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='CAK8P3a27RtHxYwtj=rjxcDzkMdKhC-w9ho=SApHpczma_vU8JQ@mail.gmail.com' \
    --to=arnd@kernel.org \
    --cc=Bing.Yuan@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=rdunlap@infradead.org \
    /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.