diff options
author | Dave Airlie <airlied@redhat.com> | 2008-06-04 13:00:31 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-06-04 13:00:31 +1000 |
commit | fd27591c6cadd2a868f4110b8993a86c37837d3e (patch) | |
tree | 2b221947c2d6e7c9965a562ccce96f48c74bb72a /linux-core/intel_display.c | |
parent | 76a44f14d6339e5bc0c936ef4a360f6c152511bd (diff) |
drm/modesetting: pass object handle to driver !bo
Diffstat (limited to 'linux-core/intel_display.c')
-rw-r--r-- | linux-core/intel_display.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/linux-core/intel_display.c b/linux-core/intel_display.c index 529cae14..3f5afac0 100644 --- a/linux-core/intel_display.c +++ b/linux-core/intel_display.c @@ -972,22 +972,24 @@ void intel_crtc_load_lut(struct drm_crtc *crtc) } static int intel_crtc_cursor_set(struct drm_crtc *crtc, - struct drm_buffer_object *bo, + uint32_t handle, uint32_t width, uint32_t height) { struct drm_device *dev = crtc->dev; struct drm_i915_private *dev_priv = dev->dev_private; struct intel_crtc *intel_crtc = to_intel_crtc(crtc); + struct drm_buffer_object *bo; int pipe = intel_crtc->pipe; uint32_t control = (pipe == 0) ? CURACNTR : CURBCNTR; uint32_t base = (pipe == 0) ? CURABASE : CURBBASE; uint32_t temp; + int ret; size_t addr; DRM_DEBUG("\n"); /* if we want to turn of the cursor ignore width and height */ - if (!bo) { + if (!handle) { DRM_DEBUG("cursor off\n"); /* turn of the cursor */ temp = 0; @@ -1004,6 +1006,11 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, return -EINVAL; } + ret = drm_get_buffer_object(dev, &bo, handle); + if (ret) { + return -EINVAL; + } + if ((bo->mem.flags & DRM_BO_MASK_MEM) != DRM_BO_FLAG_MEM_VRAM) { DRM_ERROR("buffer needs to be in VRAM\n"); return -ENOMEM; |