android-sdk/kernel-video.git
7 years agov4l: ti-vpe: Add crop support in VPE driver vpe
Archit Taneja [Mon, 10 Feb 2014 11:28:43 +0000 (16:58 +0530)]
v4l: ti-vpe: Add crop support in VPE driver

Add crop ioctl ops. For VPE, cropping only makes sense with the input to VPE, or
the V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE buffer type.

For the CAPTURE type, a S_CROP ioctl results in setting the crop region as the
whole image itself, hence making crop dimensions same as the pix dimensions.

Setting the crop successfully should result in re-configuration of those
registers which are affected when either source or destination dimensions
change, set_srcdst_params() is called for thist purpose.

Some standard crop parameter checks are done in __vpe_try_crop().

Change-Id: I7b9e31d34ca8b48be0f34ba72fa7cf602458d5ab
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: vpe: added DMABUF support
alaganraj [Thu, 19 Dec 2013 06:30:54 +0000 (12:00 +0530)]
v4l: vpe: added DMABUF support

Change-Id: Ie64877d4850ab3bf661178809108e3e0f54fddbe
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vps: Fix some params in VPE data descriptors
Archit Taneja [Wed, 19 Feb 2014 12:31:01 +0000 (18:01 +0530)]
v4l: ti-vps: Fix some params in VPE data descriptors

Some parameters of the VPE descriptors were understood incorrectly. They are now
fixed. The fixes are explained as follows:

- When adding an inbound data descriptor to the VPDMA descriptor list, we intend
  to use c_rect as the cropped region fetched by VPDMA. Therefore, c_rect->width
  shouldn't be used to calculate the line stride, the original image width
  should be used for that. We add a 'width' argument which gives the buffer
  width in memory.

- frame_width and frame_height describe the complete width and height of the
  client to which the channel is connected. If there are multiple channels
  fetching data and providing to the same client, the above 2 arguments should
  be the width and height of the region covered by all the channels. In the case
  where there is only one channel providing pixel data to the client
  (like in VPE), frame_width and frame_height should be the cropped width and
  cropped height respectively. The calculation of these params is done in the
  vpe driver now.

- start_h and start_v is also used in the case of multiple channels to decribe
  where each channel should start filling pixel data. We don't use this in VPE,
  and pass 0s to the vpdma_add_in_dtd() helper.

- Some minor changes are made to the vpdma_add_out_dtd() helper. The c_rect
  param is removed since cropping isn't possible for outbound data, and 'width'
  is added to calculate the line stride.

Change-Id: I4a5bc52d1a5a078663b2b03f63213eba8855e5a3
Signed-off-by: alaganraj <alaganraj.s@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: Fix makefile to correct build issue vpe-linux
Praneeth Bajjuri [Mon, 9 Dec 2013 21:27:44 +0000 (15:27 -0600)]
v4l: ti-vps: Fix makefile to correct build issue

Fix makefile to correct build issue

Change-Id: Iedb4d352d5cf94ed1600014d8d7d718a3e0211d0
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agov4l: ti-vpe: Remove unnescessary wmb() call when submitting descs
Archit Taneja [Wed, 4 Dec 2013 14:20:52 +0000 (19:50 +0530)]
v4l: ti-vpe: Remove unnescessary wmb() call when submitting descs

A wmb() memory barrier call was placed between the register writes to
VPDMA_LIST_ADDR and VPDMA_LIST_ATTR to ensure the correct write order is
ensured.

iowrite32() already performs the following task, and hence it's redundant to
call it again. Remove the wmb() call from vpdma_submit_descs.

Change-Id: Id5c18ffce7a2c1862fed2d5d455c80c81e7883a6
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: Remove extra vpdma_buf_unmap call
Archit Taneja [Wed, 4 Dec 2013 14:18:36 +0000 (19:48 +0530)]
v4l: ti-vpe: Remove extra vpdma_buf_unmap call

The VPDMA buffer for the descriptor list is currently unmapped twice in the
driver. It's first unmapped in the vpe_irq interrupt handler, and then in
vpe_release() when the vpe video device is closed.

Remove the extra call from vpe_release().

Change-Id: I30935e124aa440d5754e13173d37d19ad396c937
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: Handle setting of field param in v4l2_format better in try_fmt
Archit Taneja [Wed, 4 Dec 2013 14:16:22 +0000 (19:46 +0530)]
v4l: ti-vpe: Handle setting of field param in v4l2_format better in try_fmt

Clean up the setting of pix->field in __vpe_try_fmt. Make it more readable

Change-Id: I688a764c11641b8ff83daf28bdbc6cdb44e89359
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: Use dma API to allocate motion vector buffers
Archit Taneja [Wed, 4 Dec 2013 14:12:53 +0000 (19:42 +0530)]
v4l: ti-vpe: Use dma API to allocate motion vector buffers

Motion vector buffers are currently allocated through kernel's kzalloc function.
These buffers can be large if the input buffer resolution is high. We should use
dma API when allocating large buffers.

Change the allocation from kzalloc to DMA API.

Change-Id: I9732f7fa80ab69d7fa5bca0acfaa59f473f19539
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: Increase VPDMA desriptor list size
Archit Taneja [Wed, 4 Dec 2013 15:29:56 +0000 (20:59 +0530)]
v4l: ti-vpe: Increase VPDMA desriptor list size

With the addition of config descriptors for loading scaler coefficients, and the
addition of control descriptors for input channels. The current list size might
not accomodate all the descriptors. Increase this value to the maximum possible
descriptor size.

Change-Id: Idc42fd9c065096098c1515b4b07f7c3d1786be2f
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: Add sync on channel descriptors for input VPE ports
Archit Taneja [Wed, 4 Dec 2013 14:00:15 +0000 (19:30 +0530)]
v4l: ti-vpe: Add sync on channel descriptors for input VPE ports

We currently stall the VPDMA descriptor list till the time the output channels
complete their DMA. In certain cases, this may not be the correct completion
event. It's possible that there is some pending DMA operation still occuring
on one of the input channels.

Add sync on channel control descriptors for the input channels to make sure
a list complete interrupt occurs when all the channels are done with DMA.

Change-Id: I24d3127bf854fe8ac145e33803665a7a58a1d042
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: Add 'const' to intialized struct variables
Archit Taneja [Wed, 4 Dec 2013 13:53:51 +0000 (19:23 +0530)]
v4l: ti-vpe: Add 'const' to intialized struct variables

Add 'const' to intialized structure variables, to prevent
members are modified at run time.

Change-Id: I582b9371bee741a79f8acf699c52236d99a526e4
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: vpdma: Add a type specifier to describe vpdma data format type
Archit Taneja [Wed, 27 Nov 2013 10:10:47 +0000 (15:40 +0530)]
v4l: ti-vpe: vpdma: Add a type specifier to describe vpdma data format type

The struct vpdma_data_format holds the color format depth and the data_type
value needed to be programmed in the data descriptors. However, it doesn't
tell what type of color format is it, i.e, whether it is RGB, YUV or Misc.

This information is needed when by vpdma library when forming descriptors. We
modify the depth parameter for the chroma portion of the NV12 format. For this,
we check if the data_type value is C420. This isn't sufficient as there are
many YUV and RGB vpdma formats which have the same data_type value. Hence, we
need to hold the type of the color format for the above case, and possibly more
cases in the future.

