drm_mode_debug_printmodeline doesn't need struct drm_device *
authorJesse Barnes <jbarnes@jbarnes-t61.(none)>
Sat, 24 May 2008 01:41:58 +0000 (18:41 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Sat, 24 May 2008 01:41:58 +0000 (18:41 -0700)
Makes printing modelines from some routines easier.

linux-core/drm_crtc.c
linux-core/drm_crtc.h
linux-core/drm_modes.c
linux-core/intel_display.c
linux-core/intel_fb.c
linux-core/radeon_ms_fb.c

index c011db3..e05466e 100644 (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;
index 1d36dcd..ae2dd17 100644 (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);
index 3763ca6..897777d 100644 (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);
index 273f76d..e7162c2 100644 (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);
 
index 9934e3a..4f5a000 100644 (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;
        
index 082279e..e320144 100644 (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);
        }