summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_crtc.c15
-rw-r--r--linux-core/drm_modes.c8
2 files changed, 13 insertions, 10 deletions
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index 245fe5be..04d3b723 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -436,8 +436,11 @@ bool drm_crtc_set_mode(struct drm_crtc *crtc, struct drm_display_mode *mode,
*/
crtc->funcs->mode_set(crtc, mode, adjusted_mode, x, y);
list_for_each_entry(output, &dev->mode_config.output_list, head) {
- if (output->crtc == crtc)
+ if (output->crtc == crtc) {
+ dev_warn(&output->dev->pdev->dev, "%s: set mode %s\n",
+ output->name, mode->name);
output->funcs->mode_set(output, mode, adjusted_mode);
+ }
}
/* Now, enable the clocks, plane, pipe, and outputs that we set up. */
@@ -787,16 +790,14 @@ static void drm_pick_crtcs (drm_device_t *dev)
des_mode = NULL;
list_for_each_entry(des_mode, &output->modes, head) {
- if (des_mode->flags & DRM_MODE_TYPE_PREFERRED)
+ if (des_mode->type & DRM_MODE_TYPE_PREFERRED)
break;
}
- /* No preferred mode, let's select another which should pick
- * the default 640x480 if nothing else is here.
- */
- if (!des_mode || !(des_mode->flags & DRM_MODE_TYPE_PREFERRED)) {
+ /* No preferred mode, let's just select the first available */
+ if (!des_mode || !(des_mode->type & DRM_MODE_TYPE_PREFERRED)) {
list_for_each_entry(des_mode, &output->modes, head) {
- if (des_mode->flags & DRM_MODE_TYPE_DEFAULT)
+ if (des_mode)
break;
}
}
diff --git a/linux-core/drm_modes.c b/linux-core/drm_modes.c
index 41b5fade..fd00841e 100644
--- a/linux-core/drm_modes.c
+++ b/linux-core/drm_modes.c
@@ -46,12 +46,12 @@
void drm_mode_debug_printmodeline(struct drm_device *dev,
struct drm_display_mode *mode)
{
- DRM_DEBUG("Modeline %d:\"%s\" %d %d %d %d %d %d %d %d %d %d\n",
+ DRM_DEBUG("Modeline %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x\n",
mode->mode_id, mode->name, mode->vrefresh, mode->clock,
mode->hdisplay, mode->hsync_start,
mode->hsync_end, mode->htotal,
mode->vdisplay, mode->vsync_start,
- mode->vsync_end, mode->vtotal);
+ mode->vsync_end, mode->vtotal, mode->type);
}
EXPORT_SYMBOL(drm_mode_debug_printmodeline);
@@ -387,8 +387,10 @@ void drm_mode_prune_invalid(struct drm_device *dev,
list_for_each_entry_safe(mode, t, mode_list, head) {
if (mode->status != MODE_OK) {
list_del(&mode->head);
- if (verbose)
+ if (verbose) {
+ drm_mode_debug_printmodeline(dev, mode);
DRM_DEBUG("Not using %s mode %d\n", mode->name, mode->status);
+ }
kfree(mode);
}
}