Change-Id: Ia18ab994093cedc9eee23df897b250378a729b93
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: enable CSC support for VPE
Archit Taneja [Wed, 27 Nov 2013 09:59:45 +0000 (15:29 +0530)]
v4l: ti-vpe: enable CSC support for VPE

Use the csc library functions to configure the CSC block in VPE.

Some changes are required in try_fmt to handle the pix->colorspace parameter
more correctly. Add basic RGB color formats to the list of supported vpe
formats.

If the destination format is RGB colorspace, we also need to use the RGB output
port instead of the Luma and Chroma output ports. This requires configuring the
output data descriptors differently.

Also, make the default colorspace V4L2_COLORSPACE_SMPTE170M as that resembles
the Standard Definition colorspace more closely.

Change-Id: I9d762d8a0f6d0531dfc227e3c6853048b23fecbf
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: enable YUV to RGB color conversion support
Archit Taneja [Wed, 27 Nov 2013 09:28:22 +0000 (14:58 +0530)]
v4l: ti-vpe: enable YUV to RGB color conversion support

The CSC block can be used for color space conversion between YUV and RGB
formats.

It is configurable via a programmable set of coefficients. Add functionality to
choose the appropriate CSC coefficients and program them in the CSC registers.
We take the source and destination colorspace formats as the arguments, and
choose the coefficient table accordingly.

Only YUV to RGB coefficients are provided for standard and high definition
colorspaces. The coefficients can also be limited or full range, only full range
coefficients are chosen by default. We would need some sort of control ioctl for
the user to specify the range needed.

Change-Id: I1aa76dfcc0702ef022e8516f59a64f953f7331c5
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: create a color space converter library
Archit Taneja [Wed, 27 Nov 2013 08:27:13 +0000 (13:57 +0530)]
v4l: ti-vpe: create a color space converter library

Create the csc block related configurations and register definitions as a
library. This is done as the same csc block is used in both VIP and VPE.

The vpe_dev device holds a csc_data handle, which it can reference to access
the registers, or call csc related helper functions.

Change-Id: I50aaac7401c9e1848818bbb1b396f3e1e6829082
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: enable basic scaler support
Archit Taneja [Wed, 27 Nov 2013 06:48:48 +0000 (12:18 +0530)]
v4l: ti-vpe: enable basic scaler support

Add the required scaler register configurations which lets us perform linear
scaling for the supported range of horizontal and vertical scaling ratios.

The horizontal scaler performs polyphase scaling using it's 8 tap 32 phase
filter, decimation is performed when downscaling passes beyond 2x or 4x.

The vertical scaler performs polyphase scaling using it's 5 tap 32 phase
filter, it switches to a simpler form of scaling using the running average
filter when the downscale ratio is more than 4x.

Many of the scaler features like peaking, trimming and non-linear scaling aren't
implemented for now. Only those register fields are configured which are
required for basic scaling operation.

The function to configure scaler registers takes the sc_data handle, the source
and destination directions, and the scaler address data block offsets for the
current context so that they can be configured.

Change-Id: Iaaf08f5f3d5c2c9d95d97543ef333c7b7fa7178a
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: load scaler coefficients
Archit Taneja [Tue, 26 Nov 2013 13:43:38 +0000 (19:13 +0530)]
v4l: ti-vpe: load scaler coefficients

The scaler IP requires to be loaded with coefficients from memory through
VPDMA.

The horizontal and vertical scaler each require a set of scaler coefficients.
The horizontal polyphase scaler requires luma and chroma coefficients for a 32
phase and 8 tap filter. Similarly, the vertical scaler requires coefficients for
a 5 tap filter.

In order to load the scaler coefficients via VPDMA, a configuration descriptor
is used in block mode. The payload for the descriptor is the scaler coefficients
copied to memory. The coefficients need to be placed in memory in a particular
order, this is taken care by the functions sc_set_hs and sc_set_vs_coefficients.

The choice of the scaler coefficients depends on the downscale ratio. In the
case of horizontal downscaling, we need to consider the change in ratio cause by
decimation. In the case of vertical scaling, the VPE driver should provide the
source height based on whether the de-interlacer is used or not.

Change-Id: I6e8b5a9e2d3a9ac1f7fbe93333be54d7edb960bc
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: Create a scaler library
Archit Taneja [Wed, 4 Dec 2013 13:08:40 +0000 (18:38 +0530)]
v4l: ti-vpe: Create a scaler library

Create the scaler block related configurations and register definitions as a
library. This is done as the same scaler block is used in both VIP and VPE.

The vpe_dev device holds a sc_data handle, which it can reference to access
the registers, or call scaler related helper functions.

Change-Id: Ia785ba243938759555dd7bca9e6f547be00c07db
Signed-off-by: alaganraj <alaganraj.s@ti.com>
Conflicts:

drivers/media/platform/Makefile

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agov4l: ti-vpe: make sure VPDMA line stride constraints are met
Archit Taneja [Tue, 26 Nov 2013 09:08:16 +0000 (14:38 +0530)]
v4l: ti-vpe: make sure VPDMA line stride constraints are met

When VPDMA fetches or writes to an image buffer, the line stride must be a
multiple of 16 bytes. If it isn't, VPDMA HW will write/fetch until the next
16 byte boundry.

In order to prevent this, we now make sure that the VPE source and destination
image line strides are 16 byte aligned. Also, the motion vector buffer must be
allocated in such a way that it ensures the same alignment.

Change-Id: Iff0c3a433ecfeb73a4cdda9a50229d5d3c6c4f4b
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vps: Fix the data_type value for UYVY VPDMA format
Archit Taneja [Tue, 26 Nov 2013 07:41:03 +0000 (13:11 +0530)]
v4l: ti-vps: Fix the data_type value for UYVY VPDMA format

The data_type value to be programmed in the data descriptors to fetch/write a
UYVY buffer was not mentioned correctly in the older DRA7x documentation. This
caused VPE to fail with UYVY color formats.

Update the data_type value to fix functionality when UYVY format is used.

Change-Id: I2ef7b07da9a1a955cf56f637f318f1f822b969f6
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agov4l: ti-vpe: use module_platform_driver to simplify the code
Archit Taneja [Tue, 26 Nov 2013 07:37:04 +0000 (13:07 +0530)]
v4l: ti-vpe: use module_platform_driver to simplify the code

module_platform_driver() makes the code simpler by eliminating
boilerplate code.

Change-Id: I759e5a92fd45dfd527d542038aa44fdb3efae338
Signed-off-by: alaganraj <alaganraj.s@ti.com>
7 years agoVIP: Deferred initializations to vip_open and beyond
Sundar Raman [Mon, 18 Nov 2013 22:26:50 +0000 (16:26 -0600)]
VIP: Deferred initializations to vip_open and beyond

Moved VIP and subdev initializations to vip_open and
beyond so as not to create conflict with early
camera from ipu.

Change-Id: Icb91a7cb938662fe0b0334636b40a3a339e4451c
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agov4l: ti-vps: vip: support for dmabuf importing
Nikhil Devshatwar [Mon, 11 Nov 2013 06:01:31 +0000 (11:31 +0530)]
v4l: ti-vps: vip: support for dmabuf importing

This patch enhances TI vip driver with a support for importing a buffer
from DMABUF file descriptors.

