1. 23 9月, 2009 1 次提交
  2. 30 7月, 2009 1 次提交
  3. 07 7月, 2009 1 次提交
    • I
      drivers/video/s3c-fb.c: fix clock setting for Samsung SoC Framebuffer · 600ce1a0
      InKi Dae 提交于
      Correct the CLKVAL_F field value of VIDEO MAIN CONTROLLER 0 REGITSTER.
      
      Frame Rate is 1 / [ { (VSPW+1) + (VBPD+1) + (LIINEVAL + 1) + (VFPD+1)
      } x {(HSPW+1) + (HBPD +1)
      + (HFPD+1) + (HOZVAL + 1) } x { ( CLKVAL+1 ) / ( Frequency of Clock
      source ) } ] and VCLK = Video Clock Source / (CLKVAL +1).
      
      therefore CLKVAL_F should be "CLKVAL_F = Frequency of Clock source / pixel
      clock * refresh".
      
      for this, I added refresh value in platform data like below.
      
      static struct s3c_fb_pd_win xxx_fb_win0 = {
      	/* this is to ensure we use win0 */
      	.win_mode = {
      		.refresh	= 60,
      		.pixclock	= (66+4+2+480)*(15+5+3+800),
      		.left_margin	= 66,
      		.right_margin	= 2,
      		.upper_margin	= 15,
      		.lower_margin	= 3,
      		.hsync_len	= 4,
      		.vsync_len	= 5,
      		.xres		= 480,
      		.yres		= 800,
      	},
      	.max_bpp	= 32,
      	.default_bpp	= 24,
      };
      
      static struct s3c_fb_platdata xxx_lcd_pdata __initdata = {
      	.win[0]		= &xxx_fb_win0,
      	.vidcon0	= VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
      	.vidcon1	= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC
      			| VIDCON1_INV_VCLK | VIDCON1_INV_VDEN,
      	.setup_gpio	= s5pc1xx_fb_gpio_setup_24bpp,
      };
      
      xxx_machine_init()
      {
                         .
                         .
                         .
                     s3c_fb_set_platdata(&xxx_lcd_pdata);
      }
      
      platform data defined in machine code should be setting using
      s3c_fb_set_platdata().
      Signed-off-by: NInKi Dae <inki.dae@samsung.com>
      Cc: Kyungmin Park <kmpark@infradead.org>
      Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      600ce1a0
  4. 17 6月, 2009 2 次提交
    • K
      s3c-fb: fix resource releasing on error during probing · ddc518d9
      Krzysztof Helt 提交于
      All resources are released in s3c_fb_win_release so remove other places of
      resources releasing.  Add releasing of an allocated fb_info structure as
      well.
      Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ddc518d9
    • I
      Samsung SoC Framebuffer driver: add Alpha Channel support · 39000d65
      InKi Dae 提交于
      Add support for the ARGB1888 and ARGB4888 hardware to the Samsung SoC
      Framebuffer driver (s3c-fb.c).
      
      ARGB1888 and ARGB4888 is decided by var->transp.length and this variable
      is set by s3c_fb_check_var().
      
      In s3c_fb_check_var(), if var->vits_per_pixel is 25 or 28, then
      var->transp.length would be 1 or 3.
      
      Therefore alpha mode(ARGB1888 or ARGB4888) could be decided through that
      variable.
      
      For using alpha mode, you need to set the following: This code should be
      added to your machine code as platform data.
      
      static struct s3c_fb_pd_win xxx_fb_win0 = {
      	/* this is to ensure we use win0 */
      	.win_mode = {
      		.pixclock		= (8+8+8+240)*(38+4+38+400),
      		.left_margin	= 8,
      		.right_margin	= 8,
      		.upper_margin	= 38,
      		.lower_margin	= 38,
      		.hsync_len		= 8,
      		.vsync_len		= 4,
      		.xres			= 240,
      		.yres			= 400,
      	},
      	.max_bpp		= 32,
      	.default_bpp	= 24,
      };
      
      static struct s3c_fb_pd_win xxx_fb_win1 = {
      	.win_mode = {
      		.pixclock		= (8+8+8+240)*(38+4+38+400),
      		.left_margin	= 8,
      		.right_margin	= 8,
      		.upper_margin	= 38,
      		.lower_margin	= 38,
      		.hsync_len		= 8,
      		.vsync_len		= 4,
      		.xres			= 240,
      		.yres			= 400,
      	},
      	.max_bpp		= 32,
      	.default_bpp	= 28,
      };
      
      static struct s3c_fb_platdata xxx_lcd_pdata __initdata = {
      	.win[0]		= &ncp_fb_win0,
      	.win[1]		= &ncp_fb_win1,
      	.vidcon0	= VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
      	.vidcon1	= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
      	.setup_gpio	= xxx_fb_gpio_setup,
      };
      
      s3c_fb_set_platdata(&xxx_lcd_pdata);
      
      The above code sets pixelformat for window0 layer to RGB888 and window1
      layer to ARGB4888.
      Signed-off-by: NInKi Dae <inki.dae@samsung.com>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Kyungmin Park <kmpark@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      39000d65
  5. 29 5月, 2009 1 次提交
  6. 01 4月, 2009 1 次提交