drm/vmwgfx: use helpers

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Rob Clark 2014-07-17 23:30:02 -04:00 committed by Dave Airlie
parent bf02d87fa4
commit a4cd5d6857

View file

@ -1501,7 +1501,6 @@ int vmw_kms_cursor_bypass_ioctl(struct drm_device *dev, void *data,
{ {
struct drm_vmw_cursor_bypass_arg *arg = data; struct drm_vmw_cursor_bypass_arg *arg = data;
struct vmw_display_unit *du; struct vmw_display_unit *du;
struct drm_mode_object *obj;
struct drm_crtc *crtc; struct drm_crtc *crtc;
int ret = 0; int ret = 0;
@ -1519,13 +1518,12 @@ int vmw_kms_cursor_bypass_ioctl(struct drm_device *dev, void *data,
return 0; return 0;
} }
obj = drm_mode_object_find(dev, arg->crtc_id, DRM_MODE_OBJECT_CRTC); crtc = drm_crtc_find(dev, arg->crtc_id);
if (!obj) { if (!crtc) {
ret = -ENOENT; ret = -ENOENT;
goto out; goto out;
} }
crtc = obj_to_crtc(obj);
du = vmw_crtc_to_du(crtc); du = vmw_crtc_to_du(crtc);
du->hotspot_x = arg->xhot; du->hotspot_x = arg->xhot;