diff options
Diffstat (limited to 'common/recipes-kernel/linux/files/0601-drm-amdgpu-dce11-Fold-set_cursor-into-show_cursor.patch')
-rw-r--r-- | common/recipes-kernel/linux/files/0601-drm-amdgpu-dce11-Fold-set_cursor-into-show_cursor.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0601-drm-amdgpu-dce11-Fold-set_cursor-into-show_cursor.patch b/common/recipes-kernel/linux/files/0601-drm-amdgpu-dce11-Fold-set_cursor-into-show_cursor.patch new file mode 100644 index 00000000..8df551d9 --- /dev/null +++ b/common/recipes-kernel/linux/files/0601-drm-amdgpu-dce11-Fold-set_cursor-into-show_cursor.patch @@ -0,0 +1,71 @@ +From 8c3b911b874a83abf04955a980bbb4fb8ca188bc Mon Sep 17 00:00:00 2001 +From: Alex Deucher <alexander.deucher@amd.com> +Date: Wed, 7 Oct 2015 23:20:45 -0400 +Subject: [PATCH 0601/1050] drm/amdgpu/dce11: Fold set_cursor() into + show_cursor() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Port of radeon commit: +8991668ab4e26f985a8485719bce5d6d0623a644 + +Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 18 +++++------------- + 1 file changed, 5 insertions(+), 13 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +index b99c211..50cd429 100644 +--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +@@ -2494,6 +2494,11 @@ static void dce_v11_0_show_cursor(struct drm_crtc *crtc) + struct amdgpu_device *adev = crtc->dev->dev_private; + u32 tmp; + ++ WREG32(mmCUR_SURFACE_ADDRESS_HIGH + amdgpu_crtc->crtc_offset, ++ upper_32_bits(amdgpu_crtc->cursor_addr)); ++ WREG32(mmCUR_SURFACE_ADDRESS + amdgpu_crtc->crtc_offset, ++ lower_32_bits(amdgpu_crtc->cursor_addr)); ++ + tmp = RREG32_IDX(mmCUR_CONTROL + amdgpu_crtc->crtc_offset); + tmp = REG_SET_FIELD(tmp, CUR_CONTROL, CURSOR_EN, 1); + tmp = REG_SET_FIELD(tmp, CUR_CONTROL, CURSOR_MODE, 2); +@@ -2532,17 +2537,6 @@ static int dce_v11_0_cursor_move_locked(struct drm_crtc *crtc, + return 0; + } + +-static void dce_v11_0_set_cursor(struct drm_crtc *crtc) +-{ +- struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); +- struct amdgpu_device *adev = crtc->dev->dev_private; +- +- WREG32(mmCUR_SURFACE_ADDRESS_HIGH + amdgpu_crtc->crtc_offset, +- upper_32_bits(amdgpu_crtc->cursor_addr)); +- WREG32(mmCUR_SURFACE_ADDRESS + amdgpu_crtc->crtc_offset, +- lower_32_bits(amdgpu_crtc->cursor_addr)); +-} +- + static int dce_v11_0_crtc_cursor_move(struct drm_crtc *crtc, + int x, int y) + { +@@ -2620,7 +2614,6 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc, + amdgpu_crtc->cursor_hot_y = hot_y; + } + +- dce_v11_0_set_cursor(crtc); + dce_v11_0_show_cursor(crtc); + dce_v11_0_lock_cursor(crtc, false); + +@@ -2649,7 +2642,6 @@ static void dce_v11_0_cursor_reset(struct drm_crtc *crtc) + dce_v11_0_cursor_move_locked(crtc, amdgpu_crtc->cursor_x, + amdgpu_crtc->cursor_y); + +- dce_v11_0_set_cursor(crtc); + dce_v11_0_show_cursor(crtc); + + dce_v11_0_lock_cursor(crtc, false); +-- +1.9.1 + |