Messages in this thread Patch in this message | | | Date | Mon, 13 Sep 2004 20:31:50 +0200 | From | Petr Vandrovec <> | Subject | [PATCH] Report capabilities properly for matrox's fbdev |
| |
Hello, fbdev devices are now supposed to provide hints to fbcon about methods which are supported by hardware. When Antonio did his mass update during August, he kindly skipped over matroxfb - so here is missing part.
It sets (except its capabilities) also FBINFO_READS_FAST, as fbcon treats FBINFO_READS_FAST as a prerequisite for treating FBINFO_HWACCEL_COPYAREA seriously, and on matroxes with acceleration copyarea is much faster than imageblit (it slows down unaccelerated mode, but hopefully majority of users will run with acceleration enabled).
Second head is dumb and unaccelerated, so only panning is reported on it. Thanks, Petr Vandrovec
diff -urdN linux/drivers/video/matrox/matroxfb_base.c linux/drivers/video/matrox/matroxfb_base.c --- linux/drivers/video/matrox/matroxfb_base.c 2004-09-13 14:10:16.000000000 +0000 +++ linux/drivers/video/matrox/matroxfb_base.c 2004-09-13 18:28:28.000000000 +0000 @@ -1750,6 +1750,15 @@ ACCESS_FBINFO(fbcon.pseudo_palette) = ACCESS_FBINFO(cmap); /* after __init time we are like module... no logo */ ACCESS_FBINFO(fbcon.flags) = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT; + ACCESS_FBINFO(fbcon.flags) |= FBINFO_PARTIAL_PAN_OK | /* Prefer panning for scroll under MC viewer/edit */ + FBINFO_HWACCEL_COPYAREA | /* We have hw-assisted bmove */ + FBINFO_HWACCEL_FILLRECT | /* And fillrect */ + FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */ + FBINFO_HWACCEL_XPAN | /* And we support both horizontal */ + FBINFO_HWACCEL_YPAN; /* And vertical panning */ + /* We must set this, otherwise fbcon will not + use copyarea at all (it will insist on redraw) ! */ + ACCESS_FBINFO(fbcon.flags) |= FBINFO_READS_FAST; ACCESS_FBINFO(video.len_usable) &= PAGE_MASK; fb_alloc_cmap(&ACCESS_FBINFO(fbcon.cmap), 256, 1); diff -urdN linux/drivers/video/matrox/matroxfb_crtc2.c linux/drivers/video/matrox/matroxfb_crtc2.c --- linux/drivers/video/matrox/matroxfb_crtc2.c 2004-09-13 14:10:37.000000000 +0000 +++ linux/drivers/video/matrox/matroxfb_crtc2.c 2004-09-13 18:27:56.000000000 +0000 @@ -603,6 +603,8 @@ m2info->fbcon.fbops = &matroxfb_dh_ops; m2info->fbcon.flags = FBINFO_FLAG_DEFAULT; + m2info->fbcon.flags |= FBINFO_HWACCEL_XPAN | + FBINFO_HWACCEL_YPAN; m2info->fbcon.currcon = -1; m2info->fbcon.pseudo_palette = m2info->cmap; fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |