omap4-v4l2-camera:omap4-v4l2-camera.git
5 years agoOMAP4: Add base addresses for ISS
Sergio Aguirre [Sat, 26 May 2012 04:30:08 +0000 (23:30 -0500)]
OMAP4: Add base addresses for ISS

NOTE: This isn't the whole list of features that the
ISS supports, but the only ones supported at the moment.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agoOMAP4: hwmod: Include CSI2A/B and CSIPHY1/2 memory sections
Sergio Aguirre [Sat, 26 May 2012 04:30:08 +0000 (23:30 -0500)]
OMAP4: hwmod: Include CSI2A/B and CSIPHY1/2 memory sections

In memory, They are in this particular order:
- CSI2A
- CSIPHY1
- CSI2B
- CSIPHY2

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agov4l: Implement v4l2_subdev_link_validate()
Sakari Ailus [Sat, 26 May 2012 04:30:08 +0000 (23:30 -0500)]
v4l: Implement v4l2_subdev_link_validate()

v4l2_subdev_link_validate() is the default op for validating a link. In V4L2
subdev context, it is used to call a pad op which performs the proper link
check without much extra work.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Conflicts:

include/media/v4l2-subdev.h

5 years agov4l: Improve sub-device documentation for pad ops
Sakari Ailus [Sat, 26 May 2012 04:30:07 +0000 (23:30 -0500)]
v4l: Improve sub-device documentation for pad ops

Document that format related configuration is done through pad ops in case
the driver does use the media framework.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
5 years agomedia: Add link_validate() op to check links to the sink pad
Sakari Ailus [Sat, 26 May 2012 04:30:07 +0000 (23:30 -0500)]
media: Add link_validate() op to check links to the sink pad

The purpose of the link_validate() op is to allow an entity driver to ensure
that the properties of the pads at the both ends of the link are suitable
for starting the pipeline. link_validate is called on sink pads on active
links which belong to the active part of the graph.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
5 years agov4l: Image processing control class
Sakari Ailus [Sat, 26 May 2012 04:30:07 +0000 (23:30 -0500)]
v4l: Image processing control class

Add control class for image processing controls. The control class deals
with controls processing image, for example digital gain or noise filtering,
which can be present in any part of the pipeline.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Conflicts:

Documentation/DocBook/media/v4l/controls.xml
Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
drivers/media/video/v4l2-ctrls.c
include/linux/videodev2.h

5 years agov4l: Image source control class
Sakari Ailus [Sat, 26 May 2012 04:30:07 +0000 (23:30 -0500)]
v4l: Image source control class

Add image source control class. This control class is intended to contain
low level controls which deal with control of the image capture process ---
the A/D converter in image sensors, for example.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Conflicts:

Documentation/DocBook/media/v4l/controls.xml
Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml
drivers/media/video/v4l2-ctrls.c
include/linux/videodev2.h

5 years agov4l: Introduce integer menu controls
Sakari Ailus [Sat, 26 May 2012 04:30:07 +0000 (23:30 -0500)]
v4l: Introduce integer menu controls

Create a new control type called V4L2_CTRL_TYPE_INTEGER_MENU. Integer menu
controls are just like menu controls but the menu items are 64-bit integers
rather than strings.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Conflicts:

drivers/media/video/v4l2-ctrls.c
include/linux/videodev2.h

5 years agomfd: twl6040: Fix wrong TWL6040_GPO3 bitfield value
Sergio Aguirre [Sat, 26 May 2012 04:30:06 +0000 (23:30 -0500)]
mfd: twl6040: Fix wrong TWL6040_GPO3 bitfield value

The define should be the result of 1 << Bit number.

Bit number for GPOCTL.GPO3 field is 2, which results
in 0x4 value.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agomedia: vb2: fix handling MAPPED buffer flag
Marek Szyprowski [Wed, 24 Aug 2011 09:49:35 +0000 (06:49 -0300)]
media: vb2: fix handling MAPPED buffer flag

MAPPED flag was set for the buffer only if all it's planes were mapped and
relied on a simple mapping counter. This assumption is really bogus,
especially because the buffers may be mapped multiple times. Also the
meaning of this flag for muliplane buffers was not really useful. This
patch fixes this issue by setting the MAPPED flag for the buffer if any of
it's planes is in use (what means that has been mapped at least once), so
MAPPED flag can be used as 'in_use' indicator.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
5 years agopanda_defconfig: Remove remote proc related Power Management
Sergio Aguirre [Tue, 26 Jun 2012 22:10:58 +0000 (17:10 -0500)]
panda_defconfig: Remove remote proc related Power Management

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agoPanda: Adding audio support in defconfig
Israel Cepeda [Fri, 15 Jun 2012 19:03:38 +0000 (14:03 -0500)]
Panda: Adding audio support in defconfig

Adding defconfig flags to compile audio drivers for Panda
like usb, hdmi and abe firmware load.

Signed-off-by: Israel Cepeda <israel4c@gmail.com>
5 years agoOMAP4: Panda: Adding board version and ID
Israel Cepeda [Thu, 14 Jun 2012 23:49:42 +0000 (18:49 -0500)]
OMAP4: Panda: Adding board version and ID

Adding support for board version and ID for Panda
at omap_init_board_version.

Signed-off-by: Israel Cepeda <israel4c@gmail.com>
5 years agoHACK: panda_defconfig: Set governor to performance
Sergio Aguirre [Sun, 17 Jun 2012 22:10:10 +0000 (17:10 -0500)]
HACK: panda_defconfig: Set governor to performance

There's a random crash that happens if interactive governor
is set. For now, this solves problems, so let's keep it this way.

Plus, we don't use a battery on panda, so why caring about
power consumption? :P

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agoUVC: Enable CONFIG_USB_VIDEO_CLASS to default.
Saravanan Solaiyappan [Thu, 17 May 2012 22:26:18 +0000 (17:26 -0500)]
UVC: Enable CONFIG_USB_VIDEO_CLASS to default.

Enables the USB camera support in V4L driver.

