Skip to content

Commit

Permalink
Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6 in…
Browse files Browse the repository at this point in the history
…to fbdev-next
  • Loading branch information
Florian Tobias Schandinat authored and Florian Tobias Schandinat committed Oct 4, 2011
2 parents 4d74080 + 4ce36bb commit 6488867
Show file tree
Hide file tree
Showing 15 changed files with 391 additions and 916 deletions.
34 changes: 12 additions & 22 deletions drivers/video/via/dvi.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,30 +172,20 @@ static int tmds_register_read_bytes(int index, u8 *buff, int buff_len)
}

/* DVI Set Mode */
void viafb_dvi_set_mode(struct VideoModeTable *mode, int mode_bpp,
int set_iga)
void viafb_dvi_set_mode(const struct fb_var_screeninfo *var, int iga)
{
struct VideoModeTable *rb_mode;
struct crt_mode_table *pDviTiming;
unsigned long desirePixelClock, maxPixelClock;
pDviTiming = mode->crtc;
desirePixelClock = pDviTiming->refresh_rate
* pDviTiming->crtc.hor_total * pDviTiming->crtc.ver_total
/ 1000000;
maxPixelClock = (unsigned long)viaparinfo->
tmds_setting_info->max_pixel_clock;

DEBUG_MSG(KERN_INFO "\nDVI_set_mode!!\n");

if ((maxPixelClock != 0) && (desirePixelClock > maxPixelClock)) {
rb_mode = viafb_get_rb_mode(mode->crtc[0].crtc.hor_addr,
mode->crtc[0].crtc.ver_addr);
if (rb_mode) {
mode = rb_mode;
pDviTiming = rb_mode->crtc;
}
struct fb_var_screeninfo dvi_var = *var;
struct crt_mode_table *rb_mode;
int maxPixelClock;

maxPixelClock = viaparinfo->shared->tmds_setting_info.max_pixel_clock;
if (maxPixelClock && PICOS2KHZ(var->pixclock) / 1000 > maxPixelClock) {
rb_mode = viafb_get_best_rb_mode(var->xres, var->yres, 60);
if (rb_mode)
viafb_fill_var_timing_info(&dvi_var, rb_mode);
}
viafb_fill_crtc_timing(pDviTiming, mode, mode_bpp / 8, set_iga);

viafb_fill_crtc_timing(&dvi_var, iga);
}

/* Sense DVI Connector */
Expand Down
3 changes: 1 addition & 2 deletions drivers/video/via/dvi.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ void viafb_dvi_enable(void);
bool __devinit viafb_tmds_trasmitter_identify(void);
void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip,
struct tmds_setting_information *tmds_setting);
void viafb_dvi_set_mode(struct VideoModeTable *videoMode, int mode_bpp,
int set_iga);
void viafb_dvi_set_mode(const struct fb_var_screeninfo *var, int iga);

#endif /* __DVI_H__ */
2 changes: 2 additions & 0 deletions drivers/video/via/global.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ int viafb_LCD_ON ;
int viafb_LCD2_ON;
int viafb_SAMM_ON;
int viafb_dual_fb;
unsigned int viafb_second_xres = 640;
unsigned int viafb_second_yres = 480;
int viafb_hotplug_Xres = 640;
int viafb_hotplug_Yres = 480;
int viafb_hotplug_bpp = 32;
Expand Down
2 changes: 2 additions & 0 deletions drivers/video/via/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ extern int viafb_lcd_dsp_method;
extern int viafb_lcd_mode;

extern int viafb_CRT_ON;
extern unsigned int viafb_second_xres;
extern unsigned int viafb_second_yres;
extern int viafb_hotplug_Xres;
extern int viafb_hotplug_Yres;
extern int viafb_hotplug_bpp;
Expand Down
Loading

0 comments on commit 6488867

Please sign in to comment.