summaryrefslogtreecommitdiff
path: root/lib/crc7.c
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-01-04 21:35:15 (GMT)
committerDave Airlie <airlied@redhat.com>2012-01-06 09:30:15 (GMT)
commit2c05114d23c4fd2256eaf5645528c19fcefdb2c8 (patch)
treedc1f700fbacb0a7891932b13684d4a4f5a65415e /lib/crc7.c
parent36d7c537c3082a492ff851fb0da40ae3d7c5565d (diff)
downloadlinux-fsl-qoriq-2c05114d23c4fd2256eaf5645528c19fcefdb2c8.tar.xz
drm/ttm/dma: Fix accounting error when calling ttm_mem_global_free_page and don't try to free freed pages.
The code to figure out how many pages to shrink the pool ends up capping the 'count' at _manager->options.max_size - which is OK. Except that the 'count' is also used when accounting for how many pages are recycled - which we end up with the invalid values. This fixes it by using a different value for the amount of pages to shrink. On top of that we would free the cached page pool - which is nonsense as they are deleted from the pool - so there are no free pages in that pool.. Also we also missed the opportunity to batch the amount of pages to free (similar to how ttm_page_alloc.c does it). This reintroduces the code that was lost during rebasing. Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'lib/crc7.c')
0 files changed, 0 insertions, 0 deletions