Rev 3120 | Rev 5078 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3120 | Rev 3764 | ||
---|---|---|---|
Line 424... | Line 424... | ||
424 | rbo = gem_to_radeon_bo(obj); |
424 | rbo = gem_to_radeon_bo(obj); |
425 | r = radeon_bo_reserve(rbo, false); |
425 | r = radeon_bo_reserve(rbo, false); |
426 | if (unlikely(r != 0)) |
426 | if (unlikely(r != 0)) |
427 | return r; |
427 | return r; |
428 | /* Only 27 bit offset for legacy CRTC */ |
428 | /* Only 27 bit offset for legacy CRTC */ |
429 | r = radeon_bo_pin(rbo, RADEON_GEM_DOMAIN_VRAM, &base); |
429 | r = radeon_bo_pin_restricted(rbo, RADEON_GEM_DOMAIN_VRAM, 1 << 27, |
- | 430 | &base); |
|
430 | if (unlikely(r != 0)) { |
431 | if (unlikely(r != 0)) { |
431 | radeon_bo_unreserve(rbo); |
432 | radeon_bo_unreserve(rbo); |
432 | return -EINVAL; |
433 | return -EINVAL; |
433 | } |
434 | } |
434 | radeon_bo_get_tiling_flags(rbo, &tiling_flags, NULL); |
435 | radeon_bo_get_tiling_flags(rbo, &tiling_flags, NULL); |
Line 1028... | Line 1029... | ||
1028 | return 0; |
1029 | return 0; |
1029 | } |
1030 | } |
Line 1030... | Line 1031... | ||
1030 | 1031 | ||
1031 | static void radeon_crtc_prepare(struct drm_crtc *crtc) |
1032 | static void radeon_crtc_prepare(struct drm_crtc *crtc) |
1032 | { |
- | |
1033 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
1033 | { |
1034 | struct drm_device *dev = crtc->dev; |
1034 | struct drm_device *dev = crtc->dev; |
Line 1035... | Line -... | ||
1035 | struct drm_crtc *crtci; |
- | |
1036 | 1035 | struct drm_crtc *crtci; |
|
1037 | radeon_crtc->in_mode_set = true; |
1036 | |
1038 | /* |
1037 | /* |
1039 | * The hardware wedges sometimes if you reconfigure one CRTC |
1038 | * The hardware wedges sometimes if you reconfigure one CRTC |
1040 | * whilst another is running (see fdo bug #24611). |
1039 | * whilst another is running (see fdo bug #24611). |
1041 | */ |
1040 | */ |
1042 | list_for_each_entry(crtci, &dev->mode_config.crtc_list, head) |
1041 | list_for_each_entry(crtci, &dev->mode_config.crtc_list, head) |
Line 1043... | Line 1042... | ||
1043 | radeon_crtc_dpms(crtci, DRM_MODE_DPMS_OFF); |
1042 | radeon_crtc_dpms(crtci, DRM_MODE_DPMS_OFF); |
1044 | } |
1043 | } |
1045 | - | ||
1046 | static void radeon_crtc_commit(struct drm_crtc *crtc) |
1044 | |
1047 | { |
1045 | static void radeon_crtc_commit(struct drm_crtc *crtc) |
Line 1048... | Line 1046... | ||
1048 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
1046 | { |
1049 | struct drm_device *dev = crtc->dev; |
1047 | struct drm_device *dev = crtc->dev; |
1050 | struct drm_crtc *crtci; |
1048 | struct drm_crtc *crtci; |
1051 | 1049 | ||
1052 | /* |
1050 | /* |
1053 | * Reenable the CRTCs that should be running. |
1051 | * Reenable the CRTCs that should be running. |
1054 | */ |
1052 | */ |
1055 | list_for_each_entry(crtci, &dev->mode_config.crtc_list, head) { |
- | |
1056 | if (crtci->enabled) |
1053 | list_for_each_entry(crtci, &dev->mode_config.crtc_list, head) { |
Line 1057... | Line 1054... | ||
1057 | radeon_crtc_dpms(crtci, DRM_MODE_DPMS_ON); |
1054 | if (crtci->enabled) |
1058 | } |
1055 | radeon_crtc_dpms(crtci, DRM_MODE_DPMS_ON); |
1059 | radeon_crtc->in_mode_set = false; |
1056 | } |