Change-Id: Ief86b72fb4216adcf1c4fb11cff0f4f5c61998f9
Signed-off-by: Solaiyappan Saravanan <saravanan.s@ti.com>
5 years agopanda_defconfig: One more attempt to reduce differences
Sergio Aguirre [Wed, 13 Jun 2012 16:58:26 +0000 (11:58 -0500)]
panda_defconfig: One more attempt to reduce differences

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agopanda_defconfig: Don't specify vram size
Sergio Aguirre [Wed, 13 Jun 2012 03:40:48 +0000 (22:40 -0500)]
panda_defconfig: Don't specify vram size

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agopanda_defconfig: Update kernel version (blitsville and HWC header changes)
Sergio Aguirre [Tue, 12 Jun 2012 21:49:18 +0000 (16:49 -0500)]
panda_defconfig: Update kernel version (blitsville and HWC header changes)

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agopanda_defconfig: Remove SGX driver from blaze_defconfig
Sergio Aguirre [Tue, 12 Jun 2012 21:34:52 +0000 (16:34 -0500)]
panda_defconfig: Remove SGX driver from blaze_defconfig

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agopanda: group omapfb platform data setting to display init
Sergio Aguirre [Wed, 13 Jun 2012 01:39:58 +0000 (20:39 -0500)]
panda: group omapfb platform data setting to display init

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agopanda: Removing duplicate call to set vram
Sergio Aguirre [Tue, 12 Jun 2012 21:32:28 +0000 (16:32 -0500)]
panda: Removing duplicate call to set vram

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agopanda: Restrict carveout to the display size
Sergio Aguirre [Tue, 12 Jun 2012 21:31:28 +0000 (16:31 -0500)]
panda: Restrict carveout to the display size

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agopanda: Do not change voltage on VUSB LDO
Sergio Aguirre [Tue, 12 Jun 2012 21:14:32 +0000 (16:14 -0500)]
panda: Do not change voltage on VUSB LDO

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agopanda: Add init data for CLK32KAUDIO TWL6030 resource
Sergio Aguirre [Tue, 12 Jun 2012 21:12:28 +0000 (16:12 -0500)]
panda: Add init data for CLK32KAUDIO TWL6030 resource

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
5 years agoTI thermal framework: Fix Makefile bug
Sergio Aguirre [Sat, 26 May 2012 14:50:07 +0000 (09:50 -0500)]
TI thermal framework: Fix Makefile bug

Signed-off-by: Sergio Aguirre <sergio.a.aguirre@gmail.com>
5 years agoOMAP4: Blaze: Removing duplicate call to set vram
Peter Nordström [Wed, 23 May 2012 22:50:51 +0000 (15:50 -0700)]
OMAP4: Blaze: Removing duplicate call to set vram

omap_vram_set_sdram_vram is now being called from
plat-omap/omap-display.

Change-Id: I4ae1ecdca89613b525d151b04f04a22f01216cfb
Signed-off-by: Peter Nordström <nordstrom@ti.com>
5 years agoOMAP4: Blaze: Add dsi timing parameters
Peter Nordström [Wed, 23 May 2012 22:08:18 +0000 (15:08 -0700)]
OMAP4: Blaze: Add dsi timing parameters

The dsi timing parameters have moved from being
hard coded in the driver to be specified in the
board file.

Change-Id: Ife3d887fd7302242467ce093bc65330acdbf1fc2
Signed-off-by: Peter Nordström <nordstrom@ti.com>
5 years agorpmsg: omx: add handling of ion system heap buffers
Tyler Luu [Wed, 16 May 2012 18:34:24 +0000 (13:34 -0500)]
rpmsg: omx: add handling of ion system heap buffers

Generate page lists for ION system heap buffers.  This is used to
share system heap buffers with the remote processor. The address
of the page list is sent as a physical address to the list (as
opposed to the virtual address of the buffer), so the remote must
be informed using external mechanisms to expect a page list.

Also, adds a rpmsg_buffer structure to help with the book keeping
that is necessary while page list handling is in rpmsg omx.

This is expected to be moved out to a more generic place to
provide access to other potential rpmsg client drivers.

Change-Id: I5fb96a44a2054d396561a5ab559dc0ac486537df
Signed-off-by: David Schleef <ds@ti.com>
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agorpmsg: omx: add ion system heap to omx ion client
Suman Anna [Thu, 17 May 2012 03:51:24 +0000 (22:51 -0500)]
rpmsg: omx: add ion system heap to omx ion client

Allow the rpmsg omx ion client to access buffers from
the ion system heap.

Change-Id: Ic2d6922cb5cb05ec96f807a36b77c124769f4ef2
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: David Schleef <ds@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agorpmsg: omx: implement separate register ioctl for sgx buffers
Tyler Luu [Wed, 16 May 2012 02:47:15 +0000 (21:47 -0500)]
rpmsg: omx: implement separate register ioctl for sgx buffers

This implements a new register ioctl specifically meant for sgx
buffers. rpmsg_omx clients are expected to call register ioctl
for the specific buffer type (ion or sgx) before sending a buffer
to .write for mapping. The registration allows the rpmsg_omx
driver to hold a reference to the ion buffers making up the sgx
buffer, thereby preventing the buffer(s) to be freed up from
under the remote processor.

The individual imported ion handles are expected to be passed
into the .write call.

When a client no longer expects remote processor to use the buffer,
client should call unregister ioctl. A separate unregister ioctl
for pvr buffers is not created, and the same ion unregister ioctl
is expected to be used for all the ion handles a sgx buffer is
comprised of.

Change-Id: Ib36aab90136627899e98717aeb29bfa637ec09fd
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agoMerge "omaprpc: ion: adapt to omap ion api change" into p-android-omap-3.0-dev
Keith Deacon [Thu, 24 May 2012 21:57:24 +0000 (16:57 -0500)]
Merge "omaprpc: ion: adapt to omap ion api change" into p-android-omap-3.0-dev

5 years agoMerge "ion: omap: change behaviour of getting buffers from pvr fd" into p-android...
Keith Deacon [Thu, 24 May 2012 21:56:12 +0000 (16:56 -0500)]
Merge "ion: omap: change behaviour of getting buffers from pvr fd" into p-android-omap-3.0-dev

5 years agoMerge "gpu: ion: check for input arguments in ion_free" into p-android-omap-3.0-dev
Keith Deacon [Thu, 24 May 2012 21:54:27 +0000 (16:54 -0500)]
Merge "gpu: ion: check for input arguments in ion_free" into p-android-omap-3.0-dev

5 years agoEnable OMAP_RFKILL_STE_MODEM for 'ste-p5780'
Patrick Combes [Tue, 15 May 2012 13:18:28 +0000 (15:18 +0200)]
Enable OMAP_RFKILL_STE_MODEM for 'ste-p5780'

Create and register a platform device for 'ste-p5780' after the modem detection
procedure.
The platform device registering creates a WWAN RFKILL device.

