summaryrefslogtreecommitdiffstats
path: root/drivers/staging/gma500/psb_intel_display.c
diff options
context:
space:
mode:
authorAlan Cox2011-05-13 12:09:32 +0200
committerGreg Kroah-Hartman2011-05-17 20:37:57 +0200
commit7ed2911c8f727077249fc5170a1ab842465aef21 (patch)
tree9fe63ae9ef9ffbf18f8dd9339d743ccecbf948fc /drivers/staging/gma500/psb_intel_display.c
parentgma500: Don't try and take a GEM handle of a non GEM fb (diff)
downloadkernel-qcow2-linux-7ed2911c8f727077249fc5170a1ab842465aef21.tar.gz
kernel-qcow2-linux-7ed2911c8f727077249fc5170a1ab842465aef21.tar.xz
kernel-qcow2-linux-7ed2911c8f727077249fc5170a1ab842465aef21.zip
gma500: finish off the fault handler
GEM wants to mmap the object through the GTT (which avoids aliasing) so we need to put the object into the GTT before we provide the fault mapping for it. While we are at it update the pin interface so that it digs dev out of the GEM object itself. This provides a rather cleaner API and call environment. Fix th refcount/on-off confusion in the pin API. At this point we get a bit further with modetest but if we write to the new GEM mapping we hang solid and as yet I don't know why. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/gma500/psb_intel_display.c')
-rw-r--r--drivers/staging/gma500/psb_intel_display.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/gma500/psb_intel_display.c b/drivers/staging/gma500/psb_intel_display.c
index 9e1446f8af8b..4f47d09d65de 100644
--- a/drivers/staging/gma500/psb_intel_display.c
+++ b/drivers/staging/gma500/psb_intel_display.c
@@ -363,7 +363,7 @@ int psb_intel_pipe_set_base(struct drm_crtc *crtc,
/* We are displaying this buffer, make sure it is actually loaded
into the GTT */
- ret = psb_gtt_pin(dev, psbfb->gtt);
+ ret = psb_gtt_pin(psbfb->gtt);
if (ret < 0)
goto psb_intel_pipe_set_base_exit;
start = psbfb->gtt->offset;
@@ -392,7 +392,7 @@ int psb_intel_pipe_set_base(struct drm_crtc *crtc,
default:
DRM_ERROR("Unknown color depth\n");
ret = -EINVAL;
- psb_gtt_unpin(dev, psbfb->gtt);
+ psb_gtt_unpin(psbfb->gtt);
goto psb_intel_pipe_set_base_exit;
}
REG_WRITE(dspcntr_reg, dspcntr);
@@ -411,7 +411,7 @@ int psb_intel_pipe_set_base(struct drm_crtc *crtc,
/* If there was a previous display we can now unpin it */
if (old_fb)
- psb_gtt_unpin(dev, to_psb_fb(old_fb)->gtt);
+ psb_gtt_unpin(to_psb_fb(old_fb)->gtt);
psb_intel_pipe_set_base_exit:
gma_power_end(dev);
@@ -1057,7 +1057,7 @@ static int psb_intel_crtc_cursor_set(struct drm_crtc *crtc,
if (psb_intel_crtc->cursor_obj) {
gt = container_of(psb_intel_crtc->cursor_obj,
struct gtt_range, gem);
- psb_gtt_unpin(crtc->dev, gt);
+ psb_gtt_unpin(gt);
drm_gem_object_unreference(psb_intel_crtc->cursor_obj);
psb_intel_crtc->cursor_obj = NULL;
}
@@ -1083,7 +1083,7 @@ static int psb_intel_crtc_cursor_set(struct drm_crtc *crtc,
gt = container_of(obj, struct gtt_range, gem);
/* Pin the memory into the GTT */
- ret = psb_gtt_pin(crtc->dev, gt);
+ ret = psb_gtt_pin(gt);
if (ret) {
DRM_ERROR("Can not pin down handle 0x%x\n", handle);
return ret;
@@ -1109,7 +1109,7 @@ static int psb_intel_crtc_cursor_set(struct drm_crtc *crtc,
if (psb_intel_crtc->cursor_obj && psb_intel_crtc->cursor_obj != obj) {
gt = container_of(psb_intel_crtc->cursor_obj,
struct gtt_range, gem);
- psb_gtt_unpin(crtc->dev, gt);
+ psb_gtt_unpin(gt);
drm_gem_object_unreference(psb_intel_crtc->cursor_obj);
psb_intel_crtc->cursor_obj = obj;
}
@@ -1318,7 +1318,7 @@ static void psb_intel_crtc_destroy(struct drm_crtc *crtc)
if (psb_intel_crtc->cursor_obj) {
gt = container_of(psb_intel_crtc->cursor_obj,
struct gtt_range, gem);
- psb_gtt_unpin(crtc->dev, gt);
+ psb_gtt_unpin(gt);
drm_gem_object_unreference(psb_intel_crtc->cursor_obj);
psb_intel_crtc->cursor_obj = NULL;
}