Skip to content

Commit

Permalink
guide: add Kernel mode setting for display resolution
Browse files Browse the repository at this point in the history
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I1d08f196cb391701b56820ed960610fa2cce5db3
  • Loading branch information
tobetter committed Dec 21, 2020
1 parent 8de53b5 commit 4fc86ee
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions guides/kmsdrm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Kernel mode setting

Kernel mode setting (KMS) is a method to set the display resolution in the
Linux kernel during boot up, this method also effectly work when:
* you want to set the display mode with specific resolution
* the display device is old
* EDID data is corrupted or it contains incorrect one


## Prerequisites
### EDID binary

You need to download and install the EDID binary file to your Linux. Please open
the link to find out the supported EDID binaries.
https://github.com/akatrevorjay/edid-generator

Please run these commands to download the display resolution for 1920x1080.
```bash
$ sudo mkdir -p /usr/lib/firmware/edid/
$ sudo wget https://github.com/akatrevorjay/edid-generator/blob/master/1920x1080.bin -P /usr/lib/firmware/edid
```
## Apply new resolution
In order to apply the new display resolution with this method, the boot script
must be updated with a kernel parameter that specify the display resoltuion so that
the Linux kernel loads the EDID binary on booting.

Add this line to **/usr/share/flash-kernel/ubootenv.d/upstream/90-misc** to select the display resolution as 1920x1080.
> setenv bootargs "${bootargs} drm_kms_helper.edid_firmware=HDMI-A-1:edid/1920x1080.bin"
So, the file **/usr/share/flash-kernel/ubootenv.d/upstream/90-misc** must be like this.
```bash
$ cat /usr/share/flash-kernel/ubootenv.d/upstream/90-misc
setenv bootargs "${bootargs} cma=800M"
setenv bootargs "${bootargs} clk_ignore_unused"
setenv bootargs "${bootargs} drm_kms_helper.edid_firmware=HDMI-A-1:edid/1920x1080.bin"
```

Then update the boot script to apply the change and reboot.
```bash
$ sudo update-bootscript
$ sudo reboot
```

0 comments on commit 4fc86ee

Please sign in to comment.