Change-Id: Iebd712c2ea9211a71242df04a684b24cce281528
Signed-off-by: Julien Vuillaumier <j-vuillaumier@ti.com>
Signed-off-by: Patrick Combes <p-combes@ti.com>
5 years agoOMAP: rfkill driver for ST-E modem
Julien Vuillaumier [Fri, 20 Apr 2012 12:50:08 +0000 (14:50 +0200)]
OMAP: rfkill driver for ST-E modem

Driver skeleton aimed at controlling ST-E modem rfkill switches.
It will bind to relevant modem devices drivers once registered, and
create relevant sysfs entries.
Preliminary version, actual rfkill switch control is not implemented.

Change-Id: I6836689495db8c0e3099545020d1eca8a1ca9407
Signed-off-by: Julien Vuillaumier <j-vuillaumier@ti.com>
5 years agoOMAP4: DVFS: Fix scaling dependent frequencies.
Oleksandr Kozaruk [Wed, 16 May 2012 10:15:56 +0000 (13:15 +0300)]
OMAP4: DVFS: Fix scaling dependent frequencies.

When scaling dependent frequencies down it is observed that the order
in which frequencies are changed is incorrect.  For example, when core
domain changes OPP down from OPP119 to OPP50 the order is:
a) scale L3 freq down to OPP50
b) scale SGX freq down to OPP50
which is wrong.

Frequencies are scaled in order devices are registered in omap dvfs
framework in device list. Devices are inserted to the list in order,
such as dependences are satisfied if scaling frequencies up.

When scaling frequencies down traverse list backwards.

Change-Id: I752bcb264cac12514f358986a906f29ee81ba75e
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
5 years agoplat-omap: android-display: add 2 extra VRAM buffers for gc320
Dima Svetlov [Tue, 22 May 2012 01:19:25 +0000 (18:19 -0700)]
plat-omap: android-display: add 2 extra VRAM buffers for gc320

2 extra VRAM buffers are needed to gc320 composition

Change-Id: I5e02392f32a93c2eb12314151cd3a72b44fd4ae9
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAP4: OMAPDSS: Request higher bandwidth for 1080p FB
Peter Nordström [Wed, 25 Apr 2012 21:41:39 +0000 (14:41 -0700)]
OMAP4: OMAPDSS: Request higher bandwidth for 1080p FB

Request higher L3 bandwidth when we have 1080p, or higher,
resolution framebuffer. This is done to avoid underflow on
DSS pipelines.

Change-Id: Ieca56ae8bc9ec6147ab9301c267c29279a9399ca
Signed-off-by: Dandawate Saket <dsaket@ti.com>
Signed-off-by: Peter Nordström <nordstrom@ti.com>
5 years agoomaprpc: ion: adapt to omap ion api change
Tyler Luu [Tue, 22 May 2012 18:16:15 +0000 (13:16 -0500)]
omaprpc: ion: adapt to omap ion api change

api to retrieve ion handles from a pvr fd has changed from
omap_ion_fd_to_handles to omap_ion_share_fd_to_buffers.
after calling omap_ion_share_fd_to_buffers, we are also
expected to do an ion_import of the returned buffers.

Change-Id: I8a2da70ee1cd2caa63fc5d4c2b765d70418e72ea
Signed-off-by: Tyler Luu <tluu@ti.com>
5 years agoion: omap: change behaviour of getting buffers from pvr fd
Tyler Luu [Wed, 16 May 2012 03:29:11 +0000 (22:29 -0500)]
ion: omap: change behaviour of getting buffers from pvr fd

previous implemention shares the pvr ion client and the ion
handles associated with that client for a particular pvr fd.
now, we just call ion_share on the handles and return the
shared buffers. caller is in charge of calling ion_import using
its own ion client to get the ion handles.

Change-Id: I2abdee1daed7b5c57c66b2e5fddc4eb0d0cc1305
Signed-off-by: Tyler Luu <tluu@ti.com>
5 years agogpu: ion: check for input arguments in ion_free
Suman Anna [Wed, 16 May 2012 21:09:18 +0000 (16:09 -0500)]
gpu: ion: check for input arguments in ion_free

ion_free is a public API and is directly dereferencing a
pointer without checking for NULL. A check has been
added for the same and throws a WARN in case of invalid
arguments.

Change-Id: Idcf72e4449f8cba2b8342d6fb0f64600c2c59c7e
Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agoOMAP: TILER: validate input width and height
Andy Gross [Mon, 30 Apr 2012 17:23:15 +0000 (12:23 -0500)]
OMAP: TILER: validate input width and height

Add validation of input width and height to ensure that it does
not exceed maximum pixel width and height for the specific format.

Validate maximum length for 1D allocations.

Change-Id: I64b00f93a312ae715a040da28a0b0fe663afa9d8
Signed-off-by: Andy Gross <andy.gross@ti.com>
5 years agorpmsg: omx: initialize completion event in rpmsg_omx_open
Juan Gutierrez [Thu, 17 May 2012 17:53:34 +0000 (12:53 -0500)]
rpmsg: omx: initialize completion event in rpmsg_omx_open

An omx object is created when opening the rpmsg-omx device. However
the "reply_arrived" completion event is not initialized until the
connection message is sent across.

When the rpmsg_omx driver is removed (like in recovery), all pending
threads waiting on the "reply_arrived" are unblocked by a complete_all
call, however, if the rpmsg-omx device was only opened, such event is
not initialized yet, so the complete_all call will dereference a null
object causing a panic.

This patch moves the initialization of the "reply_arrived" completion
event to the open call, after the allocation of the omx object.

Change-Id: I92cf9cf5ac748456cb43bedc88fe1a8d80addd6c
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
5 years agorpmsg: omx: send disconnect only if omx state is connected
Miguel Vadillo [Thu, 17 May 2012 17:20:10 +0000 (12:20 -0500)]
rpmsg: omx: send disconnect only if omx state is connected

The rpmsg_omx driver sends a disconnect message automatically when the
driver's .release is called. This should be done only if a connection
has been established, otherwise just destroy the local end point.

Change-Id: I21b84aa6d91ae0d456f49cbe958f8e64caf691d5
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
5 years agorpmsg: omx: fix copy_to_user in register/unregister ioctls
Suman Anna [Thu, 17 May 2012 00:16:20 +0000 (19:16 -0500)]
rpmsg: omx: fix copy_to_user in register/unregister ioctls

The ION fd registration and deregistration ioctls has the
arguments reversed in the copy_to_user() calls. The same
has been fixed.

Also included a minor additional case for returning a NULL
ION handle back to user-space.

