android-sdk/kernel-video.git
7 years agodefconfig: enable analog camera feature p-ti-android-3.8.y-video
Sundar Raman [Sun, 16 Mar 2014 20:55:06 +0000 (15:55 -0500)]
defconfig: enable analog camera feature

Analog camera is supported in the kernel & userspace.
This feature is supposed to be used on JAMR board
with a dvd player or analog camera connected. The
frames are deinterlaced using vpe.

Change-Id: Ib61d3c6ca8b63356dcdd3adb30bf4f772bf5b4d0
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agoMerge branch 'p-ti-linux-3.8.y' into p-ti-android-3.8.y
Praneeth Bajjuri [Fri, 14 Mar 2014 04:36:22 +0000 (23:36 -0500)]
Merge branch 'p-ti-linux-3.8.y' into p-ti-android-3.8.y

* p-ti-linux-3.8.y:
  arm: dts: dra7-evm: fix boot failure

Change-Id: I9669475e61a3fdc2bce0ed947da38744b07cee55
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoarm: dts: dra7-evm: fix boot failure
Praneeth Bajjuri [Fri, 14 Mar 2014 03:59:31 +0000 (22:59 -0500)]
arm: dts: dra7-evm: fix boot failure

dra7-evm fails to boot due to introduction of bug by
dra7_pmx_core: pinctrl-0 with mmc1_pins
commit e5c5e3c
arm: dts: dra7xx: The SD/MMC card detect gpio has been added.

this patch fixes boot failure.

Change-Id: Ie3f21817a16e6bff8e6120c0accfaf281d50c8df
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoMerge branch 'p-ti-linux-3.8.y' into p-ti-android-3.8.y
Praneeth Bajjuri [Thu, 13 Mar 2014 19:53:11 +0000 (14:53 -0500)]
Merge branch 'p-ti-linux-3.8.y' into p-ti-android-3.8.y

* p-ti-linux-3.8.y:
  arm: dts: dra7xx: The SD/MMC card detect gpio has been added.
  DT: export of_get_next_parent() for use by modules: fix modular V4L2

Change-Id: I2e1b3020f55f55168fa68003874a35463ab715d5
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoarm: dts: dra7xx: The SD/MMC card detect gpio has been added.
Ravikumar Kattekola [Fri, 28 Feb 2014 03:52:19 +0000 (09:22 +0530)]
arm: dts: dra7xx: The SD/MMC card detect gpio has been added.

In order to use the hot swap feature, the gpio6_27 has been
added to detect the presence of the card.

The mentioned fix is needed for DRA7 evm Rev E onwards

Change-Id: Iebab30370ee4dc129c6e29fa89603f9930a4ea4d
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
Signed-off-by: Ravikumar Kattekola <rk@ti.com>
[minor fix in commit msg and dra7-evm.dts]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoDT: export of_get_next_parent() for use by modules: fix modular V4L2
Guennadi Liakhovetski [Tue, 2 Apr 2013 15:28:11 +0000 (12:28 -0300)]
DT: export of_get_next_parent() for use by modules: fix modular V4L2

Currently modular V4L2 build with enabled OF is broken dur to the
of_get_next_parent() function being unavailable to modules. Export it to
fix the build.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
7 years agodefconfig: Set selinux enforcing mode to permissive
Carlos Leija [Tue, 11 Mar 2014 23:04:19 +0000 (18:04 -0500)]
defconfig: Set selinux enforcing mode to permissive

For development purposes use boot args to set selinux enforcing
mode to permissive.

Change-Id: I6f3749092a93ac8600abfd4e350001acc6ebe01a
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agodefconfig: Enable selinux in Android kernel
Carlos Leija [Tue, 11 Mar 2014 22:58:31 +0000 (17:58 -0500)]
defconfig: Enable selinux in Android kernel

Change-Id: I7a7262116ae70a38042d044cbf5778e7719bccc8
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoxfrm: force a garbage collection after deleting a policy
Paul Moore [Wed, 29 May 2013 07:36:25 +0000 (07:36 +0000)]
xfrm: force a garbage collection after deleting a policy

In some cases after deleting a policy from the SPD the policy would
remain in the dst/flow/route cache for an extended period of time
which caused problems for SELinux as its dynamic network access
controls key off of the number of XFRM policy and state entries.
This patch corrects this problem by forcing a XFRM garbage collection
whenever a policy is sucessfully removed.

[ cileija@ti.com: backport ]
[ upstream commit e4c1721642bbd42d8142f4811cde0588c28db51d ]

Change-Id: I7f51b8b10f9f660698d7abe24f033a283fd28849
Reported-by: Ondrej Moris <omoris@redhat.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agocgroup: initialize xattr before calling d_instantiate()
Li Zefan [Tue, 14 May 2013 11:44:20 +0000 (19:44 +0800)]
cgroup: initialize xattr before calling d_instantiate()

cgroup_create_file() calls d_instantiate(), which may decide to look
at the xattrs on the file. Smack always does this and SELinux can be
configured to do so.

But cgroup_add_file() didn't initialize xattrs before calling
cgroup_create_file(), which finally leads to dereferencing NULL
dentry->d_fsdata.

This bug has been there since cgroup xattr was introduced.

[ cileija@ti.com: backport ]
[ upstream commit d6cbf35dac8a3dadb9103379820c96d7c85df3d9 ]

Change-Id: I4d52d1ac9bc6d5e7086988235b22f2f6900b1b7c
Cc: <stable@vger.kernel.org> # 3.8.x
Reported-by: Ivan Bulatovic <combuster@archlinux.us>
Reported-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agotools: hv: Use CLOEXEC when opening kvp_pool files
Tomas Hozza [Fri, 18 Jan 2013 14:23:41 +0000 (15:23 +0100)]
tools: hv: Use CLOEXEC when opening kvp_pool files

Use CLOEXEC flag when opening kvp_pool_x files to prevent file
descriptor leakage. Not using it was causing a problem when
SELinux was enabled.

[ cileija@ti.com: backport ]
[ upstream commit 8467fdbb09ca0766b638171723624f3da8703055 ]

Change-Id: Ieb1dff4539830ee38d9275dac271435db7ae8f0e
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoselinux: binder: Fix COMMON_AUDIT_DATA_INIT compile issue
John Stultz [Thu, 14 Mar 2013 20:26:14 +0000 (13:26 -0700)]
selinux: binder: Fix COMMON_AUDIT_DATA_INIT compile issue

The COMMON_AUDIT_DATA_INIT macros have been removed, and are
now replaced with open coded ad.type initialization.

Thus, this patch updates the selinux_binder_transfer_file function
so it builds.

