aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonino Daplas <adaplas@hotpop.com>2005-03-30 16:48:17 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-30 16:48:17 -0800
commitd7329205e5ad699005f3129c8c078aa86dbc51a3 (patch)
tree38fd27da0c4d47fc872dd7701dd717d59ef56663
parent8423c85771f3bf675659acb2ae202fff17e6cb93 (diff)
downloadhistory-d7329205e5ad699005f3129c8c078aa86dbc51a3.tar.gz
[PATCH] neofb: Set hwaccel flags properly
Not all neomagic chipsets are capable of hardware acceleration. Set the hwaccel flags only for chipsets that can do so. From: Antonino Daplas <adaplas@pol.net> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/video/neofb.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index e46b8bcab0c7c7..5d424a30270acd 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -2030,6 +2030,7 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
par->internal_display = internal;
par->external_display = external;
+ info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
switch (info->fix.accel) {
case FB_ACCEL_NEOMAGIC_NM2070:
@@ -2049,15 +2050,27 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
break;
case FB_ACCEL_NEOMAGIC_NM2200:
sprintf(info->fix.id, "MagicGraph 256AV");
+ info->flags |= FBINFO_HWACCEL_IMAGEBLIT |
+ FBINFO_HWACCEL_COPYAREA |
+ FBINFO_HWACCEL_FILLRECT;
break;
case FB_ACCEL_NEOMAGIC_NM2230:
sprintf(info->fix.id, "MagicGraph 256AV+");
+ info->flags |= FBINFO_HWACCEL_IMAGEBLIT |
+ FBINFO_HWACCEL_COPYAREA |
+ FBINFO_HWACCEL_FILLRECT;
break;
case FB_ACCEL_NEOMAGIC_NM2360:
sprintf(info->fix.id, "MagicGraph 256ZX");
+ info->flags |= FBINFO_HWACCEL_IMAGEBLIT |
+ FBINFO_HWACCEL_COPYAREA |
+ FBINFO_HWACCEL_FILLRECT;
break;
case FB_ACCEL_NEOMAGIC_NM2380:
sprintf(info->fix.id, "MagicGraph 256XL+");
+ info->flags |= FBINFO_HWACCEL_IMAGEBLIT |
+ FBINFO_HWACCEL_COPYAREA |
+ FBINFO_HWACCEL_FILLRECT;
break;
}
@@ -2069,9 +2082,6 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
info->fix.accel = id->driver_data;
info->fbops = &neofb_ops;
- info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
- FBINFO_HWACCEL_IMAGEBLIT | FBINFO_HWACCEL_COPYAREA |
- FBINFO_HWACCEL_COPYAREA;
info->pseudo_palette = (void *) (par + 1);
return info;
}