android_kernel_google_msm/include/media/videobuf-msm-mem.h
David Brown 096874a08b msm: camera: videobuf mem extensions
Including:

commit 76b9b4d881b32c13356c736a07b2ee363d5ddd9b
Author: Mitchel Humpherys <mitchelh@codeaurora.org>
Date:   Mon Sep 17 14:33:22 2012 -0700

    ion: remove obsolete ion flags

    The symbols CACHED and UNCACHED have been replaced by ION_FLAG_CACHED
    upstream. This removes them from the kernel.

    Change-Id: I565dcc4595298ce6a0e81dd8cb98b86a1b38fdb2
    Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>

commit 7d72bad55a0e03392d81eee77a9a8c9df6b73a9a
Author: Hanumant Singh <hanumant@codeaurora.org>
Date:   Wed Aug 29 18:39:44 2012 -0700

    ion: Port heap mask change to ion

    Heap mask field passes as argument at allocation time to specify ion
    heap.

    Change-Id: I8881dfc491dc0f8f70581ad97b35756a6a33dd6d
    Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
    Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>

commit 79b9f2233530ce7f3af51a64d257dd4f7f5a0974
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Mon Jul 2 12:38:34 2012 -0700

    msm: camera: Dynamically register domain and attach to device.

    Starting with B family chips, the IOMMU client is responsible
    for registering a domain (page table) and attaching it with
    the corresponding device context when required.

    Change-Id: I3b17ce6e27c74516325198f89d88d3635bdbff50
    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

commit b14ed96f74b1258b1f102831a2b0ccd56f991132
Author: Laura Abbott <lauraa@codeaurora.org>
Date:   Mon Jan 30 14:18:08 2012 -0800

    gpu: ion: Pull in patches for 3.4

    Pull in Ion patches for 3.4 upgrade. Inclues the following
    patches from google:

     commit 7191e9ba25
     Author: Rebecca Schultz Zavin <rebecca@android.com>
     Date:   Mon Jan 30 14:18:08 2012 -0800

         ion: Switch map/unmap dma api to sg_tables

         Switch these api's from scatterlists to sg_tables

         Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

     commit 6f9e56945d
     Author: Rebecca Schultz Zavin <rebecca@android.com>
     Date:   Tue Jan 31 09:40:30 2012 -0800

         ion: Add reserve function to ion

         Rather than requiring each platform call memblock_remove or reserve
         from the board file, add this to ion

         Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

     commit 9ae7e01de1
     Author: KyongHo Cho <pullip.cho@samsung.com>
     Date:   Wed Sep 7 11:27:07 2011 +0900

         gpu: ion: several bugfixes and enhancements of ION

         1. Verifying if the size of memory allocation in ion_alloc() is aligned
         by PAGE_SIZE at least. If it is not, this change makes the size to be
         aligned by PAGE_SIZE.

         2. Unmaps all mappings to the kernel and DMA address spaces when
         destroying ion_buffer in ion_buffer_destroy(). This prevents leaks in
         those virtual address spaces.

         3. Makes the return value of ion_alloc() to be explicit Linux error code
         when it fails to allocate a buffer.

         4. Makes ion_alloc() implementation simpler. Removes 'goto' statement and
         relavant call to ion_buffer_put().

         5. Checks if the task is valid before calling put_task_struct() due
         to failure on creating a ion client in ion_client_create().

         6. Returns error when buffer allocation requested by userspace is failed.

         Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>

     commit 043a61468f
     Author: Rebecca Schultz Zavin <rebecca@android.com>
     Date:   Wed Feb 1 11:09:46 2012 -0800

         ion: Switch ion to use dma-buf

         Ion now uses dma-buf file descriptors to share
         buffers with userspace.  Ion becomes a dma-buf
         exporter and any driver that can import dma-bufs
         can now import ion file descriptors.

         Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

     commit 0d1259b5f8
     Author: Rebecca Schultz Zavin <rebecca@android.com>
     Date:   Mon Apr 30 16:45:38 2012 -0700

         gpu: ion: Use alloc_pages instead of vmalloc from the system heap

         With this change the ion_system_heap will only use kernel address
         space when the memory is mapped into the kernel (rare case).

         Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

     commit be4a1ee79a
     Author: Rebecca Schultz Zavin <rebecca@android.com>
     Date:   Thu Apr 26 20:44:10 2012 -0700

         gpu: ion: support begin/end and kmap/kunmap dma_buf ops

         These ops were added in the 3.4 kernel.  This patch adds support
         for them to ion.  Previous ion_map/unmap_kernel api is also
         retained in addition to this new api.

         Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

     commit 46d71337f9
     Author: Rebecca Schultz Zavin <rebecca@android.com>
     Date:   Mon May 7 16:06:32 2012 -0700

         gpu: ion: Allocate the sg_table at creation time rather than dynamically

         Rather than calling map_dma on the allocations dynamically, this patch
         switches to creating the sg_table at the time the buffer is created.
         This is necessary because in future updates the sg_table will be used
         for cache maintenance.

         Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

     commit 903f6c716d
     Author: Rebecca Schultz Zavin <rebecca@android.com>
     Date:   Wed May 23 12:55:55 2012 -0700

         gpu: ion: Get an sg_table from an ion handle

         This patch adds an interface to return and sg_table given a
         valid ion handle.

         Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

    The commit also includes fixups needed for MSM specific code.

    Change-Id: Idbcfa9d6af0febf06f56daaa6beaa59cc08e4351
    Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

