1. 20 12月, 2011 1 次提交
    • T
      drivers/video: fsl-diu-fb: merge all allocated data into one block · ddd3d905
      Timur Tabi 提交于
      The Freescale DIU driver allocates multiple blocks of memory, including
      multiple DMA buffers.  Merge all of these blocks into one data structure.
      
      Specifically:
      
      1) struct fsl_diu_data now contains everything that needs to be allocated,
      except for the framebuffers themselves.  DMA'able objects are aligned correctly
      within the structure.
      
      2) struct diu_addr is no longer needed, because we don't have to manage
      multiple blocks of DMA memory.
      
      3) Since there's no diu_addr any more, macro DMA_ADDR is used to calculate
      the DMA address of any field in fsl_diu_data.
      
      4) Functions allocate_buf() and free_buf() are no longer needed, because we
      now assume that dma_alloc_coherent() will allocate a page-aligned block,
      and everything is properly aligned with fsl_diu_data already, so we no longer
      need to align any memory blocks ourselves.
      
      5) The "dummy" area descriptor is now defined separately from the other
      five ADs, so NUM_AOIS (previously called FSL_AOI_NUM) is now set to five
      instead of six.  Previously, all six were combined together to avoid a
      separate call to allocate_buf() just for the dummy AD.
      
      6) framebuffer_alloc() and framebuffer_release() are no longer used.  The
      framebuffer is initialized manually.
      
      7) Error handling is simplified since there's only one memory buffer
      allocated.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      ddd3d905
  2. 05 10月, 2011 9 次提交
  3. 19 9月, 2011 11 次提交
  4. 13 7月, 2011 1 次提交
  5. 24 6月, 2011 1 次提交
    • T
      fsl-diu-fb: remove check for pixel clock ranges · 39785eb1
      Timur Tabi 提交于
      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: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      39785eb1
  6. 31 3月, 2011 1 次提交
  7. 01 3月, 2011 1 次提交
  8. 06 8月, 2010 1 次提交
  9. 02 8月, 2010 4 次提交
  10. 22 5月, 2010 1 次提交
    • G
      of: Remove duplicate fields from of_platform_driver · 4018294b
      Grant Likely 提交于
      .name, .match_table and .owner are duplicated in both of_platform_driver
      and device_driver.  This patch is a removes the extra copies from struct
      of_platform_driver and converts all users to the device_driver members.
      
      This patch is a pretty mechanical change.  The usage model doesn't change
      and if any drivers have been missed, or if anything has been fixed up
      incorrectly, then it will fail with a compile time error, and the fixup
      will be trivial.  This patch looks big and scary because it touches so
      many files, but it should be pretty safe.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NSean MacLennan <smaclennan@pikatech.com>
      4018294b
  11. 19 5月, 2010 1 次提交
  12. 07 4月, 2010 1 次提交
    • W
      device_attributes: add sysfs_attr_init() for dynamic attributes · 12765517
      Wolfram Sang 提交于
      Made necessary by 6992f533 ("sysfs: Use
      one lockdep class per sysfs attribute").
      
      Prevents further "key xxx not in .data" bug-reports.  Although some
      attributes could probably be converted to static ones, this is left for
      people having hardware to test.
      
      Found by this semantic patch:
      
      @ init @
      type T;
      identifier A;
      @@
      
              T {
                      ...
                      struct device_attribute A;
                      ...
              };
      
      @ main extends init @
      expression E;
      statement S;
      identifier err;
      T *name;
      @@
      
              ... when != sysfs_attr_init(&name->A.attr);
      (
      +       sysfs_attr_init(&name->A.attr);
              if (device_create_file(E, &name->A))
                      S
      |
      +       sysfs_attr_init(&name->A.attr);
              err = device_create_file(E, &name->A);
      )
      
      While reviewing, I put the initialization to apropriate places.
      Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Greg KH <gregkh@suse.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Mike Isely <isely@pobox.com>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Sujith Thomas <sujith.thomas@intel.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      12765517
  13. 17 2月, 2010 1 次提交
  14. 09 7月, 2009 1 次提交
  15. 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
  16. 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
  17. 15 8月, 2008 2 次提交
  18. 06 8月, 2008 1 次提交