public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bram Stolk <bram@sara.nl>
To: linux-kernel@vger.kernel.org
Subject: fix for tridentfb.c usage on CRTs.
Date: Wed, 24 Dec 2003 10:27:04 +0100	[thread overview]
Message-ID: <20031224102704.72c00a87.bram@sara.nl> (raw)

Hello,


tridentfb.c is broken for non-FP (CRT) users, and it is not being maintained.
I believe that all kernels since 2.4.19 are affected, including 2.6.0

I mailed the maintainer in June 2003, and in October 2003, but
he does not respond.

What happens is this:
All modes that exceed the native resolution of a flatpanel
are discarded. However, a CRT has native resolution set to 0, and
therefore, tridentfb.c cannot be used with a CRT.

The patch to make it work:

$ diff -c tridentfb.c tridentfb.orig 
*** tridentfb.c Wed Dec 24 10:08:44 2003
--- tridentfb.orig      Wed Dec 24 09:55:39 2003
***************
*** 723,729 ****
        if (bpp == 24 )
                bpp = var->bits_per_pixel = 32;
        /* check whether resolution fits on panel and in memory*/
!       if (flatpanel && nativex && var->xres > nativex)
                return -EINVAL;
        if (var->xres * var->yres_virtual * bpp/8 > info->fix.smem_len)
                return -EINVAL;
--- 723,729 ----
        if (bpp == 24 )
                bpp = var->bits_per_pixel = 32;
        /* check whether resolution fits on panel and in memory*/
!       if (var->xres > nativex)
                return -EINVAL;
        if (var->xres * var->yres_virtual * bpp/8 > info->fix.smem_len)
                return -EINVAL;


Also, the Documents/fb/ docs are out of date, with regard
to option passing.

And the comment in tridentfb.c
 * Parse user specified options (`video=trident:')
...is wrong.
Only 'video=tridentfb:' will work.

modedb.txt should include the 'tridentfb' target for video=
tridentfb.txt should be updated on how to pass parameters.

And last:
video=tridentfb:mode=800x600 does not work, as mode= is
not recognized. I think it should. Currently, you are forced to
skip the mode=, thus: video=tridentfb:800x600


  Bram Stolk

PS: Maintainers I tried to contact to fix this:
jani at iv.ro,
geert at linux-m68k.org
salvestrini at users.sourceforge.net
janim at users.sourceforge.net
Only salvestrini responded that jani is probably busy.

-- 
"For the costs of subsidized agriculture in the EU, we can have all 56 million
 European cows fly around the world. First Class." - J. Norberg

                 reply	other threads:[~2003-12-24  9:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20031224102704.72c00a87.bram@sara.nl \
    --to=bram@sara.nl \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox