lkml.org 
[lkml]   [2004]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: my opinion about VGA devices
    On Wed, 20 Oct 2004, Tomas Carnecky wrote:

    > Oliver Neukum wrote:
    >> Am Mittwoch, 20. Oktober 2004 00:10 schrieb Tomas Carnecky:
    >>
    >>> I think this would make the suspend/resume/access/switching etc problems
    >>> much easier to solve since the kernel module could tell the library to
    >>> stop drawing/accessing mmap'ed memory etc. (or if the OpenGL rendering is
    >>> done in the kernel module it could just discard the render commands).
    >>> Since the user has no direct access to mmap'ed memory and other critical
    >>> sections of the device, the driver can implement proper power managment
    >>> for suspend/resume etc.
    >>>
    >>> Well... that's it.. any comments? I'm sure you have.. :)
    >>
    >>
    >> You are making damn sure that there will be no useful bug reports
    >> about problems with resuming from S3.
    >>
    >
    > I guess that you are talking about the fact that displaying text messages
    > would be possible only after the first device driver has initialized and
    > registered with the kernel.
    >
    > You could do the printing in two stages: at the begining the same way as in
    > the current kernel, but as soon as the first driver is registered, the kernel
    > switches to the function provided by the driver.
    >
    > Something like this:
    >
    > void print_message(...)
    > {
    > if (no_module_registered) {
    > use_print_function_provided_by_the_kernel();
    > } else {
    > if (!printing_disabled) {
    > use_print_function_provided_by_the_driver_module();
    > } else {
    > /* printing disabled by the userspace, we are not
    > * allowed to touch the hardware */
    > }
    > }
    > }
    >
    > tom

    On ix86 machines, regardless of whatever code initialized the
    hardware, if the screen-card is not put into graphics mode,
    anybody can write characters and attributes at 0xb8000 directly
    to the screen. Even user-mode code can mmap() that area and write
    to it. So, the key seems to be to get out of graphics mode
    before suspend, and go back later after resume.


    Cheers,
    Dick Johnson
    Penguin : Linux version 2.6.9 on an i686 machine (5537.79 GrumpyMips).
    98.36% of all statistics are fiction.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:3.490 / U:0.216 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site