ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register}

Expose omap_device_{alloc, delete, register} so we can use them outside
of omap_device.c.

This approach allows users, which need to manipulate an archdata member
of a device before it is registered, to do so. This is also useful
for users who have their devices created very early so they can be used
at ->reserve() time to reserve CMA memory.

The immediate use case for this is to set the private iommu archdata
member, which binds a device to its associated iommu controller.
This way, generic code will be able to attach omap devices to their
iommus, without calling any omap-specific API.

With this in hand, we can further clean the existing mainline OMAP iommu
driver and its mainline users, and focus on generic IOMMU approaches
for future users (rpmsg/remoteproc and the upcoming generic DMA API).

This patch is still considered an interim solution until DT fully materializes
for omap; at that point, this functionality will be removed as DT will
take care of creating the devices and configuring them correctly.

Tested on OMAP4 with a generic rpmsg/remoteproc that doesn't use any
omap-specific IOMMU API anymore.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
iommu/omap: temporary clk_enable workaround

will be removed once Omar's iommu hwmod patches will be merged

Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
drm: base prime support
XXX squash back into 'drm: base prime support'
drm/omap: dmabuf/prime support
v4l: Add DMABUF as a memory type

Adds DMABUF memory type to v4l framework. Also adds the related file
descriptor in v4l2_plane and v4l2_buffer.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
v4l:vb2: add support for shared buffer (dma_buf)

This patch adds support for DMABUF memory type in videobuf2. It calls relevant
APIs of dma_buf for v4l reqbuf / qbuf / dqbuf operations.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>

Conflicts:

	drivers/media/video/videobuf2-core.c
v4l:vb: remove warnings about MEMORY_DMABUF

Adding DMABUF memory type causes videobuf to complain about not using it
in some switch cases. This patch removes these warnings.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
v4l:vb2: Add dma-contig allocator as dma_buf user

This patch makes changes for adding dma-contig as a dma_buf user. It provides
function implementations for the {import, acquire, release, put}_dmabuf()
mem_ops of DMABUF memory type.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
v4l2 dmabuf fixes.. squash back
more v4l2 dmabuf fixes.. squash back
vb2 dmabuf fixes
ARM: OMAP: iommu-added cache flushing operation for L2 cache

Signed-off-by: Ramesh Gupta <grgupta@ti.com>
Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
ARM: OMAP: iommu-dmm fixes

This fixes the following:
  1. pgd and pte entries weren't getting flushed out leading to MMU faults.
  2. Cache invalidate was setting wrong size parameter to
     memory_regain_ownership leading cache invalidate function to fail.

Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
iommu/omap: disable mmu interrupts after the first fault

Signed-off-by: Guzman Lugo, Fernando <fernando.lugo@ti.com>
XXX omap/drm: dmm should return proper errors
staging: drm/omap: get supported color formats from ovl

Get the supported formats for a plane from ovl's supported_modes
bitmask.

Signed-off-by: Rob Clark <rob@ti.com>
staging: drm/omap: add a workqueue

Add a workqueue for omapdrm driver, which is needed for at least a
couple things currently: (1) moving omap_gem_roll() to a non-atomic
context, (2) synchronizing page flips w/ DSS scanout related irq's
(in particular not unmapping previous buffer until DSS finishes
scanout).

Signed-off-by: Rob Clark <rob@ti.com>
staging: drm/omap: call omap_gem_roll() in non-atomic ctx

If fbcon calls us from atomic context, push the work off to the
workqueue to avoid calling into the gem/dmm code in an atomic
context.

Signed-off-by: Rob Clark <rob@ti.com>
staging: drm/omap: some minor fb cleanups

Now that 'struct drm_plane' has a pixel_format field, use that.  And
fix a minor typo.

Signed-off-by: Rob Clark <rob@ti.com>