@@ -642,7 +642,7 @@ static int adv7511_mode_valid(struct adv7511 *adv7511,
/*
* some work well modes which want to put in the front of the mode list.
*/
- DRM_DEBUG("Checking mode %ix%i@%i clock: %i...",
+ printk("JDB: Checking mode %ix%i@%i clock: %i...",
mode->hdisplay, mode->vdisplay, drm_mode_vrefresh(mode), mode->clock);
if ((mode->hdisplay == 1920 && mode->vdisplay == 1080 && mode->clock == 148500) ||
(mode->hdisplay == 1280 && mode->vdisplay == 800 && mode->clock == 83496) ||
@@ -652,11 +652,11 @@ static int adv7511_mode_valid(struct adv7511 *adv7511,
(mode->hdisplay == 1024 && mode->vdisplay == 768 && mode->clock == 81833) ||
(mode->hdisplay == 800 && mode->vdisplay == 600 && mode->clock == 40000)) {
mode->type |= DRM_MODE_TYPE_PREFERRED;
- DRM_DEBUG("OK\n");
+ printk("Whitelist OK\n");
return MODE_OK;
}
- DRM_DEBUG("BAD\n");
- return MODE_BAD;
+ printk("Witelist BAD (still reporting OK)\n");
+ return MODE_OK;
}
static void adv7511_mode_set(struct adv7511 *adv7511,
@@ -563,8 +563,16 @@ static void dsi_mipi_init(struct dw_dsi *dsi)
/* dsi wake up */
writel(POWERUP, base + PWR_UP);
- DRM_DEBUG_DRIVER("lanes=%d, pixel_clk=%d kHz, bytes_freq=%d kHz\n",
- dsi->lanes, mode->clock, phy->lane_byte_clk_kHz);
+ printk("JDB: %s: lanes=%d, pixel_clk=%d kHz, req_kHz=%d kHz, bytes_freq=%d kHz\n",
+ __func__, dsi->lanes, mode->clock, dphy_req_kHz, phy->lane_byte_clk_kHz);
+
+ printk("JDB: %s: %d/%d =?= %d/3 .... ", __func__, mode->clock, dsi->lanes, phy->lane_byte_clk_kHz);
+ if (mode->clock/dsi->lanes == phy->lane_byte_clk_kHz/3)
+ printk("JDB: MATCHED GOOD!\n");
+ else
+ printk("JDB: DOES NOT MATCH, BAD!\n");
+
+
}
static void dsi_encoder_disable(struct drm_encoder *encoder)
@@ -193,6 +193,9 @@ static void ade_set_pix_clk(struct ade_hw_ctx *ctx,
if (ret)
DRM_ERROR("failed to set pixel clk %dHz (%d)\n", clk_Hz, ret);
adj_mode->clock = clk_get_rate(ctx->ade_pix_clk) / 1000;
+
+ printk("JDB: %s: %ix%i@%i requested clock: %ld, adjusted clock: %ld\n", __func__, mode->hdisplay, mode->vdisplay, drm_mode_vrefresh(mode), mode->clock, adj_mode->clock);
+
}
static void ade_ldi_set_mode(struct ade_crtc *acrtc,
We have a better solution upstream but for older kernels this can let folks figure out if a mode is valid or not. Signed-off-by: John Stultz <john.stultz@linaro.org> --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 8 ++++---- drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 12 ++++++++++-- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 3 +++ 3 files changed, 17 insertions(+), 6 deletions(-) -- 2.7.4