1. 11 8月, 2010 17 次提交
  2. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  3. 17 1月, 2010 1 次提交
    • M
      revert "drivers/video/s3c-fb.c: fix clock setting for Samsung SoC Framebuffer" · eb29a5cc
      Mark Brown 提交于
      Fix divide by zero and broken output.  Commit 600ce1a0 ("fix clock
      setting for Samsung SoC Framebuffer") introduced a mandatory refresh
      parameter to the platform data for the S3C framebuffer but did not
      introduce any validation code, causing existing platforms (none of which
      have refresh set) to divide by zero whenever the framebuffer is
      configured, generating warnings and unusable output.
      
      Ben Dooks noted several problems with the patch:
      
       - The platform data supplies the pixclk directly and should already
         have taken care of the refresh rate.
       - The addition of a window ID parameter doesn't help since only the
         root framebuffer can control the pixclk.
       - pixclk is specified in picoseconds (rather than Hz) as the patch
         assumed.
      
      and suggests reverting the commit so do that.  Without fixing this no
      mainline user of the driver will produce output.
      
      [akpm@linux-foundation.org: don't revert the correct bit]
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: InKi 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>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      eb29a5cc
  4. 23 9月, 2009 1 次提交
  5. 30 7月, 2009 1 次提交
  6. 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
  7. 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
  8. 29 5月, 2009 1 次提交
  9. 01 4月, 2009 1 次提交