Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329575
b: refs/heads/master
c: 9642ac0
h: refs/heads/master
i:
  329573: af82668
  329571: 8332dd8
  329567: 7765a22
v: v3
  • Loading branch information
Alex Deucher committed Sep 20, 2012
1 parent 9f1110c commit 0cbd4a6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5df3196bac972138fa62ea17ed036161ae710062
refs/heads/master: 9642ac0e645198b62f99279704e829a286f58d96
27 changes: 14 additions & 13 deletions trunk/drivers/gpu/drm/radeon/atombios_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,29 +1547,28 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc)
{
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
struct drm_device *dev = crtc->dev;
struct radeon_encoder *radeon_encoder =
to_radeon_encoder(radeon_crtc->encoder);
struct drm_encoder *test_encoder;
struct drm_crtc *test_crtc;
struct radeon_crtc *test_radeon_crtc;
struct radeon_encoder *test_radeon_encoder;
u32 target_clock, test_clock;
u32 adjusted_clock, test_adjusted_clock;

if (radeon_encoder->native_mode.clock)
target_clock = radeon_encoder->native_mode.clock;
else
target_clock = crtc->mode.clock;
adjusted_clock = radeon_crtc->adjusted_clock;

if (adjusted_clock == 0)
return ATOM_PPLL_INVALID;

list_for_each_entry(test_encoder, &dev->mode_config.encoder_list, head) {
if (test_encoder->crtc && (test_encoder->crtc != crtc)) {
if (!ENCODER_MODE_IS_DP(atombios_get_encoder_mode(test_encoder))) {
test_radeon_encoder = to_radeon_encoder(test_encoder);
test_radeon_crtc = to_radeon_crtc(test_encoder->crtc);
test_crtc = test_encoder->crtc;
test_radeon_crtc = to_radeon_crtc(test_crtc);
/* for non-DP check the clock */
if (test_radeon_encoder->native_mode.clock)
test_clock = test_radeon_encoder->native_mode.clock;
else
test_clock = test_encoder->crtc->mode.clock;
if ((target_clock == test_clock) &&
test_adjusted_clock = test_radeon_crtc->adjusted_clock;
if ((crtc->mode.clock == test_crtc->mode.clock) &&
(adjusted_clock == test_adjusted_clock) &&
(radeon_crtc->ss_enabled == test_radeon_crtc->ss_enabled) &&
(test_radeon_crtc->pll_id != ATOM_PPLL_INVALID))
return test_radeon_crtc->pll_id;
}
Expand Down Expand Up @@ -1873,6 +1872,7 @@ static void atombios_crtc_disable(struct drm_crtc *crtc)
}
done:
radeon_crtc->pll_id = ATOM_PPLL_INVALID;
radeon_crtc->adjusted_clock = 0;
radeon_crtc->encoder = NULL;
}

Expand Down Expand Up @@ -1923,6 +1923,7 @@ void radeon_atombios_init_crtc(struct drm_device *dev,
radeon_crtc->crtc_offset = 0;
}
radeon_crtc->pll_id = ATOM_PPLL_INVALID;
radeon_crtc->adjusted_clock = 0;
radeon_crtc->encoder = NULL;
drm_crtc_helper_add(&radeon_crtc->base, &atombios_helper_funcs);
}

0 comments on commit 0cbd4a6

Please sign in to comment.