Skip to content

Commit

Permalink
viafb: fix accel_flags check_var bug
Browse files Browse the repository at this point in the history
viafb: fix accel_flags check_var bug

In check_var we should check and modify the var given and not the
one which is currently active. So this code was obviously wrong.
Probably this was doing no harm because all acceleration functions
also check whether acceleration is possible. (otherwise I would
expect this to lead to a null pointer dereference)

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
  • Loading branch information
Florian Tobias Schandinat authored and Florian Tobias Schandinat committed Jul 23, 2010
1 parent cd58995 commit af29a5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ static int viafb_check_var(struct fb_var_screeninfo *var,

/* Adjust var according to our driver's own table */
viafb_fill_var_timing_info(var, viafb_refresh, vmode_entry);
if (info->var.accel_flags & FB_ACCELF_TEXT &&
if (var->accel_flags & FB_ACCELF_TEXT &&
!ppar->shared->vdev->engine_mmio)
info->var.accel_flags = 0;
var->accel_flags = 0;

return 0;
}
Expand Down

0 comments on commit af29a5b

Please sign in to comment.