Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dcfe2666ffd6316b764801db82092bc62db56e6f
Commit:     dcfe2666ffd6316b764801db82092bc62db56e6f
Parent:     9791d763de8cca82b42a7a579e031db78e8011ff
Author:     Geert Uytterhoeven <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 12 00:55:21 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Feb 12 09:48:44 2007 -0800

    [PATCH] fb_videomode_to_var: reset virtual screen parameters
    
    fb_videomode_to_var(): reset the virtual screen parameters when converting
    from an fb_videomode to an fb_var_screeninfo.
    
    Without this the old virtual screen parameters are kept.  Hence you cannot
    switch to a video mode with a lower resolution on frame buffer devices that
    don't support virtual screens and panning, as values are not supposed to be
    rounded down when they don't fit.
    
    I also reordered the assignments to match the order of the individual 
members.
    
    Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]>
    Cc: James Simmons <[EMAIL PROTECTED]>
    Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Cc: Paul Mackerras <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/video/modedb.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index 61fc6cd..5162eab 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -716,13 +716,17 @@ void fb_videomode_to_var(struct fb_var_screeninfo *var,
 {
        var->xres = mode->xres;
        var->yres = mode->yres;
+       var->xres_virtual = mode->xres;
+       var->yres_virtual = mode->yres;
+       var->xoffset = 0;
+       var->yoffset = 0;
        var->pixclock = mode->pixclock;
        var->left_margin = mode->left_margin;
-       var->hsync_len = mode->hsync_len;
-       var->vsync_len = mode->vsync_len;
        var->right_margin = mode->right_margin;
        var->upper_margin = mode->upper_margin;
        var->lower_margin = mode->lower_margin;
+       var->hsync_len = mode->hsync_len;
+       var->vsync_len = mode->vsync_len;
        var->sync = mode->sync;
        var->vmode = mode->vmode & FB_VMODE_MASK;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to