.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd |
---|
3 | 4 | * Author:Mark Yao <mark.yao@rock-chips.com> |
---|
4 | | - * |
---|
5 | | - * This software is licensed under the terms of the GNU General Public |
---|
6 | | - * License version 2, as published by the Free Software Foundation, and |
---|
7 | | - * may be copied, distributed, and modified under those terms. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | 5 | */ |
---|
14 | 6 | |
---|
15 | 7 | #ifndef _ROCKCHIP_DRM_FB_H |
---|
16 | 8 | #define _ROCKCHIP_DRM_FB_H |
---|
17 | 9 | |
---|
18 | | -bool rockchip_fb_is_logo(struct drm_framebuffer *fb); |
---|
| 10 | +#include "rockchip_drm_gem.h" |
---|
| 11 | + |
---|
| 12 | +#define ROCKCHIP_DRM_MODE_LOGO_FB (1<<31) /* used for kernel logo, follow the define: DRM_MODE_FB_MODIFIERS at drm_mode.h */ |
---|
| 13 | + |
---|
19 | 14 | struct drm_framebuffer * |
---|
20 | 15 | rockchip_drm_framebuffer_init(struct drm_device *dev, |
---|
21 | 16 | const struct drm_mode_fb_cmd2 *mode_cmd, |
---|
.. | .. |
---|
24 | 19 | |
---|
25 | 20 | void rockchip_drm_mode_config_init(struct drm_device *dev); |
---|
26 | 21 | struct drm_framebuffer * |
---|
| 22 | +rockchip_drm_logo_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd, |
---|
| 23 | + struct rockchip_logo *logo); |
---|
| 24 | +struct drm_framebuffer * |
---|
27 | 25 | rockchip_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd, |
---|
28 | | - struct drm_gem_object **obj, struct rockchip_logo *logo, |
---|
29 | | - unsigned int num_planes); |
---|
| 26 | + struct drm_gem_object **obj, unsigned int num_planes); |
---|
30 | 27 | |
---|
31 | | -dma_addr_t rockchip_fb_get_dma_addr(struct drm_framebuffer *fb, |
---|
32 | | - unsigned int plane); |
---|
33 | | -void *rockchip_fb_get_kvaddr(struct drm_framebuffer *fb, unsigned int plane); |
---|
34 | | -#define to_rockchip_fb(x) container_of(x, struct rockchip_drm_fb, fb) |
---|
| 28 | +#define to_rockchip_logo_fb(x) container_of(x, struct rockchip_drm_logo_fb, fb) |
---|
35 | 29 | |
---|
36 | | -struct rockchip_drm_fb { |
---|
| 30 | +struct rockchip_drm_logo_fb { |
---|
37 | 31 | struct drm_framebuffer fb; |
---|
38 | | - dma_addr_t dma_addr[ROCKCHIP_MAX_FB_BUFFER]; |
---|
39 | | - void *kvaddr[ROCKCHIP_MAX_FB_BUFFER]; |
---|
40 | | - struct drm_gem_object *obj[ROCKCHIP_MAX_FB_BUFFER]; |
---|
41 | 32 | struct rockchip_logo *logo; |
---|
| 33 | + struct rockchip_gem_object rk_obj; |
---|
| 34 | + /* |
---|
| 35 | + * Used for delayed logo fb release |
---|
| 36 | + */ |
---|
| 37 | + struct delayed_work destroy_work; |
---|
42 | 38 | }; |
---|
| 39 | + |
---|
43 | 40 | #endif /* _ROCKCHIP_DRM_FB_H */ |
---|