- 1920x1200 HDMI 分辨率,我们没有调试过
- 参考 4K@25
uboot
diff --git a/u-boot/drivers/video/drm/dw_hdmi_qp.c b/u-boot/drivers/video/drm/dw_hdmi_qp.c
index 7a8b54f03a7..90858501b93 100644
--- a/u-boot/drivers/video/drm/dw_hdmi_qp.c
+++ b/u-boot/drivers/video/drm/dw_hdmi_qp.c
@@ -1249,12 +1249,14 @@ int rockchip_dw_hdmi_qp_get_timing(struct rockchip_connector *conn, struct displ
unsigned int bus_format;
unsigned long enc_out_encoding;
struct overscan *overscan = &conn_state->overscan;
- const u8 def_modes_vic[6] = {4, 16, 2, 17, 31, 19};
+ //const u8 def_modes_vic[6] = {4, 16, 2, 17, 31, 19};
+ const u8 def_modes_vic[6] = {94};
if (!hdmi)
return -EFAULT;
ret = drm_do_get_edid(&hdmi->adap, conn_state->edid);
+ ret = -1;
if (!ret) {
hdmi->sink_is_hdmi =
drm_detect_hdmi_monitor(edid);
@@ -1354,6 +1356,7 @@ int rockchip_dw_hdmi_qp_get_edid(struct rockchip_connector *conn, struct display
struct dw_hdmi_qp *hdmi = conn->data;
ret = drm_do_get_edid(&hdmi->adap, conn_state->edid);
+ ret = -1;
return ret;
}
kernel
diff --git a/kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
index 26a5e28aab1..0347807fd93 100644
--- a/kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
+++ b/kernel-5.10/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
@@ -124,41 +124,11 @@ static const struct dw_hdmi_audio_tmds_n common_tmds_n_table[] = {
};
static const struct drm_display_mode dw_hdmi_default_modes[] = {
- /* 16 - 1920x1080@60Hz 16:9 */
- { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
- 2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+ /* 94 - 3840x2160[url=home.php?mod=space&uid=633400]@25Hz[/url] 16:9 */
+ { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896,
+ 4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
.picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
- /* 2 - 720x480@60Hz 4:3 */
- { 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),
- .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
- /* 4 - 1280x720@60Hz 16:9 */
- { 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),
- .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
- /* 31 - 1920x1080@50Hz 16:9 */
- { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
- 2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
- DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
- .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
- /* 19 - 1280x720@50Hz 16:9 */
- { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
- 1760, 1980, 0, 720, 725, 730, 750, 0,
- DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
- .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
- /* 17 - 720x576@50Hz 4:3 */
- { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 27000, 720, 732,
- 796, 864, 0, 576, 581, 586, 625, 0,
- DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC),
- .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
- /* 2 - 720x480@60Hz 4:3 */
- { 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),
- .picture_aspect_ratio = HDMI_PICTURE_ASPECT_4_3, },
};
enum frl_mask {
@@ -2094,6 +2064,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
memset(metedata, 0, sizeof(*metedata));
edid = drm_get_edid(connector, hdmi->ddc);
+ edid = NULL;
if (edid) {
dev_dbg(hdmi->dev, "got edid: width[%d] x height[%d]\n",
edid->width_cm, edid->height_cm);
@@ -2169,6 +2140,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
info->color_formats = 0;
dev_info(hdmi->dev, "failed to get edid\n");
+ dev_info(hdmi->dev, "No get edid, use def_modes resolution\n");
}
dw_hdmi_qp_check_output_type_changed(hdmi);