mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
drm/rockchip: dw_hdmi: Support rk3588 hdr10
Signed-off-by: Algea Cao <algea.cao@rock-chips.com> Change-Id: Ib7618b7627fca48efe4a9812a1b60106b9e1b834
This commit is contained in:
@@ -1191,12 +1191,12 @@ static void hdmi_config_drm_infoframe(struct dw_hdmi_qp *hdmi,
|
||||
val = (frame.version << 8) | (frame.length << 16);
|
||||
hdmi_writel(hdmi, val, PKT_DRMI_CONTENTS0);
|
||||
|
||||
for (i = 0; i < frame.length; i++) {
|
||||
for (i = 0; i <= frame.length; i++) {
|
||||
if (i % 4 == 0)
|
||||
val = buffer[4 + i];
|
||||
val |= buffer[4 + i] << ((i % 4) * 8);
|
||||
val = buffer[3 + i];
|
||||
val |= buffer[3 + i] << ((i % 4) * 8);
|
||||
|
||||
if (i % 4 == 3 || (i == (frame.length - 1)))
|
||||
if (i % 4 == 3 || (i == (frame.length)))
|
||||
hdmi_writel(hdmi, val, PKT_DRMI_CONTENTS1 + ((i / 4) * 4));
|
||||
}
|
||||
|
||||
|
||||
@@ -1729,6 +1729,12 @@ dw_hdmi_rockchip_select_output(struct drm_connector_state *conn_state,
|
||||
/* We prefer use YCbCr422 to send 10bit */
|
||||
if (info->color_formats & DRM_COLOR_FORMAT_YCRCB422)
|
||||
*color_format = DRM_HDMI_OUTPUT_YCBCR422;
|
||||
if (hdmi->is_hdmi_qp) {
|
||||
if (info->color_formats & DRM_COLOR_FORMAT_YCRCB420)
|
||||
*color_format = DRM_HDMI_OUTPUT_YCBCR420;
|
||||
else
|
||||
*color_format = DRM_HDMI_OUTPUT_DEFAULT_RGB;
|
||||
}
|
||||
}
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
@@ -2751,6 +2757,7 @@ static const struct dw_hdmi_plat_data rk3588_hdmi_drv_data = {
|
||||
.phy_force_vendor = true,
|
||||
.ycbcr_420_allowed = true,
|
||||
.is_hdmi_qp = true,
|
||||
.use_drm_infoframe = true,
|
||||
};
|
||||
|
||||
static const struct of_device_id dw_hdmi_rockchip_dt_ids[] = {
|
||||
|
||||
Reference in New Issue
Block a user