diff options
author | Dave Airlie <airlied@redhat.com> | 2017-01-26 20:00:42 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-01-26 20:00:42 -0500 |
commit | b0df0b251b25b0bf89ef3e518330fcac300add86 (patch) | |
tree | 962d8f7e91b2552a87af230762085ad97292a091 /drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | |
parent | f0493e653f9679114d1dfd54ab88b54ce95576e1 (diff) | |
parent | ff9f8a7cf935468a94d9927c68b00daae701667e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge Linus master to get the connector locking revert.
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux: (645 commits)
sysctl: fix proc_doulongvec_ms_jiffies_minmax()
Revert "drm/probe-helpers: Drop locking from poll_enable"
MAINTAINERS: add Dan Streetman to zbud maintainers
MAINTAINERS: add Dan Streetman to zswap maintainers
mm: do not export ioremap_page_range symbol for external module
mn10300: fix build error of missing fpu_save()
romfs: use different way to generate fsid for BLOCK or MTD
frv: add missing atomic64 operations
mm, page_alloc: fix premature OOM when racing with cpuset mems update
mm, page_alloc: move cpuset seqcount checking to slowpath
mm, page_alloc: fix fast-path race with cpuset update or removal
mm, page_alloc: fix check for NULL preferred_zone
kernel/panic.c: add missing \n
fbdev: color map copying bounds checking
frv: add atomic64_add_unless()
mm/mempolicy.c: do not put mempolicy before using its nodemask
radix-tree: fix private list warnings
Documentation/filesystems/proc.txt: add VmPin
mm, memcg: do not retry precharge charges
proc: add a schedule point in proc_pid_readdir()
...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_v11_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index 7a7fa96d2e49..1cf1d9d1aec1 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | |||
@@ -167,6 +167,7 @@ static void dce_v11_0_init_golden_registers(struct amdgpu_device *adev) | |||
167 | (const u32)ARRAY_SIZE(stoney_golden_settings_a11)); | 167 | (const u32)ARRAY_SIZE(stoney_golden_settings_a11)); |
168 | break; | 168 | break; |
169 | case CHIP_POLARIS11: | 169 | case CHIP_POLARIS11: |
170 | case CHIP_POLARIS12: | ||
170 | amdgpu_program_register_sequence(adev, | 171 | amdgpu_program_register_sequence(adev, |
171 | polaris11_golden_settings_a11, | 172 | polaris11_golden_settings_a11, |
172 | (const u32)ARRAY_SIZE(polaris11_golden_settings_a11)); | 173 | (const u32)ARRAY_SIZE(polaris11_golden_settings_a11)); |
@@ -608,6 +609,7 @@ static int dce_v11_0_get_num_crtc (struct amdgpu_device *adev) | |||
608 | num_crtc = 6; | 609 | num_crtc = 6; |
609 | break; | 610 | break; |
610 | case CHIP_POLARIS11: | 611 | case CHIP_POLARIS11: |
612 | case CHIP_POLARIS12: | ||
611 | num_crtc = 5; | 613 | num_crtc = 5; |
612 | break; | 614 | break; |
613 | default: | 615 | default: |
@@ -1589,6 +1591,7 @@ static int dce_v11_0_audio_init(struct amdgpu_device *adev) | |||
1589 | adev->mode_info.audio.num_pins = 8; | 1591 | adev->mode_info.audio.num_pins = 8; |
1590 | break; | 1592 | break; |
1591 | case CHIP_POLARIS11: | 1593 | case CHIP_POLARIS11: |
1594 | case CHIP_POLARIS12: | ||
1592 | adev->mode_info.audio.num_pins = 6; | 1595 | adev->mode_info.audio.num_pins = 6; |
1593 | break; | 1596 | break; |
1594 | default: | 1597 | default: |
@@ -2388,7 +2391,8 @@ static u32 dce_v11_0_pick_pll(struct drm_crtc *crtc) | |||
2388 | int pll; | 2391 | int pll; |
2389 | 2392 | ||
2390 | if ((adev->asic_type == CHIP_POLARIS10) || | 2393 | if ((adev->asic_type == CHIP_POLARIS10) || |
2391 | (adev->asic_type == CHIP_POLARIS11)) { | 2394 | (adev->asic_type == CHIP_POLARIS11) || |
2395 | (adev->asic_type == CHIP_POLARIS12)) { | ||
2392 | struct amdgpu_encoder *amdgpu_encoder = | 2396 | struct amdgpu_encoder *amdgpu_encoder = |
2393 | to_amdgpu_encoder(amdgpu_crtc->encoder); | 2397 | to_amdgpu_encoder(amdgpu_crtc->encoder); |
2394 | struct amdgpu_encoder_atom_dig *dig = amdgpu_encoder->enc_priv; | 2398 | struct amdgpu_encoder_atom_dig *dig = amdgpu_encoder->enc_priv; |
@@ -2528,6 +2532,8 @@ static int dce_v11_0_cursor_move_locked(struct drm_crtc *crtc, | |||
2528 | 2532 | ||
2529 | WREG32(mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x << 16) | y); | 2533 | WREG32(mmCUR_POSITION + amdgpu_crtc->crtc_offset, (x << 16) | y); |
2530 | WREG32(mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin << 16) | yorigin); | 2534 | WREG32(mmCUR_HOT_SPOT + amdgpu_crtc->crtc_offset, (xorigin << 16) | yorigin); |
2535 | WREG32(mmCUR_SIZE + amdgpu_crtc->crtc_offset, | ||
2536 | ((amdgpu_crtc->cursor_width - 1) << 16) | (amdgpu_crtc->cursor_height - 1)); | ||
2531 | 2537 | ||
2532 | return 0; | 2538 | return 0; |
2533 | } | 2539 | } |
@@ -2553,7 +2559,6 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc, | |||
2553 | int32_t hot_y) | 2559 | int32_t hot_y) |
2554 | { | 2560 | { |
2555 | struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); | 2561 | struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); |
2556 | struct amdgpu_device *adev = crtc->dev->dev_private; | ||
2557 | struct drm_gem_object *obj; | 2562 | struct drm_gem_object *obj; |
2558 | struct amdgpu_bo *aobj; | 2563 | struct amdgpu_bo *aobj; |
2559 | int ret; | 2564 | int ret; |
@@ -2594,7 +2599,9 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc, | |||
2594 | 2599 | ||
2595 | dce_v11_0_lock_cursor(crtc, true); | 2600 | dce_v11_0_lock_cursor(crtc, true); |
2596 | 2601 | ||
2597 | if (hot_x != amdgpu_crtc->cursor_hot_x || | 2602 | if (width != amdgpu_crtc->cursor_width || |
2603 | height != amdgpu_crtc->cursor_height || | ||
2604 | hot_x != amdgpu_crtc->cursor_hot_x || | ||
2598 | hot_y != amdgpu_crtc->cursor_hot_y) { | 2605 | hot_y != amdgpu_crtc->cursor_hot_y) { |
2599 | int x, y; | 2606 | int x, y; |
2600 | 2607 | ||
@@ -2603,16 +2610,10 @@ static int dce_v11_0_crtc_cursor_set2(struct drm_crtc *crtc, | |||
2603 | 2610 | ||
2604 | dce_v11_0_cursor_move_locked(crtc, x, y); | 2611 | dce_v11_0_cursor_move_locked(crtc, x, y); |
2605 | 2612 | ||
2606 | amdgpu_crtc->cursor_hot_x = hot_x; | ||
2607 | amdgpu_crtc->cursor_hot_y = hot_y; | ||
2608 | } | ||
2609 | |||
2610 | if (width != amdgpu_crtc->cursor_width || | ||
2611 | height != amdgpu_crtc->cursor_height) { | ||
2612 | WREG32(mmCUR_SIZE + amdgpu_crtc->crtc_offset, | ||
2613 | (width - 1) << 16 | (height - 1)); | ||
2614 | amdgpu_crtc->cursor_width = width; | 2613 | amdgpu_crtc->cursor_width = width; |
2615 | amdgpu_crtc->cursor_height = height; | 2614 | amdgpu_crtc->cursor_height = height; |
2615 | amdgpu_crtc->cursor_hot_x = hot_x; | ||
2616 | amdgpu_crtc->cursor_hot_y = hot_y; | ||
2616 | } | 2617 | } |
2617 | 2618 | ||
2618 | dce_v11_0_show_cursor(crtc); | 2619 | dce_v11_0_show_cursor(crtc); |
@@ -2636,7 +2637,6 @@ unpin: | |||
2636 | static void dce_v11_0_cursor_reset(struct drm_crtc *crtc) | 2637 | static void dce_v11_0_cursor_reset(struct drm_crtc *crtc) |
2637 | { | 2638 | { |
2638 | struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); | 2639 | struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); |
2639 | struct amdgpu_device *adev = crtc->dev->dev_private; | ||
2640 | 2640 | ||
2641 | if (amdgpu_crtc->cursor_bo) { | 2641 | if (amdgpu_crtc->cursor_bo) { |
2642 | dce_v11_0_lock_cursor(crtc, true); | 2642 | dce_v11_0_lock_cursor(crtc, true); |
@@ -2644,10 +2644,6 @@ static void dce_v11_0_cursor_reset(struct drm_crtc *crtc) | |||
2644 | dce_v11_0_cursor_move_locked(crtc, amdgpu_crtc->cursor_x, | 2644 | dce_v11_0_cursor_move_locked(crtc, amdgpu_crtc->cursor_x, |
2645 | amdgpu_crtc->cursor_y); | 2645 | amdgpu_crtc->cursor_y); |
2646 | 2646 | ||
2647 | WREG32(mmCUR_SIZE + amdgpu_crtc->crtc_offset, | ||
2648 | (amdgpu_crtc->cursor_width - 1) << 16 | | ||
2649 | (amdgpu_crtc->cursor_height - 1)); | ||
2650 | |||
2651 | dce_v11_0_show_cursor(crtc); | 2647 | dce_v11_0_show_cursor(crtc); |
2652 | 2648 | ||
2653 | dce_v11_0_lock_cursor(crtc, false); | 2649 | dce_v11_0_lock_cursor(crtc, false); |
@@ -2822,7 +2818,8 @@ static int dce_v11_0_crtc_mode_set(struct drm_crtc *crtc, | |||
2822 | return -EINVAL; | 2818 | return -EINVAL; |
2823 | 2819 | ||
2824 | if ((adev->asic_type == CHIP_POLARIS10) || | 2820 | if ((adev->asic_type == CHIP_POLARIS10) || |
2825 | (adev->asic_type == CHIP_POLARIS11)) { | 2821 | (adev->asic_type == CHIP_POLARIS11) || |
2822 | (adev->asic_type == CHIP_POLARIS12)) { | ||
2826 | struct amdgpu_encoder *amdgpu_encoder = | 2823 | struct amdgpu_encoder *amdgpu_encoder = |
2827 | to_amdgpu_encoder(amdgpu_crtc->encoder); | 2824 | to_amdgpu_encoder(amdgpu_crtc->encoder); |
2828 | int encoder_mode = | 2825 | int encoder_mode = |
@@ -2992,6 +2989,7 @@ static int dce_v11_0_early_init(void *handle) | |||
2992 | adev->mode_info.num_dig = 6; | 2989 | adev->mode_info.num_dig = 6; |
2993 | break; | 2990 | break; |
2994 | case CHIP_POLARIS11: | 2991 | case CHIP_POLARIS11: |
2992 | case CHIP_POLARIS12: | ||
2995 | adev->mode_info.num_hpd = 5; | 2993 | adev->mode_info.num_hpd = 5; |
2996 | adev->mode_info.num_dig = 5; | 2994 | adev->mode_info.num_dig = 5; |
2997 | break; | 2995 | break; |
@@ -3101,7 +3099,8 @@ static int dce_v11_0_hw_init(void *handle) | |||
3101 | amdgpu_atombios_crtc_powergate_init(adev); | 3099 | amdgpu_atombios_crtc_powergate_init(adev); |
3102 | amdgpu_atombios_encoder_init_dig(adev); | 3100 | amdgpu_atombios_encoder_init_dig(adev); |
3103 | if ((adev->asic_type == CHIP_POLARIS10) || | 3101 | if ((adev->asic_type == CHIP_POLARIS10) || |
3104 | (adev->asic_type == CHIP_POLARIS11)) { | 3102 | (adev->asic_type == CHIP_POLARIS11) || |
3103 | (adev->asic_type == CHIP_POLARIS12)) { | ||
3105 | amdgpu_atombios_crtc_set_dce_clock(adev, adev->clock.default_dispclk, | 3104 | amdgpu_atombios_crtc_set_dce_clock(adev, adev->clock.default_dispclk, |
3106 | DCE_CLOCK_TYPE_DISPCLK, ATOM_GCK_DFS); | 3105 | DCE_CLOCK_TYPE_DISPCLK, ATOM_GCK_DFS); |
3107 | amdgpu_atombios_crtc_set_dce_clock(adev, 0, | 3106 | amdgpu_atombios_crtc_set_dce_clock(adev, 0, |