|
@@ -3043,6 +3043,43 @@ static void fbcon_new_modelist(struct fb_info *info)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void fbcon_get_requirement(struct fb_info *info,
|
|
|
|
+ struct fb_blit_caps *caps)
|
|
|
|
+{
|
|
|
|
+ struct vc_data *vc;
|
|
|
|
+ struct display *p;
|
|
|
|
+ int charcnt;
|
|
|
|
+
|
|
|
|
+ if (caps->flags) {
|
|
|
|
+ int i;
|
|
|
|
+
|
|
|
|
+ for (i = first_fb_vc; i <= last_fb_vc; i++) {
|
|
|
|
+ vc = vc_cons[i].d;
|
|
|
|
+ if (vc && vc->vc_mode == KD_TEXT) {
|
|
|
|
+ p = &fb_display[i];
|
|
|
|
+ caps->x |= 1 << (vc->vc_font.width - 1);
|
|
|
|
+ caps->y |= 1 << (vc->vc_font.height - 1);
|
|
|
|
+ charcnt = (p->userfont) ?
|
|
|
|
+ FNTCHARCNT(p->fontdata) : 256;
|
|
|
|
+ if (caps->len < charcnt)
|
|
|
|
+ caps->len = charcnt;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ vc = vc_cons[fg_console].d;
|
|
|
|
+
|
|
|
|
+ if (vc && vc->vc_mode == KD_TEXT) {
|
|
|
|
+ p = &fb_display[fg_console];
|
|
|
|
+ caps->x |= 1 << (vc->vc_font.width - 1);
|
|
|
|
+ caps->y |= 1 << (vc->vc_font.height - 1);
|
|
|
|
+ charcnt = (p->userfont) ?
|
|
|
|
+ FNTCHARCNT(p->fontdata) : 256;
|
|
|
|
+ if (caps->len < charcnt)
|
|
|
|
+ caps->len = charcnt;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
static int fbcon_event_notify(struct notifier_block *self,
|
|
static int fbcon_event_notify(struct notifier_block *self,
|
|
unsigned long action, void *data)
|
|
unsigned long action, void *data)
|
|
{
|
|
{
|
|
@@ -3050,6 +3087,7 @@ static int fbcon_event_notify(struct notifier_block *self,
|
|
struct fb_info *info = event->info;
|
|
struct fb_info *info = event->info;
|
|
struct fb_videomode *mode;
|
|
struct fb_videomode *mode;
|
|
struct fb_con2fbmap *con2fb;
|
|
struct fb_con2fbmap *con2fb;
|
|
|
|
+ struct fb_blit_caps *caps;
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -3098,6 +3136,10 @@ static int fbcon_event_notify(struct notifier_block *self,
|
|
case FB_EVENT_NEW_MODELIST:
|
|
case FB_EVENT_NEW_MODELIST:
|
|
fbcon_new_modelist(info);
|
|
fbcon_new_modelist(info);
|
|
break;
|
|
break;
|
|
|
|
+ case FB_EVENT_GET_REQ:
|
|
|
|
+ caps = event->data;
|
|
|
|
+ fbcon_get_requirement(info, caps);
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
|
|
|
|
done:
|
|
done:
|