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_debugfs.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/kernel/drivers/gpu/drm/rockchip/rockchip_drm_debugfs.c b/kernel/drivers/gpu/drm/rockchip/rockchip_drm_debugfs.c
index 723c284..923bcf3 100644
--- a/kernel/drivers/gpu/drm/rockchip/rockchip_drm_debugfs.c
+++ b/kernel/drivers/gpu/drm/rockchip/rockchip_drm_debugfs.c
@@ -56,7 +56,7 @@
int rockchip_drm_dump_plane_buffer(struct vop_dump_info *dump_info, int frame_count)
{
int flags;
- int bpp = 32;
+ int bpp;
const char *ptr;
char file_name[100];
int width;
@@ -70,6 +70,10 @@
drm_get_format_name(dump_info->format->format, &format_name);
strscpy(format, format_name.str, 5);
bpp = rockchip_drm_get_bpp(dump_info->format);
+ if (!bpp) {
+ DRM_WARN("invalid bpp %d\n", bpp);
+ return 0;
+ }
if (dump_info->yuv_format) {
u8 hsub = dump_info->format->hsub;
--
Gitblit v1.6.2