当前位置: 首页 > news >正文

[kylin D2000]麒麟系统飞腾D2000下LVDS屏幕BIOS下能亮系统下不亮问题解决方法

1.拉取代码

通过以下命令拉取代码或者使用smifb2.zip 文件解压

git clone https://github.com/teddywlq/smifb2.git

代码信息

zwzn2064@zwzn2064-CVN-Z690D5-GAMING-PRO:~/smifb2$ ls
ddk750     hw750.c  hw768.h   Makefile         smi_dbg.h      smi_drv.c   smi_mode.c   smi_priv.h  smi_ttm.c  xorg.conf.multicard
ddk768     hw750.h  hw_com.h  Makefile.kernel  smi_debugfs.c  smi_drv.h   smi_plane.c  smi_snd.c   smi_ver.h  xorg.conf.SM768
dkms.conf  hw768.c  Kconfig   readme           smi_debugfs.h  smi_main.c  smi_prime.c  smi_snd.h   tags
zwzn2064@zwzn2064-CVN-Z690D5-GAMING-PRO:~/smifb2$ 

readme信息

1. Introduction
SiliconMotion SM750/SM768 Graphics PCI-E DRM Driver2. Usage
This driver can be compiled under the kernel 5.x. 
1)  Please make sure that you are in console and run as root user.
2)  Open this driver directory, and use the "make" command, it will to generate the "smifb.ko".
3)      Install the module.make install
4)  use "depmod -a" to handle dependency descriptions for loadable kernel modules.
5)  On some ubuntu or debian OS, we need to update initramfs update-initramfs -u
5)      Reboot and restart graphic interface, Build essential package:
If there is build-mistake such as "/lib/modules/.../build: No such file or directory"
(Ubuntu version)
apt-get install linux-headers-$(uname -r) build-essential
(Fedora version)
yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)Module Options
==============Special configuration for smifb is usually unnecessary. There are a few
options, however.From the command line, pass options to modprobe
modprobe smifb.ko lvds=1 width=1024 height=768Or modify options on the fly at /sys/module/smifb/parameters directory 
change the parameter in place, and save the file.Or for permanent option, create file like /etc/modprobe.d/smifb.conf with text
options smifb lvds=1 width=1024 height=768Module Parameter
==============
You can use "modinfo smifb" to get detail information
2 修改代码

调整时序。结构体 mode_parameter_t 定义了一种模式参数,通常用于描述显示设备(如液晶显示器或其他图形显示设备)的时序和频率设置

jw@kylin:~/smifb2$ git diff ddk768/ddk768_mode.c
diff --git a/ddk768/ddk768_mode.c b/ddk768/ddk768_mode.c
index 2e556a9..5dfbbcf 100644
--- a/ddk768/ddk768_mode.c
+++ b/ddk768/ddk768_mode.c
@@ -263,7 +263,9 @@ static mode_parameter_t gLVDSModeParamTable[] ={1678,1280,1350,136, POS, 795, 768, 769, 3, POS, 80000000, 47676, 60, NEG},/* 1280 x 800  [8:5] -- Not a popular mode */
- {1650,1280,1344,136, NEG, 824, 800, 800, 3, NEG, 81600000, 49455, 60, NEG},
+// {1650,1280,1344,136, NEG, 824, 800, 800, 3, NEG, 81600000, 49455, 60, NEG},
+/* 1280 x 800  [8:5] -- New */
+  {1440,1280,1408,32, NEG, 823, 800, 817, 6, NEG, 71000000, 49305, 60, NEG},/* 1280 x 960  [4:3] *//* The first commented line below are taken from SM502, the rest timing are
jw@kylin:~/smifb2$ 
3.编译代码

将代码放到麒麟系统下,使用 make 命令编译代码,会生成smifb.ko 驱动模块

make
4 替换驱动

执行以下命令替换驱动,重新启动机器,屏幕就成功点亮了

rm /lib/modules/5.4.18-63.52-embedded-generic/kernel/drivers/gpu/drm/smidrm/smifb.ko.xz
cp smifb.ko /lib/modules/5.4.18-63.52-embedded-generic/kernel/drivers/gpu/drm/smidrm/
depmod -a
update-initramfs -u

http://www.mrgr.cn/news/38838.html

相关文章:

  • Python __getattr__()函数的应用
  • 论文阅读(十一):CBAM: Convolutional Block Attention Module
  • 84、Python之鸭子类型:魔术方法自定义类型也可以实现加减乘除
  • 告别“军备竞赛”!L2进入下沉普及周期,谁在领跑本土方案市场?
  • UDS_4_传输存储的数据功能单元
  • Fiddler—使用保姆级教程
  • 苏州数字孪生工业互联网可视化技术,赋能新型工业化智能制造工厂
  • 串口UART的深入使用
  • YOLOv9改进策略 :IoU优化 | Unified-loU,用于高品质目标检测的统一loU ,2024年8月最新IoU
  • AI学习指南深度学习篇-批标准化的基本原理
  • DriveVLM 论文学习
  • STM32F103C8----3-3 蜂鸣器(跟着江科大学STM32)
  • 【CKA】CKA考题和注意事项
  • 减少重复的请求之promise缓存池(构造器版) —— 缓存promise,多次promise等待并返回第一个promise的结果
  • 浅谈Java之Redis缓存
  • 华为OD机试 - 找等值元素(Java 2024 E卷 100分)
  • PowerShell脚本在自动化Windows开发工作流程中的应用
  • 主流仿真软件Sigrity/HFSS/Siwave/Hyperlynx/ADS差异
  • 大堆对象是如何影响程序的性能的
  • 进销存软件:数字化转型下的企业运营新引擎