我是靠谱客的博主 畅快大神,最近开发中收集的这篇文章主要介绍RK3288[android 7.1]调试笔记 移除u-boot层logo显示,保留kernel层logo显示,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
1 把uboot层logo的显示关闭
修改u-bootdriversvideorockchip_display.c文件
dongsy@build-server-100:~/work/dsy/rk3288-Android-7.0/u-boot(edp-lvds)$ git diff drivers/video/rockchip_display.c
diff --git a/drivers/video/rockchip_display.c b/drivers/video/rockchip_display.
index f477b20..4adc346 100644
--- a/drivers/video/rockchip_display.c
+++ b/drivers/video/rockchip_display.c
@@ -1035,8 +1035,8 @@ void rockchip_show_logo(void)
s->logo.mode = s->logo_mode;
if (load_bmp_logo(&s->logo, s->ulogo_name))
printf("failed to display uboot logon");
-
else
-
display_logo(s);
+
//else
+
//
display_logo(s);
if (load_bmp_logo(&s->logo, s->klogo_name))
printf("failed to display kernel logon");
}
2 如果logo显示不显,调用kernel logo显示函数
修改kerneldriversgpudrmrockchiprockchip_drm_drv.c文件
dongsy@build-server-100:~/work/dsy/rk3288-Android-7.0/kernel(edp_lvds)$ git diff drivers/gpu/drm/rockchip/rockchip_drm_drv.c
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index c24c6d9..0bf332c 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -474,13 +474,6 @@ static int setup_initial_state(struct drm_device *drm_dev,
funcs = connector->helper_private;
conn_state->best_encoder = funcs->best_encoder(connector);
-
if (funcs->loader_protect)
-
funcs->loader_protect(connector, true);
-
connector->loader_protect = true;
-
encoder_funcs = conn_state->best_encoder->helper_private;
-
if (encoder_funcs->loader_protect)
-
encoder_funcs->loader_protect(conn_state->best_encoder, true);
-
conn_state->best_encoder->loader_protect = true;
num_modes = connector->funcs->fill_modes(connector, 4096, 4096);
if (!num_modes) {
dev_err(drm_dev->dev, "connector[%s] can't found any modesn",
@@ -503,8 +496,24 @@ static int setup_initial_state(struct drm_device *drm_dev,
}
if (!found) {
-
ret = -EINVAL;
-
goto error_conn;
+
list_for_each_entry(mode, &connector->modes, head) {
+
if (mode->type & DRM_MODE_TYPE_PREFERRED) {
+
found = 1;
+
break;
+
}
+
}
+
+
if (!found) {
+
mode = list_first_entry_or_null(&connector->modes,
+
struct drm_display_mode,
+
head);
+
if (!mode) {
+
dev_err(drm_dev->dev,
+
"failed to find available modesn");
+
ret = -EINVAL;
+
goto error_conn;
+
}
+
}
}
set->mode = mode;
@@ -517,7 +526,18 @@ static int setup_initial_state(struct drm_device *drm_dev,
drm_mode_copy(&crtc_state->adjusted_mode, mode);
if (!match || !is_crtc_enabled) {
set->mode_changed = true;
+
connector->loader_protect = false;
+
conn_state->best_encoder->loader_protect = false;
} else {
+
if (funcs->loader_protect)
+
funcs->loader_protect(connector, true);
+
connector->loader_protect = true;
+
encoder_funcs = conn_state->best_encoder->helper_private;
+
if (encoder_funcs->loader_protect)
+
encoder_funcs->loader_protect(conn_state->best_encoder,
+
true);
+
conn_state->best_encoder->loader_protect = true;
+
ret = drm_atomic_set_crtc_for_connector(conn_state, crtc);
if (ret)
goto error_conn;
@@ -582,12 +602,16 @@ error_crtc:
if (priv->crtc_funcs[pipe] && priv->crtc_funcs[pipe]->loader_protect)
priv->crtc_funcs[pipe]->loader_protect(crtc, false);
error_conn:
-
if (funcs->loader_protect)
-
funcs->loader_protect(connector, false);
-
connector->loader_protect = false;
-
if (encoder_funcs->loader_protect)
-
encoder_funcs->loader_protect(conn_state->best_encoder, false);
-
conn_state->best_encoder->loader_protect = false;
+
if (connector->loader_protect) {
+
if (funcs->loader_protect)
+
funcs->loader_protect(connector, false);
+
connector->loader_protect = false;
+
}
+
if (conn_state->best_encoder->loader_protect) {
+
if (encoder_funcs->loader_protect)
+
encoder_funcs->loader_protect(conn_state->best_encoder, false);
+
conn_state->best_encoder->loader_protect = false;
+
}
return ret;
}
最后
以上就是畅快大神为你收集整理的RK3288[android 7.1]调试笔记 移除u-boot层logo显示,保留kernel层logo显示的全部内容,希望文章能够帮你解决RK3288[android 7.1]调试笔记 移除u-boot层logo显示,保留kernel层logo显示所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复