omap: fix dsscomp platform default to configure a 16MB slot size

Initial commit over allocated the default tiler slot

Change-Id: Ic5ac1048a9f4e43f44c2d568de0903aa7f33a5ba
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
OMAPDSS: DISPC: HW WA for UV plane overread HW bug

vidrot attribute is ignored for NV12 format, but setting it to
1 prevents overread of the UV plane when scaling.

Change-Id: If436c26aace4c805723ccfc1bd2b989bdc7efcd5
Signed-off-by: Sathya Prakash M R <a0393677@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Revert "OMAP:DSS: SW workaround for HW scaler overread issue"

This reverts commit 0e11c5b311d2c7436756f80c35c8aef4cd0d911b.

The SW workaround is no longer needed as a hardware workaround
exists, and the SW workaround created artifacts.

Change-Id: I5d8a601b24502a3ac5d4c1f17fcb3936ba8e7e10
Signed-off-by: Sathya Prakash M R <a0393677@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
remoteproc: fix checkpatch warnings

A few checkpatch warnings have crept into remoteproc over time,
and these have been fixed.

Change-Id: Ife21b9c063505f4ceb4f7f4fd6561c854fc99b90
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc: create version debugfs after image is loaded

This patch ensures that the image version debugfs entry is
created only after the image is loaded. Version info is
not available before the image is loaded.

If the debugfs entry is created before, then it results in
a kernel panic.

Change-Id: I7311b4a832b5e897ca10f1290900b3178e2c544d
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
remoteproc: add an api to do pa to da conversion

Added an api to provide memory translation from a
physical address to a device virtual address.

Change-Id: I476ce1ba8dc53562c500ad069be42b62e69c5ee3
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: store rproc reference during virtio device creation

Get and store a reference to the rproc associated with the
virtio device. This can later be used by rpmsg drivers to
exercise rproc API (for eg: rproc_da_to_pa).

An API is provided to get this reference from a given rpmsg
channel device.

Change-Id: Ieb397a8cbdd9897a09d631f902c37364fa612210
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: omx: use rproc api for pa to da conversion

This patch adds the capability to query the remote proc memory
map to perform pa to da conversions in the rpmsg omx driver.
This removes the hard-coded table lookup for translating buffer
addresses.

Change-Id: I116e0983db493f7184796bce416cb45f99c86dd5
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
remoteproc: remove pa hardcoding of IPU_MEM_IOBUFS

While adding a mem entry, we currently check the pa of
IPU_MEM_IOBUFS and mark the entry not to be considered
during core dump. The pa hardcoding is removed in this
patch and we use the resource name instead, to make it
independent of the address location of this section.

Change-Id: If0fa893e033b8d0252d8d9d13532c7385417045c
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
omap: mailbox: enable mailbox irq per instance

The machine-specific omap2_mbox_startup is called only once
to initialize the whole mbox module. Enabling mbox irq at
startup is only enabling the irq of the very first mailbox
instance created.

The enable_irq function should be called every time a
new mbox instance is created, in the generic platform
mailbox layer.

Change-Id: I1b7148fd0342a335e3b45cfe349c43a8491ae5c1
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: iommu: apply latency constraint based on power domain

When the iommu is taken out of reset, a latency constraint is
set to avoid its power domain going to retention/off. The iommus
for DSP and M3 reside in DSP and Core power domains respectively,
and therefore the API for setting the constraints is different.
This patch uses the appropriate API depending on the iommu (power
domain) the latency constraint is being applied on.

Change-Id: I3fa4485b3c405aa10c32a3fe0b7ac694d484ee21
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
omap: remoteproc: handle latency constraints for non-ipu rprocs

The omap remoteproc code is incorrectly applying the latency
constraint on the CORE domain for all remote processors. This
would apply only for ipu, and the others need them to be applied
on their respective domains. This patch fixes the same.

