Skip to contentSkip to conversation

au1100fb.c info->var.rotate fix

PATCH New Rodolfo Giometti 1 participant 1 message Jul 12, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 au1100fb.c info->var.rotate fix

Hello,

here a little patch to fix "info->var.rotate" data settings.

This info should be deduced directly from "fbdev->panel->control_base" defined into au1100fb.h.

Ciao,

Rodolfo

Signature · 4 lines
GNU/Linux Solutions                  e-mail:    [email protected]
Linux Device Driver                             [email protected]
Embedded Systems                     		[email protected]
UNIX programming                     phone:     +39 349 2432127
drivers/video/au1100fb.c +3 -2
index f492fe8..dc5a673 100644
@@ -177,10 +177,11 @@ int au1100fb_setmode(struct au1100fb_dev
 	}
 
 	info->screen_size = info->fix.line_length * info->var.yres_virtual;
+	info->var.rotate = ((fbdev->panel->control_base&LCD_CONTROL_SM_MASK) \
+				>> LCD_CONTROL_SM_BIT) * 90;
 
 	/* Determine BPP mode and format */
-	fbdev->regs->lcd_control = fbdev->panel->control_base |
-			    ((info->var.rotate/90) << LCD_CONTROL_SM_BIT);
+	fbdev->regs->lcd_control = fbdev->panel->control_base;
 
 	fbdev->regs->lcd_intenable = 0;
 	fbdev->regs->lcd_intstatus = 0;