drm_mode_debug_printmodeline doesn't need struct drm_device *

Makes printing modelines from some routines easier.
main
Jesse Barnes 2008-05-23 18:41:58 -07:00 committed by Jesse Barnes
parent 1cde3cc1ac
commit b4d8cda8e6
6 changed files with 16 additions and 20 deletions

View File

@ -404,7 +404,7 @@ void drm_crtc_probe_single_output_modes(struct drm_output *output, int maxX, int
mode->vrefresh = drm_mode_vrefresh(mode);
drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);
drm_mode_debug_printmodeline(dev, mode);
drm_mode_debug_printmodeline(mode);
}
}
@ -1161,8 +1161,8 @@ int drm_crtc_set_config(struct drm_mode_set *set)
if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) {
DRM_DEBUG("modes are different\n");
drm_mode_debug_printmodeline(dev, &set->crtc->mode);
drm_mode_debug_printmodeline(dev, set->mode);
drm_mode_debug_printmodeline(&set->crtc->mode);
drm_mode_debug_printmodeline(set->mode);
changed = true;
}
@ -1193,7 +1193,7 @@ int drm_crtc_set_config(struct drm_mode_set *set)
set->crtc->enabled = (set->mode != NULL);
if (set->mode != NULL) {
DRM_DEBUG("attempting to set mode from userspace\n");
drm_mode_debug_printmodeline(dev, set->mode);
drm_mode_debug_printmodeline(set->mode);
if (!drm_crtc_set_mode(set->crtc, set->mode, set->x,
set->y)) {
set->crtc->enabled = save_enabled;

View File

@ -561,8 +561,7 @@ extern void drm_mode_probed_add(struct drm_output *output, struct drm_display_mo
extern void drm_mode_remove(struct drm_output *output, struct drm_display_mode *mode);
extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
struct drm_display_mode *mode);
extern void drm_mode_debug_printmodeline(struct drm_device *dev,
struct drm_display_mode *mode);
extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode);
extern void drm_mode_config_init(struct drm_device *dev);
extern void drm_mode_config_cleanup(struct drm_device *dev);
extern void drm_mode_set_name(struct drm_display_mode *mode);

View File

@ -43,8 +43,7 @@
*
* Describe @mode using DRM_DEBUG.
*/
void drm_mode_debug_printmodeline(struct drm_device *dev,
struct drm_display_mode *mode)
void drm_mode_debug_printmodeline(struct drm_display_mode *mode)
{
DRM_DEBUG("Modeline %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x\n",
mode->mode_id, mode->name, mode->vrefresh, mode->clock,
@ -388,7 +387,7 @@ void drm_mode_prune_invalid(struct drm_device *dev,
if (mode->status != MODE_OK) {
list_del(&mode->head);
if (verbose) {
drm_mode_debug_printmodeline(dev, mode);
drm_mode_debug_printmodeline(mode);
DRM_DEBUG("Not using %s mode %d\n", mode->name, mode->status);
}
kfree(mode);

View File

@ -846,7 +846,7 @@ static void intel_crtc_mode_set(struct drm_crtc *crtc,
I915_WRITE(PFIT_CONTROL, 0);
DRM_DEBUG("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B');
drm_mode_debug_printmodeline(dev, mode);
drm_mode_debug_printmodeline(mode);
#if 0
if (!xf86ModesEqual(mode, adjusted_mode)) {
@ -1015,8 +1015,6 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
temp |= (pipe << 28);
temp |= CURSOR_MODE_64_ARGB_AX | MCURSOR_GAMMA_ENABLE;
DRM_DEBUG("cusror base %x\n", addr);
I915_WRITE(control, temp);
I915_WRITE(base, addr);

View File

@ -288,9 +288,9 @@ static int intelfb_set_par(struct fb_info *info)
return -EINVAL;
found = 0;
drm_mode_debug_printmodeline(dev, drm_mode);
drm_mode_debug_printmodeline(drm_mode);
list_for_each_entry(search_mode, &output->modes, head) {
drm_mode_debug_printmodeline(dev, search_mode);
drm_mode_debug_printmodeline(search_mode);
if (drm_mode_equal(drm_mode, search_mode)) {
drm_mode_destroy(dev, drm_mode);
drm_mode = search_mode;
@ -310,7 +310,7 @@ static int intelfb_set_par(struct fb_info *info)
par->set.mode = drm_mode;
par->our_mode = drm_mode;
drm_mode_debug_printmodeline(dev, drm_mode);
drm_mode_debug_printmodeline(drm_mode);
/* attach mode */
drm_mode_attachmode_crtc(dev, par->set.crtc, par->set.mode);
} else {
@ -330,8 +330,8 @@ static int intelfb_set_par(struct fb_info *info)
if (par->crtc->x != var->xoffset || par->crtc->y != var->yoffset)
changed = 1;
drm_mode_debug_printmodeline(dev, drm_mode);
drm_mode_debug_printmodeline(dev, &par->crtc->mode);
drm_mode_debug_printmodeline(drm_mode);
drm_mode_debug_printmodeline(&par->crtc->mode);
if (!drm_mode_equal(drm_mode, &par->crtc->mode))
changed = 1;

View File

@ -221,9 +221,9 @@ static int radeonfb_set_par(struct fb_info *info)
break;
}
drm_mode_debug_printmodeline(dev, drm_mode);
drm_mode_debug_printmodeline(drm_mode);
list_for_each_entry(search_mode, &output->modes, head) {
drm_mode_debug_printmodeline(dev, search_mode);
drm_mode_debug_printmodeline(search_mode);
if (radeonfb_mode_equal(drm_mode, search_mode)) {
drm_mode_destroy(dev, drm_mode);
drm_mode = search_mode;
@ -237,7 +237,7 @@ static int radeonfb_set_par(struct fb_info *info)
drm_mode_detachmode_crtc(dev, par->fb_mode);
}
par->fb_mode = drm_mode;
drm_mode_debug_printmodeline(dev, drm_mode);
drm_mode_debug_printmodeline(drm_mode);
/* attach mode */
drm_mode_attachmode_crtc(dev, par->crtc, par->fb_mode);
}