Lines Matching refs:cache

133 	struct sh_mobile_meram_icb *cache;  member
227 plane->cache = &priv->icbs[idx]; in meram_plane_alloc()
239 __set_bit(plane->cache->index, &priv->used_icb); in meram_plane_alloc()
255 __clear_bit(plane->cache->index, &priv->used_icb); in meram_plane_free()
269 struct sh_mobile_meram_fb_cache *cache, in meram_set_next_addr() argument
273 struct sh_mobile_meram_icb *icb = cache->planes[0].marker; in meram_set_next_addr()
280 meram_write_icb(priv->base, cache->planes[0].cache->index, target, in meram_set_next_addr()
282 meram_write_icb(priv->base, cache->planes[0].marker->index, target, in meram_set_next_addr()
283 base_addr_y + cache->planes[0].marker->cache_unit); in meram_set_next_addr()
285 if (cache->nplanes == 2) { in meram_set_next_addr()
286 meram_write_icb(priv->base, cache->planes[1].cache->index, in meram_set_next_addr()
288 meram_write_icb(priv->base, cache->planes[1].marker->index, in meram_set_next_addr()
290 cache->planes[1].marker->cache_unit); in meram_set_next_addr()
297 struct sh_mobile_meram_fb_cache *cache, in meram_get_next_icb_addr() argument
300 struct sh_mobile_meram_icb *icb = cache->planes[0].marker; in meram_get_next_icb_addr()
308 *icb_addr_y = icb_offset | (cache->planes[0].marker->index << 24); in meram_get_next_icb_addr()
309 if (cache->nplanes == 2) in meram_get_next_icb_addr()
311 | (cache->planes[1].marker->index << 24); in meram_get_next_icb_addr()
356 meram_write_icb(priv->base, plane->cache->index, MExxBSIZE, in meram_plane_init()
361 meram_write_icb(priv->base, plane->cache->index, MExxMNCF, bnm); in meram_plane_init()
364 meram_write_icb(priv->base, plane->cache->index, MExxSBSIZE, xpitch); in meram_plane_init()
368 plane->cache->cache_unit = xres * save_lines; in meram_plane_init()
377 meram_write_icb(priv->base, plane->cache->index, MExxCTL, in meram_plane_init()
382 MERAM_MExxCTL_VAL(plane->cache->index, marker->offset + in meram_plane_init()
394 meram_write_icb(priv->base, plane->cache->index, MExxCTL, in meram_plane_cleanup()
399 plane->cache->cache_unit = 0; in meram_plane_cleanup()
432 struct sh_mobile_meram_fb_cache *cache; in meram_cache_alloc() local
435 cache = kzalloc(sizeof(*cache), GFP_KERNEL); in meram_cache_alloc()
436 if (cache == NULL) in meram_cache_alloc()
439 cache->nplanes = nplanes; in meram_cache_alloc()
441 ret = meram_plane_alloc(priv, &cache->planes[0], in meram_cache_alloc()
446 cache->planes[0].marker->current_reg = 1; in meram_cache_alloc()
447 cache->planes[0].marker->pixelformat = pixelformat; in meram_cache_alloc()
449 if (cache->nplanes == 1) in meram_cache_alloc()
450 return cache; in meram_cache_alloc()
452 ret = meram_plane_alloc(priv, &cache->planes[1], in meram_cache_alloc()
455 meram_plane_free(priv, &cache->planes[0]); in meram_cache_alloc()
459 return cache; in meram_cache_alloc()
462 kfree(cache); in meram_cache_alloc()
471 struct sh_mobile_meram_fb_cache *cache; in sh_mobile_meram_cache_alloc() local
503 cache = meram_cache_alloc(priv, cfg, pixelformat); in sh_mobile_meram_cache_alloc()
504 if (IS_ERR(cache)) { in sh_mobile_meram_cache_alloc()
506 PTR_ERR(cache)); in sh_mobile_meram_cache_alloc()
511 meram_plane_init(priv, &cache->planes[0], xres, yres, &out_pitch); in sh_mobile_meram_cache_alloc()
514 meram_plane_init(priv, &cache->planes[1], in sh_mobile_meram_cache_alloc()
517 meram_plane_init(priv, &cache->planes[1], in sh_mobile_meram_cache_alloc()
522 return cache; in sh_mobile_meram_cache_alloc()
529 struct sh_mobile_meram_fb_cache *cache = data; in sh_mobile_meram_cache_free() local
535 meram_plane_cleanup(priv, &cache->planes[0]); in sh_mobile_meram_cache_free()
536 meram_plane_free(priv, &cache->planes[0]); in sh_mobile_meram_cache_free()
538 if (cache->nplanes == 2) { in sh_mobile_meram_cache_free()
539 meram_plane_cleanup(priv, &cache->planes[1]); in sh_mobile_meram_cache_free()
540 meram_plane_free(priv, &cache->planes[1]); in sh_mobile_meram_cache_free()
543 kfree(cache); in sh_mobile_meram_cache_free()
556 struct sh_mobile_meram_fb_cache *cache = data; in sh_mobile_meram_cache_update() local
561 meram_set_next_addr(priv, cache, base_addr_y, base_addr_c); in sh_mobile_meram_cache_update()
562 meram_get_next_icb_addr(pdata, cache, icb_addr_y, icb_addr_c); in sh_mobile_meram_cache_update()