Commit 39785eb1d3e6c58cc8bf8f6990956a58037ecc75

Authored by Timur Tabi
Committed by Paul Mundt
1 parent 9377c51752

fsl-diu-fb: remove check for pixel clock ranges

The Freescale DIU framebuffer driver defines two constants, MIN_PIX_CLK and
MAX_PIX_CLK, that are supposed to represent the lower and upper limits of
the pixel clock.  These values, however, are true only for one platform
clock rate (533MHz) and only for the MPC8610.  So the actual range for
the pixel clock is chip-specific, which means the current values are almost
always wrong.  The chance of an out-of-range pixel clock being used are also
remote.

Rather than try to detect an out-of-range clock in the DIU driver, we depend
on the board-specific pixel clock function (e.g. p1022ds_set_pixel_clock)
to clamp the pixel clock to a supported value.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Showing 2 changed files with 0 additions and 22 deletions Side-by-side Diff

drivers/video/fsl-diu-fb.c
... ... @@ -555,8 +555,6 @@
555 555 static int fsl_diu_check_var(struct fb_var_screeninfo *var,
556 556 struct fb_info *info)
557 557 {
558   - unsigned long htotal, vtotal;
559   -
560 558 pr_debug("check_var xres: %d\n", var->xres);
561 559 pr_debug("check_var yres: %d\n", var->yres);
562 560  
... ... @@ -634,20 +632,6 @@
634 632 var->transp.msb_right = 0;
635 633  
636 634 break;
637   - }
638   - /* If the pixclock is below the minimum spec'd value then set to
639   - * refresh rate for 60Hz since this is supported by most monitors.
640   - * Refer to Documentation/fb/ for calculations.
641   - */
642   - if ((var->pixclock < MIN_PIX_CLK) || (var->pixclock > MAX_PIX_CLK)) {
643   - htotal = var->xres + var->right_margin + var->hsync_len +
644   - var->left_margin;
645   - vtotal = var->yres + var->lower_margin + var->vsync_len +
646   - var->upper_margin;
647   - var->pixclock = (vtotal * htotal * 6UL) / 100UL;
648   - var->pixclock = KHZ2PICOS(var->pixclock);
649   - pr_debug("pixclock set for 60Hz refresh = %u ps\n",
650   - var->pixclock);
651 635 }
652 636  
653 637 var->height = -1;
include/linux/fsl-diu-fb.h
... ... @@ -24,12 +24,6 @@
24 24 * See mpc8610fb_set_par(), map_video_memory(), and unmap_video_memory()
25 25 */
26 26 #define MEM_ALLOC_THRESHOLD (1024*768*4+32)
27   -/* Minimum value that the pixel clock can be set to in pico seconds
28   - * This is determined by platform clock/3 where the minimum platform
29   - * clock is 533MHz. This gives 5629 pico seconds.
30   - */
31   -#define MIN_PIX_CLK 5629
32   -#define MAX_PIX_CLK 96096
33 27  
34 28 #include <linux/types.h>
35 29