1
Cuando el tamaño de la ventana de la interfaz de nuestra aplicación es el mismo que el tamaño de la pantalla LCD, si no se quita el cursor, un cursor en la esquina superior izquierda seguirá parpadeando, lo cual no es hermoso. Pero puede mostrar si el kernel no funciona. En circunstancias normales se eliminará.
2
Archivos principalmente revisados:
./drivers/video/console/fbcon.c
Simplemente anote la implementación de las siguientes dos funciones.
Eliminar visualización del cursor
static void fb_flashcursor(struct work_struct *work)
{
#if 0
struct fb_info *info = container_of(work, struct fb_info, queue);
struct fbcon_ops *ops = info->fbcon_par;
struct vc_data *vc = NULL;
int c;
int mode;
console_lock();
if (ops && ops->currcon != -1)
vc = vc_cons[ops->currcon].d;
if (!vc || !CON_IS_VISIBLE(vc) ||
registered_fb[con2fb_map[vc->vc_num]] != info ||
vc->vc_deccm != 1) {
console_unlock();
return;
}
c = scr_readw((u16 *) vc->vc_pos);
mode = (!ops->cursor_flash || ops->cursor_state.enable) ?
CM_ERASE : CM_DRAW;
ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1),
get_color(vc, info, c, 0));
console_unlock();
#endif
}
Quitar el cursor parpadeando
static void fbcon_cursor(struct vc_data *vc, int mode)
{
#if 0
struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
struct fbcon_ops *ops = info->fbcon_par;
int y;
int c = scr_readw((u16 *) vc->vc_pos);
if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
return;
if (vc->vc_cursor_type & 0x10)
fbcon_del_cursor_timer(info);
else
fbcon_add_cursor_timer(info);
ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1;
if (mode & CM_SOFTBACK) {
mode &= ~CM_SOFTBACK;
y = softback_lines;
} else {
if (softback_lines)
fbcon_set_origin(vc);
y = 0;
}
ops->cursor(vc, info, mode, y, get_color(vc, info, c, 1),
get_color(vc, info, c, 0));
vbl_cursor_cnt = CURSOR_DRAW_DELAY;
#endif
}