for non-understand resolution, you still can get the timings according to the tools, then put them into imx8mq_pll_table, so what's your issue? the same HDMI display doesn't work on 5.10.72 but works on 4.9.88?
For example, I need to click a set of 3400x1300 resolution. For kernel5.10.72, in the path drivers/gpu/drm/mhdp/cdns-mhdp-hdmi-phy.c, I modified the following two places and added them to the last line of the two tables
/* HDMI TX clock control settings, pixel clock is output */
static const struct hdmi_ctrl imx8mq_ctrl_table[] = {
{283500, 283500, 1000, 2835000, 2835000, 0x04, 0x1, 0x1, 420, 0x14C, 0x054, 10, 0x003, 0x003, 2835000, 2835000, 0, 1, 1, 2, 1, 0x0, 283500, 283500},
}和
/* HDMI TX PLL tuning settings, pixel clock is output */
static const struct hdmi_pll_tuning imx8mq_pll_table[] = {
/* bin VCO_freq min/max coar cod NDAC PMOS PTAT div-T P-Gain Coa V2I CAL */
{42, 2835000, 2835000, 0x6, 0x3, 0x1, 0x00, 0x07, 420, 0x42, 183, 6, 225},
};
However, in kernel 5.10.72, we did not study the drm driver thoroughly, and I don't know how to "call" this resolution.
1. Can it still be forced to output through the IMX8MQ chip? What areas need to be modified? There is a drivers/gpu/drm/imx/hpd/imx-hpd.c file on kernel4.14.98. I can modify drm_display_mode edid_cea_modes[] to call it;
struct drm_display_mode *g_mode;
uint8_t g_default_mode = 0;
static struct drm_display_mode edid_cea_modes[] = {
{ DRM_MODE("3400x1300", DRM_MODE_TYPE_DRIVER, 283500, 3400, 3448,
3480, 3504, 0, 1300, 1314, 1315, 1348, 0,
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
}
But how should I call it in kernel5.10.72? I hope you can give me detailed technical guidance, thank you very much!
2. Or do I have to write a way to call the edid.bin file with a resolution of 3400x1300 EDID?
3. Or set video=HDMI-A-1:3400x1300@60 when uboot starts;
Looking forward to your early reply, thank you very much!
refer to the print information
cdns-mhdp-imx 32c00000.hdmi: 0,ff,ff,ff,ff,ff,ff,0 [drm] Reg val is 0x0080 [drm] hdmi phy shutdown complete [drm] Mode: 3840x2160p297000 [drm] Pixel clock: 297000 KHz, character clock: 297000, bpc is 8-bit, fmt 1 [drm] VCO frequency is 2970000 KHz [drm] Sink Not Support SCDC
you can find the mode is called by the cdns-hdmi-core.c,
static const struct drm_bridge_funcs cdns_hdmi_bridge_funcs = {
.attach = cdns_hdmi_bridge_attach,
.enable = cdns_hdmi_bridge_enable,
.disable = cdns_hdmi_bridge_disable,
.mode_set = cdns_hdmi_bridge_mode_set,
.mode_valid = cdns_hdmi_bridge_mode_valid,
.mode_fixup = cdns_hdmi_bridge_mode_fixup,
};
then the mode_set is called by the drm_bridge.c as below path