diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-02-28 16:40:13 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2010-02-28 23:34:03 +0100 |
commit | 8acd35d012b7f43872c56cf0928ab5c7ce1c2b28 (patch) | |
tree | 1d9183f5842bad51d837bf2d07ee14e954441bb7 | |
parent | c7bf4a334c1e498007a9e785948cb03c8da0f029 (diff) |
Don't choke if userspace provides a pixel clock value
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
-rw-r--r-- | drivers/mfd/glamo/glamo-kms-fb.c | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/drivers/mfd/glamo/glamo-kms-fb.c b/drivers/mfd/glamo/glamo-kms-fb.c index 57680eddccc..6d4b9ea04bc 100644 --- a/drivers/mfd/glamo/glamo-kms-fb.c +++ b/drivers/mfd/glamo/glamo-kms-fb.c @@ -177,37 +177,35 @@ static int glamofb_set_par(struct fb_info *info) struct drm_device *dev = par->dev; struct fb_var_screeninfo *var = &info->var; int i; + struct drm_crtc *crtc; + int ret; DRM_DEBUG("%d %d\n", var->xres, var->pixclock); if (var->pixclock != -1) { + DRM_ERROR("Warning: userspace gave me a pixel clock value (%i)" + "- I'm ignoring it.\n", var->pixclock); + } - DRM_ERROR("PIXEL CLOCK SET\n"); - return -EINVAL; - } else { - struct drm_crtc *crtc; - int ret; - - list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { - struct glamo_crtc *glamo_crtc = to_glamo_crtc(crtc); - - for (i = 0; i < par->crtc_count; i++) - if (crtc->base.id == par->crtc_ids[i]) - break; - - if (i == par->crtc_count) - continue; - - if (crtc->fb == glamo_crtc->mode_set.fb) { - mutex_lock(&dev->mode_config.mutex); - ret = crtc->funcs->set_config(&glamo_crtc->mode_set); - mutex_unlock(&dev->mode_config.mutex); - if (ret) - return ret; - } + list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { + struct glamo_crtc *glamo_crtc = to_glamo_crtc(crtc); + + for (i = 0; i < par->crtc_count; i++) + if (crtc->base.id == par->crtc_ids[i]) + break; + + if (i == par->crtc_count) + continue; + + if (crtc->fb == glamo_crtc->mode_set.fb) { + mutex_lock(&dev->mode_config.mutex); + ret = crtc->funcs->set_config(&glamo_crtc->mode_set); + mutex_unlock(&dev->mode_config.mutex); + if (ret) + return ret; } - return 0; } + return 0; } static int glamofb_pan_display(struct fb_var_screeninfo *var, |