1. 23 5月, 2013 1 次提交
    • T
      OMAPDSS: Fix crash with DT boot · 591a0ac7
      Tomi Valkeinen 提交于
      When booting with DT, there's a crash when omapfb is probed. This is
      caused by the fact that omapdss+DT is not yet supported, and thus
      omapdss is not probed at all. On the other hand, omapfb is always
      probed. When omapfb tries to use omapdss, there's a NULL pointer
      dereference crash. The same error should most likely happen with omapdrm
      and omap_vout also.
      
      To fix this, add an "initialized" state to omapdss. When omapdss has
      been probed, it's marked as initialized. omapfb, omapdrm and omap_vout
      check this state when they are probed to see that omapdss is actually
      there.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
      591a0ac7
  2. 22 3月, 2013 1 次提交
    • F
      [media] Corrected Oops on omap_vout when no manager is connected · 15170025
      Federico Fuga 提交于
      If no manager is connected to the vout device, the omapvid_init() function
      fails. No error condition is checked, and the device is started. Later on,
      when irq is serviced, a NULL pointer dereference occurs.
      Also, the isr routine must be registered only if no error occurs, otherwise
      the isr triggers without the proper setup, and the kernel oops again.
      To prevent this, the error condition is checked, and the streamon function
      exits with error. Also the isr registration call is moved after the setup
      procedure is completed.
      Reviewed-by: NPrabhakar Lad <prabhakar.lad@ti.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      15170025
  3. 06 1月, 2013 1 次提交
    • A
      [media] omap_vout: find_vma() needs ->mmap_sem held · 55ee64b3
      Al Viro 提交于
      Walking rbtree while it's modified is a Bad Idea(tm); besides,
      the result of find_vma() can be freed just as it's getting returned
      to caller.  Fortunately, it's easy to fix - just take ->mmap_sem a bit
      earlier (and don't bother with find_vma() at all if virtp >= PAGE_OFFSET -
      in that case we don't even look at its result).
      
      While we are at it, what prevents VIDIOC_PREPARE_BUF calling
      v4l_prepare_buf() -> (e.g) vb2_ioctl_prepare_buf() -> vb2_prepare_buf() ->
      __buf_prepare() -> __qbuf_userptr() -> vb2_vmalloc_get_userptr() -> find_vma(),
      AFAICS without having taken ->mmap_sem anywhere in process?  The code flow
      is bloody convoluted and depends on a bunch of things done by initialization,
      so I certainly might've missed something...
      
      Cc: stable@vger.kernel.org [2.6.35]
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Sakari Ailus <sakari.ailus@iki.fi>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Archit Taneja <archit@ti.com>
      Cc: Prabhakar Lad <prabhakar.lad@ti.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      55ee64b3
  4. 21 12月, 2012 1 次提交
  5. 19 12月, 2012 2 次提交
  6. 07 12月, 2012 1 次提交
  7. 01 12月, 2012 1 次提交
    • T
      ARM: OMAP: Move plat-omap/dma-omap.h to include/linux/omap-dma.h · 45c3eb7d
      Tony Lindgren 提交于
      Based on earlier discussions[1] we attempted to find a suitable
      location for the omap DMA header in commit 2b6c4e73 (ARM: OMAP:
      DMA: Move plat/dma.h to plat-omap/dma-omap.h) until the conversion
      to dmaengine is complete.
      
      Unfortunately that was before I was able to try to test compile
      of the ARM multiplatform builds for omap2+, and the end result
      was not very good.
      
      So I'm creating yet another all over the place patch to cut the
      last dependency for building omap2+ for ARM multiplatform. After
      this, we have finally removed the driver dependencies to the
      arch/arm code, except for few drivers that are being worked on.
      
      The other option was to make the <plat-omap/dma-omap.h> path
      to work, but we'd have to add some new header directory to for
      multiplatform builds.
      
      Or we would have to manually include arch/arm/plat-omap/include
      again from arch/arm/Makefile for omap2+.
      
      Neither of these alternatives sound appealing as they will
      likely lead addition of various other headers exposed to the
      drivers, which we want to avoid for the multiplatform kernels.
      
      Since we already have a minimal include/linux/omap-dma.h,
      let's just use that instead and add a note to it to not
      use the custom omap DMA functions any longer where possible.
      
      Note that converting omap DMA to dmaengine depends on
      dmaengine supporting automatically incrementing the FIFO
      address at the device end, and converting all the remaining
      legacy drivers. So it's going to be few more merge windows.
      
      [1] https://patchwork.kernel.org/patch/1519591/#
      
      cc: Russell King <linux@arm.linux.org.uk>
      cc: Kevin Hilman <khilman@ti.com>
      cc: "Benoît Cousson" <b-cousson@ti.com>
      cc: Herbert Xu <herbert@gondor.apana.org.au>
      cc: "David S. Miller" <davem@davemloft.net>
      cc: Vinod Koul <vinod.koul@intel.com>
      cc: Dan Williams <djbw@fb.com>
      cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
      cc: David Woodhouse <dwmw2@infradead.org>
      cc: Kyungmin Park <kyungmin.park@samsung.com>
      cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      cc: Hans Verkuil <hans.verkuil@cisco.com>
      cc: Vaibhav Hiremath <hvaibhav@ti.com>
      cc: Lokesh Vutla <lokeshvutla@ti.com>
      cc: Rusty Russell <rusty@rustcorp.com.au>
      cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
      cc: Afzal Mohammed <afzal@ti.com>
      cc: linux-crypto@vger.kernel.org
      cc: linux-media@vger.kernel.org
      cc: linux-mtd@lists.infradead.org
      cc: linux-usb@vger.kernel.org
      cc: linux-fbdev@vger.kernel.org
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      45c3eb7d
  8. 30 11月, 2012 2 次提交
  9. 27 10月, 2012 1 次提交
    • A
      [media] omap_vout: Set DSS overlay_info only if paddr is non zero · 32d640de
      Archit Taneja 提交于
      The omap_vout driver tries to set the DSS overlay_info using set_overlay_info()
      when the physical address for the overlay is still not configured. This happens
      in omap_vout_probe() and vidioc_s_fmt_vid_out().
      The calls to omapvid_init(which internally calls set_overlay_info()) are removed
      from these functions. They don't need to be called as the omap_vout_device
      struct anyway maintains the overlay related changes made. Also, remove the
      explicit call to set_overlay_info() in vidioc_streamon(), this was used to set
      the paddr, this isn't needed as omapvid_init() does the same thing later.
      These changes are required as the DSS2 driver since 3.3 kernel doesn't let you
      set the overlay info with paddr as 0.
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Tested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      32d640de
  10. 17 10月, 2012 1 次提交
  11. 16 10月, 2012 1 次提交
  12. 09 10月, 2012 1 次提交
    • K
      mm: kill vma flag VM_RESERVED and mm->reserved_vm counter · 314e51b9
      Konstantin Khlebnikov 提交于
      A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
      currently it lost original meaning but still has some effects:
      
       | effect                 | alternative flags
      -+------------------------+---------------------------------------------
      1| account as reserved_vm | VM_IO
      2| skip in core dump      | VM_IO, VM_DONTDUMP
      3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
      4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
      
      This patch removes reserved_vm counter from mm_struct.  Seems like nobody
      cares about it, it does not exported into userspace directly, it only
      reduces total_vm showed in proc.
      
      Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.
      
      remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
      remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.
      
      [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Carsten Otte <cotte@de.ibm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Morris <james.l.morris@oracle.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: Venkatesh Pallipadi <venki@google.com>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      314e51b9
  13. 26 9月, 2012 3 次提交
  14. 16 8月, 2012 1 次提交
  15. 24 1月, 2012 1 次提交
  16. 16 1月, 2012 1 次提交
  17. 13 1月, 2012 1 次提交
  18. 11 12月, 2011 1 次提交
  19. 07 12月, 2011 1 次提交
  20. 02 12月, 2011 1 次提交
    • T
      OMAPDSS: APPLY: rewrite overlay enable/disable · aaa874a9
      Tomi Valkeinen 提交于
      Overlays are currently enabled and disabled with a boolean in the struct
      omap_overlay_info. The overlay info is set with ovl->set_overlay_info(),
      and made into use with mgr->apply().
      
      This doesn't work properly, as the enable/disable status may affect also
      other overlays, for example when using fifo-merge. Thus the enabling and
      disabling of the overlay needs to be done outside the normal overlay
      configuration.
      
      This patch achieves that by doing the following things:
      
      1) Add function pointers to struct omap_overlay: enable(), disable() and
      is_enabled(). These are used to do the obvious. The functions may block.
      
      2) Move the "enabled" field from struct omap_overlay to ovl_priv_data.
      
      3) Add a new route for settings to be applied to the HW, called
      "extra_info". The status of the normal info and extra_info are tracked
      separately.
      
      The point here is to allow the normal info to be changed and
      applied in non-blocking matter, whereas the extra_info can only be
      changed when holding the mutex. This makes it possible to, for example,
      set the overlay enable flag, apply it, and wait until the HW has taken
      the flag into use.
      
      This is not possible if the enable flag would be in the normal info, as
      a new value for the flag could be set at any time from the users of
      omapdss.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      aaa874a9
  21. 07 11月, 2011 4 次提交
  22. 04 11月, 2011 1 次提交
  23. 03 10月, 2011 1 次提交
    • A
      OMAPDSS/OMAP_VOUT: Fix incorrect OMAP3-alpha compatibility setting · 11354dd5
      Archit Taneja 提交于
      On OMAP3, in order to enable alpha blending for LCD and TV managers, we needed
      to set LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits in DISPC_CONFIG. On
      OMAP4, alpha blending is always enabled by default, if the above bits are set,
      we switch to an OMAP3 compatibility mode where the zorder values in the pipeline
      attribute registers are ignored and a fixed priority is configured.
      
      Rename the manager_info member "alpha_enabled" to "partial_alpha_enabled" for
      more clarity. Introduce two dss_features FEAT_ALPHA_FIXED_ZORDER and
      FEAT_ALPHA_FREE_ZORDER which represent OMAP3-alpha compatibility mode and OMAP4
      alpha mode respectively. Introduce an overlay cap for ZORDER. The DSS2 user is
      expected to check for the ZORDER cap, if an overlay doesn't have this cap, the
      user is expected to set the parameter partial_alpha_enabled. If the overlay has
      ZORDER cap, the DSS2 user can assume that alpha blending is already enabled.
      
      Don't support OMAP3 compatibility mode for now. Trying to read/write to
      alpha_blending_enabled sysfs attribute issues a warning for OMAP4 and does not
      set the LCDALPHABLENDERENABLE/TVALPHABLENDERENABLE bits.
      
      Change alpha_enabled to partial_alpha_enabled in the omap_vout driver. Use
      overlay cap "OMAP_DSS_OVL_CAP_GLOBAL_ALPHA" to check if overlay supports alpha
      blending or not. Replace this with checks for VIDEO1 pipeline.
      
      Cc: linux-media@vger.kernel.org
      Cc: Lajos Molnar <molnar@ti.com>
      Signed-off-by: NArchit Taneja <archit@ti.com>
      Acked-by: NVaibhav Hiremath <hvaibhav@ti.com>
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      11354dd5
  24. 30 9月, 2011 1 次提交
    • T
      OMAPDSS: remove vaddr from overlay info · 212b0d50
      Tomi Valkeinen 提交于
      overlay_info struct, used to configure overlays, currently includes both
      physical and virtual addresses for the pixels. The vaddr was added to
      support more exotic configurations where CPU would be used to update a
      display, but it is not currently used and there has been no interest in
      the feature. Using CPU to update a screen is also less interesting now
      that OMAP4 has two LCD outputs.
      
      This patch removes the vaddr field, and modifies the users of omapdss
      accordingly. This makes the use of omapdss a bit simpler, as the user
      doesn't need to think if it needs to give the vaddr.
      Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
      212b0d50
  25. 22 9月, 2011 1 次提交
  26. 28 7月, 2011 8 次提交