forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/video/console/mdacon.c
....@@ -394,8 +394,10 @@
394394 (ch & 0x00ff) | attr;
395395 }
396396
397
-static u8 mdacon_build_attr(struct vc_data *c, u8 color, u8 intensity,
398
- u8 blink, u8 underline, u8 reverse, u8 italic)
397
+static u8 mdacon_build_attr(struct vc_data *c, u8 color,
398
+ enum vc_intensity intensity,
399
+ bool blink, bool underline, bool reverse,
400
+ bool italic)
399401 {
400402 /* The attribute is just a bit vector:
401403 *
....@@ -405,11 +407,11 @@
405407 * Bit 7 : blink
406408 */
407409
408
- return (intensity & 3) |
409
- ((underline & 1) << 2) |
410
- ((reverse & 1) << 3) |
411
- (!!italic << 4) |
412
- ((blink & 1) << 7);
410
+ return (intensity & VCI_MASK) |
411
+ (underline << 2) |
412
+ (reverse << 3) |
413
+ (italic << 4) |
414
+ (blink << 7);
413415 }
414416
415417 static void mdacon_invert_region(struct vc_data *c, u16 *p, int count)
....@@ -488,9 +490,9 @@
488490 return;
489491 }
490492
491
- mda_set_cursor(c->vc_y*mda_num_columns*2 + c->vc_x*2);
493
+ mda_set_cursor(c->state.y * mda_num_columns * 2 + c->state.x * 2);
492494
493
- switch (c->vc_cursor_type & 0x0f) {
495
+ switch (CUR_SIZE(c->vc_cursor_type)) {
494496
495497 case CUR_LOWER_THIRD: mda_set_cursor_size(10, 13); break;
496498 case CUR_LOWER_HALF: mda_set_cursor_size(7, 13); break;