Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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-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>
|
|
Removed unneeded/unused macro definitions.
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>
|
|
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>
|
|
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>
|
|
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 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>
|
|
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>
|
|
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>
|