Change-Id: I9d45957f9b913fa1775e70618f0da82e914a41d6
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agoMerge commit 'refs/changes/95/22495/2' of ssh://review.omapzoom.org:29418/kernel...
Keith Deacon [Fri, 18 May 2012 22:36:01 +0000 (17:36 -0500)]
Merge commit 'refs/changes/95/22495/2' of ssh://review.omapzoom.org:29418/kernel/omap into p-android-omap-3.0-dev

5 years agoomap: Add TILER reservation ION heap to omap4 board file
David Schleef [Tue, 15 May 2012 00:59:02 +0000 (19:59 -0500)]
omap: Add TILER reservation ION heap to omap4 board file

registration gives ion clients access to tiler reservation heap

The tiler reservation heap is for allocating TILER address space, but
not the underlying pages.  The idea is to allocate TILER address space
and one or more ION buffers from the system heap, and map system heap
buffers into the allocated TILER address space.

Signed-off-by: David Schleef <ds@ti.com>
Change-Id: I3eb8125d604106185c37f75d61cbbd9f2ef175a1

5 years agoomap: Add ION system heap to omap board file
David Schleef [Thu, 29 Mar 2012 00:22:17 +0000 (17:22 -0700)]
omap: Add ION system heap to omap board file

gives ion clients access to system heap for allocation
instead of being restricted to pre-allocated carveouts

Change-Id: I560e7b8cda1b561d737b9c5bc427b5cbf2591731
Signed-off-by: David Schleef <ds@ti.com>
5 years agoion: fix comment to match reality
David Schleef [Mon, 12 Mar 2012 23:40:11 +0000 (16:40 -0700)]
ion: fix comment to match reality

Change-Id: Ib722e6c34965bf48ca5bdaaef3b4741146cc1508
Signed-off-by: David Schleef <ds@ti.com>
5 years agoion: add support for tiler reservation heap
David Schleef [Wed, 11 Jan 2012 05:43:59 +0000 (21:43 -0800)]
ion: add support for tiler reservation heap

The tiler reservation heap is for allocating TILER address space, but
not the underlying pages.  The idea is to allocate TILER address space
and one or more ION buffers from the system heap, and map system heap
buffers into the allocated TILER address space.

Change-Id: Ibd53ab811259cabec87384cf2ab4f99c0cbdca23
Signed-off-by: David Schleef <ds@ti.com>
5 years agoion: convert system heap to alloc_page()
David Schleef [Wed, 30 Nov 2011 23:15:11 +0000 (15:15 -0800)]
ion: convert system heap to alloc_page()

vmalloc() allocates pages and maps them into kernel space.  If nobody
requires the area to be mapped in kernel space, this uses potentially
valuable VM address space.  Split into separate allocation and mapping
of pages.

Change-Id: I98411b93edea67c2068e20b5e48708fb38a4cd1f
Signed-off-by: David Schleef <ds@ti.com>
5 years agoOMAP4: PM: IVA AUTO RET relaxed workaround in idle path
Cedric Vamour [Tue, 27 Mar 2012 12:39:44 +0000 (14:39 +0200)]
OMAP4: PM: IVA AUTO RET relaxed workaround in idle path

AUTO RET for IVA VDD Cannot be permanently enabled during OFF mode due to
potential race between IVA VDD entering RET and start of Device OFF mode.

It is mandatory to have AUTO RET for IVA VDD exlusive with Devide OFF mode.
In order to avoid lockup in OFF mode sequence, system must ensure IVA
voltage domain transitions straight from stable ON to OFF.

In addition, management of IVA VDD SmartReflex sensor at exit of idle path
may introduce a misalignment between IVA Voltage Controller state and IVA
PRCM voltage FSM based on following identified scenario:

IVA Voltage Controller is woken-up due to SmartReflex management while
IVA PRCM voltage FSM stays in RET in absence of any IVA module wake-up event
(which is not systematic in idle path as opposed to MPU and CORE VDDs being
necessarily woken up with MPU and CORE PDs).

WA involves:
Ensure stable ON-OFF transition for IVA voltage domain during OFF mode sequence.
Ensure VCON and PRCM FSM are kept aligned due to IVA SR handling in idle path.
1) AUTO RET for IVA VDD is enabled entering in idle path, disabled exiting idle
   path and IVA VDD is always woken-up with a SW dummy wakeup.
2) OFF mode is enabled only in Suspend path.
3) AUTO RET for IVA VDD remains disabled in Suspend path (before OFF mode).

REVISIT: Update the patch once proper Errata is out for 44xx.

Benefits:
1) This patch ensures it is possible to gate SYS_CLK during OS-Idle LCD OFF
when all domains are idled, saving up to 2mA at VBAT from external clock buffer.

2) IVA voltage domain is now allowed to scale to Retention during idle which
reduces power consumption on all types of use case allowing extensive use of
idle path (e.g.: Home screen, Page reading). Effects are especially visible
if system uses Smart-Reflex Class 1.5 compared to Class 3 considering the
increased difference of voltage from converged Voltage SR vs Retention voltage.

TODO: quantify the actual savings from IVA-RET with further measurements.

Change-Id: I01f0431f7556f0baf0b5b6b42092cd11c2442f00
Signed-off-by: Cedric Vamour <c-vamour@ti.com>
5 years agoMerge branch wuxga/p-android-omap-3.0-dev into p-android-omap-3.0-dev
Dima Svetlov [Fri, 18 May 2012 16:16:31 +0000 (09:16 -0700)]
Merge branch wuxga/p-android-omap-3.0-dev into p-android-omap-3.0-dev

Change-Id: I695b59aeccd2e5cb5a50c6fc734c5d54795f5615
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAPDSS: drop small YUV encoded frames on OMAP44xx
Sergiy Kibrik [Thu, 17 May 2012 12:28:49 +0000 (15:28 +0300)]
OMAPDSS: drop small YUV encoded frames on OMAP44xx

OMAP44xx has hardware limitation: in stall mode, when the frame pixel size
is less than output SyncFifo depth(16), DISPC hangs without sending any data.
Simple workaround is to drop such frame, as cases when YUV frames of this size
are very rare.

Change-Id: I31dc262b07a52b66209c093f136ad2bac66f9439
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
5 years agoOMAPDSS: DSSCOMP: extended platform info query for fbmem type
Sunita Nadampalli [Wed, 25 Apr 2012 16:07:37 +0000 (11:07 -0500)]
OMAPDSS: DSSCOMP: extended platform info query for fbmem type

DSSCOMP query platform ioctl returns the platform specific
configuration, platform_info. The platform_info strcuture
is extended to hold fbmem type information as well.
fbmem type is populated by querying sgx omaplfb
platform config data.

