video: rockchip: hdmi: add dts property rockchip,defaultdepth
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>
(cherry picked from commit 905228ba1e)
This commit is contained in:
@@ -639,7 +639,7 @@ struct hdmi *rockchip_hdmi_register(struct hdmi_property *property,
|
||||
hdmi->vic = hdmi->property->defaultmode;
|
||||
}
|
||||
hdmi->colormode = HDMI_VIDEO_DEFAULT_COLORMODE;
|
||||
hdmi->colordepth = HDMI_VIDEO_DEFAULT_COLORDEPTH;
|
||||
hdmi->colordepth = hdmi->property->defaultdepth;
|
||||
hdmi->colorimetry = HDMI_COLORIMETRY_NO_DATA;
|
||||
hdmi->mode_3d = HDMI_3D_NONE;
|
||||
hdmi->audio.type = HDMI_AUDIO_DEFAULT_TYPE;
|
||||
|
||||
@@ -440,6 +440,7 @@ struct hdmi_property {
|
||||
int display;
|
||||
int feature;
|
||||
int defaultmode;
|
||||
int defaultdepth;
|
||||
void *priv;
|
||||
};
|
||||
|
||||
|
||||
@@ -528,6 +528,13 @@ static int rockchip_hdmiv2_parse_dt(struct hdmi_dev *hdmi_dev)
|
||||
} else {
|
||||
rk_hdmi_property.defaultmode = HDMI_VIDEO_DEFAULT_MODE;
|
||||
}
|
||||
if (!of_property_read_u32(np, "rockchip,defaultdepth", &val) &&
|
||||
(val > 0)) {
|
||||
pr_info("default depth is %d\n", val);
|
||||
rk_hdmi_property.defaultdepth = val;
|
||||
} else {
|
||||
rk_hdmi_property.defaultdepth = HDMI_VIDEO_DEFAULT_COLORDEPTH;
|
||||
}
|
||||
if (of_get_property(np, "rockchip,phy_table", &val)) {
|
||||
hdmi_dev->phy_table = kmalloc(val, GFP_KERNEL);
|
||||
if (!hdmi_dev->phy_table) {
|
||||
|
||||
Reference in New Issue
Block a user