How is /sys/devices/platform/display-subsystems/drm/<card>/modes populated for HDMI?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How is /sys/devices/platform/display-subsystems/drm/<card>/modes populated for HDMI?

2,315 次查看
tomsong
Contributor III

Hi,

     I have a display which supports both 800x600 and 1024x768. However when I ran cat /sys/devices/platform/display-subsystem/drm/card1/card1-HDMI-A-1/modes I only can see 800x600 is listed but not 1024x768. Both modes are listed in drm_dmt_modes[] and edid_est_modes[] array in gpu/drm/drm_edid.c file. How the modes value is populated? Why I only see 800x600 as a valid mode?

    Display EDID data:

Established Timings I & II:
IBM : 720x400 70.082 Hz 9:5 31.467 kHz 28.320 MHz
DMT 0x04: 640x480 59.940 Hz 4:3 31.469 kHz 25.175 MHz
DMT 0x05: 640x480 72.809 Hz 4:3 37.861 kHz 31.500 MHz
DMT 0x06: 640x480 75.000 Hz 4:3 37.500 kHz 31.500 MHz
DMT 0x08: 800x600 56.250 Hz 4:3 35.156 kHz 36.000 MHz
DMT 0x09: 800x600 60.317 Hz 4:3 37.879 kHz 40.000 MHz
DMT 0x0a: 800x600 72.188 Hz 4:3 48.077 kHz 50.000 MHz
DMT 0x0b: 800x600 75.000 Hz 4:3 46.875 kHz 49.500 MHz
DMT 0x10: 1024x768 60.004 Hz 4:3 48.363 kHz 65.000 MHz
DMT 0x11: 1024x768 70.069 Hz 4:3 56.476 kHz 75.000 MHz
DMT 0x12: 1024x768 75.029 Hz 4:3 60.023 kHz 78.750 MHz

       root@imx8mp-var-dart:~# cat /sys/devices/platform/display-subsystem/drm/card1/card1-HDMI-A-1/modes
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1280x720
1280x720
1280x720
1280x720
800x600
800x600
720x576
720x576
720x480
720x480
720x480
720x480
720x480
640x480
640x480
640x480

      Thanks!

      Regards,

      Tom

      

   

0 项奖励
回复
7 回复数

2,275 次查看
tomsong
Contributor III

Hi Brian,

     I have tried two more displays and got the same issue. The Linux version is 5.15 (Yocto Kirkstone). If you could give some suggestions of how to add a customer resolution it would be great.

     Thanks!

     Regards,

     Tom

  

   

0 项奖励
回复

2,252 次查看
brian14
NXP TechSupport
NXP TechSupport

Hi @tomsong

Thank you for your reply and detailed information.

I have reviewed this problem in depth, and I found that unfortunately, 1024x768 is a non-supported resolution for the iMX8MP.
The iMX8M Plus HDMI module does not support 1024x768 resolution because this is not a resolution described on the CEA-861 specification.
The reference manual for this device describes as follows in section 13.9.2:

"The video mode's timing format must follow the CEA-861- E specification."

You can find the resolutions that comply with this specification in Table 33-3. Video Modes on iMX6DQ Reference Manual.

iMX6DQ Reference Manual Download 

I hope this information will be helpful. 

Have a great day!

0 项奖励
回复

2,240 次查看
tomsong
Contributor III

Hi @brian14,

    Thanks for checking. I understand 1024x768 is not a standard resolution. I noticed people had similar question in other posts such as https://community.nxp.com/t5/i-MX-Processors/1024x768-Resolution-Over-HDMI-on-iMX8M/m-p/1270891. But the data structure used in that post is imx8mq_ctrl_table. We are using iMX8M Plus. I only can find data structure imx8mq_ctrl_table for iMQ8M Quad and imx8qm_ctrl_table for iMX8 QuadMax. I can't find similar data structure for other variants such iMX8M Plus. Do you know is it possible to make similar modifications for iMX8M Plus? If so what data structure should we use?

    Thanks!

    Regard,

    Tom

0 项奖励
回复

2,230 次查看
brian14
NXP TechSupport
NXP TechSupport

Hi @tomsong

Thank you for your reply.

Unfortunately, as I said before this is an unsupported resolution, and I couldn't find any known solution for iMX8M Plus related to the link that you share.
But as my colleague recommends you can proceed with help of Professional Engineering Services | NXP Semiconductors

Best regards, Brian.

0 项奖励
回复

2,282 次查看
brian14
NXP TechSupport
NXP TechSupport

Hi @tomsong

For this issue I want to discard any problem with the HDMI display connection, therefore, could you please use another monitor and reboot your iMX8?

After that, we could review other solutions to add the resolution required.

Finally, please provide information about your version of Linux BSP.

Have a great day!

0 项奖励
回复

2,273 次查看
tomsong
Contributor III

@brian14  By the way, I have add an entry to edid_cea_modes_1[] in drivers/gpu/drm/drm_edid.c:

{ DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 74250, 1024, 1048,
1184, 1344, 0, 768, 771, 777, 806, 0,
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
.picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },

    However it still doesn't work. When I ran cat /sys/devices/platform/display-subsystem/drm/card1/card1-HDMI-A-1/modes I still don't see 1024x768 as a valid mode.

     Thanks!

  

0 项奖励
回复

2,017 次查看
omar_aberkan
Contributor III

Any update on this? I also need a resolution of 1024x768 with an aspect ratio of 4:3.

0 项奖励
回复