mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
drm/rockchip: rgb: add debug log for mode_valid func
The debug msg may be like: rockchip-rgb ff000000.syscon:rgb: [drm:rockchip_rgb_encoder_mode_valid] *ERROR* mode [320x480] clock 79000 is higher than max_clock 74250 Signed-off-by: Damon Ding <damon.ding@rock-chips.com> Change-Id: I179be3bd7bdb5f562c03cb33d30c72364bce74f4
This commit is contained in:
@@ -316,14 +316,18 @@ rockchip_rgb_encoder_mode_valid(struct drm_encoder *encoder,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
struct rockchip_rgb *rgb = encoder_to_rgb(encoder);
|
||||
struct device *dev = rgb->dev;
|
||||
u32 request_clock = mode->clock;
|
||||
u32 max_clock = rgb->max_dclk_rate;
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
request_clock *= 2;
|
||||
|
||||
if (max_clock != 0 && request_clock > max_clock)
|
||||
if (max_clock != 0 && request_clock > max_clock) {
|
||||
DRM_DEV_ERROR(dev, "mode [%dx%d] clock %d is higher than max_clock %d\n",
|
||||
mode->hdisplay, mode->vdisplay, request_clock, max_clock);
|
||||
return MODE_CLOCK_HIGH;
|
||||
}
|
||||
|
||||
return MODE_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user