Change-Id: I1768d78b7029366d05cb5df16a032de597e1e5f3
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: remoteproc: add support for a boot register

Some remote processors (like DSP) need to explicitly configure
a boot address in a special register or memory location, and
this is the address from which they start executing code when
taken out of reset.

Support for this infrastructure has been added to remoteproc
code. The memory or register address where the boot address
is to be stored is supplied through the boot_reg field of the
platform data in the remoteproc. The omap_rproc_start function
will fetch the boot address from the image, and write this
address into the boot register, if provided, before taking the
processor out of reset.

Change-Id: I4efc5824791eda6e23e5d568f4568a3fe3d0014b
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: add ipu and dsp as configurable remoteproc instances

OMAP4 and OMAP5 both support two remoteproc instances - ipu &
dsp. The CONFIG_OMAP_REMOTE_PROC menuconfig option enabled
support for all OMAP remoteproc instances, but there was no
choice to enable/disable a specific remoteproc instance.

This patch adds two additional dependent config options for
finer control over these remoteproc instances. The option
CONFIG_OMAP_REMOTE_PROC will continue to be the generic
option for enabling remoteproc driver support for OMAP.

Change-Id: I9688672e4c758b9e4f4c0fb4f83654ef7b3cf48f
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
omap: add dsp carveout for remoteproc functionality

remoteproc uses DDR carveout memories for the functionality
of different rproc instances. New interfaces have been added
to perform this carveout memory during board initialization
for DSP. This patch reserves two types of carveout memory -
one whose address is dynamic, and another that leverages a
fixed static range. The dynamic pool will be used for
allocating memory for firmware sections that have no physical
memory allocated. The static pool will be used to validate the
firmware sections with fixed physical addresses.

This patch also assigns addresses for the Virtio vring buffers
for DSP. This is previously not handled, and the buffers are
currently assigned from the static pool associated with the
dsp. The rpmsg bus initialization sequence is enhanced to
process all the vprocs even if an earlier one in the list
fails due to memory requirements.

Change-Id: I0dec512b63904d3ffe0867ce00150b6c21a80805
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
omap4: sdp/panda/tablet: reserve memory for dsp

DSP is configured to use 4 MB of memory. Memory for DSP is
reserved during board initialization. The memory is just
below the reserved memory for all ION heaps. This memory is
reserved at boot-time using the memblock API and it is
reserved only if CONFIG_REMOTE_PROC_DSP is enabled.

Change-Id: I437fb5e2d8c2fd5f900bbaeb213dbe662ac8208c
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
configs: blaze/panda: zero out remoteproc dynamic carveout (dsp)

The dsp text & ipc sections have been programmed to use static
carveout currently, so there is no need to set-aside the dynamic
carveout memory for the same.

Change-Id: I68d5662cff86f4d5a231fcfe36e59b394c315047
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
omap: remoteproc: add support for dsp

Add the necessary rproc data for dsp for proper functionality
including power management.

The logic for getting the memory pool information has also
been updated to work for dsp.

Change-Id: I8c04fdad2bd85f92ea8152fd62596d0f76fa28fc
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: rpmsg: add dsp as a virtio rproc device

Add a dsp virtio rproc device to the omap_rpmsg_vproc
array, so that the corresponding virtio device can be
created and registered with the virtio bus.

The device is included only if the dsp remote rproc
is enabled.

Change-Id: Ie33f9a8bee7b1a3c603fe8f33a44a4c8f01426e2
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc: ignore static pool check for dsp IO buffers

The dsp remoteproc is using the same pool of 1D buffer
region as the ducati. This cannot be configured in the
static pool of dsp as this memory region is co-located
only with ducati memory, but not dsp. So, ignore the
valid memory check to proceed with the loading & booting
for dsp.

Change-Id: Ia92a2b7329cd0b9431afad4dde8c83396d861ba2
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Jesse Villarreal <jesse.villarreal@ti.com>
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>