Change-Id: I09727c4654d09e83e66ca174f71a00136518c164
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAPDSS: DSSCOMP: Added support for back bufer copy for ext displays
Sunita Nadampalli [Mon, 23 Apr 2012 16:04:21 +0000 (11:04 -0500)]
OMAPDSS: DSSCOMP: Added support for back bufer copy for ext displays

In order to decouple the LCD FB and the ext display buffers, sDMA copy
based solution is implemented in dsscomp.
This patch adds the support for parsing ION handles for buffer addresses and
copying FB into user provide buffers (for ext display cloning).

Change-Id: I84cfa249e86b863aef9fd9685e1854649f25afc8
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoION: Added support for getting ion phys without client
Sunita Nadampalli [Fri, 20 Apr 2012 21:47:43 +0000 (16:47 -0500)]
ION: Added support for getting ion phys without client

In order to dereference the ion_handles passed from user side
to kernel, there should be support for api without client identity.
This patch adds this support.

Change-Id: I95d0d460c9e0ad202d14e7620b82e1fa9d48f746
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoRevert "OMAPDSS: Increase PLL1_CLK1 frequency for correct work with large panels"
Dima Svetlov [Sun, 13 May 2012 20:45:28 +0000 (13:45 -0700)]
Revert "OMAPDSS: Increase PLL1_CLK1 frequency for correct work with large panels"

This reverts commit 1fe611b1c2eea594ed3738d50bfb37a701d2632c.

Change-Id: I444e0e09a99ce5f495ffc298d388678e0e07cda4
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAPDSS: MFlag thresholds settings
Sunita Nadampalli [Wed, 2 May 2012 21:01:49 +0000 (16:01 -0500)]
OMAPDSS: MFlag thresholds settings

As per the simultaion team suggestion, the below thesholds are set:
HT = fifosize * 5/8;
LT = fifosize * 4/8;

Change-Id: Ieef7d8a090e38ce717729fe30f60f46c6dfd6ddd
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAP4: Tablet: Configure TILER1D and FB allocation for WUXGA panel
Dima Svetlov [Sun, 13 May 2012 20:35:30 +0000 (13:35 -0700)]
OMAP4: Tablet: Configure TILER1D and FB allocation for WUXGA panel

- Allocate 54 MB for TILER1D for WUXGA panel
- Put FB in VRAM for WUXGA panel

Change-Id: I2c7cbc3287837a0235f6b6be08ea6d255f3873d7
Signed-off-by: Dima Svetlov <svetlov@ti.com>
Signed-off-by: Peter Nordström <nordstrom@ti.com>
5 years agoOMAP4: Tablet: Support for Cypress touchpanel
Peter Nordström [Tue, 24 Apr 2012 22:55:09 +0000 (15:55 -0700)]
OMAP4: Tablet: Support for Cypress touchpanel

Change-Id: Ib5ee979bf2ed7ec57b7680f3eaa0540aad11b972
Signed-off-by: Peter Nordström <nordstrom@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoInput: Add driver for Cypress touchpanels
Peter Nordström [Tue, 24 Apr 2012 22:51:27 +0000 (15:51 -0700)]
Input: Add driver for Cypress touchpanels

Supports CY8CTMA398 & CY8CTMA884

Change-Id: Ifcdba380e3a8712716054dd6c5d807ebb2c1beb6
Signed-off-by: Peter Nordström <nordstrom@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoblaze_defconfig: Don't specify vram size
Peter Nordström [Mon, 16 Apr 2012 22:14:59 +0000 (17:14 -0500)]
blaze_defconfig: Don't specify vram size

The size of the vram is being calculated based on panel
size so do not hard code it.

Change-Id: If7840c0cfbf491f5053fdbe10b6e4e6f2ba5e8ec
Signed-off-by: Peter Nordström <nordstrom@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoplat-omap: android-display: Set min number of vram buffers
Peter Nordström [Tue, 24 Apr 2012 03:34:12 +0000 (20:34 -0700)]
plat-omap: android-display: Set min number of vram buffers

Omapfb requires at least one vram buffer

Change-Id: I7d719856e3360314f8bccfba8fcbd3b518496b8b
Signed-off-by: Peter Nordström <nordstrom@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAP4: tablet: Make panel configuration dynamic
Peter Nordström [Mon, 16 Apr 2012 22:11:28 +0000 (17:11 -0500)]
OMAP4: tablet: Make panel configuration dynamic

Enable support for multiple panels, and make the selection of
panel settings dynamic based on kernel boot argument
ompadss.board_id. FB ram size should not be specified since
it is being calculated.

Rebased by Dima Svetlov.

Change-Id: Idf138337d58c4c38c9d71a0f31e2affefa713d48
Signed-off-by: Peter Nordström <nordstrom@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAPDSS: DSI: Enable DSI and DISPC configuration from board file
Peter Nordström [Mon, 16 Apr 2012 22:08:37 +0000 (17:08 -0500)]
OMAPDSS: DSI: Enable DSI and DISPC configuration from board file

DSI and DISPC parameters cannot always be calculated by the
driver, so add fields to allow for providing detailed
configuration from the board file.

Change-Id: If8ad5c7c6479ae221b5dd8ddd44d845ab5756974
Signed-off-by: Peter Nordström <nordstrom@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAPDSS: DISPC: fix pclk divisor limits
Sergiy Kibrik [Wed, 21 Mar 2012 12:07:24 +0000 (14:07 +0200)]
OMAPDSS: DISPC: fix pclk divisor limits

According to TRM, minimal pixel clock divisor value can be 1.
Fix corresponding checks, as high resolution panels use undivided
pixel clock frequency.

Also certain scaler unit constraint must be met: in case DISPC_CLK
and pixel clock frequencies are equal, set IPC to work on rising edge.

Change-Id: Iabeac2ad81f6909213cb81f4e16b1d0762369b53
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAPDSS: DSSCOMP: Added platform_info and getter
Lajos Molnar [Fri, 16 Mar 2012 02:38:57 +0000 (21:38 -0500)]
OMAPDSS: DSSCOMP: Added platform_info and getter

Get platform information from dss2 driver and android_display,
instead of it being hardcoded in dsscomp clients.

Change-Id: Icc23245ec93d93dd0d9b9fcd791e546720699dcc
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoInput: CEC keyboard driver
Muralidhar Dixit [Thu, 10 May 2012 09:40:05 +0000 (15:10 +0530)]
Input: CEC keyboard driver

Adding support for CEC key board driver in input device.
UI commands received from CEC are mapped to the key buttons
in the linux kernel.

