The function is always called with the remap argument set to true.
Hardcode that behaviour and remove it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
void omap_gem_cpu_sync(struct drm_gem_object *obj, int pgoff);
void omap_gem_dma_sync(struct drm_gem_object *obj,
enum dma_data_direction dir);
-int omap_gem_get_paddr(struct drm_gem_object *obj,
- dma_addr_t *paddr, bool remap);
+int omap_gem_get_paddr(struct drm_gem_object *obj, dma_addr_t *paddr);
void omap_gem_put_paddr(struct drm_gem_object *obj);
int omap_gem_get_pages(struct drm_gem_object *obj, struct page ***pages,
bool remap);
for (i = 0; i < n; i++) {
struct plane *plane = &omap_fb->planes[i];
- ret = omap_gem_get_paddr(plane->bo, &plane->paddr, true);
+ ret = omap_gem_get_paddr(plane->bo, &plane->paddr);
if (ret)
goto fail;
omap_gem_dma_sync(plane->bo, DMA_TO_DEVICE);
* to it). Then we just need to be sure that we are able to re-
* pin it in case of an opps.
*/
- ret = omap_gem_get_paddr(fbdev->bo, &paddr, true);
+ ret = omap_gem_get_paddr(fbdev->bo, &paddr);
if (ret) {
dev_err(dev->dev,
"could not map (paddr)! Skipping framebuffer alloc\n");
}
}
-/* Get physical address for DMA.. if 'remap' is true, and the buffer is not
- * already contiguous, remap it to pin in physically contiguous memory.. (ie.
- * map in TILER)
+/* Get physical address for DMA.. if the buffer is not already contiguous, remap
+ * it to pin in physically contiguous memory.. (ie. map in TILER)
*/
-int omap_gem_get_paddr(struct drm_gem_object *obj,
- dma_addr_t *paddr, bool remap)
+int omap_gem_get_paddr(struct drm_gem_object *obj, dma_addr_t *paddr)
{
struct omap_drm_private *priv = obj->dev->dev_private;
struct omap_gem_object *omap_obj = to_omap_bo(obj);
mutex_lock(&obj->dev->struct_mutex);
- if (!is_contiguous(omap_obj) && remap && priv->has_dmm) {
+ if (!is_contiguous(omap_obj) && priv->has_dmm) {
if (omap_obj->paddr_cnt == 0) {
struct page **pages;
uint32_t npages = obj->size >> PAGE_SHIFT;
/* camera, etc, need physically contiguous.. but we need a
* better way to know this..
*/
- ret = omap_gem_get_paddr(obj, &paddr, true);
+ ret = omap_gem_get_paddr(obj, &paddr);
if (ret)
goto out;