[TEMP]ODROID-C5: test print

Change-Id: I538959d70243b68142cb0d5b23fffe5d53ed361d
Signed-off-by: xiane <sangch.go@gmail.com>
This commit is contained in:
xiane
2026-06-05 14:44:45 +09:00
parent 89ab5b09e8
commit b8585779bf
2 changed files with 41 additions and 8 deletions

View File

@@ -1126,9 +1126,11 @@ drm_mode_validate_driver(struct drm_device *dev,
if (status != MODE_OK)
return status;
if (dev->mode_config.funcs->mode_valid)
printk("[%d]%s LUKE\n", __LINE__, __func__);
if (dev->mode_config.funcs->mode_valid) {
printk("[%d]%s LUKE\n", __LINE__, __func__);
return dev->mode_config.funcs->mode_valid(dev, mode);
else
} else
return MODE_OK;
}
EXPORT_SYMBOL(drm_mode_validate_driver);
@@ -1259,6 +1261,7 @@ void drm_mode_prune_invalid(struct drm_device *dev,
list_for_each_entry_safe(mode, t, mode_list, head) {
if (mode->status != MODE_OK) {
printk("[%d]%s LUKE mode name - %s\n", __LINE__, __func__, mode->name);
list_del(&mode->head);
if (verbose) {
drm_mode_debug_printmodeline(mode);

View File

@@ -71,17 +71,21 @@ static enum drm_mode_status
drm_mode_validate_flag(const struct drm_display_mode *mode,
int flags)
{
printk("[%d]%s LUKE\n", __LINE__, __func__);
if ((mode->flags & DRM_MODE_FLAG_INTERLACE) &&
!(flags & DRM_MODE_FLAG_INTERLACE))
return MODE_NO_INTERLACE;
printk("[%d]%s LUKE\n", __LINE__, __func__);
if ((mode->flags & DRM_MODE_FLAG_DBLSCAN) &&
!(flags & DRM_MODE_FLAG_DBLSCAN))
return MODE_NO_DBLESCAN;
printk("[%d]%s LUKE\n", __LINE__, __func__);
if ((mode->flags & DRM_MODE_FLAG_3D_MASK) &&
!(flags & DRM_MODE_FLAG_3D_MASK))
return MODE_NO_STEREO;
printk("[%d]%s LUKE\n", __LINE__, __func__);
return MODE_OK;
}
@@ -96,11 +100,14 @@ drm_mode_validate_pipeline(struct drm_display_mode *mode,
struct drm_encoder *encoder;
int ret;
printk("[%d]%s LUKE\n", __LINE__, __func__);
/* Step 1: Validate against connector */
ret = drm_connector_mode_valid(connector, mode, ctx, status);
if (ret || *status != MODE_OK)
if (ret || *status != MODE_OK) {
return ret;
}
printk("[%d]%s LUKE\n", __LINE__, __func__);
/* Step 2: Validate against encoders and crtcs */
drm_connector_for_each_possible_encoder(connector, encoder) {
struct drm_bridge *bridge;
@@ -112,6 +119,7 @@ drm_mode_validate_pipeline(struct drm_display_mode *mode,
* will not accept the mode anyway. If all encoders
* reject the mode then, at exit, ret will not be
* MODE_OK. */
printk("[%d]%s LUKE\n", __LINE__, __func__);
continue;
}
@@ -122,6 +130,7 @@ drm_mode_validate_pipeline(struct drm_display_mode *mode,
if (*status != MODE_OK) {
/* There is also no point in continuing for crtc check
* here. */
printk("[%d]%s LUKE\n", __LINE__, __func__);
continue;
}
@@ -138,6 +147,7 @@ drm_mode_validate_pipeline(struct drm_display_mode *mode,
}
}
}
printk("[%d]%s LUKE\n", __LINE__, __func__);
return 0;
}
@@ -210,6 +220,7 @@ drm_connector_mode_valid(struct drm_connector *connector,
connector->helper_private;
int ret = 0;
printk("[%d]%s LUKE\n", __LINE__, __func__);
if (!connector_funcs)
*status = MODE_OK;
else if (connector_funcs->mode_valid_ctx)
@@ -507,7 +518,9 @@ retry:
goto prune;
}
printk("[%d]%s LUKE\n", __LINE__, __func__);
count = (*connector_funcs->get_modes)(connector);
printk("[%d]%s LUKE count - %d\n", __LINE__, __func__, count);
/*
* Fallback for when DDC probe failed in drm_get_edid() and thus skipped
@@ -516,15 +529,19 @@ retry:
if (count == 0 && connector->status == connector_status_connected)
count = drm_add_override_edid_modes(connector);
printk("[%d]%s LUKE count - %d\n", __LINE__, __func__, count);
if (count == 0 && (connector->status == connector_status_connected ||
connector->status == connector_status_unknown))
count = drm_add_modes_noedid(connector, 1024, 768);
count += drm_helper_probe_add_cmdline_mode(connector);
printk("[%d]%s LUKE count - %d\n", __LINE__, __func__, count);
if (count == 0)
goto prune;
printk("[%d]%s LUKE\n", __LINE__, __func__);
drm_connector_list_update(connector);
printk("[%d]%s LUKE\n", __LINE__, __func__);
if (connector->interlace_allowed)
mode_flags |= DRM_MODE_FLAG_INTERLACE;
if (connector->doublescan_allowed)
@@ -533,20 +550,31 @@ retry:
mode_flags |= DRM_MODE_FLAG_3D_MASK;
list_for_each_entry(mode, &connector->modes, head) {
if (mode->status != MODE_OK)
printk("[%d]%s LUKE mode -%s\n", __LINE__, __func__, mode->name);
if (mode->status != MODE_OK) {
printk("[%d]%s LUKE status - %x\n", __LINE__, __func__, mode->status);
continue;
}
mode->status = drm_mode_validate_driver(dev, mode);
if (mode->status != MODE_OK)
if (mode->status != MODE_OK) {
printk("[%d]%s LUKE status - %x\n", __LINE__, __func__, mode->status);
continue;
}
printk("[%d]%s LUKE maxX - %d, maxy - %d\n", __LINE__, __func__, maxX, maxY);
mode->status = drm_mode_validate_size(mode, maxX, maxY);
if (mode->status != MODE_OK)
if (mode->status != MODE_OK) {
printk("[%d]%s LUKE status - %x\n", __LINE__, __func__, mode->status);
continue;
}
printk("[%d]%s LUKE mode_flags - %x\n", __LINE__, __func__, mode_flags);
mode->status = drm_mode_validate_flag(mode, mode_flags);
if (mode->status != MODE_OK)
if (mode->status != MODE_OK) {
printk("[%d]%s LUKE status - %x\n", __LINE__, __func__, mode->status);
continue;
}
ret = drm_mode_validate_pipeline(mode, connector, &ctx,
&mode->status);
@@ -563,8 +591,10 @@ retry:
}
}
if (mode->status != MODE_OK)
if (mode->status != MODE_OK) {
printk("[%d]%s LUKE\n", __LINE__, __func__);
continue;
}
mode->status = drm_mode_validate_ycbcr420(mode, connector);
}