aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_v8_0.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
index c6c4e073028e..c5b286617da4 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c
@@ -2022,7 +2022,7 @@ static int dce_v8_0_crtc_do_set_base(struct drm_crtc *crtc,
2022 struct amdgpu_framebuffer *amdgpu_fb; 2022 struct amdgpu_framebuffer *amdgpu_fb;
2023 struct drm_framebuffer *target_fb; 2023 struct drm_framebuffer *target_fb;
2024 struct drm_gem_object *obj; 2024 struct drm_gem_object *obj;
2025 struct amdgpu_bo *rbo; 2025 struct amdgpu_bo *abo;
2026 uint64_t fb_location, tiling_flags; 2026 uint64_t fb_location, tiling_flags;
2027 uint32_t fb_format, fb_pitch_pixels; 2027 uint32_t fb_format, fb_pitch_pixels;
2028 u32 fb_swap = (GRPH_ENDIAN_NONE << GRPH_SWAP_CNTL__GRPH_ENDIAN_SWAP__SHIFT); 2028 u32 fb_swap = (GRPH_ENDIAN_NONE << GRPH_SWAP_CNTL__GRPH_ENDIAN_SWAP__SHIFT);
@@ -2049,23 +2049,23 @@ static int dce_v8_0_crtc_do_set_base(struct drm_crtc *crtc,
2049 * just update base pointers 2049 * just update base pointers
2050 */ 2050 */
2051 obj = amdgpu_fb->obj; 2051 obj = amdgpu_fb->obj;
2052 rbo = gem_to_amdgpu_bo(obj); 2052 abo = gem_to_amdgpu_bo(obj);
2053 r = amdgpu_bo_reserve(rbo, false); 2053 r = amdgpu_bo_reserve(abo, false);
2054 if (unlikely(r != 0)) 2054 if (unlikely(r != 0))
2055 return r; 2055 return r;
2056 2056
2057 if (atomic) { 2057 if (atomic) {
2058 fb_location = amdgpu_bo_gpu_offset(rbo); 2058 fb_location = amdgpu_bo_gpu_offset(abo);
2059 } else { 2059 } else {
2060 r = amdgpu_bo_pin(rbo, AMDGPU_GEM_DOMAIN_VRAM, &fb_location); 2060 r = amdgpu_bo_pin(abo, AMDGPU_GEM_DOMAIN_VRAM, &fb_location);
2061 if (unlikely(r != 0)) { 2061 if (unlikely(r != 0)) {
2062 amdgpu_bo_unreserve(rbo); 2062 amdgpu_bo_unreserve(abo);
2063 return -EINVAL; 2063 return -EINVAL;
2064 } 2064 }
2065 } 2065 }
2066 2066
2067 amdgpu_bo_get_tiling_flags(rbo, &tiling_flags); 2067 amdgpu_bo_get_tiling_flags(abo, &tiling_flags);
2068 amdgpu_bo_unreserve(rbo); 2068 amdgpu_bo_unreserve(abo);
2069 2069
2070 pipe_config = AMDGPU_TILING_GET(tiling_flags, PIPE_CONFIG); 2070 pipe_config = AMDGPU_TILING_GET(tiling_flags, PIPE_CONFIG);
2071 2071
@@ -2220,12 +2220,12 @@ static int dce_v8_0_crtc_do_set_base(struct drm_crtc *crtc,
2220 2220
2221 if (!atomic && fb && fb != crtc->primary->fb) { 2221 if (!atomic && fb && fb != crtc->primary->fb) {
2222 amdgpu_fb = to_amdgpu_framebuffer(fb); 2222 amdgpu_fb = to_amdgpu_framebuffer(fb);
2223 rbo = gem_to_amdgpu_bo(amdgpu_fb->obj); 2223 abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
2224 r = amdgpu_bo_reserve(rbo, false); 2224 r = amdgpu_bo_reserve(abo, false);
2225 if (unlikely(r != 0)) 2225 if (unlikely(r != 0))
2226 return r; 2226 return r;
2227 amdgpu_bo_unpin(rbo); 2227 amdgpu_bo_unpin(abo);
2228 amdgpu_bo_unreserve(rbo); 2228 amdgpu_bo_unreserve(abo);
2229 } 2229 }
2230 2230
2231 /* Bytes per pixel may have changed */ 2231 /* Bytes per pixel may have changed */
@@ -2697,16 +2697,16 @@ static void dce_v8_0_crtc_disable(struct drm_crtc *crtc)
2697 if (crtc->primary->fb) { 2697 if (crtc->primary->fb) {
2698 int r; 2698 int r;
2699 struct amdgpu_framebuffer *amdgpu_fb; 2699 struct amdgpu_framebuffer *amdgpu_fb;
2700 struct amdgpu_bo *rbo; 2700 struct amdgpu_bo *abo;
2701 2701
2702 amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb); 2702 amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);
2703 rbo = gem_to_amdgpu_bo(amdgpu_fb->obj); 2703 abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
2704 r = amdgpu_bo_reserve(rbo, false); 2704 r = amdgpu_bo_reserve(abo, false);
2705 if (unlikely(r)) 2705 if (unlikely(r))
2706 DRM_ERROR("failed to reserve rbo before unpin\n"); 2706 DRM_ERROR("failed to reserve abo before unpin\n");
2707 else { 2707 else {
2708 amdgpu_bo_unpin(rbo); 2708 amdgpu_bo_unpin(abo);
2709 amdgpu_bo_unreserve(rbo); 2709 amdgpu_bo_unreserve(abo);
2710 } 2710 }
2711 } 2711 }
2712 /* disable the GRPH */ 2712 /* disable the GRPH */