Change-Id: If4136940f28fb4a0c4b9b730aabb8e0fc7837ccf
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
5 years agoOMAPDSS: CEC: Adding HDMI CEC support
Muralidhar Dixit [Wed, 21 Mar 2012 07:03:02 +0000 (12:33 +0530)]
OMAPDSS: CEC: Adding HDMI CEC support

Adding CEC driver support in HDMI

Change-Id: Ia6a7d04b1df3a459ae435f8bec79219b2036dfa0
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
5 years agoOMAPDSS: CEC: Adding support for CEC in HDMI driver
Muralidhar Dixit [Thu, 10 May 2012 10:23:54 +0000 (15:53 +0530)]
OMAPDSS: CEC: Adding support for CEC in HDMI driver

Adding support for CEC functionality in OMAP4 HDMI IP
specific file

Change-Id: I333e8ae484e0e56e0c597bca754f0276614d90ee
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
5 years agoOMAPDSS: CEC: Add callback to CEC driver on HDMI HPD
Muralidhar Dixit [Tue, 24 Apr 2012 07:45:50 +0000 (13:15 +0530)]
OMAPDSS: CEC: Add callback to CEC driver on HDMI HPD

Adding support for call back from HDMI to CEC driver
on HPD and HDMI enable.

Change-Id: I9fff9d41d598e5ef375bc03faafb9a559ce7435a
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
5 years agoOMAPDSS: CEC: Physical address discovery form edid
Muralidhar Dixit [Tue, 24 Apr 2012 06:56:15 +0000 (12:26 +0530)]
OMAPDSS: CEC: Physical address discovery form edid

HDMI sink device will set the physical address for
CEC devices

Change-Id: I6419834816978dfc8bcb8ef9a7b6c36276e5792c
Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
5 years agoomap: rpmsg: bump to max freq while booting remote processor
Miguel Vadillo [Fri, 6 Jan 2012 23:48:45 +0000 (17:48 -0600)]
omap: rpmsg: bump to max freq while booting remote processor

Reduce the remote processor booting time by bumping to the max
frequency. This is achieved by putting in constraints before
the loading of the remote processor. The latter is known through
the RPROC_PRELOAD notification.

Once the remote processor has reached a certain point, it would
send a message, RP_MSG_BOOTINIT_DONE via mailbox to notify the
host that the remote processor has completed the basic boot and
initization. The constraints are released upon receipt of this
message. They are also released in case of an error during
loading.

NOTE: The current implementation used tput api for ipu since
freq scale api is not supported directly yet.

Change-Id: I1fe936087f00872756c7b532ee58d923e695ff28
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Chandra Sekhar.Anagani <chandu@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agoremoteproc: add a notify event for firmware preload
Chandra Sekhar.Anagani [Mon, 7 May 2012 18:04:52 +0000 (13:04 -0500)]
remoteproc: add a notify event for firmware preload

Added a new rproc event, RPROC_PRELOAD, to send a notification
about commencement of loading of a image into remoteproc's
memory. This event will currently be used for bumping up the
remoteproc frequency to optimize the overall boot time of the
remote processor.

Change-Id: I7e36e54fe938b3242b9e87fd33d6e190a1233083
Signed-off-by: Chandra Sekhar.Anagani <chandu@ti.com>
5 years agorpmsg: omx: return ENXIO in rpmsg_omx_write
Vidhoon Viswanathan [Wed, 2 May 2012 12:34:19 +0000 (05:34 -0700)]
rpmsg: omx: return ENXIO in rpmsg_omx_write

The error code, ENXIO is used in rpmsg_omx driver to indicate
a terminal error on the remote processor side. This status is
maintained during the recovery of the remote processor, while
the cdev gets reinitialized/recreated.

The rpmsg_omx's write file operation is currently not returning
this error. This has been added now to have it behave in the
same way as the read file operation.

Change-Id: I61d6e6c07aa39208d913da622ed32d809c51d409
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agoremoteproc: fix obsolete comment about memory_maps
David Schleef [Thu, 29 Mar 2012 19:05:59 +0000 (12:05 -0700)]
remoteproc: fix obsolete comment about memory_maps

memory_maps in remoteproc platform data has been replaced
with memory_pool, but the comment still remained. It has
been cleaned up.

Change-Id: Iae78c0b8e8d4caccce2fc0248b89a9d18f8d7cca
Signed-off-by: David Schleef <ds@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
5 years agorpmsg: omx: copy_from_user() errors should return -EFAULT
David Schleef [Thu, 5 Jan 2012 00:22:16 +0000 (16:22 -0800)]
rpmsg: omx: copy_from_user() errors should return -EFAULT

Change-Id: Ib4a2d92dd3b8afa18e60019871cfea2e6b446a4d
Signed-off-by: David Schleef <ds@ti.com>
5 years agoOMAP2PLUS:fix for TF doesn't work when CPU1 on/off
Eugen Mandrenko [Fri, 4 May 2012 10:03:32 +0000 (13:03 +0300)]
OMAP2PLUS:fix for TF doesn't work when CPU1 on/off

TI thermal framework: rework initialization sequence

The initialization of max_thermal was placed in function
which is executed for each CPU1 start. The old value of
max_thermal is lost in this case and is set to max_freq.
As result, the omap_thermal_step_freq_down() can't
reduce the frequency if CPU1 is  switched on/off often.

Signed-off-by: Eugen Mandrenko <ievgen.mandrenko@ti.com>
Change-Id: Idcbc6a56407595b8f71743b91d994990a279593b

5 years agoAdd a generic OMAP Remote Procedure Call Driver
Erik Rainey [Tue, 1 May 2012 18:46:13 +0000 (13:46 -0500)]
Add a generic OMAP Remote Procedure Call Driver

Change-Id: I7c54eb41f62c104c7a1d0f525e1fd85450441cd3
Signed-off-by: Erik Rainey <erik.rainey@ti.com>
Signed-off-by: Alberto Aguirre <a-aguirre@ti.com>
5 years agosched: Fix select_fallback_rq() vs cpu_active/cpu_online
Peter Zijlstra [Tue, 20 Mar 2012 14:57:01 +0000 (15:57 +0100)]
sched: Fix select_fallback_rq() vs cpu_active/cpu_online

Commit 5fbd036b55 ("sched: Cleanup cpu_active madness"), which was
supposed to finally sort the cpu_active mess, instead uncovered more.

Since CPU_STARTING is ran before setting the cpu online, there's a
(small) window where the cpu has active,!online.

If during this time there's a wakeup of a task that used to reside on
that cpu select_task_rq() will use select_fallback_rq() to compute an
alternative cpu to run on since we find !online.

