-
Notifications
You must be signed in to change notification settings - Fork 2
iMX8M HDMI
vraevsky edited this page Apr 20, 2019
·
4 revisions
This manual shows how to get HDMI parameters using the CompuLab Yocto Linux:
- Video Mode Limitation
imx8
is able to set a video mode described in the edid_cea_modes
array:
static struct drm_display_mode edid_cea_modes[] = { /* user defined - 1024@768@70Hz */ { DRM_MODE("1024x768", DRM_MODE_TYPE_DRIVER, 74250, 1024, 1072, 1176, 1328, 0, 768, 771, 775, 798, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, /* user defined - 1366x768@52Hz */ { DRM_MODE("1366x768", DRM_MODE_TYPE_DRIVER, 74250, 1366, 1436, 1579, 1792, 0, 768, 771, 774, 798, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, /* 3 - 720x480@60Hz */ { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000, 720, 736, 798, 858, 0, 480, 489, 495, 525, 0, DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC), .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, /* 4 - 1280x720@60Hz */ { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, 1430, 1650, 0, 720, 725, 730, 750, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, /* 16 - 1920x1080@60Hz */ { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, /* 97 - 3840x2160@60Hz */ { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, /* 96 - 3840x2160@30Hz */ { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, };
- Pixel Clock Limitation
Available Pixel Clocks (KHz): 594000; 297000; 148500; 74250; 27000
In order to use one of the defined video modes:
- edid must be disabled:
&hdmi { fsl,no_edid; status = "okay"; };
- kernel video boot parameter must be defined this way:
video=HDMI-A-1:1366x768@60
- kernel Config
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
- kernel video boot parameter must be defined this way:
video=HDMI-A-1:1366x768@60 fbcon=rotate:1
- xorg.conf
Section "Device" Identifier "i.MX Accelerated DRM Device" Driver "fbdev" Option "kmsdev" "/dev/dri/card0" Option "Rotate" "CW" EndSection Section "ServerFlags" Option "BlankTime" "0" Option "StandbyTime" "0" Option "SuspendTime" "0" Option "OffTime" "0" Option "Xinerama" "off" Option "Clone" "on" Option "SWcursor" "true" EndSection
cat /sys/class/drm/card1-HDMI-A-1/status
cat /sys/class/drm/card1-HDMI-A-1/modes
hexdump -C /sys/class/drm/card1-HDMI-A-1/edid
fbset
Follow this instruction:
- Reboot the device & stop in U-Boot.
- Issue:
env default -a setenv mmcargs ${mmcargs} '${video}' setenv video 'video=HDMI-A-1:1280x800@60' saveenv boot
The format is:
video=:x[M][R][-][@][i][m][eDd]
- : Connector, e.g. DVI-I-1, see /sys/class/drm/ for available connectors
- x : resolution
- M: compute a CVT mode?
- R: reduced blanking?
- -: color depth
- @: refresh rate
- i: interlaced (non-CVT mode)
- m: margins?
- e: output forced to on
- d: output forced to off
- D: digital output forced to on (e.g. DVI-I connector)
Here is an example video
mode parameter to force HDMI-A-1
to 720x576 interlaced
mode at 50Hz
:
video=HDMI-A-1:720x576@50i
- ADA 1024x60@50
Section "Monitor" Identifier "Configured ADA Monitor" ModelName "ADA Monitor" VendorName "ADA" # Monitor Manufactured week 1 of 2007 # EDID version 1.3 # Digital Display DisplaySize 150 100 Gamma 1.00 Option "DPMS" "false" Modeline "Mode 0" 50.00 1024 1064 1112 1152 600 613 616 645 -hsync -vsync EndSection
- Video parameter for the 4.9.51 kernel is:
video=disp.screen0_output_mode=EDID:0 video=HDMI-A-1:1280x720@60
The EDID defined resolution does not work yet.