1. 程式人生 > >[Linux][RK3399] DRM HDMI 除錯小結

[Linux][RK3399] DRM HDMI 除錯小結

Platform: RK3399
OS: Android 6.0
Kernel: 4.4
Version: v2017.04

除錯流程

1. 確認板子是否識別到了顯示器的 EDID

 echo 0x1f > /sys/module/drm/parameters/debug

插拔一下hdmi
然後dmesg | grep drm, 看看裡面的資訊是否解析到了edid

[  405.576876] EDID block is all zeroes
[  405.577224] rockchip-drm display-subsystem: HDMI-A-1: EDID block
0 invalid. [ 405.687232] EDID block is all zeroes [ 405.687590] rockchip-drm display-subsystem: HDMI-A-1: EDID block 0 invalid.

EDID = 0
這個就是顯示器被識別為DVI的主因, 當無法讀出edid時, hdmi驅動可能就會以dvi顯示輸出

2. 測一下hdmi驅動是否可以支援hdmi輸出

將附件的 acer_edid.bin 推到板子上, 以下是android上的例子, linux上也可以進行類似操作

adb push acer_edid.bin /data
adb shell: mount -o rw,remount / cp /data/acer_edid.bin /lib/firmware/ echo HDMI-A-1:acer_edid.bin > /sys/module/drm_kms_helper/parameters/edid_firmware

採用 acer_edid.bin 模擬 EDID 後分辨率由 DVI 800×[email protected] 變為 DVI 1920×[email protected] 。但是依舊無法識別 HDMI。
熱插拔資訊:

[  211.948958] [drm:edid_load] Got external EDID base block and
1 extension from "acer_edid.bin" for connector "HDMI-A-1" [ 211.949953] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 4 [ 212.066567] [drm:edid_load] Got external EDID base block and 1 extension from "acer_edid.bin" for connector "HDMI-A-1" [ 212.067598] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 4

錯誤資訊

1. No drm_driver.set_busid() implementation provided by 0x…. Use drm_dev_set_unique() to set the unique

1)dev->driver->set_busid 回撥沒有被賦值
2)dev->unique == NULL

set_busid 沒有對應回撥是正常的,RK 平臺未對其進行實現,一般在 PC 平臺會對其進行實現。

dev->unique == NULL 不正常。
RK VR SDK 中 DRM 框架太舊了,通過升級 DRM 框架解決。

2. drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:64:2: error: unknown field ‘fb_dmabuf_export’ specified in initializer

.fb_dmabuf_export = rockchip_fbdev_get_dma_buf,

/home/younix/rk_op_linux_3399/kernel/include/linux/fb.h

/* Export the frame buffer as a dmabuf object */
struct dma_buf *(*fb_dmabuf_export)(struct fb_info *info);

3. kernel/drivers/gpu/drm/drm_prime.c:545: undefined reference to ‘dma_buf_get_release_callback_data’

需要對比修改 檔案:/home/younix/rk_op_linux_3399/kernel/drivers/dma-buf/dma-buf.c

參考資料