|
@@ -70,6 +70,11 @@ int mga_crtc_cursor_set(struct drm_crtc *crtc,
|
|
|
BUG_ON(pixels_2 != pixels_current && pixels_2 != pixels_prev);
|
|
|
BUG_ON(pixels_current == pixels_prev);
|
|
|
|
|
|
+ if (!handle || !file_priv) {
|
|
|
+ mga_hide_cursor(mdev);
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
obj = drm_gem_object_lookup(dev, file_priv, handle);
|
|
|
if (!obj)
|
|
|
return -ENOENT;
|
|
@@ -88,12 +93,6 @@ int mga_crtc_cursor_set(struct drm_crtc *crtc,
|
|
|
goto out_unreserve1;
|
|
|
}
|
|
|
|
|
|
- if (!handle) {
|
|
|
- mga_hide_cursor(mdev);
|
|
|
- ret = 0;
|
|
|
- goto out1;
|
|
|
- }
|
|
|
-
|
|
|
/* Move cursor buffers into VRAM if they aren't already */
|
|
|
if (!pixels_1->pin_count) {
|
|
|
ret = mgag200_bo_pin(pixels_1, TTM_PL_FLAG_VRAM,
|