参照文档中的修改方式,思路是不读取edid,在默认分辨率中只设置自己想要的固定分辨率,但是结果还是有多种分辨率可以选择,
大佬们帮忙看下 我哪部分漏掉没有改呢?
红色是我修改的代码
在dw-hdmi.c中的
static int dw_hdmi_connector_get_modes(struct drm_connector *connector){ ... edid = dw_hdmi_get_edid(hdmi, connector); edid =NULL;
if(edid){ .... }
static struct edid *dw_hdmi_get_edid(struct dw_hdmi *hdmi, struct drm_connector *connector) { struct edid *edid;
if (!hdmi->ddc) return NULL;
edid = drm_get_edid(connector, hdmi->ddc); edid =NULL;
if (!edid) { dev_dbg(hdmi->dev, "failed to get edid\n"); return NULL; } ...
}
static const struct drm_display_mode dw_hdmi_default_modes[] = {
//只留了这1280*720的分辨率
/* 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, },
// /* 16 - 1920x1080@60Hz 16:9 */
// { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
// 2052, 2200, 0, 1080, 1084, 1089, 1125, 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, },
};
|