From 8f6e4a50149835e49336fa50eaf502200003ca3e Mon Sep 17 00:00:00 2001 From: Petr Vandrovec Date: Mon, 18 Oct 2004 18:09:05 -0700 Subject: [PATCH] [PATCH] Assorted matroxfb fixes This small change does: (1) Properly document 'outputs' option. (2) Properly use accelerated characters drawing. fbcon used depth == 0 for character painting long ago, but it is fixed for several months. (3) Provide correct hints for fbcon about matroxfb/matroxfb_crtc2 hardware capabilities. Signed-off-by: Petr Vandrovec Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Documentation/fb/matroxfb.txt | 7 +++++++ drivers/video/matrox/matroxfb_accel.c | 2 +- drivers/video/matrox/matroxfb_base.c | 6 ++++++ drivers/video/matrox/matroxfb_crtc2.c | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/fb/matroxfb.txt b/Documentation/fb/matroxfb.txt index 621e3b3e40df3..ad7a67707d622 100644 --- a/Documentation/fb/matroxfb.txt +++ b/Documentation/fb/matroxfb.txt @@ -223,6 +223,13 @@ dfp:X - use settings X for digital flat panel interface. X is number from selects who is source of display clocks, whether G400, or panel. Default value is now read back from hardware - so you should specify this value only if you are also using `init' parameter. +outputs:XYZ - set mapping between CRTC and outputs. Each letter can have value + of 0 (for no CRTC), 1 (CRTC1) or 2 (CRTC2), and first letter corresponds + to primary analog output, second letter to the secondary analog output + and third letter to the DVI output. Default setting is 100 for + cards below G400 or G400 without DFP, 101 for G400 with DFP, and + 111 for G450 and G550. You can set mapping only on first card, + use matroxset for setting up other devices. vesa:X - selects startup videomode. X is number from 0 to 0x1FF, see table above for detailed explanation. Default is 640x480x8bpp if driver has 8bpp support. Otherwise first available of 640x350x4bpp, diff --git a/drivers/video/matrox/matroxfb_accel.c b/drivers/video/matrox/matroxfb_accel.c index d4cbaa4afa179..8f14c9b300c28 100644 --- a/drivers/video/matrox/matroxfb_accel.c +++ b/drivers/video/matrox/matroxfb_accel.c @@ -470,7 +470,7 @@ static void matroxfb_imageblit(struct fb_info* info, const struct fb_image* imag DBG_HEAVY(__FUNCTION__); - if (image->depth == 0) { + if (image->depth == 1) { u_int32_t fgx, bgx; fgx = ((u_int32_t*)info->pseudo_palette)[image->fg_color]; diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c index 820868cb8efc3..84eea6057cbc4 100644 --- a/drivers/video/matrox/matroxfb_base.c +++ b/drivers/video/matrox/matroxfb_base.c @@ -1750,6 +1750,12 @@ static int initMatrox2(WPMINFO struct board* b){ 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 */ ACCESS_FBINFO(video.len_usable) &= PAGE_MASK; fb_alloc_cmap(&ACCESS_FBINFO(fbcon.cmap), 256, 1); diff --git a/drivers/video/matrox/matroxfb_crtc2.c b/drivers/video/matrox/matroxfb_crtc2.c index 75d19696ffe49..c5230bbe1da41 100644 --- a/drivers/video/matrox/matroxfb_crtc2.c +++ b/drivers/video/matrox/matroxfb_crtc2.c @@ -603,6 +603,8 @@ static int matroxfb_dh_regit(CPMINFO struct matroxfb_dh_fb_info* m2info) { 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); -- 2.53.0