当前位置:首页 > 技术 > LINUX > 正文内容

更换了800*480的屏幕以后报错[记录]

Watrt3年前 (2024-04-02)LINUX17750

更换了800*480的屏幕以后,报错:

[    0.138371] rockchip-drm display-subsystem: bound ff990000.vop (ops 0xb039a8e4)
[    0.138480] rockchip-drm display-subsystem: bound ff000000.syscon:rgb (ops 0xb039b444)
[    0.139121] rockchip-drm display-subsystem: failed to parse loader memory
[    0.139394] [drm:rockchip_gem_create_object] *ERROR* failed to allocate 1536000 byte dma buffer
[    0.139418] rockchip-drm display-subsystem: [drm:rockchip_drm_fbdev_init] *ERROR* Failed to set initial hw config - -12.
[    0.139819] rockchip-drm display-subsystem: master bind failed: -12
[    0.139913] rockchip-drm: probe of display-subsystem failed with error -12

应该是ARGB的缓存空间800*480*4=1536000


630QX~5{{B$XN3I3`_PUVUL.png

查源代码是这个位置申请的DMA内存

解决方法:

改设备树

reserved-memory {
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;
        linux,cma {
            compatible = "shared-dma-pool";
            inactive;
            reusable;
            size = <0x1000000>;
            linux,cma-default;
        };
        drm_logo: drm-logo@00000000 {
            compatible = "rockchip,drm-logo";
            reg = <0x0 0x0>;
        };
    };


这是设备树中的一部分内容,用于描述保留内存区域和相关设备的配置。让我为你解释一下:

首先,`reserved-memory` 是一个设备树节点,它用于定义保留内存区域。

`#address-cells` 和 `#size-cells` 属性指定了地址单元和大小单元的数量。

`ranges` 属性为空,表示没有定义范围。

`linux,cma` 是关于连续内存分配器(Contiguous Memory Allocator)的配置。`compatible` 属性表示与共享DMA池(Shared DMA Pool)兼容。`inactive` 表示此连续内存未被使用,`reusable` 表示可以重新使用,`size` 属性定义了连续内存的大小,`linux,cma-default` 表示这是默认的连续内存配置。

`drm_logo` 是一个子节点,它描述了一个名为 `drm-logo` 的设备。`compatible` 属性指定了该设备与 Rockchip 平台上的 DRM-Logo 兼容。`reg` 属性定义了该设备的寄存器地址范围。

这段设备树描述了一个保留内存区域和一个 DRM-Logo 设备。


打赏 支付宝打赏 微信打赏

相关文章

mkfs 参数

mkfs 参数

#mkfs.jffs2 -r rootfs -o fs.jffs2 -e 0x20000 --pad=0x500000 -s 0x800 –n -l即可生成 rootfs.jffs2Mkfs.jffs2各参数的意义如下:-r:指定要做成image的目录名。-o:指定输出image的文件名。-e:每一块要擦除的block size,默认是64KB.要注意,不同的flash, 其block size会不一样,三星的K9F2G08U0A的block size为0x20000(从其datasheet里可...

老是提示:newer kernel available 解决方法

老是提示:newer kernel available 解决方法

这个是由于没有正确的安装内核造成的。可以直接关掉提示 sudo apt purge needrestart...

Configure & Build

Configure & Build

Configure and build Linux kernel for Surface RTEditing kernel build configurationFirst run the command make ARCH=arm tegra_defconfigThis will create a standard kernel config for tegra SoC's.Open the file .config in the kernel source directory wit...

荔枝派Nano的linux5.2版本主线下载及编译(支持USB设备与主机模式)

荔枝派Nano的linux5.2版本主线下载及编译(支持USB设备与主机模式)

安装必须的库:sudo apt-get install gcc make cmake rsync wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev python3-distutils android-tools-mkbo...

从Ubuntu-base构建ubuntu rootfs系统

从Ubuntu-base构建ubuntu rootfs系统

1.介绍ubuntu-base 是Ubuntu官方构建的ubuntu最小文件系统,包含debain软件包管理器,基础包大小通常只有几十兆,其背后有整个ubuntu软件源支持,ubuntu软件一般稳定性比较好,基于ubuntu-base按需安装Linux软件,深度可定制…,常用于嵌入式rootfs构建。嵌入式常见的几种文件系统构建方法:busybox、yocto、builroot,我觉得它们都不如Ubuntu方便,强大的包管系统,有强大的社区支持,可以直接apt-get install来安装新软件...

Ubuntu server openbox 安装笔记

Ubuntu server openbox 安装笔记

安装好ubuntu server 后开始安装openboxsudo apt-get install --no-install-recommends openbox xorg tint2 xcompmgr fonts-wqy-zenhei language-pack-zh-hans fcitx mupdf feh moc smplayer dbus-x11 thunar bzip2 tar obconf --no-install-recommend...

荔枝派licheepi_nano编译uboot记录【转】

荔枝派licheepi_nano编译uboot记录【转】

板子使用我自己重新绘制的f1c100s,开源地址:复刻f1c100s/f1c200sLinux - 嘉立创EDA开源硬件平台首先完全参照官网给的教程来前言 - Sipeed Wiki注意选择相应的板子,安装合适的交叉编译器,我之前安装的交叉编译器是4.9版本的,编译过程报错,提示编译器版本过低参考官网直接下载相应的交叉编译器,然后添加到环境变量中就行。如果arm-linux-gnueabi-gcc -v显示的交叉编译器版本没有改变,可以试试把老编译器的文件夹名字改了,然后把新版本的添加到老文件夹...

PCManFM

PCManFM

安装有以下版本可供选择安装:pcmanfm包pcmanfm-gtk3包:gtk3版本pcmanfm-gitAUR:开发版pcmanfm-qt包或pcmanfm-qt-gitAUR:Qt版本可选组件:gvfs包:提供回收站功能udisks:远程文件系统的挂载支持桌面管理如果要用PCManFM进行桌面管理,比如设置壁纸和桌面图标,使用这个命令:pcmanfm --desktop原生的桌面管理菜单会被PCManFM提供的桌面管理菜单所替换。如果要还原,只需要在桌面右击,选择 桌面偏好设置(D...