commit 5b1e6f1afb70ace03b32b48d4d70f34302decdc2
Author: Laura Abbott <lauraa@codeaurora.org>
Date:   Mon May 28 08:13:55 2012 -0700

    msm: camera: Remove subsystem_map header

    The old subsystem_map APIs are being deprecated. The
    msm_subsystem_map.h header file used to have definitions for
    iommu domains. Remove this header file and include iommu_domains.h
    to get the necessary iommu definitions.

    Change-Id: I417a357789a8fea16bbadd98663a8ebe873ff4e7
    Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

commit 459429648e0dd7c9b2bbaffc63a4086614e4109e
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Wed Feb 15 19:21:25 2012 -0800

    msm: v4l2: use new IOMMU mapping API.

    The ion_phys API is being deprecated. Instead there
    is a new set of API that does the same thing as ion_phys
    if the system has no IOMMU enabled. Otherwise, it
    returns an IOMMU device virtual address.

    Change-Id: I1f01d33cbc6d236d28c9193a90e48377b9fb35cc
    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

commit 318d7cbd8eaaced74293b90bec8533a280d41bdc
Author: Kevin Chan <ktchan@codeaurora.org>
Date:   Tue Nov 29 14:24:26 2011 -0800

    msm: camera: Correct the reserve buffer logic in mctl_pp.

    When the daemon asks to reserve a free buffer, get the
    correct address by using the image mode to get to the
    correct camera instance and populating the buffer address.

    Change-Id: I23c6e00458562ef2b9880cbffe2d6a100de80ea1
    Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
    Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>

commit d814743600bf0b5c26ec4a532d47fce828c18d6f
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Fri Jan 6 09:45:11 2012 -0800

    msm: v4l2: fix support for test app.

    This commit fixes bug in query-cap ioctl and
    adds ION support for case where buffers are
    allocated in the kernel with mmap. This change
    is required to fix the V4L2 command line test app.

    Change-Id: I50a535e8a0af60ff7d86341a3f726ed81a630fb0
    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

commit 748a70ad755602593d35eb841b69d0fee35d3132
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Tue Nov 1 08:22:04 2011 -0700

    msm: camera: use ION for stats and userptr buffers in V4L2 driver.

    Change-Id: Ibc7db3a7355d07f421e63e990354e44e372e79d0
    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

commit 5e08d77840cfcaba5bd6c43a2ee4b40d516a448f
Author: Kiran Kumar H N <hurlisal@codeaurora.org>
Date:   Mon Oct 3 10:19:15 2011 -0700

    camera: Store the data offsets for each planes.

    - When the user queues a buffer, store the data offset
      along with the address offset which is already stored.
      data offset indicates the offset of the data in the
      buffer.
    - Use this offset when the physical address of the
      buffer is configured to VFE.
    - Depending on the number of planes present in the
      buffer, store either the y, cbr offset or the
      offset of each plane.

    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit ceea762f4b33c244059f674798527902b0e2168e
Author: Kiran Kumar H N <hurlisal@codeaurora.org>
Date:   Tue Aug 23 14:01:03 2011 -0700

    msm: camera: Support for Multi planar image formats.

    Add support for multi-planar image formats. This
    allows the luma and chroma planes of the image to
    reside in different memory locations.

    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit a5ea3a921763e7bb3059116e67635daa2a5d77ca
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Thu Aug 4 17:54:17 2011 -0700

    msm: camera: correct error checking in case of failed allocation.

    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

commit 1b9b9a4310cfc4eee2afdd3c20ae96a1dfc4e47d
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Fri Aug 5 15:49:42 2011 -0700

    msm: camera: correct size passed into IOMMU mapping API.

    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

commit c6864b8db38bd6ee700d862df15380eb95234c25
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Fri Jul 15 11:43:41 2011 -0700

    msm-camera: add SMMU code for use with videobuf2 framework

    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
    Signed-off-by: Mingcheng Zhu <mingchen@codeaurora.org>

