| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/drivers/video/mmp/fb/mmpfb.c |
|---|
| 3 | 4 | * Framebuffer driver for Marvell Display controller. |
|---|
| 4 | 5 | * |
|---|
| 5 | 6 | * Copyright (C) 2012 Marvell Technology Group Ltd. |
|---|
| 6 | 7 | * Authors: Zhou Zhu <zzhu3@marvell.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 9 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 10 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 11 | | - * option) any later version. |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 14 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 15 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 16 | | - * more details. |
|---|
| 17 | | - * |
|---|
| 18 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 19 | | - * this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 20 | | - * |
|---|
| 21 | 8 | */ |
|---|
| 22 | 9 | #include <linux/module.h> |
|---|
| 23 | 10 | #include <linux/dma-mapping.h> |
|---|
| .. | .. |
|---|
| 103 | 90 | else |
|---|
| 104 | 91 | return PIXFMT_BGR888UNPACK; |
|---|
| 105 | 92 | } |
|---|
| 106 | | - |
|---|
| 107 | | - /* fall through */ |
|---|
| 108 | 93 | } |
|---|
| 109 | 94 | |
|---|
| 110 | 95 | return -EINVAL; |
|---|
| .. | .. |
|---|
| 467 | 452 | return 0; |
|---|
| 468 | 453 | } |
|---|
| 469 | 454 | |
|---|
| 470 | | -static struct fb_ops mmpfb_ops = { |
|---|
| 455 | +static const struct fb_ops mmpfb_ops = { |
|---|
| 471 | 456 | .owner = THIS_MODULE, |
|---|
| 472 | 457 | .fb_blank = mmpfb_blank, |
|---|
| 473 | 458 | .fb_check_var = mmpfb_check_var, |
|---|
| .. | .. |
|---|
| 535 | 520 | info->var.bits_per_pixel / 8; |
|---|
| 536 | 521 | info->fbops = &mmpfb_ops; |
|---|
| 537 | 522 | info->pseudo_palette = fbi->pseudo_palette; |
|---|
| 538 | | - info->screen_base = fbi->fb_start; |
|---|
| 523 | + info->screen_buffer = fbi->fb_start; |
|---|
| 539 | 524 | info->screen_size = fbi->fb_size; |
|---|
| 540 | 525 | |
|---|
| 541 | 526 | /* For FB framework: Allocate color map and Register framebuffer*/ |
|---|
| .. | .. |
|---|
| 625 | 610 | ret = -ENOMEM; |
|---|
| 626 | 611 | goto failed_destroy_mutex; |
|---|
| 627 | 612 | } |
|---|
| 628 | | - memset(fbi->fb_start, 0, fbi->fb_size); |
|---|
| 629 | 613 | dev_info(fbi->dev, "fb %dk allocated\n", fbi->fb_size/1024); |
|---|
| 630 | 614 | |
|---|
| 631 | 615 | /* fb power on */ |
|---|