Report capabilities properly for matrox's fbdev
PATCH 1/1 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
drivers/video/matrox/matroxfb_base.c +9 -0
@@ -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 );
drivers/video/matrox/matroxfb_crtc2.c +2 -0
@@ -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 );