gma500: push through device driver tree
This is partial revert ofe44ba033c
("treewide: remove duplicate includes") and28f65c11
("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 <jkosina@suse.cz>
This commit is contained in:
parent
e1f91f82b8
commit
0c4986388a
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
#include "psb_drv.h"
|
#include "psb_drv.h"
|
||||||
#include "psb_reg.h"
|
#include "psb_reg.h"
|
||||||
|
#include "psb_drv.h"
|
||||||
#include "psb_fb.h"
|
#include "psb_fb.h"
|
||||||
|
|
||||||
void psb_spank(struct drm_psb_private *dev_priv)
|
void psb_spank(struct drm_psb_private *dev_priv)
|
||||||
|
|
|
@ -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;
|
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||||
u32 *gtt_slot, pte;
|
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;
|
struct page **pages;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -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;
|
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||||
u32 *gtt_slot, pte;
|
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;
|
int i;
|
||||||
|
|
||||||
WARN_ON(r->stolen);
|
WARN_ON(r->stolen);
|
||||||
|
@ -149,7 +149,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt)
|
||||||
struct address_space *mapping;
|
struct address_space *mapping;
|
||||||
int i;
|
int i;
|
||||||
struct page *p;
|
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);
|
WARN_ON(gt->pages);
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ err:
|
||||||
static void psb_gtt_detach_pages(struct gtt_range *gt)
|
static void psb_gtt_detach_pages(struct gtt_range *gt)
|
||||||
{
|
{
|
||||||
int i;
|
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++) {
|
for (i = 0; i < pages; i++) {
|
||||||
/* FIXME: do we need to force dirty */
|
/* FIXME: do we need to force dirty */
|
||||||
|
|
Loading…
Reference in New Issue