From: Jani Nikula <jani.nikula@linux.intel.com>
To: Tom Li <tomli@tomli.me>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Yifeng Li <tomli@tomli.me>,
Teddy Wang <teddy.wang@siliconmotion.com>
Subject: Re: Is it possible to reset graphics controller on reboot in a framebuffer driver?
Date: Thu, 07 Mar 2019 11:00:49 +0200 [thread overview]
Message-ID: <871s3jm532.fsf@intel.com> (raw)
In-Reply-To: <20190307051641.GA7012@localhost.localdomain>
On Thu, 07 Mar 2019, Tom Li <tomli@tomli.me> wrote:
> Hi all.
>
> As you may have noticed, recently I've been working on a reworked version
> of sm712fb, and planned to convert it to a DRM/KMS driver. Besides using
> it on embedded/non-x86 systems, I thought it would be a good idea to support
> histrocial x86 laptops with this VGA chipset as well, so I've acquired a
> machine for testing.
>
> However, soon I found a nasty problem. The BIOS does not reset the chip
> on boot! Like most graphics controller of that era, sm712 chipset has a
> VGA compatible mode and a 2D framebuffer mode. The power-on default is
> VGA. The BIOS writer just assumed this, and does nothing to reinitialize
> it. If one uses the framebuffer driver under Linux, once the machine reboots,
> the entire LCD panel becomes a piece of garbage.
>
> AFAIK, the framebuffer driver would be running throughout the kernel's life-
> cycle, is it really possible to workaround this issue by restoring on VGA
> state upon reboot?
It's possible to do this using a reboot notifier. I am not sure if there
are better ways to achieve the same, but there's at least one example of
using reboot notifiers to achieve the exact same goal.
See drivers/video/fbdev/aty/atyfb_base.c, look for
register_reboot_notifier().
HTH,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
WARNING: multiple messages have this Message-ID
From: Jani Nikula <jani.nikula@linux.intel.com>
To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Yifeng Li <tomli@tomli.me>,
Teddy Wang <teddy.wang@siliconmotion.com>
Subject: Re: Is it possible to reset graphics controller on reboot in a framebuffer driver?
Date: Thu, 07 Mar 2019 08:58:57 +0000 [thread overview]
Message-ID: <871s3jm532.fsf@intel.com> (raw)
In-Reply-To: <20190307051641.GA7012@localhost.localdomain>
On Thu, 07 Mar 2019, Tom Li <tomli@tomli.me> wrote:
> Hi all.
>
> As you may have noticed, recently I've been working on a reworked version
> of sm712fb, and planned to convert it to a DRM/KMS driver. Besides using
> it on embedded/non-x86 systems, I thought it would be a good idea to support
> histrocial x86 laptops with this VGA chipset as well, so I've acquired a
> machine for testing.
>
> However, soon I found a nasty problem. The BIOS does not reset the chip
> on boot! Like most graphics controller of that era, sm712 chipset has a
> VGA compatible mode and a 2D framebuffer mode. The power-on default is
> VGA. The BIOS writer just assumed this, and does nothing to reinitialize
> it. If one uses the framebuffer driver under Linux, once the machine reboots,
> the entire LCD panel becomes a piece of garbage.
>
> AFAIK, the framebuffer driver would be running throughout the kernel's life-
> cycle, is it really possible to workaround this issue by restoring on VGA
> state upon reboot?
It's possible to do this using a reboot notifier. I am not sure if there
are better ways to achieve the same, but there's at least one example of
using reboot notifiers to achieve the exact same goal.
See drivers/video/fbdev/aty/atyfb_base.c, look for
register_reboot_notifier().
HTH,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
WARNING: multiple messages have this Message-ID
From: Jani Nikula <jani.nikula@linux.intel.com>
To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Yifeng Li <tomli@tomli.me>,
Teddy Wang <teddy.wang@siliconmotion.com>
Subject: Re: Is it possible to reset graphics controller on reboot in a framebuffer driver?
Date: Thu, 07 Mar 2019 11:00:49 +0200 [thread overview]
Message-ID: <871s3jm532.fsf@intel.com> (raw)
In-Reply-To: <20190307051641.GA7012@localhost.localdomain>
On Thu, 07 Mar 2019, Tom Li <tomli@tomli.me> wrote:
> Hi all.
>
> As you may have noticed, recently I've been working on a reworked version
> of sm712fb, and planned to convert it to a DRM/KMS driver. Besides using
> it on embedded/non-x86 systems, I thought it would be a good idea to support
> histrocial x86 laptops with this VGA chipset as well, so I've acquired a
> machine for testing.
>
> However, soon I found a nasty problem. The BIOS does not reset the chip
> on boot! Like most graphics controller of that era, sm712 chipset has a
> VGA compatible mode and a 2D framebuffer mode. The power-on default is
> VGA. The BIOS writer just assumed this, and does nothing to reinitialize
> it. If one uses the framebuffer driver under Linux, once the machine reboots,
> the entire LCD panel becomes a piece of garbage.
>
> AFAIK, the framebuffer driver would be running throughout the kernel's life-
> cycle, is it really possible to workaround this issue by restoring on VGA
> state upon reboot?
It's possible to do this using a reboot notifier. I am not sure if there
are better ways to achieve the same, but there's at least one example of
using reboot notifiers to achieve the exact same goal.
See drivers/video/fbdev/aty/atyfb_base.c, look for
register_reboot_notifier().
HTH,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2019-03-07 8:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-07 5:16 Is it possible to reset graphics controller on reboot in a framebuffer driver? Tom Li
2019-03-07 5:16 ` Tom Li
2019-03-07 8:58 ` Jani Nikula [this message]
2019-03-07 9:00 ` Jani Nikula
2019-03-07 9:00 ` Jani Nikula
2019-03-07 9:39 ` Geert Uytterhoeven
2019-03-07 9:39 ` Geert Uytterhoeven
2019-03-07 9:39 ` Geert Uytterhoeven
2019-03-07 21:38 ` Tom Li
2019-03-07 21:38 ` Tom Li
2019-03-08 9:13 ` Geert Uytterhoeven
2019-03-08 9:13 ` Geert Uytterhoeven
2019-03-08 10:35 ` Tom Li
2019-03-08 10:35 ` Tom Li
2019-03-12 9:19 ` Tom Li
2019-03-12 9:19 ` Tom Li
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=871s3jm532.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=teddy.wang@siliconmotion.com \
--cc=tomli@tomli.me \
/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.