diff options
author | Lajos Molnar <molnar@ti.com> | 2011-04-07 08:41:30 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-04-07 08:41:30 +0100 |
commit | f829ce4406a371ebc86a5337a5a679b616aa0d84 (patch) | |
tree | 77ec33070e7b3f9fc70a19b01ab368594b90cee7 /drivers/media/video/tiler | |
parent | 0fc08f104059ef54bf5456c740ab23647f8a71c0 (diff) |
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>
Diffstat (limited to 'drivers/media/video/tiler')
-rw-r--r-- | drivers/media/video/tiler/tcm.h | 33 | ||||
-rw-r--r-- | drivers/media/video/tiler/tcm/tcm-sita.c | 33 |
2 files changed, 0 insertions, 66 deletions
diff --git a/drivers/media/video/tiler/tcm.h b/drivers/media/video/tiler/tcm.h index 11201674fdc..ccd3ce4eaaa 100644 --- a/drivers/media/video/tiler/tcm.h +++ b/drivers/media/video/tiler/tcm.h @@ -49,8 +49,6 @@ struct tcm { struct tcm_area *area); s32 (*reserve_1d)(struct tcm *tcm, u32 slots, struct tcm_area *area); s32 (*free) (struct tcm *tcm, struct tcm_area *area); - s32 (*get_parent)(struct tcm *tcm, struct tcm_pt *pt, - struct tcm_area *area); void (*deinit) (struct tcm *tcm); }; @@ -200,37 +198,6 @@ static inline s32 tcm_free(struct tcm_area *area) return res; } - -/** - * Retrieves the parent area (1D or 2D) for a given co-ordinate in the - * container. - * - * @author Ravi Ramachandra (3/1/2010) - * - * @param tcm Pointer to container manager. - * @param pt Pointer to the coordinates of a slot in the container. - * @param area Pointer to where the reserved area should be stored. - * - * @return 0 on success. Non-0 error code on failure. Also, - * the tcm field of the area will be set to NULL on - * failure. Some error codes: -ENODEV: invalid manager, - * -EINVAL: invalid area, -ENOENT: coordinate is not part of any - * active area. - */ -static inline s32 tcm_get_parent(struct tcm *tcm, struct tcm_pt *pt, - struct tcm_area *area) -{ - s32 res = (tcm == NULL ? -ENODEV : - area == NULL ? -EINVAL : - (pt->x >= tcm->width || pt->y >= tcm->height) ? -ENOENT : - tcm->get_parent(tcm, pt, area)); - - if (area) - area->tcm = res ? NULL : tcm; - - return res; -} - /*============================================================================= HELPER FUNCTION FOR ANY TILER CONTAINER MANAGER =============================================================================*/ diff --git a/drivers/media/video/tiler/tcm/tcm-sita.c b/drivers/media/video/tiler/tcm/tcm-sita.c index 2ab5ac59ae2..ea6ceb8ecc9 100644 --- a/drivers/media/video/tiler/tcm/tcm-sita.c +++ b/drivers/media/video/tiler/tcm/tcm-sita.c @@ -45,8 +45,6 @@ static s32 sita_reserve_2d(struct tcm *tcm, u16 h, u16 w, u8 align, static s32 sita_reserve_1d(struct tcm *tcm, u32 slots, struct tcm_area *area); static s32 sita_free(struct tcm *tcm, struct tcm_area *to_be_removed_area); -static s32 sita_get_parent(struct tcm *tcm, struct tcm_pt *pt, - struct tcm_area *area); static void sita_deinit(struct tcm *tcm); /********************************************* @@ -213,7 +211,6 @@ struct tcm *sita_init(u16 width, u16 height, struct tcm_pt *attr) tcm->width = width; tcm->reserve_2d = sita_reserve_2d; tcm->reserve_1d = sita_reserve_1d; - tcm->get_parent = sita_get_parent; tcm->free = sita_free; tcm->deinit = sita_deinit; tcm->pvt = (void *)pvt; @@ -1296,36 +1293,6 @@ static s32 get_busy_neigh_stats(struct tcm *tcm, u16 width, u16 height, return 0; } -/** - @description: Retrieves the parent area of the page at p0.x, p0.y if - occupied - @input:co-ordinates of the page (p0.x, p0.y) whoes parent area - is required - @return 0 on success, non-0 error value on failure. On success - - parent will contain co-ordinates (TL & BR corner) of the parent - area -*/ -static s32 sita_get_parent(struct tcm *tcm, struct tcm_pt *pt, - struct tcm_area *parent) -{ - struct sita_pvt *pvt = (struct sita_pvt *)tcm->pvt; - s32 res = 0; - - mutex_lock(&(pvt->mtx)); - - if (pvt->map[pt->x][pt->y].busy) { - *parent = pvt->map[pt->x][pt->y].parent; - } else { - memset(parent, 0, sizeof(*parent)); - res = -ENOENT; - } - - mutex_unlock(&(pvt->mtx)); - - return res; -} - static s32 move_left(struct tcm *tcm, u16 x, u16 y, u32 num_pages, u16 *xx, u16 *yy) { |