forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/video/fbdev/efifb.c
....@@ -154,6 +154,11 @@
154154 return;
155155 }
156156
157
+ if (bgrt_tab.status & 0x06) {
158
+ pr_info("efifb: BGRT rotation bits set, not showing boot graphics\n");
159
+ return;
160
+ }
161
+
157162 /* Avoid flashing the logo if we're going to print std probe messages */
158163 if (console_loglevel > CONSOLE_LOGLEVEL_QUIET)
159164 return;
....@@ -250,7 +255,7 @@
250255 fb_dealloc_cmap(&info->cmap);
251256 }
252257
253
-static struct fb_ops efifb_ops = {
258
+static const struct fb_ops efifb_ops = {
254259 .owner = THIS_MODULE,
255260 .fb_destroy = efifb_destroy,
256261 .fb_setcolreg = efifb_setcolreg,
....@@ -433,7 +438,6 @@
433438
434439 info = framebuffer_alloc(sizeof(u32) * 16, &dev->dev);
435440 if (!info) {
436
- pr_err("efifb: cannot allocate framebuffer\n");
437441 err = -ENOMEM;
438442 goto err_release_mem;
439443 }
....@@ -649,7 +653,7 @@
649653 if (!base)
650654 return;
651655
652
- for (i = 0; i <= PCI_STD_RESOURCE_END; i++) {
656
+ for (i = 0; i < PCI_STD_NUM_BARS; i++) {
653657 struct resource *res = &dev->resource[i];
654658
655659 if (!(res->flags & IORESOURCE_MEM))