From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/gpu/drm/rockchip/rockchip_drm_fb.h | 37 +++++++++++++++++--------------------
1 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/kernel/drivers/gpu/drm/rockchip/rockchip_drm_fb.h b/kernel/drivers/gpu/drm/rockchip/rockchip_drm_fb.h
index 9429c11..4442719 100644
--- a/kernel/drivers/gpu/drm/rockchip/rockchip_drm_fb.h
+++ b/kernel/drivers/gpu/drm/rockchip/rockchip_drm_fb.h
@@ -1,21 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
* Author:Mark Yao <mark.yao@rock-chips.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
*/
#ifndef _ROCKCHIP_DRM_FB_H
#define _ROCKCHIP_DRM_FB_H
-bool rockchip_fb_is_logo(struct drm_framebuffer *fb);
+#include "rockchip_drm_gem.h"
+
+#define ROCKCHIP_DRM_MODE_LOGO_FB (1<<31) /* used for kernel logo, follow the define: DRM_MODE_FB_MODIFIERS at drm_mode.h */
+
struct drm_framebuffer *
rockchip_drm_framebuffer_init(struct drm_device *dev,
const struct drm_mode_fb_cmd2 *mode_cmd,
@@ -24,20 +19,22 @@
void rockchip_drm_mode_config_init(struct drm_device *dev);
struct drm_framebuffer *
+rockchip_drm_logo_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd,
+ struct rockchip_logo *logo);
+struct drm_framebuffer *
rockchip_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd,
- struct drm_gem_object **obj, struct rockchip_logo *logo,
- unsigned int num_planes);
+ struct drm_gem_object **obj, unsigned int num_planes);
-dma_addr_t rockchip_fb_get_dma_addr(struct drm_framebuffer *fb,
- unsigned int plane);
-void *rockchip_fb_get_kvaddr(struct drm_framebuffer *fb, unsigned int plane);
-#define to_rockchip_fb(x) container_of(x, struct rockchip_drm_fb, fb)
+#define to_rockchip_logo_fb(x) container_of(x, struct rockchip_drm_logo_fb, fb)
-struct rockchip_drm_fb {
+struct rockchip_drm_logo_fb {
struct drm_framebuffer fb;
- dma_addr_t dma_addr[ROCKCHIP_MAX_FB_BUFFER];
- void *kvaddr[ROCKCHIP_MAX_FB_BUFFER];
- struct drm_gem_object *obj[ROCKCHIP_MAX_FB_BUFFER];
struct rockchip_logo *logo;
+ struct rockchip_gem_object rk_obj;
+ /*
+ * Used for delayed logo fb release
+ */
+ struct delayed_work destroy_work;
};
+
#endif /* _ROCKCHIP_DRM_FB_H */
--
Gitblit v1.6.2