select_fallback_rq() however will compute the new cpu against
cpu_active, this means that it can return the same cpu it started out
with, the !online one, since that cpu is in fact marked active.

This results in us trying to scheduling a task on an offline cpu and
triggering a WARN in the IPI code.

The solution proposed by Chuansheng Liu of setting cpu_active in
set_cpu_online() is buggy, firstly not all archs actually use
set_cpu_online(), secondly, not all archs call set_cpu_online() with
IRQs disabled, this means we would introduce either the same race or
the race from fd8a7de17 ("x86: cpu-hotplug: Prevent softirq wakeup on
wrong CPU") -- albeit much narrower.

[ By setting online first and active later we have a window of
  online,!active, fresh and bound kthreads have task_cpu() of 0 and
  since cpu0 isn't in tsk_cpus_allowed() we end up in
  select_fallback_rq() which excludes !active, resulting in a reset
  of ->cpus_allowed and the thread running all over the place. ]

The solution is to re-work select_fallback_rq() to require active
_and_ online. This makes the active,!online case work as expected,
OTOH archs running CPU_STARTING after setting online are now
vulnerable to the issue from fd8a7de17 -- these are alpha and
blackfin.

Change-Id: I34bedb461f77bfe4af78ef5ddd3fb3a230ca3551
Reported-by: Chuansheng Liu <chuansheng.liu@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: linux-alpha@vger.kernel.org
Link: http://lkml.kernel.org/n/tip-hubqk1i10o4dpvlm06gq7v6j@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Taras Kondratiuk <taras@ti.com>
5 years agosched: Cleanup cpu_active madness
Peter Zijlstra [Thu, 15 Dec 2011 16:09:22 +0000 (17:09 +0100)]
sched: Cleanup cpu_active madness

Stepan found:

CPU0 CPUn

_cpu_up()
  __cpu_up()

boostrap()
  notify_cpu_starting()
  set_cpu_online()
  while (!cpu_active())
    cpu_relax()

<PREEMPT-out>

smp_call_function(.wait=1)
  /* we find cpu_online() is true */
  arch_send_call_function_ipi_mask()

  /* wait-forever-more */

<PREEMPT-in>
  local_irq_enable()

  cpu_notify(CPU_ONLINE)
    sched_cpu_active()
      set_cpu_active()

Now the purpose of cpu_active is mostly with bringing down a cpu, where
we mark it !active to avoid the load-balancer from moving tasks to it
while we tear down the cpu. This is required because we only update the
sched_domain tree after we brought the cpu-down. And this is needed so
that some tasks can still run while we bring it down, we just don't want
new tasks to appear.

On cpu-up however the sched_domain tree doesn't yet include the new cpu,
so its invisible to the load-balancer, regardless of the active state.
So instead of setting the active state after we boot the new cpu (and
consequently having to wait for it before enabling interrupts) set the
cpu active before we set it online and avoid the whole mess.

Change-Id: Ibad68784d481672eed23b0e8ad1d5fefc8755bd7
Reported-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1323965362.18942.71.camel@twins
Signed-off-by: Ingo Molnar <mingo@elte.hu>
[taras@ti.com: backported from v3.4-rc1]
Signed-off-by: Taras Kondratiuk <taras@ti.com>
5 years agoOMAP4: ion: remove hardcoded carveout sizes
Lajos Molnar [Fri, 30 Mar 2012 04:01:59 +0000 (23:01 -0500)]
OMAP4: ion: remove hardcoded carveout sizes

These are no longer used as android-display is calculating the
carveout sizes.

Change-Id: I3dcaec56158da1a573cb8de9ec3761db94d1a698
Signed-off-by: Lajos Molnar <lajos@ti.com>
Singed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAP4: Tablet: Restrict carveouts based on display size
Lajos Molnar [Fri, 9 Mar 2012 01:37:23 +0000 (19:37 -0600)]
OMAP4: Tablet: Restrict carveouts based on display size

Pass default display to android display if Android is used.
Also add display dimensions for dpi calculations.

Non-ion support fixed by Dima Svetlov.

Change-Id: I5ecbcc46e529171ae8ad23a60b0183920e5d1c62
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAP4: Blaze: Restrict carveout to the Blaze display size
Lajos Molnar [Fri, 9 Mar 2012 01:36:24 +0000 (19:36 -0600)]
OMAP4: Blaze: Restrict carveout to the Blaze display size

Also add the dimensions of the blaze display panels, so that dpi
can be calculated.

Change-Id: I7b8dc44b70db89c92e9ba25a47090745abf8108f
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAP2: generic Android display configuration setup
Lajos Molnar [Sun, 13 May 2012 20:14:35 +0000 (13:14 -0700)]
OMAP2: generic Android display configuration setup

Added android_display methods to allow runtime configuration of
Android display resources, such as:

- FB0's vram is dynamically calculated from the number of
  buffers SGX requires in VRAM (swap chain and/or composition
  buffers), and the FB0 display size.
- OMAP VRAM is calculated from FB0's vram need + any other
  specified FB's vram.  (If command line is used to specify
  FB vrams, omap vram must also be specified.)
- TILER1D area reserved for use as DSS MMU by DSSCOMP is
  calculated from default display size.  It can be overriden
  by board file.
- TILER2D carveout size is reduced by TILER1D area (if coallocated
  with TILER2D) and by the TILER2D SGX buffers (swapchain and/or
  composition buffers)
- nonsecure TILER2D carveout size is set to the backpages needed
  by TILER2D SGX buffers.

All of this is coordinated by omap_android_display_setup.  It
takes pointers to the DSS board info, FB platform data, and
optionally to the ION, SGX and DSSCOMP platform data.  It should
be called in board_reserve before omap_ion_init.

If SGX data is provided, it is set as the SGX platform data for
FB0.  Similarly, if DSSCOMP platform data is provided it is
also set.  This can be used to set a preferred tiler1d slot size.
If ION platform data is provided, it is updated with the required
tiler2d carveout sizes.

NOTE:

To maximize TILER2D space, the TILER1D area reserved for android
display is not aligned to 1MB, but is aligned to 32 pages as the
smallest 2D allocation needs a 32-page band.  We further reduce
TILER2D space by the container space lost by the SGX buffers,
which may be larger than the actual backpages bneeded for the
SGX buffers.

Therefore the sum of secure + nonsecure + 1D tiler space may
be smaller than the available container space.

Ported to latest SGX DDK by Dima Svetlov.

Change-Id: I5d8858c38efd842452994e3a3476463083d200d7
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAP4: ion: Calculate carveout addresses based on sizes
Lajos Molnar [Fri, 9 Mar 2012 01:29:37 +0000 (19:29 -0600)]
OMAP4: ion: Calculate carveout addresses based on sizes