commit 9812bd34ec034b4a78ed1c1c5f6fbd1ca3d1b43e
Author: Mingcheng Zhu <mingchen@codeaurora.org>
Date:   Fri Jul 22 22:57:11 2011 -0700

    msm camera: migrate to videobuf2 framework

    add necessary changes in camera driver to
    migrate to videobuf2 framework.

    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
    Signed-off-by: Mingcheng Zhu <mingchen@codeaurora.org>

    Conflicts:

    	drivers/media/video/Makefile

commit 5a19c68d63da33710ed52a974a996f03a706b84f
Author: Kiran Kumar H N <hurlisal@codeaurora.org>
Date:   Sat Jul 23 11:34:34 2011 -0700

    Revert "msm: camera: YV12 video support"

    This reverts commit 66882a5046143601429632a0b589d9ffeeb3c668.
    This change will be submitted later.

    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit 7ff0cf49995d22fddaa90cea95dac8850abcac89
Author: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
Date:   Fri Jul 15 15:56:40 2011 -0700

    msm: camera: YV12 video support

    Support for color format YV12.

    Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>

commit fc38e95cca1a20c34fce8202d3465bd53ba74eb1
Author: Shuzhen Wang <shuzhenw@codeaurora.org>
Date:   Wed Jul 13 15:41:14 2011 -0700

    camera: v4l2: Avoid duplicate put_pmem_file on single buffer.

    For each video buffer, get_pmem_file is called when it's enqueued
    the first time. When releasing the buffer, make sure put_pmem_file
    is only done once.

    CRs-fixed: 295111
    Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>

commit 3f2bc4d6eb5a4fada842462ba22bb6bbb41d00c7
Author: Bryan Huntsman <bryanh@codeaurora.org>
Date:   Tue Aug 16 17:27:22 2011 -0700

    Initial Contribution

    msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142

    Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
commit 02d550d38360d875cbca8b230591b5e449c0ea2a
Author: Kiran Kumar H N <hurlisal@codeaurora.org>
Date:   Mon Oct 3 10:19:15 2011 -0700

    camera: Store the data offsets for each planes.

    - When the user queues a buffer, store the data offset
      along with the address offset which is already stored.
      data offset indicates the offset of the data in the
      buffer.
    - Use this offset when the physical address of the
      buffer is configured to VFE.
    - Depending on the number of planes present in the
      buffer, store either the y, cbr offset or the
      offset of each plane.

    Change-Id: I51166ce71b1d8cbe7fc26254e2b460288072342c
    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit 93d42d4357772a178c7729d20f1a4353a5d9b08d
Author: Kiran Kumar H N <hurlisal@codeaurora.org>
Date:   Tue Aug 23 14:01:03 2011 -0700

    msm: camera: Support for Multi planar image formats.

    Add support for multi-planar image formats. This
    allows the luma and chroma planes of the image to
    reside in different memory locations.

    Change-Id: Ibd85b89d752d17d6f840e6959d9b3692e0f2aa98
    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit 1df3081483dfef31e9d8238731915d6d1e6a1bc5
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Thu Aug 4 17:54:17 2011 -0700

    msm: camera: correct error checking in case of failed allocation.

    Change-Id: I8ef5281529e80dffd3ae7d8991e35d11dfeb9f17
    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

commit eac9292b28e7eb1270d4cb0f3e9e8eb234cdea8e
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Fri Aug 5 15:49:42 2011 -0700

    msm: camera: correct size passed into IOMMU mapping API.

    Change-Id: If0b0759a87bff951cbd649f13c7cfcb2ac4f7276
    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

commit f63f37d83adb904bfc4eb011da278e58f160e3b9
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Fri Jul 15 11:43:41 2011 -0700

    msm-camera: add SMMU code for use with videobuf2 framework

    Change-Id: I24c1e94173ecca588f4b3d17305014b069aef010
    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
    Signed-off-by: Mingcheng Zhu <mingchen@codeaurora.org>

commit bc843c09bde81e1859d557f1d36625bf02499f37
Author: Mingcheng Zhu <mingchen@codeaurora.org>
Date:   Fri Jul 22 22:57:11 2011 -0700

    msm camera: migrate to videobuf2 framework

    add necessary changes in camera driver to
    migrate to videobuf2 framework.

    Change-Id: I703c29b464fa33d4fec271d4970da44281cbb2d6
    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
    Signed-off-by: Mingcheng Zhu <mingchen@codeaurora.org>

commit 01a5bde2b58c6968994480d9738c0defd8149b1a
Author: Kiran Kumar H N <hurlisal@codeaurora.org>
Date:   Sat Jul 23 11:34:34 2011 -0700

    Revert "msm: camera: YV12 video support"

    This reverts commit 66882a5046143601429632a0b589d9ffeeb3c668.
    This change will be submitted later.

    Change-Id: I9ac60ad2dadbc330a0b010a706bbefe344d706e7
    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit 66882a5046143601429632a0b589d9ffeeb3c668
