drm/radeon: fix order of doing things in radeon_crtc_cursor_set

if object pin or object lookup in radeon_cursor_set fail, the function
could leave inconsistent mouse width and hight values in radeon_crtc
fixed by moving cursor width and height assignments after all
checks have passed

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by Ilija Hadzic and committed by Dave Airlie 45e5f6a2 2bbd4492

+3 -3
+3 -3
drivers/gpu/drm/radeon/radeon_cursor.c
··· 167 167 return -EINVAL; 168 168 } 169 169 170 - radeon_crtc->cursor_width = width; 171 - radeon_crtc->cursor_height = height; 172 - 173 170 obj = drm_gem_object_lookup(crtc->dev, file_priv, handle); 174 171 if (!obj) { 175 172 DRM_ERROR("Cannot find cursor object %x for crtc %d\n", handle, radeon_crtc->crtc_id); ··· 176 179 ret = radeon_gem_object_pin(obj, RADEON_GEM_DOMAIN_VRAM, &gpu_addr); 177 180 if (ret) 178 181 goto fail; 182 + 183 + radeon_crtc->cursor_width = width; 184 + radeon_crtc->cursor_height = height; 179 185 180 186 radeon_lock_cursor(crtc, true); 181 187 /* XXX only 27 bit offset for legacy cursor */