Calculate carveout addresses somewhat dynamically.

- calculate the carveout addresses based on starting or ending
address and size.

- get the tiler2D and nonsecure tiler2D sizes from a separate
platform config variable

- lay out nonsecure tiler2D carveout before tiler2D carvout.
This allows only aligning the sum of these two carveout to
2MB, instead of the size of each.

Change-Id: I38c12459e6229ab9ef2deb89c0bce712e424a2a9
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAP4: ion: move omap4_ion.h under mach/include
Lajos Molnar [Fri, 30 Mar 2012 05:11:27 +0000 (00:11 -0500)]
OMAP4: ion: move omap4_ion.h under mach/include

This is because tiler and ion is really a platform device, but
they are defined in mach, and other platform devices need to refer
to them.

Change-Id: Ifbc151b7d1dd45453dc2501419ec831f1ce585c3
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoOMAPDSS: DSSCOMP: Export dsscomp_set_platform_data
Lajos Molnar [Fri, 30 Mar 2012 00:28:29 +0000 (19:28 -0500)]
OMAPDSS: DSSCOMP: Export dsscomp_set_platform_data

This is used by android-display to set up default tiler1d slot
size.

Change-Id: Ic6fe49b9338d8ce41c2ac2b444d8ef018ee5fc7a
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agogpu: ion: omap: Set correct heap for TILER allocations
Lajos Molnar [Fri, 9 Mar 2012 01:25:40 +0000 (19:25 -0600)]
gpu: ion: omap: Set correct heap for TILER allocations

OMAP has two TILER heaps, but all allocations are logged under
the first TILER heap, as ion_alloc only takes a heap type mask.
Correct the heap after ion_alloc, so the buffer is maintained
under the correct heap.

Change-Id: I7b4eb690a6cde6f07632f5254c91374c6088cb8a
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agogpu: ion: group heap allocations by id in the debugfs
Lajos Molnar [Fri, 9 Mar 2012 01:24:19 +0000 (19:24 -0600)]
gpu: ion: group heap allocations by id in the debugfs

Multiple ion heaps can have the same type.  These heaps will have
separate debugfs files, but any allocation for a heap with the same
type will be listed in them.

Change-Id: Iad2f660c539e151d62e76f8f99ecc9ad80b16dd5
Signed-off-by: Lajos Molnar <lajos@ti.com>
Singed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoTILER: Add tiler_backpages method
Lajos Molnar [Fri, 9 Mar 2012 01:06:49 +0000 (19:06 -0600)]
TILER: Add tiler_backpages method

tiler_backpages method can be used to get the number of pages
required for a tiler allocation.  This method is called before
the memory is partitioned, therefore, we cannot rely on tiler
being initialized.  Separated geometry initialization for this
purpose.

Change-Id: Ia68cbd81c31a357fdc51036753db222d21994996
Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Dima Svetlov <svetlov@ti.com>
5 years agoomap2plus: cpufreq: Modify lpj recalculation logic
Sergii Postulga [Thu, 3 May 2012 11:26:21 +0000 (14:26 +0300)]
omap2plus: cpufreq: Modify lpj recalculation logic

Somethimes "mdelay" function provide delay
that several times shorter than it should be.

This happens because recalculating lpj
performed after switching OPP. In this case,
for short period of time, when OPP on MPU
was switched but lpj was not recalculated,
"udelay" function can provide incorrect
delay - upto 5 times shorter
(if OPP was switched from lowest to highest).

This patch changes lpj recalculation logic to:
if OPP will be switched to higher - recalculate lpj before switching OPP,
if OPP will be switched to lower - recalculate lpj after switching OPP.

Change-Id: I3258e756c471fd0258a849d712ab00f4e1279ea9
Signed-off-by: Sergii Postulga <x0153364@ti.com>
5 years agoOMAP4: IRQ: Fix OMAP44XX_IRQ_CPUIDLE_POKE0 definition
Grygorii Strashko [Fri, 4 May 2012 12:40:34 +0000 (15:40 +0300)]
OMAP4: IRQ: Fix OMAP44XX_IRQ_CPUIDLE_POKE0 definition

According to OMAP4470 TRM the MA_IRQ_60 is busy for
L3_STAT_ALARM_IRQ L3 NoC statistics collector alarm interrupt.

The MA_IRQ_106 is reserved in all OMAP4 chips, so it's selected
for using as OMAP44XX_IRQ_CPUIDLE_POKE0.

Change-Id: Iba7f727035c71db009defe684a66fb8c58ee3f93
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
5 years agogcx: fixed error handling.
Alexei Shlychkov [Thu, 26 Apr 2012 23:58:07 +0000 (16:58 -0700)]
gcx: fixed error handling.

Change-Id: I4e38c35b51fbff71f2f9070e67478ebb726c3c4a
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
5 years agogcx: add virtual gcx platform driver for versioning
Craig Stout [Tue, 1 May 2012 23:30:59 +0000 (16:30 -0700)]
gcx: add virtual gcx platform driver for versioning

Change-Id: Ib3895a4d01c5e38137ec89397633787369349e89
Signed-off-by: Craig Stout <craig.stout@ti.com>
5 years agogcx: add kernel gcbv_cache implementation
Jack Yen [Thu, 26 Apr 2012 15:54:57 +0000 (10:54 -0500)]
gcx: add kernel gcbv_cache implementation

Change-Id: Iaab1f1575650f67bbd034255546052024c35cff9
Signed-off-by: Jack Yen <jyen@ti.com>
5 years agogcx: fixed color conversion table.
Alexei Shlychkov [Thu, 26 Apr 2012 22:32:20 +0000 (15:32 -0700)]
gcx: fixed color conversion table.

Change-Id: I9f0c8ed5f6a341ca8d6a2460a1b5225d78a505e4
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
5 years agogcx: add cache ioctl.
Jack Yen [Thu, 15 Mar 2012 15:47:11 +0000 (10:47 -0500)]
gcx: add cache ioctl.

Add GC_CACHE_IOCTL to allow usermode to call into cache manager.

Change-Id: I66bcfd6384e0e8c764c05a2619731d2ecf83da12
Signed-off-by: Jack Yen <jyen@ti.com>
5 years agocache-2dmanager: initial work.
Jack Yen [Tue, 13 Mar 2012 20:11:48 +0000 (15:11 -0500)]
cache-2dmanager: initial work.

Change-Id: Ia2bba7045988e837072970fcf8507fed60679756
Signed-off-by: Jack Yen <jyen@ti.com>