Change-Id: Ie2e14451a9d48781990236d1201795c9f8a08e14
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: Export vpdma functions
Nikhil Devshatwar [Mon, 11 Nov 2013 10:06:08 +0000 (15:36 +0530)]
v4l: ti-vps: Export vpdma functions

This patch exports the functions provided by
VPDMA library, so that they can be used by VIP/VPE modules

Change-Id: I6b81d47528134d28e50641c116edb3f7e0961dc6
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l: ti-vps: Do not add objects in ti-vps from outside
Nikhil Devshatwar [Thu, 24 Oct 2013 15:26:42 +0000 (20:56 +0530)]
v4l: ti-vps: Do not add objects in ti-vps from outside

This patch fixes the build error when kernel is compiled with
make O=.build flag
It adds the ti-vps/Makefile always, and depending on the config,
ti-vip / ti-vpe  vpdma will be selected.

Change-Id: Idedf01b3268c6960598db2ede729b562573e07ca
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoi2c: Create generic driver for Omnivision Sensors
Arthur Philpott [Tue, 26 Nov 2013 20:10:06 +0000 (14:10 -0600)]
i2c: Create generic driver for Omnivision Sensors

Renamed ov10635.c to ov1063x.c to make it generic
to omnivision sensors. This patch also makes changes
to the initial register configuration which was needed
to enable the onboard LI-OV10633 sensor.

Change-Id: I00d9cee6f4b032671b07fd8cfb94988e13262c02
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoDTS: Default to onboard OV10633 sensor
Arthur Philpott [Tue, 12 Nov 2013 16:02:30 +0000 (10:02 -0600)]
DTS: Default to onboard OV10633 sensor

If both OV10633 and OV10635 sensors are attached
this ordering will ensure that the onboard sensor
is probed first, thus enabling it by default.

Change-Id: Ica087ad6a58441d2cd6df892c197a460a61bae54
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoVIP: Added support for OV10633 sensor
Arthur Philpott [Tue, 12 Nov 2013 15:49:04 +0000 (09:49 -0600)]
VIP: Added support for OV10633 sensor

Added new v4l2_async_subdev for the OV10633
sensor support.

Change-Id: I2f904c10ca1d4d563d6f944a9765459f8c742372
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoVPDMA: Create Load Kernel VPDMA F/W flag
Arthur Philpott [Wed, 30 Oct 2013 18:49:11 +0000 (13:49 -0500)]
VPDMA: Create Load Kernel VPDMA F/W flag

Create Load Kernel VPDMA F/W flag in order to specify
whether the VPDMA F/W will be loaded from kernel.

Change-Id: If510eca81b30847534fd2a4a2e4593732cf03b16
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoDTS: Added ov10633 sensor support to the DTS file
Arthur Philpott [Fri, 25 Oct 2013 21:57:27 +0000 (16:57 -0500)]
DTS: Added ov10633 sensor support to the DTS file

-Created new entry for ov10633 support
-Removed camera module from VIP handle and placed along
 with sensors

Change-Id: I738f907ff2b33fc842c67dc13d4421037da20a17
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoi2c: ov10635: Added support for the OV10633 sensor
Arthur Philpott [Fri, 25 Oct 2013 21:51:33 +0000 (16:51 -0500)]
i2c: ov10635: Added support for the OV10633 sensor

-Added support for the OV10633 sensor
-Added GPIO configurations to toggle mux settings
 for the OV1063x sensors

Change-Id: Ia28d8d69687a80c9aa2dac9d44eb2b23958adeff
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoVIP: Remove GPIO configuration for OV1063x sensors
Arthur Philpott [Fri, 25 Oct 2013 21:50:12 +0000 (16:50 -0500)]
VIP: Remove GPIO configuration for OV1063x sensors

The GPIO configurations for the OV1063x sensors have
been removed from the VIP driver to keep the framework
generic.

Change-Id: I51a9aa57f903cfc64fe99c62817530471bd8f9f5
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoVPDMA FW: Include VPDMA FW in kernel firmware directory.
Arthur Philpott [Thu, 17 Oct 2013 23:41:11 +0000 (18:41 -0500)]
VPDMA FW: Include VPDMA FW in kernel firmware directory.

Ease deployment and include the VPDMA firmware in build/install.

Change-Id: I28449361aa19e2c328c2e583d2faaac51a5d6ed5
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoMerge branch 'vip' into p-ti-linux-3.8.y-video
Arthur Philpott [Tue, 15 Oct 2013 22:17:51 +0000 (17:17 -0500)]
Merge branch 'vip' into p-ti-linux-3.8.y-video

This merge contains all of the VIP changes.
It enables functionality of the OV10635
sensor. It also combines the VIP and VPE
into one common directory in order to utilize
the shared VPDMA library.

* vip:
  i2c: Add support for OV10635 sensor
  VIP: Added Support for OV10635 sensor
  i2c: Added device tree support for OV10635 sensor
  v4l2: Added v4l2 asynchronous probing capabilities
  VIP: Add device tree support for VIP
  Added Kconfig for vpdma
  VIP: Initial version of DRA7xx VIP driver

Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
7 years agoi2c: Add support for OV10635 sensor
Arthur Philpott [Mon, 9 Sep 2013 22:18:31 +0000 (17:18 -0500)]
i2c: Add support for OV10635 sensor

Added driver support for OV10635 sensor.

Change-Id: I3971f746366c82abd536c3179884cb30599fcb13
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
[Fixed checkpatch error]
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agoVIP: Added Support for OV10635 sensor
Arthur Philpott [Mon, 9 Sep 2013 22:23:30 +0000 (17:23 -0500)]
VIP: Added Support for OV10635 sensor

Added support for OV10635 sensor in the VIP driver.

Change-Id: Ie9d16f02add9d16c9686abafff5fbf36218b4304
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
[Fixed checkpatch error]
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agoi2c: Added device tree support for OV10635 sensor
Arthur Philpott [Mon, 9 Sep 2013 22:19:29 +0000 (17:19 -0500)]
i2c: Added device tree support for OV10635 sensor

-Added device tree support for OV10635 sensor.
-Disabled HDMI because there is a conflict between
 HDMI and VIP muxing on the pc8575.

Change-Id: I8309e3339e7a876a9b9562b0c25d8030812de51d
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agov4l2: Added v4l2 asynchronous probing capabilities
Arthur Philpott [Mon, 9 Sep 2013 22:15:48 +0000 (17:15 -0500)]
v4l2: Added v4l2 asynchronous probing capabilities

Added v4l2 asynchronous probing capabilities.

Change-Id: I9ed6f0d1f056b79d2bd66e668f65ac129d1d631e
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoVIP: Add device tree support for VIP
Arthur Philpott [Mon, 9 Sep 2013 19:17:08 +0000 (14:17 -0500)]
VIP: Add device tree support for VIP

Add device tree support for VIP.

Change-Id: Iefbae706f8186698500df6d2942a9775f50f2fba
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
7 years agoAdded Kconfig for vpdma
Nikhil Devshatwar [Wed, 2 Oct 2013 19:56:12 +0000 (01:26 +0530)]
Added Kconfig for vpdma

Added one Kconfig for VPDMA
This solved the redeclaration errors for vpdma
functions.

Change-Id: I949afe1df6d19cf5bfd06b38fe01df789143c4bb
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Conflicts:
drivers/media/platform/Makefile

