diff options
| -rw-r--r-- | drivers/gpu/drm/radeon/atombios_crtc.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index ec848787d7d9..84a69e7fa11e 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
| @@ -1045,7 +1045,7 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, | |||
| 1045 | uint64_t fb_location; | 1045 | uint64_t fb_location; |
| 1046 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; | 1046 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; |
| 1047 | u32 fb_swap = EVERGREEN_GRPH_ENDIAN_SWAP(EVERGREEN_GRPH_ENDIAN_NONE); | 1047 | u32 fb_swap = EVERGREEN_GRPH_ENDIAN_SWAP(EVERGREEN_GRPH_ENDIAN_NONE); |
| 1048 | u32 tmp; | 1048 | u32 tmp, viewport_w, viewport_h; |
| 1049 | int r; | 1049 | int r; |
| 1050 | 1050 | ||
| 1051 | /* no fb bound */ | 1051 | /* no fb bound */ |
| @@ -1171,8 +1171,10 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, | |||
| 1171 | y &= ~1; | 1171 | y &= ~1; |
| 1172 | WREG32(EVERGREEN_VIEWPORT_START + radeon_crtc->crtc_offset, | 1172 | WREG32(EVERGREEN_VIEWPORT_START + radeon_crtc->crtc_offset, |
| 1173 | (x << 16) | y); | 1173 | (x << 16) | y); |
| 1174 | viewport_w = crtc->mode.hdisplay; | ||
| 1175 | viewport_h = (crtc->mode.vdisplay + 1) & ~1; | ||
| 1174 | WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset, | 1176 | WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset, |
| 1175 | (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); | 1177 | (viewport_w << 16) | viewport_h); |
| 1176 | 1178 | ||
| 1177 | /* pageflip setup */ | 1179 | /* pageflip setup */ |
| 1178 | /* make sure flip is at vb rather than hb */ | 1180 | /* make sure flip is at vb rather than hb */ |
| @@ -1213,7 +1215,7 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc, | |||
| 1213 | uint64_t fb_location; | 1215 | uint64_t fb_location; |
| 1214 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; | 1216 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; |
| 1215 | u32 fb_swap = R600_D1GRPH_SWAP_ENDIAN_NONE; | 1217 | u32 fb_swap = R600_D1GRPH_SWAP_ENDIAN_NONE; |
| 1216 | u32 tmp; | 1218 | u32 tmp, viewport_w, viewport_h; |
| 1217 | int r; | 1219 | int r; |
| 1218 | 1220 | ||
| 1219 | /* no fb bound */ | 1221 | /* no fb bound */ |
| @@ -1338,8 +1340,10 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc, | |||
| 1338 | y &= ~1; | 1340 | y &= ~1; |
| 1339 | WREG32(AVIVO_D1MODE_VIEWPORT_START + radeon_crtc->crtc_offset, | 1341 | WREG32(AVIVO_D1MODE_VIEWPORT_START + radeon_crtc->crtc_offset, |
| 1340 | (x << 16) | y); | 1342 | (x << 16) | y); |
| 1343 | viewport_w = crtc->mode.hdisplay; | ||
| 1344 | viewport_h = (crtc->mode.vdisplay + 1) & ~1; | ||
| 1341 | WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset, | 1345 | WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset, |
| 1342 | (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); | 1346 | (viewport_w << 16) | viewport_h); |
| 1343 | 1347 | ||
| 1344 | /* pageflip setup */ | 1348 | /* pageflip setup */ |
| 1345 | /* make sure flip is at vb rather than hb */ | 1349 | /* make sure flip is at vb rather than hb */ |