[ cileija@ti.com: backport ]
[ https://android.googlesource.com/kernel/common android-3.10 ]
[ commit a657646035c3208697b6505daa0236f311470e22 ]

Change-Id: I2da4cfd9c9f85af7894eb8fee23ec7557a8a44cb
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoAdd security hooks to binder and implement the hooks for SELinux.
Stephen Smalley [Mon, 5 Nov 2012 13:15:34 +0000 (08:15 -0500)]
Add security hooks to binder and implement the hooks for SELinux.

Add security hooks to the binder and implement the hooks for SELinux.
The security hooks enable security modules such as SELinux to implement
controls over binder IPC.  The security hooks include support for
controlling what process can become the binder context manager
(binder_set_context_mgr), controlling the ability of a process
to invoke a binder transaction/IPC to another process (binder_transaction),
controlling the ability a process to transfer a binder reference to
another process (binder_transfer_binder), and controlling the ability
of a process to transfer an open file to another process (binder_transfer_file).

This support is used by SE Android, http://selinuxproject.org/page/SEAndroid.

[ cileija@ti.com: backport ]
[ https://android.googlesource.com/kernel/common android-3.10 ]
[ commit 6e6d8f546c36b161067efa5e0518f56be0200e77 ]

Change-Id: I489826bbb46d81d0f930a3c42293c4fd52b34b2e
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoselinux: fix the labeled xfrm/IPsec reference count handling
Paul Moore [Wed, 29 May 2013 07:36:32 +0000 (07:36 +0000)]
selinux: fix the labeled xfrm/IPsec reference count handling

The SELinux labeled IPsec code was improperly handling its reference
counting, dropping a reference on a delete operation instead of on a
free/release operation.

[ cileija@ti.com: backport ]
[ upstream commit e4e8536f65b51ce91c30588b0925872bdfc60d03 ]

Change-Id: Ic7dc350b18a06e36bd5d43edc935cced7ef485e1
Reported-by: Ondrej Moris <omoris@redhat.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoselinux: add a skb_owned_by() hook
Eric Dumazet [Mon, 8 Apr 2013 17:58:11 +0000 (17:58 +0000)]
selinux: add a skb_owned_by() hook

Commit 90ba9b1986b5ac (tcp: tcp_make_synack() can use alloc_skb())
broke certain SELinux/NetLabel configurations by no longer correctly
assigning the sock to the outgoing SYNACK packet.

Cost of atomic operations on the LISTEN socket is quite big,
and we would like it to happen only if really needed.

This patch introduces a new security_ops->skb_owned_by() method,
that is a void operation unless selinux is active.

[ cileija@ti.com: backport ]
[ upstream commit ca10b9e9a8ca7342ee07065289cbe74ac128c169 ]

Change-Id: I62d394dd6e0c1405475c1fef4d7a52ef8b9ac930
Reported-by: Miroslav Vadkerti <mvadkert@redhat.com>
Diagnosed-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-security-module@vger.kernel.org
Acked-by: James Morris <james.l.morris@oracle.com>
Tested-by: Paul Moore <pmoore@redhat.com>
Acked-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoselinux: make security_sb_clone_mnt_opts return an error on context mismatch
Jeff Layton [Mon, 1 Apr 2013 12:14:24 +0000 (08:14 -0400)]
selinux: make security_sb_clone_mnt_opts return an error on context mismatch

I had the following problem reported a while back. If you mount the
same filesystem twice using NFSv4 with different contexts, then the
second context= option is ignored. For instance:

    # mount server:/export /mnt/test1
    # mount server:/export /mnt/test2 -o context=system_u:object_r:tmp_t:s0
    # ls -dZ /mnt/test1
    drwxrwxrwt. root root system_u:object_r:nfs_t:s0       /mnt/test1
    # ls -dZ /mnt/test2
    drwxrwxrwt. root root system_u:object_r:nfs_t:s0       /mnt/test2

When we call into SELinux to set the context of a "cloned" superblock,
it will currently just bail out when it notices that we're reusing an
existing superblock. Since the existing superblock is already set up and
presumably in use, we can't go overwriting its context with the one from
the "original" sb. Because of this, the second context= option in this
case cannot take effect.

This patch fixes this by turning security_sb_clone_mnt_opts into an int
return operation. When it finds that the "new" superblock that it has
been handed is already set up, it checks to see whether the contexts on
the old superblock match it. If it does, then it will just return
success, otherwise it'll return -EBUSY and emit a printk to tell the
admin why the second mount failed.

Note that this patch may cause casualties. The NFSv4 code relies on
being able to walk down to an export from the pseudoroot. If you mount
filesystems that are nested within one another with different contexts,
then this patch will make those mounts fail in new and "exciting" ways.

For instance, suppose that /export is a separate filesystem on the
server:

    # mount server:/ /mnt/test1
    # mount salusa:/export /mnt/test2 -o context=system_u:object_r:tmp_t:s0
    mount.nfs: an incorrect mount option was specified

...with the printk in the ring buffer. Because we *might* eventually
walk down to /mnt/test1/export, the mount is denied due to this patch.
The second mount needs the pseudoroot superblock, but that's already
present with the wrong context.

OTOH, if we mount these in the reverse order, then both mounts work,
because the pseudoroot superblock created when mounting /export is
discarded once that mount is done. If we then however try to walk into
that directory, the automount fails for the similar reasons:

    # cd /mnt/test1/scratch/
    -bash: cd: /mnt/test1/scratch: Device or resource busy

The story I've gotten from the SELinux folks that I've talked to is that
this is desirable behavior. In SELinux-land, mounting the same data
under different contexts is wrong -- there can be only one.

[ cileija@ti.com: backport ]
[ upstream commit 094f7b69ea738d7d619cba449d2af97159949459 ]

Change-Id: I094fee5cf9098e459d625d2419126884db4cd190
Cc: Steve Dickson <steved@redhat.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoselinux: replace obsolete NLMSG_* with type safe nlmsg_*
Hong zhi guo [Wed, 27 Mar 2013 06:49:35 +0000 (06:49 +0000)]
selinux: replace obsolete NLMSG_* with type safe nlmsg_*

[ cileija@ti.com: backport ]
[ upstream commit 77954983ad76e4f10cee8d2e06fcd085fae11780 ]

Change-Id: Ia813de40256e0e0de6a45433c8e27661699ec478
Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoselinux: opened file can't have NULL or negative ->f_path.dentry
Al Viro [Wed, 23 Jan 2013 21:24:16 +0000 (16:24 -0500)]
selinux: opened file can't have NULL or negative ->f_path.dentry

[ cileija@ti.com: backport ]
[ upstream commit 45e09bd51b2be1fbb86c2e3d5bb00d32744f1ecb ]

Change-Id: Ie7f365087a3ef2dee714f1610916b8542475978d
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Carlos Leija <cileija@ti.com>
7 years agoMerge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y
Vishal Mahaveer [Wed, 12 Mar 2014 00:32:35 +0000 (19:32 -0500)]
Merge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y

* origin/p-ti-linux-3.8.y:
  ti-ec: Adds the vip_s_fmt_vid_cap API
  v4l: ti-vps: vip: Export vip_s_fmt_vid_cap API
  i2c: fpdlink: camera: Add fpdlink camera driver
  v4l: ti-vps: vip: Add support for RGB capture
  v4l: ti-vps: vpdma: Set background color
  arm: dts: dra7xx: Add d16-d23 for vin1a
  arm: dts: dra7xx: Device tree node for tvp5158
  i2c: ov1063x: Free gpios after use
  i2c: tvp5158: Analog camera Driver Support
  v4l: ti-vps: vip: Configure parser for chosen sensor
  v4l: ti-vps: vip: Functions for setting parser props
  v4l: ti-vps: vip: Parse sensor endpoints in probe
  arm: dts: dra7xx: Endpoint nodes for vip and i2c
  v4l: of: New property to specify number of channels
  v4l: of: Drop acquired reference to node when getting next endpoint
  v4l: of: Use of_get_child_by_name()
  V4L: Remove incorrect EXPORT_SYMBOL() usage at v4l2-of.c
  Add a V4L2 OF parser
  Add common video interfaces OF bindings documentation

Change-Id: Iecab6174ef487329f48f544d9dde0cc371774571
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoMerge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video...
Vishal Mahaveer [Wed, 12 Mar 2014 00:20:32 +0000 (19:20 -0500)]
Merge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video into p-ti-linux-3.8.y

* 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video:
  ti-ec: Adds the vip_s_fmt_vid_cap API
  v4l: ti-vps: vip: Export vip_s_fmt_vid_cap API
  i2c: fpdlink: camera: Add fpdlink camera driver
  v4l: ti-vps: vip: Add support for RGB capture
  v4l: ti-vps: vpdma: Set background color
  arm: dts: dra7xx: Add d16-d23 for vin1a
  arm: dts: dra7xx: Device tree node for tvp5158
  i2c: ov1063x: Free gpios after use
  i2c: tvp5158: Analog camera Driver Support
  v4l: ti-vps: vip: Configure parser for chosen sensor
  v4l: ti-vps: vip: Functions for setting parser props
  v4l: ti-vps: vip: Parse sensor endpoints in probe
  arm: dts: dra7xx: Endpoint nodes for vip and i2c
  v4l: of: New property to specify number of channels
  v4l: of: Drop acquired reference to node when getting next endpoint
  v4l: of: Use of_get_child_by_name()
  V4L: Remove incorrect EXPORT_SYMBOL() usage at v4l2-of.c
  Add a V4L2 OF parser
  Add common video interfaces OF bindings documentation

Change-Id: I3aa539caf5336a8f0d4fb1abf0e8bc11340f94d1
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Arthur Philpott [Wed, 12 Mar 2014 00:07:44 +0000 (19:07 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  ti-ec: Adds the vip_s_fmt_vid_cap API
  v4l: ti-vps: vip: Export vip_s_fmt_vid_cap API
  i2c: fpdlink: camera: Add fpdlink camera driver
  v4l: ti-vps: vip: Add support for RGB capture
  v4l: ti-vps: vpdma: Set background color
  arm: dts: dra7xx: Add d16-d23 for vin1a
  arm: dts: dra7xx: Device tree node for tvp5158
  i2c: ov1063x: Free gpios after use
  i2c: tvp5158: Analog camera Driver Support
  v4l: ti-vps: vip: Configure parser for chosen sensor
  v4l: ti-vps: vip: Functions for setting parser props
  v4l: ti-vps: vip: Parse sensor endpoints in probe
  arm: dts: dra7xx: Endpoint nodes for vip and i2c
  v4l: of: New property to specify number of channels
  v4l: of: Drop acquired reference to node when getting next endpoint
  v4l: of: Use of_get_child_by_name()
  V4L: Remove incorrect EXPORT_SYMBOL() usage at v4l2-of.c
  Add a V4L2 OF parser
  Add common video interfaces OF bindings documentation

7 years agoti-ec: Adds the vip_s_fmt_vid_cap API
Arthur Philpott [Tue, 11 Mar 2014 23:17:38 +0000 (18:17 -0500)]
ti-ec: Adds the vip_s_fmt_vid_cap API

This patch is a temporary patch that hard codes
the parameters expected for an omnivision sensor
and passes those parameters to the vip_s_fmt_vid_cap
API

Change-Id: I8d7b50dc7b8efa01d54dec30bb3a0d94bd53936e
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agov4l: ti-vps: vip: Export vip_s_fmt_vid_cap API
Arthur Philpott [Tue, 11 Mar 2014 23:16:16 +0000 (18:16 -0500)]
v4l: ti-vps: vip: Export vip_s_fmt_vid_cap API

This patch exports the vip_s_fmt_vid_cap API which
is needed by earlycamera module to ensure that the
proper GPIOs are configured for the appropriate
sensor.

Change-Id: I2b496622115cd1ce35d0355445368089bd8c6ab9
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoi2c: fpdlink: camera: Add fpdlink camera driver
Nikhil Devshatwar [Mon, 10 Mar 2014 18:12:08 +0000 (23:42 +0530)]
i2c: fpdlink: camera: Add fpdlink camera driver

It is possible to use output of FPDLink display as a camera
if it is connected to the deserializer of JAMR3 board.
Deserializer output is given to Vin1a

As, VIP can communicate with only subdevices, we need a subdevice to
use the fpdlink display as camera.

This patch adds a device tree node for the camera and the compatible driver.
The i2c driver for the fpdlink camera only registers a v4l2 subdevice
The display can be looped back from the same EVM or can come externally
via the FPDLink. In any case, deserializer configuration is done at the
remote end (serializer side), so this driver won't configure the deserializer.

Change-Id: I910aff26ff31444c38afda8fe5acd59ee2d8ec8f
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Add support for RGB capture
Nikhil Devshatwar [Mon, 10 Mar 2014 11:32:27 +0000 (17:02 +0530)]
v4l: ti-vps: vip: Add support for RGB capture

Add ARGB capture format (32 bits including alpha)
Corrected channel number to be used for RGB capture
Allow setting RGB_LO mux select from the slice

Currently, CSC is not enabled, so input and output formats are same
For now, RGB capture is only passthrough mode.

Change-Id: Ic8b2256607b0df21b7e34e58634b1de367d1d74a
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vpdma: Set background color
Nikhil Devshatwar [Thu, 27 Feb 2014 09:54:24 +0000 (15:24 +0530)]
v4l: ti-vps: vpdma: Set background color

If a VPDMA client doesn't provide data for any component, it is taken from
the background color register. e.g. for ARGB capture, alpha component
is not provided by VIP client.

VPDMA picks the value from this registers and repeats for all the pixels.

Change-Id: Ib61f7d632356492efa6479d4639b408d38c895db
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoarm: dts: dra7xx: Add d16-d23 for vin1a
Nikhil Devshatwar [Fri, 7 Mar 2014 10:39:19 +0000 (16:09 +0530)]
arm: dts: dra7xx: Add d16-d23 for vin1a

For RGB capture to work, vin1a should be configured for 24bit interface
The d16-d23 pins conflict with vin2a pins
By default, this is commented, if using RGB camera, enable this and
disable the vin2a pins

Change-Id: Ia448b7c1d87584a2d083a2741931480f0789211a
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoarm: dts: dra7xx: Device tree node for tvp5158
Sathishkumar S [Wed, 5 Mar 2014 14:57:05 +0000 (20:27 +0530)]
arm: dts: dra7xx: Device tree node for tvp5158

Add a dts entry for TVP5158 video decoder chip.

Change-Id: I183ddd42a4aa3cf621b66fc5c93c83a5924be60d
Signed-off-by: Sathishkumar S <sathish.omap@gmail.com>
7 years agoi2c: ov1063x: Free gpios after use
Sathishkumar S [Fri, 28 Feb 2014 11:16:35 +0000 (16:46 +0530)]
i2c: ov1063x: Free gpios after use

Request gpios with appropriate settings and
free them after use for other drivers, as
there are multiple sensors sharing the gpios

Change-Id: If2206fac8673dc8915e34da32d544e2b04e30c33
Signed-off-by: Sathishkumar S <sathish.omap@gmail.com>
7 years agoi2c: tvp5158: Analog camera Driver Support
Sathishkumar S [Tue, 25 Feb 2014 07:12:56 +0000 (12:42 +0530)]
i2c: tvp5158: Analog camera Driver Support

Add support for TVP5158 video decoder. This driver
does the default initialization for single channel
NTSC decode. It is tested with NTSC camera source.

Change-Id: Ida5a9b45414a917bd6f515882fe72a4b4b8e0947
Signed-off-by: Sathishkumar S <sathish.omap@gmail.com>
7 years agov4l: ti-vps: vip: Configure parser for chosen sensor
Nikhil Devshatwar [Thu, 27 Feb 2014 17:17:12 +0000 (22:47 +0530)]
v4l: ti-vps: vip: Configure parser for chosen sensor

Whenever a sensor (v4l2_subdev) is bound via async notifier,
save check the priority based on the index in the array

Maintain a pointer to the v4l2_endpoint of the chosen sensor in vip_dev
Added a new function to setup the parser according to the way sensor
interface is described in endpoint

Cuurently, only BT656 and parallel busses are suppoted
Following properties are set:
- hsync, vsync, actvid, pclk polarities
- Port interfaces and sync typei

Change-Id: Ib60a99d0901f69e72aff21cf0e12f23457b5f6a4
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Functions for setting parser props
Nikhil Devshatwar [Thu, 27 Feb 2014 17:14:02 +0000 (22:44 +0530)]
v4l: ti-vps: vip: Functions for setting parser props

Add helper functions for configuring the parser so that
pixel clock sampling and hsync method(using actvid) can be set

Change-Id: I0ff8d10345ac6024633279e5abfd509269b064c9
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Parse sensor endpoints in probe
Nikhil Devshatwar [Tue, 18 Feb 2014 08:24:50 +0000 (13:54 +0530)]
v4l: ti-vps: vip: Parse sensor endpoints in probe

Modified of_probe to iterate over all endpoints
Get the i2c address of the sensors (parent nodes of remote-endpoint)
Save all the parsed data in the v4l2_of_endpoint

Change-Id: I6290d1f8ae28aabc6d64a7ce2d3f1e1a774530b8
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoarm: dts: dra7xx: Endpoint nodes for vip and i2c
Nikhil Devshatwar [Tue, 18 Feb 2014 06:00:32 +0000 (11:30 +0530)]
arm: dts: dra7xx: Endpoint nodes for vip and i2c

Following the binding doc video-interfaces
Every VIP has some ports - 0A and 1A
Every port can have multiple endpoints - one can be chosen to use

Added ports and endpoint nodes for all the sensor nodes
Sensor endpoints specify the interface used - hsync, vsync, etc
Order of endpoints still decides the priority

Change-Id: Ibcce7f477795942f60df2702444c4ae6fb185143
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: of: New property to specify number of channels
Nikhil Devshatwar [Tue, 25 Feb 2014 13:35:06 +0000 (19:05 +0530)]
v4l: of: New property to specify number of channels

For time multiplexed video signal, number of channels multiplexed
is specified by adding a new property 'num-channels' to the endpoint

Change-Id: Ic51e8e44ffb5838eca73e3d744faf33c3b3a5fd0
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: of: Drop acquired reference to node when getting next endpoint
Laurent Pinchart [Wed, 3 Jul 2013 02:05:51 +0000 (23:05 -0300)]
v4l: of: Drop acquired reference to node when getting next endpoint

The of_get_child_by_name() function takes a reference to the node it
returns. Make sure to drop it when looking for the ports node in
v4l2_of_get_next_endpoint().

Change-Id: I97a1a5cd4ea833ab52df498f96742899299bbb77
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: of: Use of_get_child_by_name()
Laurent Pinchart [Wed, 3 Jul 2013 02:04:25 +0000 (23:04 -0300)]
v4l: of: Use of_get_child_by_name()

Replace a manual loop through child nodes with a call to
of_get_child_by_name().

Change-Id: I97bbaa432368ff412ba7e10445aeb4c26bb7bb88
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoV4L: Remove incorrect EXPORT_SYMBOL() usage at v4l2-of.c
Sylwester Nawrocki [Tue, 2 Apr 2013 14:41:19 +0000 (11:41 -0300)]
V4L: Remove incorrect EXPORT_SYMBOL() usage at v4l2-of.c

v4l2_of_parse_parallel_bus() function is now static and
EXPORT_SYMBOL() doesn't apply to it any more. Drop this
meaningless statement, which was supposed to be done in
the original merged patch.
While at it, edit the copyright notice so it is sorted in
both the v4l2-of.c and v4l2-of.h file in newest entries
on top order, and state clearly I'm just the author of
parts of the code, not the copyright owner.

Change-Id: Ia1e11851844b15132b767fc862b6a432b87cdc95
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoAdd a V4L2 OF parser
Guennadi Liakhovetski [Wed, 26 Sep 2012 08:24:03 +0000 (05:24 -0300)]
Add a V4L2 OF parser

Add a V4L2 OF parser, implementing bindings documented in
Documentation/devicetree/bindings/media/video-interfaces.txt.
[s.nawrocki@samsung.com: various corrections and improvements
since the initial version]

Change-Id: If9df83c65e01ad3cf99fe403c7307d3935f41f85
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoAdd common video interfaces OF bindings documentation
Guennadi Liakhovetski [Tue, 11 Sep 2012 15:44:18 +0000 (12:44 -0300)]
Add common video interfaces OF bindings documentation

This patch adds a document describing common OF bindings for video
capture, output and video processing devices. It is curently mainly
focused on video capture devices, with data busses defined by
standards such as ITU-R BT.656 or MIPI-CSI2.
It also documents a method of describing data links between devices.

Change-Id: I4077340ca0c55b049513a1ee56ad698b528da5fb
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoMerge branch 'p-ti-linux-3.8.y' into p-ti-android-3.8.y
Praneeth Bajjuri [Tue, 11 Mar 2014 21:16:34 +0000 (16:16 -0500)]
Merge branch 'p-ti-linux-3.8.y' into p-ti-android-3.8.y

* p-ti-linux-3.8.y:
  ARM: OMAP2+: remoteproc: add the second MMUs to DRA7 DSPs
  iommu/omap: add support to program multiple iommus
  iommu/omap: change the attach detection logic
  ARM: OMAP2+: devices: use sentinel terminated iommu archdata for ISP
  ARM: DRA7: hwmod data: remove resets from MMU1 for DSPs
  ARM: DRA7: hwmod data: add iommu index values to dev_attr data
  iommu/omap: fix dra7 syscfg programming
  iommu/omap: add a index field for each iommu
  ARM: OMAP2+: remoteproc: use sentinel terminated iommu archdata
  ARM: OMAP2+: remoteproc: split iommu archdata information
  rpmsg: rpc: reset the current function counter on remove

Change-Id: I0642bc5b931a1d64aeccca97b0a578ed9aad5f49
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoMerge branch 'ti2013.04.02-rpmsg-3.8.y' of git://git.ti.com/rpmsg/rpmsg into p-ti...
Praneeth Bajjuri [Tue, 11 Mar 2014 21:06:49 +0000 (16:06 -0500)]
Merge branch 'ti2013.04.02-rpmsg-3.8.y' of git://git.ti.com/rpmsg/rpmsg into p-ti-linux-3.8.y

* 'ti2013.04.02-rpmsg-3.8.y' of git://git.ti.com/rpmsg/rpmsg:
  ARM: OMAP2+: remoteproc: add the second MMUs to DRA7 DSPs
  iommu/omap: add support to program multiple iommus
  iommu/omap: change the attach detection logic
  ARM: OMAP2+: devices: use sentinel terminated iommu archdata for ISP
  ARM: DRA7: hwmod data: remove resets from MMU1 for DSPs
  ARM: DRA7: hwmod data: add iommu index values to dev_attr data
  iommu/omap: fix dra7 syscfg programming
  iommu/omap: add a index field for each iommu
  ARM: OMAP2+: remoteproc: use sentinel terminated iommu archdata
  ARM: OMAP2+: remoteproc: split iommu archdata information
  rpmsg: rpc: reset the current function counter on remove

Change-Id: I5ca00e04212e2258b41cc8ed7416898901be38a0
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoRevert "HACK: [vayu] Enable mmu1 for DSP1 and DSP2"
Praneeth Bajjuri [Tue, 11 Mar 2014 19:49:21 +0000 (14:49 -0500)]
Revert "HACK: [vayu] Enable mmu1 for DSP1 and DSP2"

This reverts commit 36c6b92ae5857f8c7dab27c1d9dd78ecd7a25665.

Reverting this hack. since cleaner series to take care of this
is going to be merged from

"git://git.ti.com/rpmsg/rpmsg ti2013.04.02-rpmsg-3.8.y"

Change-Id: Ie16b4419598ecf0340e8c9d3e13f8451c6923cf9
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoMerge branch 'rproc-linux-3.8.y' of git://git.ti.com/rpmsg/remoteproc into ti2013...
Suman Anna [Mon, 10 Mar 2014 23:00:31 +0000 (18:00 -0500)]
Merge branch 'rproc-linux-3.8.y' of git://git.ti.com/rpmsg/remoteproc into ti2013.04.02-rpmsg-3.8.y

Merge in the necessary support to program and enable the second
MMU in DRA7 DSP processor sub-systems.

* 'rproc-linux-3.8.y' of git://git.ti.com/rpmsg/remoteproc:
  ARM: OMAP2+: remoteproc: add the second MMUs to DRA7 DSPs
  iommu/omap: add support to program multiple iommus
  iommu/omap: change the attach detection logic
  ARM: OMAP2+: devices: use sentinel terminated iommu archdata for ISP
  ARM: DRA7: hwmod data: remove resets from MMU1 for DSPs
  ARM: DRA7: hwmod data: add iommu index values to dev_attr data
  iommu/omap: fix dra7 syscfg programming
  iommu/omap: add a index field for each iommu
  ARM: OMAP2+: remoteproc: use sentinel terminated iommu archdata
  ARM: OMAP2+: remoteproc: split iommu archdata information

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoARM: OMAP2+: remoteproc: add the second MMUs to DRA7 DSPs
Suman Anna [Wed, 5 Mar 2014 17:51:41 +0000 (11:51 -0600)]
ARM: OMAP2+: remoteproc: add the second MMUs to DRA7 DSPs

The DRA7xx DSP subsystem has two MMUs, one intended for the
processor core, and the other intended for the EDMA port. Add
the second MMU information to the corresponding DSP rproc device
archdata.

This will allow the OMAP IOMMU driver core to mirror program
the second MMU alongside the first MMU, and present identical
translations to both the processor core and the EDMA port within
the DSP sub-system. This helps avoid any special translations
needed in the firmware for EDMA operations on DRA7xx DSPs
specifically. All other OMAP SoCs share the same MMU for both
the ports.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoMerge branch 'iommu-linux-3.8.y' of git://git.ti.com/rpmsg/iommu into rproc-linux...
Suman Anna [Mon, 10 Mar 2014 22:54:08 +0000 (17:54 -0500)]
Merge branch 'iommu-linux-3.8.y' of git://git.ti.com/rpmsg/iommu into rproc-linux-3.8.y

Merge in the omap iommu driver enhancements and fixes from the
iommu feature tree that allows programming of multiple iommus
within a single domain. This provides the necessary framework
for programming and enabling the second MMU in each of the DSP
processor sub-systems in DRA7xx family of SoCs.

* 'iommu-linux-3.8.y' of git://git.ti.com/rpmsg/iommu:
  iommu/omap: add support to program multiple iommus
  iommu/omap: change the attach detection logic
  ARM: OMAP2+: devices: use sentinel terminated iommu archdata for ISP
  ARM: DRA7: hwmod data: remove resets from MMU1 for DSPs
  ARM: DRA7: hwmod data: add iommu index values to dev_attr data
  iommu/omap: fix dra7 syscfg programming
  iommu/omap: add a index field for each iommu

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoMerge branch 'rpmsg-linux-3.8.y' of git://git.ti.com/rpmsg/rpmsg into ti2013.04.02...
Suman Anna [Mon, 10 Mar 2014 22:32:56 +0000 (17:32 -0500)]
Merge branch 'rpmsg-linux-3.8.y' of git://git.ti.com/rpmsg/rpmsg into ti2013.04.02-rpmsg-3.8.y

Pull in a rpmsg-rpc patch that fixes the functionality
of an rpmsg rpc device during error recovery.

* 'rpmsg-linux-3.8.y' of git://git.ti.com/rpmsg/rpmsg:
  rpmsg: rpc: reset the current function counter on remove

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoiommu/omap: add support to program multiple iommus
Suman Anna [Wed, 5 Mar 2014 00:35:59 +0000 (18:35 -0600)]
iommu/omap: add support to program multiple iommus

A client user instantiates and attaches to an iommu_domain
to program the IOMMU associated with the domain. The iommus
programmed by a client user are bound with the iommu_domain
through the user's device archdata. The OMAP IOMMU driver
currently supports only one IOMMU per IOMMU domain per
user.

The OMAP IOMMU driver has been enhanced to support allowing
multiple IOMMUs to be programmed by a single client user. This
support is being added mainly to handle the DSP subsystems in
the DRA7xx SoC, which have two MMUs within the same subsystem.
These MMUs provide translations to a processor core port and
an EDMA port. This support allows the both the MMUs to be
programmed together, but with each one retaining this own
internal state objects.

The multiple iommus are expected to be provided through a
sentinel terminated array of omap_iommu_archdata objects
through the client user's device archdata. The OMAP driver
core is enhanced to loop through the array of attached
iommus and program them for all common operations.

NOTE:
1. Any existing OMAP iommu users are required to be converted
   to use the sentinel-terminated array form for programming
   the MMUs associated with the devices.
2. The dev_to_omap_iommu() macro which operates on a device's
   archdata is not adjusted, as its current users can work
   without any additional changes. The OMAP iommu debug code
   relies on operating on each individual iommu object. The
   omap iovmm module is also not fixed up to support multiple
   MMUs as the sole user of this module, OMAP3 ISP driver, has
   only one iommu. The omap iovmm module is expected to be
   deprecated, and is not used by any of the MMUs on OMAP4+
   SoCs.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoiommu/omap: change the attach detection logic
Suman Anna [Tue, 4 Mar 2014 23:21:04 +0000 (17:21 -0600)]
iommu/omap: change the attach detection logic

The OMAP IOMMU driver allows only a single device (eg: a rproc
device) to be attached per domain. The current detection logic
relies on an attached iommu for the client device. Change this
logic to use dedicated flags in preparation for supporting
multiple iommu devices to be bound to a single iommu domain.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoARM: OMAP2+: devices: use sentinel terminated iommu archdata for ISP
Suman Anna [Fri, 7 Mar 2014 00:10:07 +0000 (18:10 -0600)]
ARM: OMAP2+: devices: use sentinel terminated iommu archdata for ISP

A client user of an IOMMU is tied to use a single IOMMU at the
moment, with both of them bound together through the client user
device's archdata field.

Update the OMAP3 ISP device to use a sentinel terminated iommu
archdata array. OMAP3 ISP will still be using only one MMU device,
but this logic allows the OMAP3 ISP driver to work properly even
after OMAP IOMMU driver is enhanced to program multiple IOMMUs
together.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoARM: DRA7: hwmod data: remove resets from MMU1 for DSPs
Suman Anna [Wed, 5 Mar 2014 19:06:46 +0000 (13:06 -0600)]
ARM: DRA7: hwmod data: remove resets from MMU1 for DSPs

The second MMU in the DSP processor subsystems, intended for
the providing address translations to the EDMA port, is also
controlled by the same reset as the first MMU, that provides
the translations to the processor cores.

This second MMU will not be programmed independently, it will
be programmed along-side the first MMU as a simple mirror copy.
The reset information need not be duplicated in both the MMUs,
as the resets will be ensured to be programmed properly while
configuring the first MMU. The reset data has therefore been
cleaned up. This also fixes a reset failure error in the hwmod
layer caused by the reset already being deasserted when the
data is not removed.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoARM: DRA7: hwmod data: add iommu index values to dev_attr data
Suman Anna [Tue, 4 Mar 2014 18:28:50 +0000 (12:28 -0600)]
ARM: DRA7: hwmod data: add iommu index values to dev_attr data

A common omap_mmu_dev_attr data is defined currently for both
the MMU0 and MMU1 instances within the DSP processor subsystems.
Use separate copies of this data with an added iommu index value
to identify the exact MMU within the DSP processor subsystem.
Subsystems with only 1 MMU will use the inherent default index
value of 0.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoiommu/omap: fix dra7 syscfg programming
Suman Anna [Tue, 4 Mar 2014 18:33:26 +0000 (12:33 -0600)]
iommu/omap: fix dra7 syscfg programming

The dra7_cfg_dspsys_mmu() function currently can enable
only the first MMU within the DSP processor sub-system
in DRA7xx. Fix this function to actually use the index
from the IOMMU object so that it can program both MMU0
and MMU1 in the DSP processor sub-system correctly.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoiommu/omap: add a index field for each iommu
Suman Anna [Tue, 4 Mar 2014 18:25:25 +0000 (12:25 -0600)]
iommu/omap: add a index field for each iommu

Add an index field in omap_iommu object to store the index
of the IOMMU instance within a processor subsystem. The index
allows to identify each IOMMU instance in a processor subsystem
having multiple IOMMUs. The index 0 will be used by the default
MMU that a processor core goes through. The index is expected
to be supplied through the corresponding platform data.

This is in preparation to enable all the MMUs within DRA7xx
DSP sub-systems. DRA7xx is the first SoC in the OMAP family
to have more than a single MMU within a processor sub-system.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoARM: OMAP2+: remoteproc: use sentinel terminated iommu archdata
Suman Anna [Wed, 5 Mar 2014 17:38:39 +0000 (11:38 -0600)]
ARM: OMAP2+: remoteproc: use sentinel terminated iommu archdata

A remoteproc device is tied with a single IOMMU at the moment,
and both are bound together through the rproc device's archdata
field, which is defined as a single element at present.

Change this iommu archdata information to be represented through
a sentinel terminated array, so that more than one MMU can be
added to a rproc device. The sentinel allows the IOMMU driver
core to be adapted to recognize multiple IOMMUs without having
to change the iommu archdata structure.

This logic scales well with both the current single IOMMU
instance per processor as well as with the upcoming enhanced
support in the OMAP IOMMU driver to program multiple IOMMUs
together.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoARM: OMAP2+: remoteproc: split iommu archdata information
Suman Anna [Tue, 4 Mar 2014 22:16:30 +0000 (16:16 -0600)]
ARM: OMAP2+: remoteproc: split iommu archdata information

A remoteproc device is tied with its IOMMU through it's device
archdata field. The way this information is assigned currently
uses an array of iommu archdata elements, with each element
representing an IOMMU corresponding to a processor.

Split this iommu archdata array into discrete declarations to
prepare for supporting multiple iommus per processor. This info
could have been filled in directly in the respective platform
device declarations, but the discrete declarations keep both
the platform device and iommu archdata declarations to a minimum
with better code readability. The new iommu archdata is integrated
by introducing a new element to the struct omap_rproc_pdev_data.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agorpmsg: rpc: reset the current function counter on remove
Suman Anna [Sat, 8 Mar 2014 00:34:57 +0000 (18:34 -0600)]
rpmsg: rpc: reset the current function counter on remove

Each rppc_device uses a temporary function counter to keep
track of querying the remote functions supported by that
device. The rppc_device is usually created during the rpmsg
rpc driver probe and removed during driver release, but is
only removed completely when there are no active user-space
clients operating on the device.

A remoteproc recovery causes the rpmsg rpc channel devices
to be destroyed and recreated, and a previously created
rppc_device is reused if the corresponding device is not
destroyed during the prior remove. However, the requerying
of functions is failing as the current queried function
counter is never reset. This counter is now reset during
remove to avoid the above issue. This logic is independent
from whether the rppc_device is destroyed or invalidated
and reused.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoMakefile: Remove duplicate entries
Arthur Philpott [Fri, 7 Mar 2014 19:19:29 +0000 (13:19 -0600)]
Makefile: Remove duplicate entries

This patch removes the duplicate entries from
drivers/Makefile which was introduced by this commit:
442841704a120610f0bbcd3a9621bd95e0769e66

Change-Id: Icdbb74006434b24f8206bcef53afb06c32047077
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoMerge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y
Vishal Mahaveer [Thu, 6 Mar 2014 18:25:25 +0000 (12:25 -0600)]
Merge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y

* origin/p-ti-linux-3.8.y:
  Revert "TEMP: ASoC: DRA7: dra7-evm: Allow CPU DAI less for radio"
  ASoC: DRA7: dra7-evm: Reorder device_node validation
  ARM: dts: dra7-evm: Share McASP6 through sound card
  ASoC: DRA7: dra7-evm: Support shared CPU DAIs
  ti-ec: Create file pointer to interact with VIP directly
  v4l: ti-vps: vip: early_camera clean up
  v4l: ti-vps: vip: Separate vpdma lists for slices
  v4l: ti-vps: vip: Fix race condition between slices of VIP
  v4l: ti-vps: vpdma: Add support for using all lists
  v4l: ti-vps: vpdma: Support all irqs of vpdma
  v4l: ti-vps: vip: Add support for both VIP slices
  v4l: ti-vps: vpdma: correct setting active_low polarities
  arm: dts: dra7xx: Added pinmux for Vin2a and Vin6a
  displays: panel: lg101: set up the ser/deser link from probe
  omap: displays: Makefile: Changing the build-order for fpdlink panel driver

Change-Id: Ie749a6e9198155c4c4421e36062899b9b0b6cec8
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoMerge branch 'p-ti-linux-3.8.y/audio-for-next' of git://git.ti.com/android-sdk/kernel...
Vishal Mahaveer [Thu, 6 Mar 2014 17:51:04 +0000 (11:51 -0600)]
Merge branch 'p-ti-linux-3.8.y/audio-for-next' of git://git.ti.com/android-sdk/kernel-audio into p-ti-linux-3.8.y

* 'p-ti-linux-3.8.y/audio-for-next' of git://git.ti.com/android-sdk/kernel-audio:
  Revert "TEMP: ASoC: DRA7: dra7-evm: Allow CPU DAI less for radio"
  ASoC: DRA7: dra7-evm: Reorder device_node validation
  ARM: dts: dra7-evm: Share McASP6 through sound card
  ASoC: DRA7: dra7-evm: Support shared CPU DAIs

Change-Id: Ieced1f47df413d7e6785e86cafed9b0411bfa965
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoRevert "TEMP: ASoC: DRA7: dra7-evm: Allow CPU DAI less for radio"
Misael Lopez Cruz [Thu, 27 Feb 2014 00:16:20 +0000 (18:16 -0600)]
Revert "TEMP: ASoC: DRA7: dra7-evm: Allow CPU DAI less for radio"

This reverts commit 25fa86841feb304f663f5b0661f5b3a263ee3191.

The CPU DAI less approach is no longer used for radio, instead
the McASP instance is kept always clocked.

Change-Id: Iafe4cbc4d24bc5352dc0ec72b9149b1e6a8f2fa7
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: DRA7: dra7-evm: Reorder device_node validation
Misael Lopez Cruz [Thu, 27 Feb 2014 00:16:09 +0000 (18:16 -0600)]
ASoC: DRA7: dra7-evm: Reorder device_node validation

The device_node pointer was validated after it was already
used, the validation is changed to right place now.

Change-Id: I0b1d4e425c4cee65969e8fa11d068484fd9971e3
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoARM: dts: dra7-evm: Share McASP6 through sound card
Misael Lopez Cruz [Wed, 26 Feb 2014 03:29:19 +0000 (21:29 -0600)]
ARM: dts: dra7-evm: Share McASP6 through sound card

Having McASP6 as a dra7xx_radio_subdev creates two platform
devices associated with the same McASP6 omap_hwmod.
The radio_subdev only takes care of ensuring that McASP is
always clocked so that DSP can access it.

The platform device duplication can be prevented by directly
using the device in the dra7-evm sound card. The device in the
sound card is associated with the Multichannel DAI link (McASP6)
which is specified as shared to keep the device always clocked.

Change-Id: Ic244ad77026aed9db3f8b932303498649da36369
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: DRA7: dra7-evm: Support shared CPU DAIs
Misael Lopez Cruz [Wed, 26 Feb 2014 03:10:41 +0000 (21:10 -0600)]
ASoC: DRA7: dra7-evm: Support shared CPU DAIs

Either Media (McASP3) or Multichannel (McASP6) CPU DAIs can be
shared with radio. The CPU DAI is fed from the DSP side but its
power management is kept on the ARM side.

A new optional devicetree property is added to indicate if the
DAI link's CPU DAI is shared ("ti,media-shared" or
"ti,multichannel-shared"). It will prevent the device from being
power managed at runtime (clocks will be kept running).

Change-Id: Iaf5dd952e9a1ebac7970ce07d83f03c948c6b9ed
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoMerge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video...
Vishal Mahaveer [Thu, 6 Mar 2014 15:03:13 +0000 (09:03 -0600)]
Merge branch 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video into p-ti-linux-3.8.y

* 'p-ti-linux-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video:
  ti-ec: Create file pointer to interact with VIP directly
  v4l: ti-vps: vip: early_camera clean up
  v4l: ti-vps: vip: Separate vpdma lists for slices
  v4l: ti-vps: vip: Fix race condition between slices of VIP
  v4l: ti-vps: vpdma: Add support for using all lists
  v4l: ti-vps: vpdma: Support all irqs of vpdma
  v4l: ti-vps: vip: Add support for both VIP slices
  v4l: ti-vps: vpdma: correct setting active_low polarities
  arm: dts: dra7xx: Added pinmux for Vin2a and Vin6a
  displays: panel: lg101: set up the ser/deser link from probe
  omap: displays: Makefile: Changing the build-order for fpdlink panel driver

Change-Id: I4ab8c20e48bc3af1b91a9c125f2d40873836784b
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Arthur Philpott [Wed, 5 Mar 2014 22:15:17 +0000 (16:15 -0600)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

* vip:
  ti-ec: Create file pointer to interact with VIP directly
  v4l: ti-vps: vip: early_camera clean up
  v4l: ti-vps: vip: Separate vpdma lists for slices
  v4l: ti-vps: vip: Fix race condition between slices of VIP
  v4l: ti-vps: vpdma: Add support for using all lists
  v4l: ti-vps: vpdma: Support all irqs of vpdma
  v4l: ti-vps: vip: Add support for both VIP slices
  v4l: ti-vps: vpdma: correct setting active_low polarities
  arm: dts: dra7xx: Added pinmux for Vin2a and Vin6a

7 years agoti-ec: Create file pointer to interact with VIP directly
Arthur Philpott [Wed, 5 Mar 2014 21:49:34 +0000 (15:49 -0600)]
ti-ec: Create file pointer to interact with VIP directly

This moves to a new implementation where a file pointer
is created in the early_camera module.  This fp is used
to open and close an instance of the VIP as well as make
IOCTL calls directly.

Change-Id: I5c3c30b2f2c3f097a99c8eaef3979bfe2ce281e9
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agov4l: ti-vps: vip: early_camera clean up
Arthur Philpott [Wed, 5 Mar 2014 21:47:11 +0000 (15:47 -0600)]
v4l: ti-vps: vip: early_camera clean up

This patch removes all references to the early_camera
module that was present in the previous implementation.
It also exports the vip_open and vip_release functions
so that the early_camera module is able to open
the VIP driver directly without altering it.

Change-Id: I8624b2e0c6a117179411fc7d7bfe2617d34a96f6
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agov4l: ti-vps: vip: Separate vpdma lists for slices
Nikhil Devshatwar [Wed, 12 Feb 2014 11:45:20 +0000 (17:15 +0530)]
v4l: ti-vps: vip: Separate vpdma lists for slices

Use individual lists for different slices
Slice0 - uses int0 of VIP (only list0 enabled)
Slice1 - uses int1 of VIP (only list1 enabled)
Using slice_id to decide the irq_num and list_num
Correct the interrupt status reading and clearing logic

Change-Id: Ice44b99b1e51d3a16c95cd352d0f0802f20809f0
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vip: Fix race condition between slices of VIP
Nikhil Devshatwar [Wed, 12 Feb 2014 15:11:07 +0000 (20:41 +0530)]
v4l: ti-vps: vip: Fix race condition between slices of VIP

First slice for which open gets called would allocate a shared struct
needed for VPDMA and other slice should start using that

But when both slices are opened one after another, both slices try to allocate
their own structures leading to a kernel crash
This happens because there isn't any lock
vip_driver_mutex would avoid the race condition between the two slices

Release the lock after initializing vpdma

Change-Id: I1afa6d86ab630c80624ae07afd4020f585532c6a
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vpdma: Add support for using all lists
Nikhil Devshatwar [Wed, 12 Feb 2014 10:46:34 +0000 (16:16 +0530)]
v4l: ti-vps: vpdma: Add support for using all lists

Current VPDMA library allows to submit descriptors for
no other than List 0
Sometimes using multiple lists is needed (multiple slice of VIP)
This patch allows to submit descriptors for all lists 0-7

Change-Id: I3766c974f26e15c8aaec6241de627cdfe066166d
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vpdma: Support all irqs of vpdma
Nikhil Devshatwar [Thu, 6 Feb 2014 08:07:26 +0000 (13:37 +0530)]
v4l: ti-vps: vpdma: Support all irqs of vpdma

Current VPDMA library uses only int0 of VPDMA
This patch adds support for using other interrupts of VPDMA

Change-Id: I84718f27c457d28478a06c6331216a259316e9bc
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Conflicts:
drivers/media/platform/ti-vps/vip.c

7 years agov4l: ti-vps: vip: Add support for both VIP slices
Nikhil Devshatwar [Wed, 12 Feb 2014 14:54:10 +0000 (20:24 +0530)]
v4l: ti-vps: vip: Add support for both VIP slices

Create a vip_dev per slice
Request resource and map register memory one time
Perform all dev initialization once per slice
Use different irqs for different slices
Return 0 if at least one slice is registered correctly

Use the same vip_shared for both slices - set as platform data
Save the devices allocated in shared structure
Use them to free when device is released

Change-Id: Ia03e5a85b4bc6df50381ef0595c23960adc115e4
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: vpdma: correct setting active_low polarities
Nikhil Devshatwar [Wed, 22 Jan 2014 14:39:12 +0000 (20:09 +0530)]
v4l: ti-vps: vpdma: correct setting active_low polarities

Correct resetting bitfield logic  when polarity is zero
For active low signal, reset only the corresponding bit

Change-Id: I5a1a7139978379416b00194108345d297e1ea7ec
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoarm: dts: dra7xx: Added pinmux for Vin2a and Vin6a
Nikhil Devshatwar [Wed, 8 Jan 2014 16:51:05 +0000 (22:21 +0530)]
arm: dts: dra7xx: Added pinmux for Vin2a and Vin6a

Not enabling Vin6a since it conflicts with the mcasp3

Change-Id: I854ab983f40d4ed4d1fe1c2878300e960e8f3da4
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoHACK: [vayu] Enable mmu1 for DSP1 and DSP2
Robert Tivy [Wed, 30 Oct 2013 00:50:24 +0000 (17:50 -0700)]
HACK: [vayu] Enable mmu1 for DSP1 and DSP2

This patch enabled mmu1_dsp[1|2] using mmu0_dsp[1|2]'s TTB
By default MMU0 only is enabled for all cores.
The patch enables MMU1 for DSPs by copying the same settings
as that done for MMU0 for DSP.

Change-Id: I652bf2691115ee6532e81eb270fd91ea4700e606
Signed-off-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agoHACK: [vayu] Allow remoteproc to load DSP memories
Meena E [Tue, 10 Dec 2013 13:58:24 +0000 (19:28 +0530)]
HACK: [vayu] Allow remoteproc to load DSP memories

Allow loading of DSP text to DSP Internal memory by remoteproc

Change-Id: I2c5f20864475c32e7ecb711c94f9aac4694e8576
Signed-off-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Signed-off-by: Meena E <meena-e@ti.com>
7 years agodefconfig: android: enable configurations needed for cts
Vishal Mahaveer [Tue, 25 Feb 2014 21:06:32 +0000 (15:06 -0600)]
defconfig: android: enable configurations needed for cts

android.security cts test requires CONFIG_IKCONFIG_PROC to
be disabled and android.net cts test cases require CONFIG_UID_STAT
and CONFIG_TUN to be enabled.

Change-Id: I5995e7ff03f1159d3dbbecfda355bd6ccf9437ae
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoMerge branch 'p-ti-android-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video...
Vishal Mahaveer [Wed, 5 Mar 2014 16:23:06 +0000 (10:23 -0600)]
Merge branch 'p-ti-android-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video into p-ti-android-3.8.y

* 'p-ti-android-3.8.y-video' of git://git.ti.com/android-sdk/kernel-video:
  defconfig: enable LVDS sensor config in defconfig
  Makefile: Rearrange devices in initialization sequence
  defconfig: enable VPE/Deinterlacing module

Conflicts:
arch/arm/configs/android_omap_defconfig

Change-Id: Ibcbbfcf4aec038ccc2e396315eb20e15c15cf960
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agodefconfig: enable LVDS sensor config in defconfig
Arthur Philpott [Thu, 27 Feb 2014 21:58:05 +0000 (15:58 -0600)]
defconfig: enable LVDS sensor config in defconfig

This sets a flag that changes the sensor configuration
when the LVDS setup is utilized.

Change-Id: I5876f0461ad76d6aff31ac75c8f60311eadf0099
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoMakefile: Rearrange devices in initialization sequence
Arthur Philpott [Wed, 19 Feb 2014 21:27:38 +0000 (15:27 -0600)]
Makefile: Rearrange devices in initialization sequence

This rearranges the devices in the initialization sequence
in order to support both multi-instance VIP and the
early camera usecase simultaneously. The previous
sequence did not allow the i2c expanders, deserializer,
serializers, or attached sensors to probe correctly.

Change-Id: Ie1c5a402538db9fadb12957d9e56db46dd798c17
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoMerge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y
Vishal Mahaveer [Tue, 4 Mar 2014 21:16:37 +0000 (15:16 -0600)]
Merge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y

* origin/p-ti-linux-3.8.y:
  misc: gc320: Add dma buf functionality

Change-Id: I8961f7d7e83b01c48937bb73f61c8d35b072e4da
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agomisc: gc320: Add dma buf functionality
Pradeep Venkatasubbarao [Mon, 3 Mar 2014 20:52:06 +0000 (14:52 -0600)]
misc: gc320: Add dma buf functionality

This patch adds the dma buf functionality to Vivante GC320 driver.

Change-Id: I83ff78fb882d8ebe87c97134d04708a62516fae4
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
7 years agoMerge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y
Vishal Mahaveer [Mon, 3 Mar 2014 22:26:21 +0000 (16:26 -0600)]
Merge remote-tracking branch 'origin/p-ti-linux-3.8.y' into p-ti-android-3.8.y

* origin/p-ti-linux-3.8.y: (46 commits)
  ARM: DRA7: hwmod data: fix merge conflict
  omapdrm: Modify sync for write flags
  omapdrm : Free waiter when not added to wait list
  drm: Don't set the plane->fb to NULL on successfull set_plane
  drm: fix fb leak in setcrtc
  drm: check that ->set_config properly updates the fb
  drm: Add drm_plane_force_disable()
  drm: Kill user_modes list and the associated ioctls
  drm: Silence some sparse warnings
  drm: Destroy property blobs at mode config cleanup time
  drm: cleanup: use drm_framebuffer_reference instead of a kref_get
  drm: don't unlock in the addfb error paths
  drm/omap: use flip-work helper
  drm: add flip-work helper
  drm/fb_helper: check whether fbcon is bound
  drm/doc: updates for new framebuffer lifetime rules
  drm: don't hold crtc mutexes for connector ->detect callbacks
  drm: only grab the crtc lock for pageflips
  drm: optimize drm_framebuffer_remove
  drm: refcounting for crtc framebuffers
  ...

Change-Id: I54476ab6fef31a0d6c603ac98ebc444954641450
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoARM: DRA7: hwmod data: fix merge conflict
Vishal Mahaveer [Mon, 3 Mar 2014 22:16:32 +0000 (16:16 -0600)]
ARM: DRA7: hwmod data: fix merge conflict

Fix the merge conflict introduced by
commit '335001648b1155f0c719f97e884012bb8bed347c'

Change-Id: I5957f7da19f6352f285f8b6e2aca2bb3359a4ef6
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoMerge branch 'ti2013.04.02-rpmsg-3.8.y-late-attach' of git://git.ti.com/rpmsg/rpmsg...
Vishal Mahaveer [Mon, 3 Mar 2014 20:58:13 +0000 (14:58 -0600)]
Merge branch 'ti2013.04.02-rpmsg-3.8.y-late-attach' of git://git.ti.com/rpmsg/rpmsg into p-ti-linux-3.8.y

* 'ti2013.04.02-rpmsg-3.8.y-late-attach' of git://git.ti.com/rpmsg/rpmsg:
  remoteproc/omap: add Kconfig symbols for late attach
  ARM: OMAP: remoteproc: use non-zeroing dma_map_ops for late attach
  ARM: dma-mapping: create non-zeroing dma_map_ops
  ARM: DRA7: hwmod data: add flags to support late attach on IPUs
  remoteproc/omap: add "late attach" support
  remoteproc: add "late attach" support

Conflicts:
arch/arm/mach-omap2/omap_hwmod_7xx_data.c

Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agoomapdrm: Modify sync for write flags
Archit Taneja [Tue, 4 Feb 2014 11:53:20 +0000 (17:23 +0530)]
omapdrm: Modify sync for write flags

omapdrm uses omap_gem_op_async to make sure the buffer is onyl accessed when
completely written by the SGX. The OMAP_GEM_READ flag makes it only read the
'read flag' in the buffer sync object. However, the SGX driver only updates the
'write flag' in the sync object. Add the OMAP_GEM_WRITE flag so that it
considers the 'write flag' in the sync object struct too.

Change-Id: Id8fc4f8ad06dbbe0632f77a444cd3f788398baee
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agoomapdrm : Free waiter when not added to wait list
Subhajit Paul [Wed, 19 Feb 2014 12:02:38 +0000 (17:32 +0530)]
omapdrm : Free waiter when not added to wait list

If the waiter is not added to wait list, it needs to be freed.
If added, it will be freed in sync_op_update.

Change-Id: I57ad1853c3717b4e0b0a449bde0ba3e4f2d5a0c6
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: Don't set the plane->fb to NULL on successfull set_plane
Daniel Vetter [Fri, 15 Feb 2013 20:21:37 +0000 (21:21 +0100)]
drm: Don't set the plane->fb to NULL on successfull set_plane

We need to clear the local variable to get the refcounting right
(since the reference drm_mode_setplane holds is transferred to the
plane->fb pointer). But should be done _after_ we update the pointer.

Breakage introduced in

commit 6c2a75325c800de286166c693e0cd33c3a1c5ec8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 11 00:59:24 2012 +0100

    drm: refcounting for sprite framebuffers

Change-Id: I0139500e821c1174d9a6475af3917e3f4558d5c2
Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Rob Clark <rob@ti.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: fix fb leak in setcrtc
Daniel Vetter [Fri, 14 Jun 2013 22:13:16 +0000 (00:13 +0200)]
drm: fix fb leak in setcrtc

Drivers are allowed (actually have to) disable unrelated crtcs in
their ->set_config callback (when we steal all the connectors from
that crtc). If they do that they'll clear crtc->fb to NULL.

Which results in a refcount leak, since the drm core is keeping track
of that reference.

To fix this track the old fb of all crtcs and adjust references for
all of them. Of course, since we only hold an additional reference for
the fb for the current crtc we need to increase refcounts before we
drop the old one.

This approach has the benefit that it inches us a bit closer to an
atomic modeset world, where we want to update the config of all crtcs
in one step.

This regression has been introduce in the framebuffer refcount
conversion, specifically in

commit b0d1232589df5575c5971224ac4cb30e7e525884
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 11 01:07:12 2012 +0100

    drm: refcounting for crtc framebuffers

Change-Id: Ie094d0a5beebd2ba1df690f9c4029f8fdd1b6226
Reported-by: Russell King <linux@arm.linux.org.uk>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: check that ->set_config properly updates the fb
Daniel Vetter [Fri, 14 Jun 2013 22:13:15 +0000 (00:13 +0200)]
drm: check that ->set_config properly updates the fb

Historically drm lacked fb refcounting, so the updating of crtc->fb
was done by the lower levels at a point convenient to get their own
refcounting (e.g. refcounts for the underlying gem bo, pinning
refcounts) right. With the introduction of refcounted fbs the drm core
handled the fb refcounts, but still relied on drivers to update the
crtc->fb pointer (this approach required the least invasive changes in
drivers).

Enforce this contract with a WARN_ON.

Change-Id: I65497f4f8dd94381dd8944dd0cd1b7abd498287d
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: Add drm_plane_force_disable()
Ville Syrjälä [Mon, 3 Jun 2013 13:10:40 +0000 (16:10 +0300)]
drm: Add drm_plane_force_disable()

drm_plane_force_disable() will forcibly disable the plane even if user
had previously requested the plane to be enabled.

This can be used to force planes to be off when restoring the fbdev
mode.

The code was simply pulled from drm_framebuffer_remove(), which now
calls the new function as well.

v2: Check plane->fb in drm_plane_force_disable(), drop bogus comment
    about disabling crtc

Change-Id: Ie35255ea31372f8c56ba1fd37d95de4acb42ace9
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: Kill user_modes list and the associated ioctls
Ville Syrjälä [Fri, 26 Apr 2013 14:40:28 +0000 (17:40 +0300)]
drm: Kill user_modes list and the associated ioctls

There is no way to use modes added to the user_modes list. We never
look at the contents of said list in the kernel, and the only operations
userspace can do are attach and detach. So the only "benefit" of this
interface is wasting kernel memory.

Fortunately it seems no real user space application ever used these
ioctls. So just kill them.

Also remove the prototypes for the non-existing drm_mode_addmode_ioctl()
and drm_mode_rmmode_ioctl() functions.

v2: Use drm_noop instead of completely removing the ioctls

Change-Id: I5b35bf100f2d2166bbe64a4e1bbdfb3f7a619714
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: Silence some sparse warnings
Ville Syrjälä [Thu, 25 Apr 2013 17:09:20 +0000 (20:09 +0300)]
drm: Silence some sparse warnings

drivers/gpu/drm/drm_pci.c:155:5: warning: symbol 'drm_pci_set_busid' was not declared. Should it be static?
drivers/gpu/drm/drm_pci.c:197:5: warning: symbol 'drm_pci_set_unique' was not declared. Should it be static?
drivers/gpu/drm/drm_pci.c:269:5: warning: symbol 'drm_pci_agp_init' was not declared. Should it be static?

drivers/gpu/drm/drm_crtc.c:181:1: warning: symbol 'drm_get_dirty_info_name' was not declared. Should it be static?
drivers/gpu/drm/drm_crtc.c:1123:5: warning: symbol 'drm_mode_group_init' was not declared. Should it be static?

drivers/gpu/drm/drm_modes.c:918:6: warning: symbol 'drm_mode_validate_clocks' was not declared. Should it be static?

Change-Id: I1a63c4fcbd2fb1b0859a00aba2f530d6c27c8d3a
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: Destroy property blobs at mode config cleanup time
Laurent Pinchart [Mon, 15 Apr 2013 13:37:16 +0000 (15:37 +0200)]
drm: Destroy property blobs at mode config cleanup time

Property blob objects need to be destroyed when cleaning up to avoid
memory leaks. Go through the list of all blobs in the
drm_mode_config_cleanup() function and destroy them.

The drm_mode_config_cleanup() function needs to be moved after the
drm_property_destroy_blob() declaration. Move drm_mode_config_init() as
well to keep the functions together.

Change-Id: I0ed0ac01b8f325023713e9f0d524f2e802ba5620
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: cleanup: use drm_framebuffer_reference instead of a kref_get
archit taneja [Wed, 10 Apr 2013 08:59:39 +0000 (08:59 +0000)]
drm: cleanup: use drm_framebuffer_reference instead of a kref_get

drm_framebuffer_lookup() does a kref_get() for the framebuffer if it finds one
corresponding to the fb id passed to it. Use drm_framebuffer_reference() instead
for clarity since it's the function used in other places to take a reference.

Change-Id: I465a57a17977f6681e7c7fa8f9af8a2212eed382
Signed-off-by: Archit Taneja <archit@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: don't unlock in the addfb error paths
Daniel Vetter [Wed, 27 Mar 2013 20:42:00 +0000 (21:42 +0100)]
drm: don't unlock in the addfb error paths

We don't grab the modeset locks any more since

commit 468174f748603497e73dba9b5c6d1d9f71121486
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 11 00:09:12 2012 +0100

    drm: push modeset_lock_all into ->fb_create driver callbacks

Change-Id: I6b027666b73eae4f9fc222a018c43881f073b735
Reported-by: Ray Strode <rstrode@redhat.com>
Cc: Ray Strode <rstrode@redhat.com>
Cc: Dave Airlie <airlied@gmail.com>
Acked-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm/omap: use flip-work helper
Archit Taneja [Wed, 22 Jan 2014 06:39:23 +0000 (12:09 +0530)]
drm/omap: use flip-work helper

[backport to 3.8]

And simplify how we hold a ref+pin to what is being scanned out by using
fb refcnt'ing.  The previous logic pre-dated fb refcnt, and as a result
was less straightforward than it could have been.  By holding a ref to
the fb, we don't have to care about how many plane's there are and
holding a ref to each color plane's bo.

Change-Id: Ib1f003756d3241c971f48095494d0c8ef42102ea
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Archit Taneja <archit@ti.com>
7 years agodrm: add flip-work helper
Archit Taneja [Wed, 22 Jan 2014 06:36:48 +0000 (12:06 +0530)]
drm: add flip-work helper

[Backport of mainline kernel patch]

A small helper to queue up work to do, from workqueue context, after a
flip.  Typically useful to defer unreffing buffers that may be read by
the display controller until vblank.

v1: original
v2: wire up docbook + couple docbook fixes

Change-Id: Ia66de269b3c1d80d292192fa17c86ebb4bc368d1
Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Archit Taneja <archit@ti.com>
[Fixed checkpatch error]
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
7 years agodrm/fb_helper: check whether fbcon is bound
Daniel Vetter [Mon, 17 Dec 2012 11:13:23 +0000 (12:13 +0100)]
drm/fb_helper: check whether fbcon is bound

We need to make sure that the fbcon is still bound when touching the
hw, since otherwise we might corrupt the modeset state of kms clients.
X mostly works around that with VT switching and setting the VT into
raw mode, which disables most fbcon events.

Raw kms test programs though don't do that dance, and in the future
we might want to aim to abolish CONFIG_VT anyway. So improve preventive
measures a bit. To do so, extract the existing logic for handling hotplug
events (which X can't block with the current set of tricks) and reuse
it for the fbdev blanking helper.

Long-term we really need to either scrap this all and only have a OOPS
console, or come up with a saner model for device ownership sharing
between fbdev/fbcon and kms userspace.

Change-Id: I4762f0ab47f57d352fa83d31f33b9090830c284c
Reviewed-by: Rob Clark <rob@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Archit Taneja <archit@ti.com>