7 years agoVIP: Initial version of DRA7xx VIP driver
Dale Farnsworth [Mon, 9 Sep 2013 18:54:39 +0000 (13:54 -0500)]
VIP: Initial version of DRA7xx VIP driver

This is a very preliminary version of the driver based
on what was given by Dale Farnsworth and the LCPD team.

Change-Id: Iff588c128f4e483d75a11393822f4c31baa168bc
Signed-off-by: Arthur Philpott <arthur.philpott@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
[Fixed checkpatch errors]
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agoMerge remote-tracking branch 'origin/dss' into p-ti-linux-3.8.y-video
Praneeth Bajjuri [Tue, 24 Sep 2013 16:54:58 +0000 (11:54 -0500)]
Merge remote-tracking branch 'origin/dss' into p-ti-linux-3.8.y-video

* origin/dss:
  OMAPDSS: DISPC: Remove reduntant code for passing plane info

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoOMAPDSS: DISPC: Remove reduntant code for passing plane info
srinivas pulukuru [Mon, 23 Sep 2013 04:00:17 +0000 (23:00 -0500)]
OMAPDSS: DISPC: Remove reduntant code for passing plane info

overlay id is being retrived from overlay that was not initialized during probe.
This will cause NULL pointer exception when accessing the ovl->id
directly when initializing the DISPC without initializing the
overlas/managers during probe.

overlays/managers are being initialized during probe with a call
to omapdss_compat_init(). This call is being made from dsscomp or omapfb
probe. if either of these components are not used by the rendering engine
then it will cause NULL pointer exception when accessing overlays frmo DISPC.

Change-Id: I2c98aa5de4f3bf2a4ea6206f0f605d24343e9996
Signed-off-by: Srinivas Pulukuru <srinivas.pulukuru@ti.com>
7 years agoMerge branch 'gc320' into p-ti-linux-3.8.y-video
Sundar Raman [Tue, 17 Sep 2013 20:12:44 +0000 (15:12 -0500)]
Merge branch 'gc320' into p-ti-linux-3.8.y-video

Merge gc320 feature branch into common kernel branch for
gc320 driver sharing.

* gc320:
  gc320: Fix MMU error issue
  ARM: OMAP5/DRA7: hwmod: add ADDR_TYPE_RT to bb2d address flags
  gc320: gcx: [WA] Allocate MMU page tables as non cached
  gc320: Added  missing programming of MTLB base second time
  gc320: adding gcxxx support in Makefiles
  gc320: Adapt GC320 driver for K3.8
  devices: Initialize GC320 as part of devices init
  platform_data: Added platform data for GC320
  gc320: OMAP4: Adding cache-2dmanager
  Initial Open Color format Definitions (OCD).
  OMAP4:GCXXX: Fixing build warnings
  OMAP4: adding Vivante Corp 2/3D gcxxx driver files
  OMAP4: adding BLTsville header files
  Initial BLTsville API definition.

Change-Id: I84cbe026f20439a18650466f0e6e9c819aeac499
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agogc320: Fix MMU error issue gc320
ye.feng [Mon, 9 Sep 2013 03:12:02 +0000 (11:12 +0800)]
gc320: Fix MMU error issue

Earlier every second run of a GC320 test case after a boot
crashed with MMU fault. Updated logical address as well when
current command queue was not mapped yet.
This patch addresses this mmu error issue.

Change-Id: Ic1c0f14ea1c9e74099adbab1e69c9c0b74b6f804
Signed-off-by: Yi Zhang <yi.zhang@vivantecorp.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agoARM: OMAP5/DRA7: hwmod: add ADDR_TYPE_RT to bb2d address flags
Sundar Raman [Thu, 18 Jul 2013 22:42:14 +0000 (17:42 -0500)]
ARM: OMAP5/DRA7: hwmod: add ADDR_TYPE_RT to bb2d address flags

This is required so that the omap_hwmod_get_mpu_rt_va()
api returns a virtual register base address for the IP.

Change-Id: If9c55cb13f2d3864ee4c287b73dab069ee6f56ff
Signed-off-by: Sundar Raman <a0393242@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agogc320: gcx: [WA] Allocate MMU page tables as non cached
Sundar Raman [Mon, 22 Jul 2013 14:25:56 +0000 (09:25 -0500)]
gc320: gcx: [WA] Allocate MMU page tables as non cached

In K3.8, the cache flushing APIs for the MMU page tables are not
working correctly. Changed the allocations to non cached to
workaround the problem until the correct root cause is found.

Change-Id: I9391aeacac6a24f45c11daac3a7ea6d5f8d3ff0a
Signed-off-by: Sundar Raman <a0393242@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agogc320: Added missing programming of MTLB base second time
Alexei Shlychkov [Mon, 22 Jul 2013 14:29:06 +0000 (09:29 -0500)]
gc320: Added  missing programming of MTLB base second time

This patch fixes a crash when running the bvtest test case
second time around. The MTLB base address was not programmed
second time around leading to a bad MMU state. This patch
ensures that the MTLB base is programmed correctly.

Change-Id: I01bd88fc09dec608b3470a012a4f84332942c110
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
Signed-off-by: Sundar Raman <a0393242@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agogc320: adding gcxxx support in Makefiles
David Sin [Mon, 28 Jan 2013 16:50:54 +0000 (18:50 +0200)]
gc320: adding gcxxx support in Makefiles

Ported from k3.0, commit Id 6c14dfc5c011ce3
[ David Sin <davidsin@ti.com> ]

Change-Id: I9a923d83fbd332b58b2cb990568ac052c66efb95
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
Signed-off-by: Sundar Raman <sunds@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agogc320: Adapt GC320 driver for K3.8
Sundar Raman [Thu, 18 Jul 2013 22:40:57 +0000 (17:40 -0500)]
gc320: Adapt GC320 driver for K3.8

Modified SOC checks and a few other minor changes.

Change-Id: I6b1d8ca49bcd87c81e9ca51e25f5219460956f4c
Signed-off-by: Sundar Raman <a0393242@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agodevices: Initialize GC320 as part of devices init
Sundar Raman [Thu, 18 Jul 2013 22:37:40 +0000 (17:37 -0500)]
devices: Initialize GC320 as part of devices init

With K3.8, devices.c is used to initialize platform
devices. Added GC320 initialization here so that it is
done as part of bootup.

Change-Id: I62817b60d8703afb3d4a13107c00158fe79a7530
Signed-off-by: Sundar Raman <a0393242@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agoplatform_data: Added platform data for GC320
Sundar Raman [Thu, 18 Jul 2013 22:36:29 +0000 (17:36 -0500)]
platform_data: Added platform data for GC320

The omap_gcx.h file which contains platform specific
structures for gc320 IP is being added as part of this
patch

Change-Id: Ib5069a859547932f9c6a46be2006f50996a86f0f
Signed-off-by: Sundar Raman <a0393242@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agogc320: OMAP4: Adding cache-2dmanager
Jack Yen [Mon, 24 Dec 2012 12:59:51 +0000 (14:59 +0200)]
gc320: OMAP4: Adding cache-2dmanager

Based on k3.0 commit:
p-android-omap-3.0: 43eb373199a [Jack Yen <jyen@ti.com>]

Change-Id: I094b5070ab565b402d242daa6e1a3cb14973d8ac
Signed-off-by: Jack Yen <jyen@ti.com>
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
Signed-off-by: Sundar Raman <sunds@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agoInitial Open Color format Definitions (OCD).
David Sin [Tue, 8 Nov 2011 20:55:17 +0000 (14:55 -0600)]
Initial Open Color format Definitions (OCD).

