| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| | |
Add missing kfree when cleaning up fast structure
Signed-off-by: Andy Gross <andy.gross@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Build fails without this when using omap3 defconfig.
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Use unlocked ioctl
Use .unlocked_ioctl and change return value to long
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Add semi-colon to fix compile error
Add semi-colon to fix error: two or more data types in
declaration specifiers
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If TILER view was rotated, the flip logic was incorrectly flipping
the view resulting in incorrect top-left coordinate.
This is now fixed.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds a tiler notifier callback mechanism
for events. This covers file close events.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Use WARN_ON for sita area check
We don't want to crash the system, so use WARN_ON
instead of BUG_ON. Also, remove some whitespaces in comments.
Signed-off-by: David Sin <davidsin@ti.com>
TILER: vma flags need not to be set in tiler mmap function
vma flags are set by remap_pfn_range function in mmap function, so
don't need to set this seperatly in the function.
Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Updated comments.
Simplified common expression when copying ioctl data.
Simplified block_info filling.
Removed unused variables, initializers, macros.
Fixed issue with registering buffer with no blocks.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Minor comment & code cleanup
Updated header comments.
Removed extranous headers.
Made ssptr_id flag read-only, as it should not be changed once tiler
is being used.
__analize_area now returns error values.
1D stride is explicitly set to 0 by describe.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed formattings.
Added comments
Standardized method parameter order.
Removed can_together flag that is now unneeded.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Cleaned up tiler-geom.c comments.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
tiler.cache now can be specified as a memory, such as "40M".
Also added TILER_CACHE_LIMIT config to set cache limit in MB.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoid memory leaks if PAT array allocation fails, or if further
initializations fail.
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: David Sin <davidsin@ti.com>
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We can treat 1d and 2d areas uniformly using the tcm_for_each_slice
macro.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: TCM-SiTA: Cleaned up tcm_sita code and fixed 1D allocation.
Cleaned up comments.
Improved optimization for skipping blocks while searching.
Rewrote 1D scan algorithm. This is now significantly simpler and
to the point, and it also fixed potential incorrect x, y value if
the tiler is completely full.
Removed unused methods/values, and shortened some unnecessarily
long variable names.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: TCM-SiTA: Remove unnecessary copy of width and height
tcm struct already contains width and height, and there is no
need to copy it into the private data.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: TCM-SiTA: Simplified scanning code and neighbor stats
Only combined neighbor stats are used by algorithm, so we now
calculate combined stats.
Now passing map to is_area_clear. Also, is_area_clear starts
by checking top left corner, so checking whether it is busy is
redundant.
Removed done variable from scan, and instead exit loop directly.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removed unnecessary initializations.
Simplified page allocation logic by directly allocating pages
instead of going through free_page list.
Made page and memory allocation global, so that page cache can
be shared between PATs.
Now deinitialization logic works with multiple PATs.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Simplified dmm.c
Removed unnecessary type casting.
Updated logic to common bitfield setting macro.
Removed unnecessary step-by-step register modifications.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Cleaned up tcm API definitions.
Fixed comments.
Removed unused methods.
Removed AREA_FMT macro that caused a checkpatch failure.
Added further error checking to tcm methods.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
PAT was only cleared when freeing allocated blocks, but PAT should
be cleared for both situations.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
id is now populated by tiler_alloc/map. This is needed for
tiler_free to work.
id and physical address is cleared on tiler_free. This is needed
for tiler_alloc to work if called using the same tiler_block_t
structure.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| | |
Allocating 0-sized area now fails.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
TILER container was rotated opposite from the top-left corner's
rotation. This resulted in an incorrect view. This is now fixed.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This circumvents the idea of tilview, but is needed and omap_vout
and dss2 cannot currently share a tilview object. Once 2D areas
areas are integrated into dss2, this method can be removed.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Moved tiler_def.h into _tiler.h
Updated file headers to include correct file name and copyright
notice.
Since _tiler.h includes <mach/tiler.h> and "tcm.h", removed these
includes from source files.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Created tiler_view_t to abstract a view on a tiler 2d rectangle.
Manipulations include crop, rotate and mirror, and provide access
to horizontal and vertical increments to be used by other
subsystems.
Fixed issue with tiler_ops->xy that returned incorrect x, y
coordinates (it returned them thinking of an x & y-mirrored view.)
Simplified macro names in tiler-geom.c.
Separated ioctl definitions in tiler.h.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added missing brackets for handling failing QBLK ioctl.
Added 1D in-page offset.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch sets the offset and alignment members of the
tiler_block_info struct after successful GBLK or MBLK ioctls.
This is required to be able to continuosly map multiple blocks
if ssptr is not exposed to user space.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that blocks are not necessarily page-aligned, and the
physical addresses of blocks are not revealed, the buffer offset
has to contain the in-page offset.
This patch propagates the in-page offset into the buffer offset
and adjusts the buffer size so still only the actual pages are
used.
It also adjusts the offset lookup to be able to deal with
non-aligned buffer offsets and lengths.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| | |
Add logic to cap the total amount of pages to keep on hand.
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of allocating and freeing PAT page array
memory each time, allocate 128k upfront and reuse the
memory. This will avoid the possibilty of not being
able to obtain the memory after driver initialization.
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is desired so that user-space components need not keep track
of the size of the buffer for unmapping.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Map used to have copies of the parent area in each slot. It also
used to have a busy member. This is now replaced with a pointer
to the parent area which is set to NULL if not occupied.
Also removed reserved member as it was not used.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: TCM-SiTA: Removed tracking of tiler areas.
Since no method requires knowing the list of tiler areas in
tcm_sita, the tracking of such has been removed.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: TCM-SiTA: Removed unhandled memory allocation while scanning
Changed scoring to happen incrementally while scanning. This
avoids creating a list of potential positions that may run out of
memory.
Since we sort positions strictly, we can use an incremental
approach. Furthermore, if first position selection is enabled,
this reduces the search time.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removed unneeded/unused macro definitions.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Removed redundant hardcoded TILER constants.
tiler-geom.c now calculates most tiler-geometry related constants,
and exposes them to other functions via a tiler_geom structure.
Removed unused TILER calculation macros.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Removed unnecessary adjustment by TILFMT_8BIT
Since TILFMT_8BIT is not 0, we don't need to adjust array access
by tiler format.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
TILER: Removed unused get_parent() API from TCM.
Since TILER maintains a list of blocks within TCM areas, we do not
use this method. Also, this method is only used when looking up
blocks by ssptr, which is not used by MemMgr API-s.
Originally, this method was provided to optimize this lookup.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added support for NV12 packing decision based on whether container
is shared between 8 and 16-bit modes.
Fixed mutex handling of QBLK.
Simplified mutex handling of QBUF, URBUF.
Added support for looking up block info by key & id.
RBUF now fills out block info for each mapped block.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Moved all non-static internal functions into a function table.
Also renamed tiler-ioctl.c to tiler-iface.c as it contains multiple
external interfaces (file & API).
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Moved file operations, buffer/process management and major kernel
API-s to tiler-ioctl.c.
Moved tiler geometric manipulations to tiler-geom.c.
Added wrappers around block manipulations so that other tiler
source files can manipulate blocks without needing to share the
main tiler mutex.
Listed non-static files in tiler-pri.h.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Renamed (and moved around) files in preparation for upstreaming activity.
Also fixed spacing checkpatch errors that are new since the creation of
these files.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch will resolve the data inconsistency problems
seen in omap 4 es2.0. For es1.0, we were creating a
memory barrier using dsb() around the PAT reg accesses.
Additionally, we have added wmb() calls before the call to the
PAT refill function to ensure that the data reaches the main
memory beforehand.
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| | |
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The following config options are added:
TI_TILER - whether to include TILER module.
TILER_SSPTR_ID - whether to use SSPtr as the id
TILER_ALIGNMENT - default TILER alignment
TILER_GRANULARITY - default TILER granularity
TILER_SECURITY - default process security
TILER_SECURE - hardwire secure mode
TILER_EXPOSE_SSPTR - whether to expose system-space addresses to
userspace programs.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added the following params and default values:
tiler.security=y - process security
tiler.grain=128 - granularity
tiler.align=4096 - default alignment
tiler.ssptr_id=n - use ssptr as id
tiler.ssptr_lookup=y - allow ssptr lookup
tiler.offset_lookup=y - allow offset lookup
These last two are provided to check for compatibility as ssptr and
offset lookup is planned to be removed.
Also fixed an issue with tiler_alloc not accepting a non-0 offset
with the default alignment.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These give the optimal packings for block sizes less than 64 slots
wide.
Also added reservation ioctls.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
TILER block lookup is now based on key & id. However, it is still
possible to look up a block's key & id based on its system space
address.
Signed-off-by: Lajos Molnar <molnar@ti.com>
TILER: Added address space support for mmap.
Now each TILER buffer occupies a range of the correct size in
TILER's mmap memory space (offset + size).
Signed-off-by: Lajos Molnar <molnar@ti.com>
TILER: Added support for partial mmaping of TILER buffers
Added support for mmapping only a portion of a TILER buffer.
Also added helper functions that can be used by other drivers that
use TILER to mmap and ioremap portions of TILER blocks.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Changed tiler_alloc/x, tiler_map/x and tiler_free APIs to use
tiler_block_t structure.
Simplified tiler_mmap using information in this structure.
Now storing and able to reconstruct exact dimension of each
allocated tiler block.
Fixed issue with virtual stride of 1D buffers when using an
offset.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Tiler allocations are autopacked, so these API-s are no longer
needed. For more optimal allocations, tiler_reserve and
tiler_reserve_nv12 can be used to prereserve these blocks.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Offset was cropped to tile boundaries. Now supporting full offset.
Granularity and alignment was combined as the same concept. Now
we support (min.) granularity even for larger aligmnents.
Granularity is the minimum TILER block size, which could be aligned
to a larger alignment value. This prevents allocating too much
TILER space in this case.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| | |
Change x1 (end-x-coord) parameter to width. This simplifies the
use of this method with complex starting-x-coordinates.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| | |
This prevents the situation that a new group info object could be
autofreed before the first area is linked to it.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| | |
This patch requires similar changes in user space API/memmgr
header files.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Move division point in the container manager
to the right most corner, and extend division
points to allow for 'zero' and 'container_width'.
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Clear PAT IRQ STATUS RAW and set PAT_DESC_0 to NULL before
exiting the refill function. Check the PAT STATUS
reg before exiting to make sure PAT 0 is in the ready state.
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| | |
This resolves incorrect colors on NV12 images, as well as incorrectly
rotated images, which may result in DSS OCP_ERR.
Signed-off-by: Lajos Molnar <molnar@ti.com>
|
| |
| |
| |
| |
| |
| |
| | |
slab.h needs to be included in the sources when using kmalloc and
kfree for 2.6.34
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| | |
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed size calculation for the allocated buffer into which the
packing takes place.
Tested using V4L2 unit tests and debug prints as only V4L2 uses this
function.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| | |
Signed-off-by: David Sin <davidsin@ti.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The reference count of blocks increases on alloc, and by registered
buffers that contain that block.
When all tiler drivers of a process are closed:
- blocks allocated by it are marked "freed"
- buffers registered by it are unregistered
All blocks that are no longer marked "allocated" and are not
referenced by registered buffers are actually freed.
Blocks allocated by the kernel API are tracked separately, and
are not release when tiler drivers are closed. They are only
freed using tiler_free, or when the kernel driver closes.
Fixed a bug with querying buffers by address, which did not
account for the new TCM support for 1D buffers and block management.
Added support for clearing PAT for freed blocks.
Added extended tiler kernel API-s for specifying group ids, pids,
alignment and offset.
tiler_allocx
tiler_reserve
tiler_reservex
tiler_map
tiler_mapx
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
|