aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r100.c
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2011-03-16 17:10:06 -0400
committerDave Airlie <airlied@redhat.com>2011-03-16 23:50:43 -0400
commita3a88a668ffe8f9771a525a2b00570f8a4c29286 (patch)
tree05022f51b985846654634927ce21323faa6bd448 /drivers/gpu/drm/radeon/r100.c
parent3409fc1b22e2717237f9f23112645f5d190cff4d (diff)
drm: radeon: *_cs_packet_parse_vline() cleanup
Simplify the way the return value is set a number of times (mostly on error). Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r100.c')
-rw-r--r--drivers/gpu/drm/radeon/r100.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index e372f9e1e5ce..fcc23e4e0b3c 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -1205,14 +1205,12 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
1205 if (waitreloc.reg != RADEON_WAIT_UNTIL || 1205 if (waitreloc.reg != RADEON_WAIT_UNTIL ||
1206 waitreloc.count != 0) { 1206 waitreloc.count != 0) {
1207 DRM_ERROR("vline wait had illegal wait until segment\n"); 1207 DRM_ERROR("vline wait had illegal wait until segment\n");
1208 r = -EINVAL; 1208 return -EINVAL;
1209 return r;
1210 } 1209 }
1211 1210
1212 if (radeon_get_ib_value(p, waitreloc.idx + 1) != RADEON_WAIT_CRTC_VLINE) { 1211 if (radeon_get_ib_value(p, waitreloc.idx + 1) != RADEON_WAIT_CRTC_VLINE) {
1213 DRM_ERROR("vline wait had illegal wait until\n"); 1212 DRM_ERROR("vline wait had illegal wait until\n");
1214 r = -EINVAL; 1213 return -EINVAL;
1215 return r;
1216 } 1214 }
1217 1215
1218 /* jump over the NOP */ 1216 /* jump over the NOP */
@@ -1230,8 +1228,7 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
1230 obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC); 1228 obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC);
1231 if (!obj) { 1229 if (!obj) {
1232 DRM_ERROR("cannot find crtc %d\n", crtc_id); 1230 DRM_ERROR("cannot find crtc %d\n", crtc_id);
1233 r = -EINVAL; 1231 return -EINVAL;
1234 goto out;
1235 } 1232 }
1236 crtc = obj_to_crtc(obj); 1233 crtc = obj_to_crtc(obj);
1237 radeon_crtc = to_radeon_crtc(crtc); 1234 radeon_crtc = to_radeon_crtc(crtc);
@@ -1253,14 +1250,13 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
1253 break; 1250 break;
1254 default: 1251 default:
1255 DRM_ERROR("unknown crtc reloc\n"); 1252 DRM_ERROR("unknown crtc reloc\n");
1256 r = -EINVAL; 1253 return -EINVAL;
1257 goto out;
1258 } 1254 }
1259 ib[h_idx] = header; 1255 ib[h_idx] = header;
1260 ib[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1; 1256 ib[h_idx + 3] |= RADEON_ENG_DISPLAY_SELECT_CRTC1;
1261 } 1257 }
1262out: 1258
1263 return r; 1259 return 0;
1264} 1260}
1265 1261
1266/** 1262/**