1. 01 7月, 2009 1 次提交
    • K
      fbdev: add mutex for fb_mmap locking · 537a1bf0
      Krzysztof Helt 提交于
      Add a mutex to avoid a circular locking problem between the mm layer
      semaphore and fbdev ioctl mutex through the fb_mmap() call.
      
      Also, add mutex to all places where smem_start and smem_len fields change
      so the mutex inside the fb_mmap() is actually used.  Changing of these
      fields before calling the framebuffer_register() are not mutexed.
      
      This is 2.6.31 material.  It removes one lockdep (fb_mmap() and
      register_framebuffer()) but there is still another one (fb_release() and
      register_framebuffer()).  It also cleans up handling of the smem_start and
      smem_len fields used by mutexed section of the fb_mmap().
      Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      537a1bf0
  2. 06 4月, 2009 1 次提交
    • A
      fsl-diu-fb: Pass the proper device for dma mapping routines · f3791889
      Anton Vorontsov 提交于
      The driver should pass a device that specifies internal DMA ops, but
      currently NULL pointers are passed, and thus following bug pops up:
      
        Freescale DIU driver
        ------------[ cut here ]------------
        kernel BUG at arch/powerpc/include/asm/dma-mapping.h:237!
        Oops: Exception in kernel mode, sig: 5 [#1]
        ...
        NIP [c01658b4] allocate_buf+0x0/0x8
        LR [c0306554] fsl_diu_probe+0x2b4/0x518
        Call Trace:
        [df02be10] [c030638c] fsl_diu_probe+0xec/0x518 (unreliable)
        [df02be60] [c020cdec] of_platform_device_probe+0x5c/0x84
        [df02be80] [c018f5d0] really_probe+0x78/0x1a0
        [df02bea0] [c018f7c0] __driver_attach+0xa4/0xa8
        [df02bec0] [c018ea00] bus_for_each_dev+0x60/0x9c
        [df02bef0] [c018f414] driver_attach+0x24/0x34
        [df02bf00] [c018f168] bus_add_driver+0x12c/0x1cc
        [df02bf20] [c018fbdc] driver_register+0x6c/0x110
        [df02bf30] [c020ccb4] of_register_driver+0x54/0x70
        [df02bf40] [c03d0a50] fsl_diu_init+0x70/0xa4
        ...
      
      This patch fixes the issue.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      f3791889
  3. 15 8月, 2008 2 次提交
  4. 06 8月, 2008 1 次提交
  5. 25 7月, 2008 1 次提交
  6. 09 7月, 2008 1 次提交
  7. 05 7月, 2008 1 次提交
    • A
      fsl_diu_fb: fix build with CONFIG_PM=y, plus fix some warnings · 05946bce
      Anton Vorontsov 提交于
      This patch fixes following build error when CONFIG_PM is set.
      
        CC      drivers/video/fsl-diu-fb.o
      drivers/video/fsl-diu-fb.c: In function 'fsl_diu_suspend':
      drivers/video/fsl-diu-fb.c:1327: error: 'ofdev' undeclared (first use in this function)
      drivers/video/fsl-diu-fb.c:1327: error: (Each undeclared identifier is reported only once
      drivers/video/fsl-diu-fb.c:1327: error: for each function it appears in.)
      drivers/video/fsl-diu-fb.c: In function 'fsl_diu_resume':
      drivers/video/fsl-diu-fb.c:1337: error: 'ofdev' undeclared (first use in this function)
      
      While I'm at it, also fix this warning:
      
      drivers/video/fsl-diu-fb.c: In function 'fsl_diu_alloc':
      drivers/video/fsl-diu-fb.c:314: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'phys_addr_t'
      
      And these section mismatches:
      
      ..from the function fsl_diu_remove() to the function .exit.text:uninstall_fb()
      ..from the function fsl_diu_remove() to the function .exit.text:uninstall_fb()
      ..from the function install_fb() to the variable .devinit.data:fsl_diu_mode_db
      ..from the function install_fb() to the variable .devinit.data:fsl_diu_mode_db
      ..from the function fsl_diu_probe() to the function .exit.text:uninstall_fb()
      ..from the function fsl_diu_probe() to the function .exit.text:uninstall_fb()
      
      Also, some sparse fixes: make two functions static, and use NULL where
      appropriate. There are still a lot of sparse warnings, mainly wrt absence
      of __iomem annotations, but some will require ugly __force stuff. I'll leave
      them for now, since proper fix would be not that trivial as few one-liners
      below.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Cc: Timur Tabi <timur@freescale.com>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: York Sun <yorksun@freescale.com>
      Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      05946bce
  8. 12 6月, 2008 1 次提交
  9. 28 4月, 2008 1 次提交
    • Y
      fbdev: powerpc: driver for Freescale 8610 and 5121 DIU · 9b53a9e2
      York Sun 提交于
      The following features are supported:
      plane 0 works as a regular frame buffer, can be accessed by /dev/fb0
      plane 1 has two AOIs (area of interest), can be accessed by /dev/fb1 and /dev/fb2
      plane 2 has two AOIs, can be accessed by /dev/fb3 and /dev/fb4
      Special ioctls support AOIs
      
      All /dev/fb* can be used as regular frame buffer devices, except hardware
      change can only be made through /dev/fb0.  Changing pixel clock has no effect
      on other fbs.
      
      Limitation of usage of AOIs:
      AOIs on the same plane can not be horizonally overlapped
      AOIs have horizonal order, i.e. AOI0 should be always on top of AOI1
      AOIs can not beyond phisical display area. Application should check AOI geometry
      before changing physical resolution on /dev/fb0
      
      required command line parameters to preallocate memory for frame buffer diufb.
      
      optional command line parameters to set modes and monitor
      video=fslfb:[resolution][,bpp][,monitor]
      Syntax:
      
      Resolution
      xres x yres-bpp@refresh_rate, the -bpp and @refresh_rate are optional
      eg, 1024x768, 1280x1024, 1280x1024-32, 1280x1024@60, 1280x1024-32@60, 1280x480-32@60
      
      Bpp
      bpp=32, bpp=24, or bpp=16
      
      Monitor
      monitor=0, monitor=1, monitor=2
      0 is DVI
      1 is Single link LVDS
      2 is Double link LVDS
      
      Note: switching monitor is a board feather, not DIU feather. MPC8610HPCD has three
      monitor ports to swtich to. MPC5121ADS doesn't have additional monitor port. So switching
      monirot port for MPC5121ADS has no effect.
      
      If compiled as a module, it takes pamameters mode, bpp, monitor with the same syntax above.
      Signed-off-by: NYork Sun <yorksun@freescale.com>
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9b53a9e2