OMAPFB: move dssdev->sync call out from omapfb_realloc_fbmem
Currently omapfb_realloc_fbmem() calls dssdev->sync to ensure any possible frame update is finished. This patch moves the call to dssdev->sync from omapfb_realloc_fbmem to the callers of omapfb_realloc_fbmem. This keeps dssdev related calls out from omapfb_realloc_fbmem, which makes sense as the function should only deal with fb memory. Also, this seems to avoid a lockdep warning about possible circular locking. However, the exact reason for that warning is still unclear. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
@@ -211,6 +211,7 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi)
|
||||
{
|
||||
struct omapfb_info *ofbi = FB2OFB(fbi);
|
||||
struct omapfb2_device *fbdev = ofbi->fbdev;
|
||||
struct omap_dss_device *display = fb2display(fbi);
|
||||
struct omapfb2_mem_region *rg;
|
||||
int r = 0, i;
|
||||
size_t size;
|
||||
@@ -220,6 +221,9 @@ static int omapfb_setup_mem(struct fb_info *fbi, struct omapfb_mem_info *mi)
|
||||
|
||||
size = PAGE_ALIGN(mi->size);
|
||||
|
||||
if (display && display->driver->sync)
|
||||
display->driver->sync(display);
|
||||
|
||||
rg = ofbi->region;
|
||||
|
||||
down_write_nested(&rg->lock, rg->id);
|
||||
|
Reference in New Issue
Block a user