Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249179
b: refs/heads/master
c: cb0ff05
h: refs/heads/master
i:
  249177: 9bd0f88
  249175: 179f410
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Apr 26, 2011
1 parent fe4873e commit c536b2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d9c134c6e53e27f37ae3167e25190885586e538
refs/heads/master: cb0ff05aa19cfdc8bc08bfeca619546207b01f7d
2 changes: 0 additions & 2 deletions trunk/drivers/staging/gma500/psb_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ struct drm_psb_private {
struct resource *gtt_mem; /* Our PCI resource */
struct gtt_range *gtt_handles[GTT_MAX];

struct gtt_range *fb; /* System frame buffer */

struct psb_mmu_driver *mmu;
struct psb_mmu_pd *pf_pd;

Expand Down
13 changes: 6 additions & 7 deletions trunk/drivers/staging/gma500/psb_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
struct device *device = &dev->pdev->dev;
int size, aligned_size;
int ret;
struct gtt_range *backing;

mode_cmd.width = sizes->surface_width;
mode_cmd.height = sizes->surface_height;
Expand All @@ -479,13 +480,12 @@ static int psbfb_create(struct psb_fbdev *fbdev,
aligned_size = ALIGN(size, PAGE_SIZE);

/* Allocate the framebuffer in the GTT */
/* FIXME: this cannot live in dev_priv once we go multi head */
dev_priv->fb = psb_gtt_alloc_range(dev, aligned_size, "fb");
if (dev_priv->fb == NULL)
backing = psb_gtt_alloc_range(dev, aligned_size, "fb");
if (backing == NULL)
return -ENOMEM;

mutex_lock(&dev->struct_mutex);
fb = psb_framebuffer_create(dev, &mode_cmd, dev_priv->fb);
fb = psb_framebuffer_create(dev, &mode_cmd, backing);
if (!fb) {
DRM_ERROR("failed to allocate fb.\n");
ret = -ENOMEM;
Expand Down Expand Up @@ -518,7 +518,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
/* Accessed via stolen memory directly, This only works for stolem
memory however. Need to address this once we start using gtt
pages we allocate */
info->screen_base = (char *)pg->vram_addr + dev_priv->fb->offset;
info->screen_base = (char *)pg->vram_addr + backing->offset;
info->screen_size = size;
memset(info->screen_base, 0, size);

Expand Down Expand Up @@ -548,8 +548,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
fb->funcs->destroy(fb);
out_err1:
mutex_unlock(&dev->struct_mutex);
psb_gtt_free_range(dev, dev_priv->fb);
dev_priv->fb = NULL;
psb_gtt_free_range(dev, backing);
return ret;
}

Expand Down

0 comments on commit c536b2b

Please sign in to comment.