drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handling
authorClemens Ladisch <clemens@ladisch.de>
Wed, 2 Dec 2009 07:16:55 +0000 (08:16 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 18:22:43 +0000 (10:22 -0800)
commit321cb431c5027d83257d8fbfd957f9d90b469e74
tree42e24184792a02d9e6818048d3baa8d0a403f923
parente7ec863bb38f66855c128df211082a026a81212e
drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handling

commit 5349ef3127c77075ff70b2014f17ae0fbcaaf199 upstream

When the framebuffer driver does not publish detailed timing information
for the current video mode, the correct value for the pixclock field is
zero, not -1.

Since pixclock is actually unsigned, the value -1 would be interpreted
as 4294967295 picoseconds (i.e., about 4 milliseconds) by
register_framebuffer() and userspace programs.

This patch allows X.org's fbdev driver to work.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/radeon/radeon_fb.c