Bug 8129 - kyrofb_check_var misses x-resolution and y-resolution setting?
Summary: kyrofb_check_var misses x-resolution and y-resolution setting?
Status: REJECTED INVALID
Alias: None
Product: Drivers
Classification: Unclassified
Component: Console/Framebuffers (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Antonino Daplas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-04 22:12 UTC by Shan
Modified: 2007-04-28 16:47 UTC (History)
1 user (show)

See Also:
Kernel Version: Linux 2.6.20
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Shan 2007-03-04 22:12:38 UTC
Distribution: Linux 2.6.20
Problem Description:

kyrofb_check_var (the function supposed to set up based video mode) seems to
forget set two framebuffer parameters: x-resolution and y-resolution.

The function is in File drivers/video/kyro/fbdev.c
399 static int kyrofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
400 {
401  	struct kyrofb_info *par = info->par;
...

In above function, almost every display-related fields (upper-margin,
left-margin, sync, etc.) are set for var based on info->par. But var->x_res and
var->y_res (x-resolution and y-resolution) are not. Why not use par->XRES and
par->YRES to set it?

Also the par->X_RES and par->Y_RES do get set in kyrofb_set_par (in the same
file), together with other field like par->HFP (right margin), HBP
(left_margin). I think check_var should take x,y-resolution from par.
Comment 1 Antonino Daplas 2007-03-04 22:40:36 UTC
If we get xres and yres from par, then mode changing will not work.  Not saying
that what kyrofb does is correct.  What it should do is for check_var to:

First, validate if the contents of var are okay; and if not
Secondly, replace the contents with values that matches xres and yres, and not
just get them blindly from par.

However, taking xres and yres from par is not correct.
Comment 2 Antonino Daplas 2007-04-28 16:47:23 UTC
Closing this bug.  What kyrofb does is not really up to specs, but is still
better than what is suggested. 

Note You need to log in before you can comment on or make changes to this bug.