OCD is a set of Open Color format Definitions.  Color formats
are used in everything from BLTers to video codecs,
and from cameras to displays.  But although there are
plenty of common formats, the definition of the code specifying
them is never the same.

OCD attempts to solve this problem.  It provides logical color
format codes, and is extensible.

Change-Id: I56ef49f451ab9c194418500d833d204a83f66edd
Signed-off-by: Rick Tillery <rtillery@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
Signed-off-by: Rodrigo Obregon <robregon@ti.com>
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agoOMAP4:GCXXX: Fixing build warnings
Volodymyr Mieshkov [Tue, 29 Jan 2013 16:15:39 +0000 (18:15 +0200)]
OMAP4:GCXXX: Fixing build warnings

Next build warnings are fixed:

drivers/misc/gcx/gccore/gcmain.c: In function 'gc_map':
drivers/misc/gcx/gccore/gcmain.c:690: warning: assignment from incompatible pointer type
drivers/misc/gcx/gccore/gcmmu.c: In function 'virt2phys':
drivers/misc/gcx/gccore/gcmmu.c:255: warning: passing argument 1 of 'pmd_offset' from incompatible pointer type
omap/arch/arm/include/asm/pgtable-2level.h:156: note: expected 'struct pud_t *' but argument is of type 'pmdval_t (*)[2]'

Change-Id: Ifd90c99f248fe66e0cfe887a4ec535b07637adef
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agoOMAP4: adding Vivante Corp 2/3D gcxxx driver files
David Sin [Thu, 17 Jan 2013 16:00:33 +0000 (18:00 +0200)]
OMAP4: adding Vivante Corp 2/3D gcxxx driver files

Driver files to enable Vivante Corp 2/3D gcxxx hardware.

Change-Id: I1a978bce85cc93e38b4a6b9d1811366feea7bb1b
Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
7 years agoOMAP4: adding BLTsville header files
David Sin [Mon, 24 Dec 2012 13:14:43 +0000 (15:14 +0200)]
OMAP4: adding BLTsville header files

Change-Id: If573d2ea6f0d6e858e2dae94a629458d2d767cc5
Signed-off-by: David Sin <davidsin@ti.com>
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agoInitial BLTsville API definition.
David Sin [Tue, 8 Nov 2011 20:55:17 +0000 (14:55 -0600)]
Initial BLTsville API definition.

BLTsville is the open 2-D API designed to provide an abstract
interface for both hardware and software 2-D implementations.

BLTs (BLock Transfers) involve the moving around of blocks
(rectangles) of pixels.

Change-Id: Ifced4987169acf56bfc6cf4fd6ce7fec9fcda993
Signed-off-by: Rick Tillery <rtillery@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
Signed-off-by: Rodrigo Obregon <robregon@ti.com>
Signed-off-by: Sundar Raman <sunds@ti.com>
7 years agoMerge branch 'dss' into p-ti-linux-3.8.y-video
Praneeth Bajjuri [Fri, 6 Sep 2013 22:27:23 +0000 (17:27 -0500)]
Merge branch 'dss' into p-ti-linux-3.8.y-video

* dss:
  OMAPDSS: DSS: Fix file permissions from 755 to 644
  OMAPDSS: DISPC: remove revision check on arbitration
  OMAPDSS: DISPC: Add support for global MFLAG feature
  OMAPDSS: DISPC : Enable GFX pipeline arbitration

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoOMAPDSS: DSS: Fix file permissions from 755 to 644
Praneeth Bajjuri [Fri, 6 Sep 2013 21:55:38 +0000 (16:55 -0500)]
OMAPDSS: DSS: Fix file permissions from 755 to 644

Fix file permission back to 644 on dss/apply.c

caused by
commit ad56f9294f1a75e63bfad1f6b85135f0a8a6b582
OMAPDSS: DSS: Fix null pointer crash in DSS

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agodefconfig: omap2plus: Enable RPMSG RPC Driver
Praneeth Bajjuri [Thu, 5 Sep 2013 18:34:59 +0000 (13:34 -0500)]
defconfig: omap2plus: Enable RPMSG RPC Driver

Enable rpmsg Remote Procedure Call driver.

rpmsg driver that exposes the Remote Procedure Call API to
user space, in order to allow applications to distribute
remote calls to more power-efficient remote processors. This is
currently available only on OMAP4+ systems.

Change-Id: Ia3027ace4c87a0c5e3b746640927076f1c8bbd23
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agodefconfig: omap2plus: Enable OMAP Remote Proc
Praneeth Bajjuri [Mon, 26 Aug 2013 21:30:55 +0000 (16:30 -0500)]
defconfig: omap2plus: Enable OMAP Remote Proc

Enable by default OMAP remote processor via the remote processor
framework.

This is needed in order to enable multimedia usecases to run
on your platform

(multimedia codecs are offloaded to remote DSP processors using this framework).

Also Enable Support for
[*]   OMAP remoteproc support for IPU
[*]   OMAP remoteproc support for DSP
[*]   OMAP remoteproc support for IPU1 (DRA7xx only)
[*]   OMAP remoteproc support for DSP2 (DRA7xx only)

Change-Id: I16b4d5b527d61ba5d805b3143457bec8b1125bbc
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agodefconfig: omap2plus: Enable IOMMU Support
Praneeth Bajjuri [Mon, 26 Aug 2013 21:26:29 +0000 (16:26 -0500)]
defconfig: omap2plus: Enable IOMMU Support

Enable IO Memory Management Units support into the kernel.

These devices usually allow to remap DMA requests and/or remap
interrupts from other devices on the system.

Change-Id: Ic4e27f23278d235b55983ea93cd2257c9230c080
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agodefconfig: omap2plus: Enable CMA
Praneeth Bajjuri [Mon, 26 Aug 2013 21:19:20 +0000 (16:19 -0500)]
defconfig: omap2plus: Enable CMA

This enables the Contiguous Memory Allocator which allows drivers
to allocate big physically-contiguous blocks of memory for use with
hardware components that do not support I/O map nor scatter-gather.

CMA must be selected before OMAP_REMOTEPROC can be made available.

