{
struct drm_psb_private *dev_priv = dev->dev_private;
u32 *gtt_slot, pte;
- int numpages = resource_size(&r->resource) >> PAGE_SHIFT;
+ int numpages = (r->resource.end + 1 - r->resource.start) >> PAGE_SHIFT;
struct page **pages;
int i;
{
struct drm_psb_private *dev_priv = dev->dev_private;
u32 *gtt_slot, pte;
- int numpages = resource_size(&r->resource) >> PAGE_SHIFT;
+ int numpages = (r->resource.end + 1 - r->resource.start) >> PAGE_SHIFT;
int i;
WARN_ON(r->stolen);
struct address_space *mapping;
int i;
struct page *p;
- int pages = resource_size(>->resource) >> PAGE_SHIFT;
+ int pages = (gt->resource.end + 1 - gt->resource.start) >> PAGE_SHIFT;
WARN_ON(gt->pages);
static void psb_gtt_detach_pages(struct gtt_range *gt)
{
int i;
- int pages = resource_size(>->resource) >> PAGE_SHIFT;
+ int pages = (gt->resource.end + 1 - gt->resource.start) >> PAGE_SHIFT;
for (i = 0; i < pages; i++) {
/* FIXME: do we need to force dirty */