Author: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
Date:   Fri Jul 15 15:56:40 2011 -0700

    msm: camera: YV12 video support

    Support for color format YV12.

    Change-Id: I89c139c6c7a4d3ec6555cadcb8afe9eef0023de2
    Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>

commit ab60576721702a811e31536cefd49880a03e1eba
Author: Shuzhen Wang <shuzhenw@codeaurora.org>
Date:   Wed Jul 13 15:41:14 2011 -0700

    camera: v4l2: Avoid duplicate put_pmem_file on single buffer.

    For each video buffer, get_pmem_file is called when it's enqueued
    the first time. When releasing the buffer, make sure put_pmem_file
    is only done once.

    CRs-fixed: 295111
    Change-Id: I79a0e91d7389d6658e004d9958f201504a310a5f
    Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>

commit da7283c54090a0597d0ae4127f9214ab4f338c83
Author: Shuzhen Wang <shuzhenw@codeaurora.org>
Date:   Sat Jun 18 22:59:45 2011 -0700

    camera: v4l2: Implement raw snapshot.

    Enhance videobuf-msm-mem, msm_mctl, and msm_vfe32 to
    support CAMIF raw snapshot.

    Change-Id: Id93b9e76c461f12fedddd9ac8b7e8c3c571759a4
    Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>

commit 40798a89bd8932e71a26d1a88f4e6160ca83829e
Author: Shuzhen Wang <shuzhenw@codeaurora.org>
Date:   Tue Jun 21 15:54:12 2011 -0700

    camera: Remove mapping the mmap-ed buffer in kernel space.

    We don't need to access mmap-ed buffer in kernel memory space.
    Hence removed the ioremap. Doing ioremap would fail because
    of the very limited kernel vma.

    Change-Id: I1e7435fdbc1393124be96649b4dd81080830230c
    Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>

commit ec6d301e36b541c66396464632c7e5631929f9d8
Author: Shuzhen Wang <shuzhenw@codeaurora.org>
Date:   Sat Jun 18 22:57:21 2011 -0700

    camera: v4l2: Remove ioremap for USERPTR videobuf.

    When videobuf uses USERPTR, the buffer is already allocated
    in user space. We don't need to remap physical address to user
    space.

    Change-Id: Ia93784cfa006d736116cc82447f0cbe5dd975012
    Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>

commit bb47a1d526e05aa9ce2f66757af76878c8f204fb
Author: Shuzhen Wang <shuzhenw@codeaurora.org>
Date:   Sat May 28 22:51:50 2011 -0700

    camera: Implement user space pmem buffer using V4L2 userptr.

    In order to support user space pmem buffer across processes,
    we use V4L2 userptr buffer, in which we pass file descriptor
    and offset to the driver.

    Change-Id: Icf89af9b39d2223d9f6ef4beb4c2fb7c67219adc
    Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>

commit 58f35500b3051e2a4e866dacede9e370d3d1ce01
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Fri May 27 11:38:13 2011 -0700

    msm: v4l2: replace pmem calls with new API

    Replace pmem kalloc/free calls with
    allocate_contiguous_memory_nomap and
    free_contiguous_memory_by_paddr.

    Change-Id: If04255c236bb915b4fd56e4391b8e9e22480bb26
    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

commit 075cdb154e92a5fc6017c47b6aced4eb65071414
Author: Ankit Premrajka <ankitp@codeaurora.org>
Date:   Fri Apr 15 16:18:09 2011 -0700

    msm: Remove pmem code dependency in V4L2 camera driver

    This change is being made because PMEM won't
    be included in 8960 kernel.

    Change-Id: I2ab92c4973ee367f528758874776f607f0d85a26
    Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>

Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:29:49 -08:00

46 lines
1.3 KiB
C

/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* helper functions for physically contiguous PMEM capture buffers
*/
#ifndef _VIDEOBUF_PMEM_CONTIG_H
#define _VIDEOBUF_PMEM_CONTIG_H
#include <media/videobuf-core.h>
struct videobuf_contig_pmem {
u32 magic;
void *vaddr;
int phyaddr;
unsigned long size;
int is_userptr;
uint32_t y_off;
uint32_t cbcr_off;
int buffer_type;
struct file *file;
};
void videobuf_queue_pmem_contig_init(struct videobuf_queue *q,
const struct videobuf_queue_ops *ops,
struct device *dev,
spinlock_t *irqlock,
enum v4l2_buf_type type,
enum v4l2_field field,
unsigned int msize,
void *priv,
struct mutex *ext_lock);
int videobuf_to_pmem_contig(struct videobuf_buffer *buf);
int videobuf_pmem_contig_free(struct videobuf_queue *q,
struct videobuf_buffer *buf);
#endif /* _VIDEOBUF_PMEM_CONTIG_H */