Change-Id: I1a6b177563ca97daf9735fab9fa8532efd7899b3
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 [Thu, 5 Sep 2013 11:20:18 +0000 (06:20 -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:
  net/rpmsg: add support for new rpmsg sockets
  rpmsg: add api for creating and deleting rpmsg channels
  staging: omapdrm: flush the mapped page in kmap/kunmap
  rpmsg: rpc: introduce a new rpmsg_rpc driver
  remoteproc: add api for retrieving the rproc platform id
  rpmsg: add a description field
  rpmsg: add api for getting underlying the virtio device
  rpmsg: reset the virtio device after del_vqs
  rpmsg: disable hex dump traces
  drivers/rpmsg/virtio_rpmsg_bus.c: fix error return code in rpmsg_probe()
  rpmsg: process _all_ pending messages in rpmsg_recv_done
  drivers/rpmsg: remove depends on CONFIG_EXPERIMENTAL
  ARM: OMAP: remoteproc: request timers for DRA7xx DSP1 processor

Change-Id: If3de33a27f1ff596abce40af6e3d9d9c5c173e9c
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoOMAPDSS: HDMI: set regulator voltage to required level
Somnath Mukherjee [Fri, 30 Aug 2013 12:41:52 +0000 (18:11 +0530)]
OMAPDSS: HDMI: set regulator voltage to required level

It's not sufficient to request the regulator. We need to set the
IO voltage as well. The IO voltages are being requested from
<soc>.dtsi files.

Change-Id: I64a935d0ecc49b65ba38fc76382c3b28445fbfa6
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agoARM: DRA7: dts: Moved the reference to regulator for hdmi supply
Somnath Mukherjee [Fri, 30 Aug 2013 12:32:57 +0000 (18:02 +0530)]
ARM: DRA7: dts: Moved the reference to regulator for hdmi supply

Moved the reference to ldo3 regulator required for hdmi, to board
specific dts file.

Change-Id: If909a5b95aff19f53bada098b0d4160b0db70b28
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agoARM: dts: OMAP5uevm: Use LDO4 for DSI
Nishanth Menon [Wed, 14 Aug 2013 16:59:14 +0000 (11:59 -0500)]
ARM: dts: OMAP5uevm: Use LDO4 for DSI

Regulator for omap5-uevm is LDO4 and not LDO7. Further, LDO
configuration should be done in the board dts file, and not in SoC
generic DTSI.

Change-Id: I436c0a9f904e7b291c911d9be861464f041b1a69
Signed-off-by: Nishanth Menon <nm@ti.com>
7 years agoARM: dts: OMAP5uevm: Use LDO4 for HDMI
Somnath Mukherjee [Tue, 23 Jul 2013 09:35:43 +0000 (15:05 +0530)]
ARM: dts: OMAP5uevm: Use LDO4 for HDMI

Regulator for omap5-uevm is LDO4 and not LDO7. Further, LDO configuration
should be done in the board dts file, and not in SoC generic DTSI.

Change-Id: I99591fd79caa700fa52d8b5c3db3d321e4b109bc
Signed-off-by: Somnath Mukherjee <somnath@ti.com>
7 years agoMerge branch 'rpmsg-linux-3.8.y' of git://git.ti.com/rpmsg/rpmsg into ti2013.04.02...
Suman Anna [Thu, 5 Sep 2013 08:31:50 +0000 (03:31 -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 two new rpmsg client drivers: rpmsg-rpc & rpmsg-proto.

Also, includes a patch in drm for proper cache flushing of the
pages where the rpc pointer translations are handled in the rpmsg-rpc
driver code.

* 'rpmsg-linux-3.8.y' of git://git.ti.com/rpmsg/rpmsg:
  net/rpmsg: add support for new rpmsg sockets
  rpmsg: add api for creating and deleting rpmsg channels
  staging: omapdrm: flush the mapped page in kmap/kunmap
  rpmsg: rpc: introduce a new rpmsg_rpc driver

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agonet/rpmsg: add support for new rpmsg sockets
Ohad Ben-Cohen [Tue, 12 Mar 2013 00:01:23 +0000 (17:01 -0700)]
net/rpmsg: add support for new rpmsg sockets

Add the support for a new socket address and protocol
family: remote-processor sockets. The rpmsg protocol
driver provides the necessary support to expose a
rpmsg communication channel through the socket API
to userspace.

This patch is created from the initial rpmsg socket
support patch by Ohad on an older kernel.

Tested-by: G Anthony <a0783926@ti.com>
Signed-off-by: Ohad Ben Cohen <ohad@wizery.com>
[rtivy@ti.com: forward port and add .bind functionality]
Signed-off-by: Robert Tivy <rtivy@ti.com>
[s-anna@ti.com: rproc id retrieval logic and cleanup]
Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agorpmsg: add api for creating and deleting rpmsg channels
Robert Tivy [Sat, 17 Aug 2013 00:23:31 +0000 (19:23 -0500)]
rpmsg: add api for creating and deleting rpmsg channels

The rpmsg channels are currently created and deleted only through
the device announcements from a remote processor. Two new exported
functions, rpmsg_create_channel and rpmsg_destroy_channel, are added
to be able to create and delete a rpmsg channel on a particular
virtual processor.

This is required for creating/deleting a channel from the HLOS-side
(needed by the rpmsg socket driver).

Signed-off-by: Robert Tivy <rtivy@ti.com>
[s-anna@ti.com: add delete channel api and documentation]
Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agostaging: omapdrm: flush the mapped page in kmap/kunmap
Erik Rainey [Tue, 17 Apr 2012 03:04:00 +0000 (22:04 -0500)]
staging: omapdrm: flush the mapped page in kmap/kunmap

A kernel driver can access a omapdrm/gem backed buffer page through
a cycle of dma_buf_begin_cpu_access, dma_buf_kmap & dma_buf_kunmap,
dma_buf_end_cpu_access function invocations. Any changes to the
buffer by the kernel driver are not reflected properly in RAM,
so flush the cache deliberately in the kmap/kunmap dma_buf ops
implementations of the omapdrm/gem buffers.

Signed-off-by: Erik Rainey <erik.rainey@ti.com>
[s-anna@ti.com: add proper comments and commit description]
Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agorpmsg: rpc: introduce a new rpmsg_rpc driver
Suman Anna [Thu, 28 Feb 2013 20:50:10 +0000 (14:50 -0600)]
rpmsg: rpc: introduce a new rpmsg_rpc driver

The new rpmsg client driver, rpmsg_rpc, is introduced to provide a
framework for userspace applications to execute functions on different
remote processors.

The functions themselves are published by the remote processors by
different libraries. Each set of functions are published and supported
by a corresponding rpmsg server channel, and is exposed to the user-space
as its own device. User-space applications can open this character device,
and execute any of the published functions associated with the device.

The rpmsg-rpc driver allows any function upto 10 arguments with in-built
pointer translation. The kernel-userspace interaction allows any buffer
pointers to be replaced in the marshalled packet, provided the buffers
are obtained from allocators backed by dma_buf framework.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Erik Rainey <erik.rainey@ti.com>
7 years agoMerge branch 'rproc-linux-3.8.y' of git://git.ti.com/rpmsg/remoteproc into ti2013...
Suman Anna [Thu, 5 Sep 2013 07:34:04 +0000 (02:34 -0500)]
Merge branch 'rproc-linux-3.8.y' of git://git.ti.com/rpmsg/remoteproc into ti2013.04.02-rpmsg-3.8.y

* 'rproc-linux-3.8.y' of git://git.ti.com/rpmsg/remoteproc:
  remoteproc: add api for retrieving the rproc platform id
  ARM: OMAP: remoteproc: request timers for DRA7xx DSP1 processor

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 [Thu, 5 Sep 2013 07:29:32 +0000 (02:29 -0500)]
Merge branch 'rpmsg-linux-3.8.y' of git://git.ti.com/rpmsg/rpmsg into ti2013.04.02-rpmsg-3.8.y

Merge the base rpmsg tree that includes few fixes and enhancements.
The enhancements are primarily about adding a new descriptor field
to the rpmsg channel device, and for processing all the pending
messages on a virtio_vring upon a kick notification.

* 'rpmsg-linux-3.8.y' of git://git.ti.com/rpmsg/rpmsg:
  rpmsg: add a description field
  rpmsg: add api for getting underlying the virtio device
  rpmsg: reset the virtio device after del_vqs
  rpmsg: disable hex dump traces
  drivers/rpmsg/virtio_rpmsg_bus.c: fix error return code in rpmsg_probe()
  rpmsg: process _all_ pending messages in rpmsg_recv_done
  drivers/rpmsg: remove depends on CONFIG_EXPERIMENTAL

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoremoteproc: add api for retrieving the rproc platform id
Suman Anna [Fri, 30 Aug 2013 21:12:39 +0000 (16:12 -0500)]
remoteproc: add api for retrieving the rproc platform id

A new api, rproc_get_platform_id, is added to allow remoteproc/rpmsg
clients to be able to retrieve a fixed id associated with a rproc
device. Each of the rproc's is given an ida index as well, but this
is dynamic depending on the order rproc_alloc is called, and also
depends on what remote processor devices are instantiated. The
platform device id is therefore chosen, with the assumption that
a remoteproc device is assigned a static platform device id.

The OMAP remoteproc devices do satisfy this requirement, since
static platform devices are needed anyway for declaring the
corresponding CMA pools.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agoarm/dts: omap5: Add gpu supply
Hemant Hariyani [Mon, 19 Aug 2013 04:32:32 +0000 (10:02 +0530)]
arm/dts: omap5: Add gpu supply

Add smps45 as gpu supply

Change-Id: I158095880f715c3fc88e2412d45dddb5befab1b7
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
7 years agoarm: dts: omap5: Add gpu data
Hemant Hariyani [Mon, 19 Aug 2013 04:29:10 +0000 (09:59 +0530)]
arm: dts: omap5: Add gpu data

GPU DT entry for OMAP5.

Change-Id: I892741ae86a092d36dd2d922272ce10172c21d8a
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
7 years agostaging: ti-soc-thermal: Ensure to compute thermal trend
Ranganath Krishnan [Tue, 20 Aug 2013 15:48:44 +0000 (10:48 -0500)]
staging: ti-soc-thermal: Ensure to compute thermal trend

Workaround to compute thermal trend even when update interval
is not set. This patch will ensure to compute the trend when
bandgap counter delay is not set.

Change-Id: I68593c1155751833f4ee8792823db80c6d82a4ce
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
7 years agostatging: ti-soc-thermal: Set the bandgap mask counter delay value
Ranganath Krishnan [Fri, 16 Aug 2013 22:20:54 +0000 (17:20 -0500)]
statging: ti-soc-thermal: Set the bandgap mask counter delay value

Set the bandgap mask counter_delay with the polling_delay value on
registering the thermal zone. This patch will ensure to get the
correct update interval for computing the trend.

Change-Id: I7e6790094f5c553532ff9804238b2de81b596e35
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
7 years agostaging: ti-soc-thermal: Initialize counter_delay field for TI DRA752 sensors
Ranganath Krishnan [Fri, 16 Aug 2013 21:54:51 +0000 (16:54 -0500)]
staging: ti-soc-thermal: Initialize counter_delay field for TI DRA752 sensors

Initialize MPU, GPU, CORE, DSPEVE and IVA thermal sensors of DRA752 bandgap
with the counter delay mask.

Change-Id: Ide1fb1e55d91a85385f7d812872401e0e92c3f60
Signed-off-by: Ranganath Krishnan <ranganath@ti.com>
7 years agorpmsg: add a description field
Ohad Ben-Cohen [Sun, 4 Nov 2012 10:08:21 +0000 (12:08 +0200)]
rpmsg: add a description field

Add a new description field to the rpmsg bus infrastructure
that can be passed onto the rpmsg client drivers for additional
information. The current rpmsg bus client drivers need to have
a fixed id_table for proper matching, this new field can allow
flexibility for the client drivers (eg: like creating unique
cdevs).

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agorpmsg: add api for getting underlying the virtio device
Ido Yariv [Mon, 8 Oct 2012 04:47:38 +0000 (00:47 -0400)]
rpmsg: add api for getting underlying the virtio device

In order to retrieve the remoteproc structure from a rpmsg channel, add
a function for retrieving the virtio device. The associated remoteproc
structure can then be deduced from it.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agorpmsg: reset the virtio device after del_vqs
Suman Anna [Thu, 11 Jul 2013 22:37:59 +0000 (17:37 -0500)]
rpmsg: reset the virtio device after del_vqs

The virtio device configuration information for the rpmsg virtio
devices is usually present in a shared memory accessible to the
remote processor when it is running. The rpmsg_remove function
stops a remote processor and frees up all the resources associated
with the remote processor including memory. The remoteproc core
switches to a cached resource table and reconfigures the table
pointer used by virtio config functions once the remote processor
is stopped.

The virtio core touches the virtio device status bits during the
probe and remove of a virtio driver. The switching to the cached
resource table causes a loss of the reset status in the virtio
device configuration, and triggers a WARN_ON in virtio_dev_remove
function. Reset the status later within the rpmsg_remove function
to fix this.

Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agorpmsg: disable hex dump traces
Suman Anna [Tue, 5 Jun 2012 15:30:10 +0000 (10:30 -0500)]
rpmsg: disable hex dump traces

There are couple of print_hex_dump traces used in rpmsg code which
prints the actual byte messages being transferred between host and
the remote processors. These traces cannot be controlled by kernel
printk level. These are quiet verbose and affects performance. This
patch disables them by commenting them out.

They are intentionally not removed since they are core debug traces
and are useful when debugging complex IPC issues. It is easier to
enable them in code when needed rather than having to look up and
add the trace later.

Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agodrivers/rpmsg/virtio_rpmsg_bus.c: fix error return code in rpmsg_probe()
Wei Yongjun [Mon, 29 Apr 2013 23:17:09 +0000 (16:17 -0700)]
drivers/rpmsg/virtio_rpmsg_bus.c: fix error return code in rpmsg_probe()

Return a negative error code from the error handling case instead of 0, as
returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: Ohad Ben-Cohen <ohad@wizery.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[s-anna@ti.com: cherry-pick commit '3119b48' from upstream]
Signed-off-by: Suman Anna <s-anna@ti.com>
7 years agorpmsg: process _all_ pending messages in rpmsg_recv_done
Robert Tivy [Fri, 5 Apr 2013 14:38:52 +0000 (17:38 +0300)]
rpmsg: process _all_ pending messages in rpmsg_recv_done

Change virtqueue callback function rpmsg_recv_done() to process all
available messages instead of just one message.

Signed-off-by: Robert Tivy <rtivy@ti.com>
[split _recv function instead of adding indentation]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
[s-anna@ti.com: cherry-pick commit '1aa7d6a' from upstream]
Signed-off-by: Suman Anna <s-anna@ti.com>
Conflicts:
drivers/rpmsg/virtio_rpmsg_bus.c

------
This patch is critical if the BIOS-side does not kick when
there is an already pending mailbox message from a previous
kick, and the Linux-side processes only one message per kick.

7 years agoMerge branch 'p-ti-linux-3.8.y/audio-for-next' of git://git.ti.com/android-sdk/kernel...
Praneeth Bajjuri [Thu, 29 Aug 2013 20:58:34 +0000 (15:58 -0500)]
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:
  TEMP: ASoC: DRA7: dra7-evm: Allow CPU DAI less for radio
  ASoC: utils: Add generic parameters to dummy DAI
  ASoC: utils: Prevent overwriting hostless PCM params
  ARM: dts: DRA7xx: Add DATA port to McASP6 node and enable FIFO
  ARM: dts: dra7-evm: Add multichannel sound support
  ASoC: DRA7: dra7-evm: Add support for multichannel
  ASoC: Add support for DAI multicodec
  ASoC: pcm: Refactor DAI compatibility
  ASoC: core: Refactor dai link and aux dev init
  ASoC: core: Refactor ac97 CODEC registration
  ASoC: core: Refactor CODEC/CODEC_DAI search
  ASoC: core: Refactor DAI widgets linking
  ASoC: core: Refactor CODEC DAI probe/remove
  ASoC: core: Get dev from runtime data
  ASoC: dapm: Fix duplicated prefix of DAI link routes
  ASoC: core: Allow setting CODEC conf by DT/OF node
  ASoC: io: Use devm_regmap_* function
  ASoC: tlv320aic3x: Add TDM support

Change-Id: I6596c786a9f3ed9f8d53d41f50e12d45da4d67e3
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
7 years agoTEMP: ASoC: DRA7: dra7-evm: Allow CPU DAI less for radio
Misael Lopez Cruz [Sun, 28 Jul 2013 12:02:16 +0000 (07:02 -0500)]
TEMP: ASoC: DRA7: dra7-evm: Allow CPU DAI less for radio

Radio functionality on dra7-evm is DSP-based, it uses McASP6 but is not
controlled from CPU side but from DSP. From ASoC point of view, this will
be treated as a dummy CPU DAI.

This is meant to address an interim solution as long term plan is to have
the CPU side owning all CPU DAIs.

Change-Id: I1eb1536feae8474315131d929ce178138ef981ed
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: utils: Add generic parameters to dummy DAI
Misael Lopez Cruz [Mon, 29 Jul 2013 23:10:01 +0000 (18:10 -0500)]
ASoC: utils: Add generic parameters to dummy DAI

Add generic playback and capture stream parameters to dummy DAI to
ensure they can match any CPU DAI parameters.

Change-Id: Ic658bcd85a1d42f95b238e2ee21629b13cf2049e
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: utils: Prevent overwriting hostless PCM params
Misael Lopez Cruz [Mon, 29 Jul 2013 02:19:15 +0000 (21:19 -0500)]
ASoC: utils: Prevent overwriting hostless PCM params

Hostless mode support declares its own PCM hardware parameters
which are set at the start of streams marked as no_host_mode.
This parameters may be overwritten if the platform driver is
the dummy driver provided by ASoC utils, this can be prevented
during dummy platform driver open() callback.

Change-Id: I1d548c376d28b08ee00e17ddaa34d1810a70f638
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoARM: dts: DRA7xx: Add DATA port to McASP6 node and enable FIFO
Angela Stegmaier [Mon, 5 Aug 2013 23:52:50 +0000 (18:52 -0500)]
ARM: dts: DRA7xx: Add DATA port to McASP6 node and enable FIFO

Update McASP6 node to use the DATA port and enable the FIFO by
setting the tx-num-evt and rx-num-evt to 8.

Change-Id: I046be36e4bb97d1da8444e17a8c65652e662f148
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
7 years agoARM: dts: dra7-evm: Add multichannel sound support
Misael Lopez Cruz [Thu, 18 Jul 2013 19:53:35 +0000 (14:53 -0500)]
ARM: dts: dra7-evm: Add multichannel sound support

Enable multichannel support through McASP6 and 3 tlv320aic3106 instances
available in JAMR3 board. The analog codecs can take up to 6 slots of the
TDM bus, although the bus itself is configured to support up to 8 slots.

Max BCLK frequency supported by tlv320aic3106 codec is 14.2857MHz, so
8 slots is the upper limit in order to support 32-bits/sample, 44.1kHz.

Change-Id: Icf3e1813c1bcb04e5c639ab2a575094d2a91d8a2
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: DRA7: dra7-evm: Add support for multichannel
Misael Lopez Cruz [Tue, 30 Jul 2013 20:30:54 +0000 (15:30 -0500)]
ASoC: DRA7: dra7-evm: Add support for multichannel

DRA7 EVM features a multichannel output that consists of McASP6 connected
to three instances of tlv320aic3106 in the JAMR3 board. This DAI link
is configured in TDM mode, and each stereo CODEC instance receives two
channels of the stream.

               i2s
  McASP3  o-----------o  tlv320aic3106

                   +--o  tlv320aic3106 (Instance A)
              tdm  |
  McASP6  o--------|--o  tlv320aic3106 (Instance B)
                   |
                   +--o  tlv320aic3106 (Instance C)

dra7-evm can record up to 4 channels from a stereo auxiliary input and
two mono line-in/mics.

Change-Id: I0e5c5f28c240d1757553b0ae6fa96ee3ab22ece4
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: Add support for DAI multicodec
Misael Lopez Cruz [Wed, 26 Jun 2013 08:08:48 +0000 (03:08 -0500)]
ASoC: Add support for DAI multicodec

Add support for DAI links composed of a single CPU DAI and multiple
CODECs. Sound cards have to pass the CODECs array in the corresponding
DAI link through a new 'snd_soc_dai_link_codec' struct. Each CODEC in
this array is described in the same manner single CODEC DAIs are
(either DT/OF node or codec_name).

CPU DAI in a multicodec DAI link can have more channels than what each
CODEC has. The number of channels each CODEC is responsible for is
machine specific, hence it's fixed up in machine drivers in a similar
way to what DPCM does.

Change-Id: I9921265628763dac6ed3b935f068c09de0a031d8
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: pcm: Refactor DAI compatibility
Misael Lopez Cruz [Wed, 5 Jun 2013 18:34:21 +0000 (13:34 -0500)]
ASoC: pcm: Refactor DAI compatibility

CPU DAI and CODEC compatibility is now checked outside snd_pcm_open()
in preparation for DAI multicodec support.

Change-Id: I598c56cbd5665ffab5b145b9d84a44e56ee18534
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: core: Refactor dai link and aux dev init
Misael Lopez Cruz [Wed, 19 Jun 2013 21:35:59 +0000 (16:35 -0500)]
ASoC: core: Refactor dai link and aux dev init

Separate DAI link and aux dev initialization in preparation for
DAI multicodec support, since aux dev will remain using single
codecs but DAI links will be able to support multiple codecs.

Change-Id: I8fcb5c49fc761ecd564cbccf8d10aa0ccb2fa86e
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: core: Refactor ac97 CODEC registration
Misael Lopez Cruz [Wed, 5 Jun 2013 08:38:22 +0000 (03:38 -0500)]
ASoC: core: Refactor ac97 CODEC registration

CODEC registration specific function is added in preparation for
DAI-multicodec support.

Change-Id: I468093825739daa8ef89a8985ef74a453302b0fe
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
7 years agoASoC: core: Refactor CODEC/CODEC_DAI search
Misael Lopez Cruz [Wed, 5 Jun 2013 08:25:59 +0000 (03:25 -0500)]
ASoC: core: Refactor CODEC/CODEC_DAI search

Refactor CODEC and CODEC DAI search in preparation for DAI-multicodec.
Dedicated functions for CODEC/CODEC_DAI search are added.

Previous implementation unnecessarily kept searching for a matching CODEC
in the remaining register CODECS even if it was already found.

Change-Id: Ic47d874bb3544b16a4f769104aaca543a6cf0d02
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>