drm/radeon/kms: display watermark fixes
- rs780/880 were using the wrong bandwidth functions - convert r1xx-r4xx to use the same pm sclk/mclk structs as r5xx+ - move bandwidth setup to a common function Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:

committed by
Dave Airlie

parent
9e7b414edb
commit
f47299c55a
@@ -241,6 +241,36 @@ bool radeon_card_posted(struct radeon_device *rdev)
|
||||
|
||||
}
|
||||
|
||||
void radeon_update_bandwidth_info(struct radeon_device *rdev)
|
||||
{
|
||||
fixed20_12 a;
|
||||
u32 sclk, mclk;
|
||||
|
||||
if (rdev->flags & RADEON_IS_IGP) {
|
||||
sclk = radeon_get_engine_clock(rdev);
|
||||
mclk = rdev->clock.default_mclk;
|
||||
|
||||
a.full = rfixed_const(100);
|
||||
rdev->pm.sclk.full = rfixed_const(sclk);
|
||||
rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a);
|
||||
rdev->pm.mclk.full = rfixed_const(mclk);
|
||||
rdev->pm.mclk.full = rfixed_div(rdev->pm.mclk, a);
|
||||
|
||||
a.full = rfixed_const(16);
|
||||
/* core_bandwidth = sclk(Mhz) * 16 */
|
||||
rdev->pm.core_bandwidth.full = rfixed_div(rdev->pm.sclk, a);
|
||||
} else {
|
||||
sclk = radeon_get_engine_clock(rdev);
|
||||
mclk = radeon_get_memory_clock(rdev);
|
||||
|
||||
a.full = rfixed_const(100);
|
||||
rdev->pm.sclk.full = rfixed_const(sclk);
|
||||
rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a);
|
||||
rdev->pm.mclk.full = rfixed_const(mclk);
|
||||
rdev->pm.mclk.full = rfixed_div(rdev->pm.mclk, a);
|
||||
}
|
||||
}
|
||||
|
||||
bool radeon_boot_test_post_card(struct radeon_device *rdev)
|
||||
{
|
||||
if (radeon_card_posted(rdev))
|
||||
|
Reference in New Issue
Block a user