diff options
Diffstat (limited to 'drivers/video/atafb.c')
-rw-r--r-- | drivers/video/atafb.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index 018850c116c6..8cd279be74e5 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c | |||
@@ -2405,6 +2405,9 @@ static int do_fb_set_var(struct fb_var_screeninfo *var, int isactive) | |||
2405 | return 0; | 2405 | return 0; |
2406 | } | 2406 | } |
2407 | 2407 | ||
2408 | /* fbhw->encode_fix() must be called with fb_info->mm_lock held | ||
2409 | * if it is called after the register_framebuffer() - not a case here | ||
2410 | */ | ||
2408 | static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) | 2411 | static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) |
2409 | { | 2412 | { |
2410 | struct atafb_par par; | 2413 | struct atafb_par par; |
@@ -2414,7 +2417,8 @@ static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) | |||
2414 | if (err) | 2417 | if (err) |
2415 | return err; | 2418 | return err; |
2416 | memset(fix, 0, sizeof(struct fb_fix_screeninfo)); | 2419 | memset(fix, 0, sizeof(struct fb_fix_screeninfo)); |
2417 | return fbhw->encode_fix(fix, &par); | 2420 | err = fbhw->encode_fix(fix, &par); |
2421 | return err; | ||
2418 | } | 2422 | } |
2419 | 2423 | ||
2420 | static int atafb_get_var(struct fb_var_screeninfo *var, struct fb_info *info) | 2424 | static int atafb_get_var(struct fb_var_screeninfo *var, struct fb_info *info) |
@@ -2743,7 +2747,9 @@ static int atafb_set_par(struct fb_info *info) | |||
2743 | 2747 | ||
2744 | /* Decode wanted screen parameters */ | 2748 | /* Decode wanted screen parameters */ |
2745 | fbhw->decode_var(&info->var, par); | 2749 | fbhw->decode_var(&info->var, par); |
2750 | mutex_lock(&info->mm_lock); | ||
2746 | fbhw->encode_fix(&info->fix, par); | 2751 | fbhw->encode_fix(&info->fix, par); |
2752 | mutex_unlock(&info->mm_lock); | ||
2747 | 2753 | ||
2748 | /* Set new videomode */ | 2754 | /* Set new videomode */ |
2749 | ata_set_par(par); | 2755 | ata_set_par(par); |