drm移植

libdrm下载

解压后进入libdrm-2.4.104目录 ,参考官网如下图操作即可。

mkdir build
mkdir install
创建cross_file.txt
meson --prefix=/root/work/code/software/drm/libdrm-2.4.104/install  --cross-file=../cross_file.txt -D radeon=true -Dudev=true && ninja
njnja install

在cross_file.txt中指定编译器 

[binaries]
c = 'aarch64-linux-gnu-gcc'
cpp = 'aarch64-linux-gnu-gcc'
ar = 'aarch64-linux-gnu-ar'
strip = 'aarch64-linux-gnu-strip'

[host_machine]
system = 'linux'
cpu_family = 'arm'
cpu = 'armv7'
endian = 'little'

[build_machine]
system = 'linux'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

 

使用modetest命令前,先停止使用/dev/dri/card0节点的应用程序。

可以使用systemctl命令,停止桌面显示服务,然后使用modetest命令测试。

systemctl stop lightdm.service

 

## 1.停止桌面显示
root@linaro-alip:~# systemctl stop lightdm.service
[  682.983722] rockchip-vop ff900000.vop: [drm:vop_crtc_enable] Update mode to 1024x768p60, type: 11

#modetest 参数
modetest -h  #帮助
 Query options:#用于查询的参数选项

        -c      list connectors #列举出所有的connectors
        -e      list encoders   #列举出所有的encoders   
        -f      list framebuffers #列举出所有的framebuffers 
        -p      list CRTCs and planes (pipes) #列举出所有的CRTCs和planes 

 Test options:#用于测试的参数选项
		#-P给CRTC指定plane
        -P <plane_id>@<crtc_id>:<w>x<h>[+<x>+<y>][*<scale>][@<format>]  set a plane 
        #-s 设置输出模式,选择connector和crtc
        -s <connector_id>[,<connector_id>][@<crtc_id>]:[#<mode index>]<mode>[-<vrefresh>][@<format>] set a mode 
        -C      test hw cursor
        -v      test vsynced page flipping
        -r      set the preferred mode for all connectors
        -w <obj_id>:<prop_name>:<value> set property
        -a      use atomic API
        -F pattern1,pattern2    specify fill patterns

 Generic options:#指定打开设备、驱动

        -d      drop master after mode set
        -M module       use the given driver
        -D device       use the given device

        Default is to dump all info.

#例子
#-s <connector_id>[,<connector_id>][@<crtc_id>]:[#<mode index>]<mode>[-<vrefresh>][@<format>]
#-P <plane_id>@<crtc_id>:<w>x<h>[+<x>+<y>][*<scale>][@<format>]  set a plane 
modetest  -s 37@35:1024x768  -P 33@35:1024x768


$modetest -M atmel-hlcdc -s 24@31:800x480

24是connect id, 31 crtc id,这些id可以使用$./modetest  命令来获取

执行命令后

800x480的屏幕上会显示彩条

$modetest -M atmel-hlcdc -s 24@31:800x480 -w 30:alpha:100 -P 30@31:200x200+200+200

在base plane上显示id为30的plane,位置为(200,200),大小为200x200,同时设定该plane的透明度为100(最大255),这里的-w是设定property 参数

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sunxiaopengsun

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值