forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/video/fbdev/core/bitblit.c
....@@ -240,12 +240,15 @@
240240 struct fbcon_ops *ops = info->fbcon_par;
241241 unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
242242 int w = DIV_ROUND_UP(vc->vc_font.width, 8), c;
243
- int y = real_y(ops->p, vc->vc_y);
244
- int attribute, use_sw = (vc->vc_cursor_type & 0x10);
243
+ int y = real_y(ops->p, vc->state.y);
244
+ int attribute, use_sw = vc->vc_cursor_type & CUR_SW;
245245 int err = 1;
246246 char *src;
247247
248248 cursor.set = 0;
249
+
250
+ if (!vc->vc_font.data)
251
+ return;
249252
250253 c = scr_readw((u16 *) vc->vc_pos);
251254 attribute = get_attribute(info, c);
....@@ -277,10 +280,10 @@
277280 cursor.set |= FB_CUR_SETCMAP;
278281 }
279282
280
- if ((ops->cursor_state.image.dx != (vc->vc_font.width * vc->vc_x)) ||
283
+ if ((ops->cursor_state.image.dx != (vc->vc_font.width * vc->state.x)) ||
281284 (ops->cursor_state.image.dy != (vc->vc_font.height * y)) ||
282285 ops->cursor_reset) {
283
- ops->cursor_state.image.dx = vc->vc_font.width * vc->vc_x;
286
+ ops->cursor_state.image.dx = vc->vc_font.width * vc->state.x;
284287 ops->cursor_state.image.dy = vc->vc_font.height * y;
285288 cursor.set |= FB_CUR_SETPOS;
286289 }
....@@ -316,7 +319,7 @@
316319 ops->p->cursor_shape = vc->vc_cursor_type;
317320 cursor.set |= FB_CUR_SETSHAPE;
318321
319
- switch (ops->p->cursor_shape & CUR_HWMASK) {
322
+ switch (CUR_SIZE(ops->p->cursor_shape)) {
320323 case CUR_NONE:
321324 cur_height = 0;
322325 break;