diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/rs690.c')
-rw-r--r-- | drivers/gpu/drm/radeon/rs690.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c index f3a8c9344c64..6fbb874583f4 100644 --- a/drivers/gpu/drm/radeon/rs690.c +++ b/drivers/gpu/drm/radeon/rs690.c | |||
@@ -398,7 +398,9 @@ void rs690_bandwidth_update(struct radeon_device *rdev) | |||
398 | struct drm_display_mode *mode1 = NULL; | 398 | struct drm_display_mode *mode1 = NULL; |
399 | struct rs690_watermark wm0; | 399 | struct rs690_watermark wm0; |
400 | struct rs690_watermark wm1; | 400 | struct rs690_watermark wm1; |
401 | u32 tmp, d1mode_priority_a_cnt, d2mode_priority_a_cnt; | 401 | u32 tmp; |
402 | u32 d1mode_priority_a_cnt = S_006548_D1MODE_PRIORITY_A_OFF(1); | ||
403 | u32 d2mode_priority_a_cnt = S_006548_D1MODE_PRIORITY_A_OFF(1); | ||
402 | fixed20_12 priority_mark02, priority_mark12, fill_rate; | 404 | fixed20_12 priority_mark02, priority_mark12, fill_rate; |
403 | fixed20_12 a, b; | 405 | fixed20_12 a, b; |
404 | 406 | ||
@@ -495,10 +497,6 @@ void rs690_bandwidth_update(struct radeon_device *rdev) | |||
495 | d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); | 497 | d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); |
496 | d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); | 498 | d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); |
497 | } | 499 | } |
498 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); | ||
499 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); | ||
500 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); | ||
501 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); | ||
502 | } else if (mode0) { | 500 | } else if (mode0) { |
503 | if (dfixed_trunc(wm0.dbpp) > 64) | 501 | if (dfixed_trunc(wm0.dbpp) > 64) |
504 | a.full = dfixed_mul(wm0.dbpp, wm0.num_line_pair); | 502 | a.full = dfixed_mul(wm0.dbpp, wm0.num_line_pair); |
@@ -528,13 +526,7 @@ void rs690_bandwidth_update(struct radeon_device *rdev) | |||
528 | d1mode_priority_a_cnt = dfixed_trunc(priority_mark02); | 526 | d1mode_priority_a_cnt = dfixed_trunc(priority_mark02); |
529 | if (rdev->disp_priority == 2) | 527 | if (rdev->disp_priority == 2) |
530 | d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); | 528 | d1mode_priority_a_cnt |= S_006548_D1MODE_PRIORITY_A_ALWAYS_ON(1); |
531 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); | 529 | } else if (mode1) { |
532 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); | ||
533 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, | ||
534 | S_006D48_D2MODE_PRIORITY_A_OFF(1)); | ||
535 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, | ||
536 | S_006D4C_D2MODE_PRIORITY_B_OFF(1)); | ||
537 | } else { | ||
538 | if (dfixed_trunc(wm1.dbpp) > 64) | 530 | if (dfixed_trunc(wm1.dbpp) > 64) |
539 | a.full = dfixed_mul(wm1.dbpp, wm1.num_line_pair); | 531 | a.full = dfixed_mul(wm1.dbpp, wm1.num_line_pair); |
540 | else | 532 | else |
@@ -563,13 +555,12 @@ void rs690_bandwidth_update(struct radeon_device *rdev) | |||
563 | d2mode_priority_a_cnt = dfixed_trunc(priority_mark12); | 555 | d2mode_priority_a_cnt = dfixed_trunc(priority_mark12); |
564 | if (rdev->disp_priority == 2) | 556 | if (rdev->disp_priority == 2) |
565 | d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); | 557 | d2mode_priority_a_cnt |= S_006D48_D2MODE_PRIORITY_A_ALWAYS_ON(1); |
566 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, | ||
567 | S_006548_D1MODE_PRIORITY_A_OFF(1)); | ||
568 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, | ||
569 | S_00654C_D1MODE_PRIORITY_B_OFF(1)); | ||
570 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); | ||
571 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); | ||
572 | } | 558 | } |
559 | |||
560 | WREG32(R_006548_D1MODE_PRIORITY_A_CNT, d1mode_priority_a_cnt); | ||
561 | WREG32(R_00654C_D1MODE_PRIORITY_B_CNT, d1mode_priority_a_cnt); | ||
562 | WREG32(R_006D48_D2MODE_PRIORITY_A_CNT, d2mode_priority_a_cnt); | ||
563 | WREG32(R_006D4C_D2MODE_PRIORITY_B_CNT, d2mode_priority_a_cnt); | ||
573 | } | 564 | } |
574 | 565 | ||
575 | uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg) | 566 | uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg) |