To modify hdmi default output color depth, use following dts:
&hdmi {
rockchip,defaultdepth = <10>;
}
rockchip,defaultdepth could be following value:
<0> auto select color depth, prefer 8bit
<8> 8bit
<10> 10bit
Change-Id: Idce0bd080c042edf3939c5c38b76d4d1860b7a9f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Use following command to set hdr metadata:
cd /sys/class/display/HDMI
echo "hdrmdata=1 2 3 4 5 6 7 8 9 10 11 12" > color
Use following command to get current hdr metadata
cat /sys/class/display/HDMI/color
Change-Id: I81a5000801b558728689be912c1a642f3b237e65
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Use following command:
echo mode=<value> > /sys/class/display/HDMI/mode
<value> is decimal digits, lower 8bit is color mode, upper 8bit is depth.
For example:
value = 131 = 0x83 means YCbCr444 8bit output
value = 164 = 0xa4 means YCbCr422 10bit output
value = 0 means restore auto mode(8bit, priority YCbCr444)
Change-Id: I256906d91f7075defb4d785cfc15926ca5627093
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
1. HDR MetaData HB2 is 26.
2. Under HF1-53, HDR MetaData should be sent and
PB1 value should be exist in EDID.
Change-Id: I616b4cdcf321ea0080b845c868d1f4cd4881fd14
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
If output tmdsclk is out of sink max tmds clk, we need to set output
mode to 8bit or YCbCr422.
For example, sink max tmds clk is 600M, but 3840x2160p-60 10bit tmdsclk
is 594*1.25 > 600, we set output mode to YCbCr422 10bit which tmds clk
is 594, so we can get max picture quality.
Change-Id: I13fe30dad06757ec52de8d367f1e10a56e63ad92
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
HDR is introduced by HDMI2.0a, which need parsing HDR Static
Metedata data Block defined in EDID, and send Dynamic Range
and Mastering InfoFrame to inform TV to switch to HDR mode.
If TV support HDR, it's EOTF is shown in sysfs node
/sys/class/display/HDMI/color with key word "Supported EOTF:".
For example, "Support EOTF: 0x7" means support following EOTF:
BIT0: Traditional gamma - SDR
BIT1: Traditional gamma - HDR
BIT2: ST_2084
To switch eotf mode, you can use following command:
echo eotf=value > /sys/class/display/HDMI/color
value could be:
0 - Disable sending Dynamic Range and Mastering InfoFrame
1 - Traditional gamma - SDR
2 - Traditional gamma - HDR
4 - ST_2084
0、1 both means SDR mode, 4 is HDR10/Dolby HDR mode.
Change-Id: Ia3d19bbca9b9368cde8dcb11265fbff4684ac603
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
user can change hdmi_dbg_level value to printf log which you want.
1 : cec
2 : hdmi
3 : hdcp
such as, echo 2 > /sys/module/rockchip_hdmi_sysfs/parameters/hdmi_dbg_level
Change-Id: Iaa5a66c2926789694e0d544196bedc81fb3a755a
Signed-off-by: Shen Zhenyi <szy@rock-chips.com>
When box is starting, if kernel resolution is different from uboot,
need to clear hdmi->uboot
Change-Id: Iec56862fe20dcaccc12fefae21de55b56ab2fe54
Signed-off-by: Shen Zhenyi <szy@rock-chips.com>
For YCbCr420 mode, input color and output color must be same as
HDMI_COLOR_YCBCR420.
Change-Id: I302c1a0572d706abdebf5d2d35bd100e0242edf9
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit c3ed688f02f76dfc5533124c41bbb8c016e3cc97)
If uboot_vic has HDMI_UBOOT_NOT_INIT flag, it means uboot just
pass the preset vic value, registers has not been set in uboot.
If not, hdmi has been power up in uboot, should not operate phy
register again.
Change-Id: I64f48bd878ec124a94f25a752a74dc9bae502b2b
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
If hdmi_submit_work work in synchronous mode, the malloced delayed_work
is free by caller, not by hdmi_work_queue, to prevent delayed_work is
free before flush_delayed_work fucntion is executed.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
before calling switch_set_state() when HDMI is removed.
For android hwcompser need to make sure vop is disabled when
received hdmi removing event.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
For system can not be wakeup under following case:
step1. Disable HDMI.
step2. set system to deep sleep mode.
step3. remove HDMI connection.
step4. wake up system.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Unable to handle kernel paging request at virtual address 40ce80f8
pgd = ffffffc001022000
[40ce80f8] *pgd=0000000025b19003, *pmd=000000001cb1f003, *pte=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in: pvrsrvkm(O) drmboot(PO)
CPU: 7 PID: 2558 Comm: kworker/u16:1 Tainted: P W O 3.10.0 #66
Workqueue: hdmi-ff980000.hdmi hdmi_work_queue
task: ffffffc01ca83f00 ti: ffffffc033e00000 task.ti: ffffffc033e00000
PC is at hdmi_wq_insert+0xa4/0x2ac
LR is at hdmi_wq_insert+0x74/0x2ac
pc : [<ffffffc000341014>] lr : [<ffffffc000340fe4>] pstate: 60000145
Use inline fuction hdmi_destroy_modelist replace fb_destroy_modelist.
For unkown reason, variable struct hdmi *hdmi is deferent before and
after calling fb_destroy_modelist.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Application should read /sys/class/display/HDMI/audioinfo
to detect sink device support audio or not.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Introduce feature SUPPORT_YCBCR_INPUT. If VOP can
output YCbCr, VOP output color mode is equal to HDMI
output color mode. Otherwise, VOP just output RGB,
HDMI will conver color space.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
1. In DVI mode, input color and output color should be RGB[0-255];
In HDMI mode, input color should be YCbCr;
2. For MID, HDMI is default disabled.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
1. Rename rk3036 hdmi to rockchip_hdmiv1, support hdmi v1.4;
2. Rename rk3288 hdmi to rockchip_hdmiv2, support hdmi v2.0;
3. Support transmmit 3D picture.
4. 3288 hdmi support HDCP, CEC and TMDSCLK 600M.
5. HDMI video source default is LCDC0, it can be modified in dts by
follow:
rockchip,hdmi_video_source = <DISPLAY_SOURCE_LCDC1>;
HDCP and CEC function default is disabled , it can be enabled in
dts file by follow:
rockchip,hdcp_enable = <1>;
rockchip,cec_enable = <1>;
More information please see
Documentation/devicetree/bindings/video/rockchip_hdmi.txt