From: James Simmons <jsimmons@infradead.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave Jones <davej@codemonkey.org.uk>, <dank@reflexsecurity.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.0-test1-ac1 Matrox Compile Error
Date: Tue, 15 Jul 2003 19:36:24 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.44.0307151854100.7746-100000@phoenix.infradead.org> (raw)
In-Reply-To: <1058291363.3845.53.camel@dhcp22.swansea.linux.org.uk>
> > Also doing this kind of thing only covers up broken framebuffer
> > drivers. Unfortunetly its going to take me months to cleanup and make the
> > fbdev drivers behave right.
>
> We don't have months. Should we be talking about reverting to the rather
> solid 2.4 framebuffer side for 2.6 in this case ?
Its not that the 2.5.X framebuffer layer is not solid. Except for the
software cursor it behaves right. The issue I have is the quality of the
framebuffer drivers. Lets take a example. In the new api we have two new
functions called check_var and set_par. Check_var's job is to test a
passed in mode to see if the hardware can support it. It is not to alter
or change any hardware states. The second function set_par does change the
hardware state. Lets look at the Mach64 driver. Mind you it does work and
functions. We have
static int atyfb_check_var(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct atyfb_par *par = (struct atyfb_par *) info->par;
struct crtc crtc;
union aty_pll pll;
int err;
if ((err = aty_var_to_crtc(info, var, &crtc)) ||
(err = par->pll_ops->var_to_pll(info, var->pixclock,
var->bits_per_pixel, &pll)))
return err;
#if 0 /* fbmon is not done. uncomment for 2.5.x -brad */
if (!fbmon_valid_timings(var->pixclock, htotal, vtotal, info))
return -EINVAL;
#endif
aty_crtc_to_var(&crtc, var);
var->pixclock = par->pll_ops->pll_to_var(info, &pll);
return 0;
}
We can see here that we first pass var into aty_var_to_crtc to generate a
crtc struct. Then at the end we do the reverse and use that crtc to create
a var. This is horribly done. Now lets look at what is in set_par.
if ((err = aty_var_to_crtc(info, var, &par->crtc)) ||
(err = par->pll_ops->var_to_pll(info, var->pixclock,
var->bits_per_pixel, &par->pll)))
return err;
Its being called twice. Once in check_var and again in set_par. Mind you
this works but the implementation is horribly done. I see this done alot
in various drivers. The reason it was done this way was because people
wanted a quick port to the new api without thinking much about it.
What makes me sad is I added accel hooks to speed up the console but I
don't see anyone using there accel engines. Everyone is just using my soft
accel functions :-( Using the soft accel was to be the exception not the
rule.
next prev parent reply other threads:[~2003-07-15 18:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-15 16:03 2.6.0-test1-ac1 Matrox Compile Error Adam Voigt
2003-07-15 16:16 ` nick black
2003-07-15 16:40 ` James Simmons
2003-07-15 17:13 ` Dave Jones
2003-07-15 17:30 ` Alan Cox
2003-07-15 17:43 ` James Simmons
2003-07-15 17:49 ` Alan Cox
2003-07-15 18:36 ` James Simmons [this message]
2003-07-15 17:57 ` Dave Jones
2003-07-15 18:49 ` Jörn Engel
2003-07-15 19:13 ` Dave Jones
2003-07-15 19:28 ` Jörn Engel
2003-07-15 19:32 ` Dave Jones
2003-07-15 20:00 ` Jörn Engel
2003-07-17 17:03 ` James Simmons
2003-07-17 17:07 ` Dave Jones
2003-07-17 17:37 ` James Simmons
2003-07-15 17:02 ` Adam Voigt
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=Pine.LNX.4.44.0307151854100.7746-100000@phoenix.infradead.org \
--to=jsimmons@infradead.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dank@reflexsecurity.com \
--cc=davej@codemonkey.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).