|
From: Christian H. <ch...@os...> - 2000-06-02 09:36:48
|
On Wed, 31 May 2000, James Simmons wrote:
>
> > > > length = (xres_virtual+bpp-1)/bpp;
> > It is obviously wrong... For xres = 640 at 16bpp you should get
> > 1280 bytes and for 8bpp 640 bytes...
>
> Dah!! I don't know what I was thinking. I was just trying to figure what
> the orginal code was doing. Which I stil can't figure it out yet. Petr do
> you have a idea what Geert was thinking when he wrote that routine?
>
Okay ... has anybody tested vfb.c? I didn't. If it works, I don't know how,
because it computes the memory size with get_line_length() to test:
------ vfb.c ------ L245 ------
line_length = get_line_length(var->xres_virtual, var->bits_per_pixel);
if (line_length*var->yres_virtual > videomemorysize)
return -ENOMEM;
Any idea? Maybe nobody got a problem because the get_line_length()-function
always produces to small values to return ENOMEM - and the
default/module_param videomemorysize fitted.
But:
------ vfb.c ------ L506 ------
fix->line_length = get_line_length(var->xres_virtual,
var->bits_per_pixel);
would also 'encode' wrong values.
Christian.
|