Updated from Linux LTS 3.10.21 to 3.10.22
This commit is contained in:
@@ -1683,7 +1683,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc)
|
||||
if (pll != ATOM_PPLL_INVALID)
|
||||
return pll;
|
||||
}
|
||||
} else {
|
||||
} else if (!ASIC_IS_DCE41(rdev)) { /* Don't share PLLs on DCE4.1 chips */
|
||||
/* use the same PPLL for all monitors with the same clock */
|
||||
pll = radeon_get_shared_nondp_ppll(crtc);
|
||||
if (pll != ATOM_PPLL_INVALID)
|
||||
|
||||
@@ -219,8 +219,7 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode
|
||||
/* fglrx clears sth in AFMT_AUDIO_PACKET_CONTROL2 here */
|
||||
|
||||
WREG32(HDMI_ACR_PACKET_CONTROL + offset,
|
||||
HDMI_ACR_AUTO_SEND | /* allow hw to sent ACR packets when required */
|
||||
HDMI_ACR_SOURCE); /* select SW CTS value */
|
||||
HDMI_ACR_AUTO_SEND); /* allow hw to sent ACR packets when required */
|
||||
|
||||
evergreen_hdmi_update_ACR(encoder, mode->clock);
|
||||
|
||||
|
||||
@@ -57,15 +57,15 @@ enum r600_hdmi_iec_status_bits {
|
||||
static const struct radeon_hdmi_acr r600_hdmi_predefined_acr[] = {
|
||||
/* 32kHz 44.1kHz 48kHz */
|
||||
/* Clock N CTS N CTS N CTS */
|
||||
{ 25174, 4576, 28125, 7007, 31250, 6864, 28125 }, /* 25,20/1.001 MHz */
|
||||
{ 25175, 4576, 28125, 7007, 31250, 6864, 28125 }, /* 25,20/1.001 MHz */
|
||||
{ 25200, 4096, 25200, 6272, 28000, 6144, 25200 }, /* 25.20 MHz */
|
||||
{ 27000, 4096, 27000, 6272, 30000, 6144, 27000 }, /* 27.00 MHz */
|
||||
{ 27027, 4096, 27027, 6272, 30030, 6144, 27027 }, /* 27.00*1.001 MHz */
|
||||
{ 54000, 4096, 54000, 6272, 60000, 6144, 54000 }, /* 54.00 MHz */
|
||||
{ 54054, 4096, 54054, 6272, 60060, 6144, 54054 }, /* 54.00*1.001 MHz */
|
||||
{ 74175, 11648, 210937, 17836, 234375, 11648, 140625 }, /* 74.25/1.001 MHz */
|
||||
{ 74176, 11648, 210937, 17836, 234375, 11648, 140625 }, /* 74.25/1.001 MHz */
|
||||
{ 74250, 4096, 74250, 6272, 82500, 6144, 74250 }, /* 74.25 MHz */
|
||||
{ 148351, 11648, 421875, 8918, 234375, 5824, 140625 }, /* 148.50/1.001 MHz */
|
||||
{ 148352, 11648, 421875, 8918, 234375, 5824, 140625 }, /* 148.50/1.001 MHz */
|
||||
{ 148500, 4096, 148500, 6272, 165000, 6144, 148500 }, /* 148.50 MHz */
|
||||
{ 0, 4096, 0, 6272, 0, 6144, 0 } /* Other */
|
||||
};
|
||||
@@ -75,8 +75,15 @@ static const struct radeon_hdmi_acr r600_hdmi_predefined_acr[] = {
|
||||
*/
|
||||
static void r600_hdmi_calc_cts(uint32_t clock, int *CTS, int N, int freq)
|
||||
{
|
||||
if (*CTS == 0)
|
||||
*CTS = clock * N / (128 * freq) * 1000;
|
||||
u64 n;
|
||||
u32 d;
|
||||
|
||||
if (*CTS == 0) {
|
||||
n = (u64)clock * (u64)N * 1000ULL;
|
||||
d = 128 * freq;
|
||||
do_div(n, d);
|
||||
*CTS = n;
|
||||
}
|
||||
DRM_DEBUG("Using ACR timing N=%d CTS=%d for frequency %d\n",
|
||||
N, *CTS, freq);
|
||||
}
|
||||
@@ -313,8 +320,8 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod
|
||||
}
|
||||
|
||||
WREG32(HDMI0_ACR_PACKET_CONTROL + offset,
|
||||
HDMI0_ACR_AUTO_SEND | /* allow hw to sent ACR packets when required */
|
||||
HDMI0_ACR_SOURCE); /* select SW CTS value */
|
||||
HDMI0_ACR_SOURCE | /* select SW CTS value - XXX verify that hw CTS works on all families */
|
||||
HDMI0_ACR_AUTO_SEND); /* allow hw to sent ACR packets when required */
|
||||
|
||||
WREG32(HDMI0_VBI_PACKET_CONTROL + offset,
|
||||
HDMI0_NULL_SEND | /* send null packets when required */
|
||||
|
||||
@@ -1157,6 +1157,8 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev,
|
||||
return -ENOMEM;
|
||||
|
||||
r = radeon_ib_get(rdev, ridx, &ib, NULL, ndw * 4);
|
||||
if (r)
|
||||
return r;
|
||||
ib.length_dw = 0;
|
||||
|
||||
r = radeon_vm_update_pdes(rdev, vm, &ib, bo_va->soffset, bo_va->eoffset);
|
||||
|
||||
@@ -422,6 +422,7 @@ int radeon_crtc_do_set_base(struct drm_crtc *crtc,
|
||||
/* Pin framebuffer & get tilling informations */
|
||||
obj = radeon_fb->obj;
|
||||
rbo = gem_to_radeon_bo(obj);
|
||||
retry:
|
||||
r = radeon_bo_reserve(rbo, false);
|
||||
if (unlikely(r != 0))
|
||||
return r;
|
||||
@@ -430,6 +431,33 @@ int radeon_crtc_do_set_base(struct drm_crtc *crtc,
|
||||
&base);
|
||||
if (unlikely(r != 0)) {
|
||||
radeon_bo_unreserve(rbo);
|
||||
|
||||
/* On old GPU like RN50 with little vram pining can fails because
|
||||
* current fb is taking all space needed. So instead of unpining
|
||||
* the old buffer after pining the new one, first unpin old one
|
||||
* and then retry pining new one.
|
||||
*
|
||||
* As only master can set mode only master can pin and it is
|
||||
* unlikely the master client will race with itself especialy
|
||||
* on those old gpu with single crtc.
|
||||
*
|
||||
* We don't shutdown the display controller because new buffer
|
||||
* will end up in same spot.
|
||||
*/
|
||||
if (!atomic && fb && fb != crtc->fb) {
|
||||
struct radeon_bo *old_rbo;
|
||||
unsigned long nsize, osize;
|
||||
|
||||
old_rbo = gem_to_radeon_bo(to_radeon_framebuffer(fb)->obj);
|
||||
osize = radeon_bo_size(old_rbo);
|
||||
nsize = radeon_bo_size(rbo);
|
||||
if (nsize <= osize && !radeon_bo_reserve(old_rbo, false)) {
|
||||
radeon_bo_unpin(old_rbo);
|
||||
radeon_bo_unreserve(old_rbo);
|
||||
fb = NULL;
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
radeon_bo_get_tiling_flags(rbo, &tiling_flags, NULL);
|
||||
|
||||
@@ -242,6 +242,8 @@ void radeon_uvd_free_handles(struct radeon_device *rdev, struct drm_file *filp)
|
||||
if (handle != 0 && rdev->uvd.filp[i] == filp) {
|
||||
struct radeon_fence *fence;
|
||||
|
||||
radeon_uvd_note_usage(rdev);
|
||||
|
||||
r = radeon_uvd_get_destroy_msg(rdev,
|
||||
R600_RING_TYPE_UVD_INDEX, handle, &fence);
|
||||
if (r) {
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
#define NOOFGROUPS_SHIFT 12
|
||||
#define NOOFGROUPS_MASK 0x00001000
|
||||
|
||||
#define MC_SEQ_TRAIN_WAKEUP_CNTL 0x2808
|
||||
#define MC_SEQ_TRAIN_WAKEUP_CNTL 0x28e8
|
||||
#define TRAIN_DONE_D0 (1 << 30)
|
||||
#define TRAIN_DONE_D1 (1 << 31)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user