Skip to content

Commit

Permalink
gma500: push through device driver tree
Browse files Browse the repository at this point in the history
This is partial revert of e44ba03 ("treewide: remove duplicate
includes") and 28f65c1 ("treewide: Convert uses of struct resource
to resource_size(ptr)") as these changes will be merged through Alan->Greg
together with other gma500 bits.

Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
Jiri Kosina committed Jun 28, 2011
1 parent e1f91f8 commit 0c49863
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions drivers/staging/gma500/psb_2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include "psb_drv.h"
#include "psb_reg.h"
#include "psb_drv.h"
#include "psb_fb.h"

void psb_spank(struct drm_psb_private *dev_priv)
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/gma500/psb_gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static int psb_gtt_insert(struct drm_device *dev, struct gtt_range *r)
{
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;

Expand Down Expand Up @@ -121,7 +121,7 @@ static void psb_gtt_remove(struct drm_device *dev, struct gtt_range *r)
{
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);
Expand Down Expand Up @@ -149,7 +149,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt)
struct address_space *mapping;
int i;
struct page *p;
int pages = resource_size(&gt->resource) >> PAGE_SHIFT;
int pages = (gt->resource.end + 1 - gt->resource.start) >> PAGE_SHIFT;

WARN_ON(gt->pages);

Expand Down Expand Up @@ -191,7 +191,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt)
static void psb_gtt_detach_pages(struct gtt_range *gt)
{
int i;
int pages = resource_size(&gt->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 */
Expand Down

0 comments on commit 0c49863

Please sign in to comment.