mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 17:43:59 +00:00
drm/radeon/kms: enable memory clock reading on legacy (V2)
V2: detect IGP cards (which don't have own memory) Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
c31ad97f18
commit
5ea597f376
@ -33,6 +33,7 @@
|
|||||||
*/
|
*/
|
||||||
uint32_t radeon_legacy_get_engine_clock(struct radeon_device *rdev);
|
uint32_t radeon_legacy_get_engine_clock(struct radeon_device *rdev);
|
||||||
void radeon_legacy_set_engine_clock(struct radeon_device *rdev, uint32_t eng_clock);
|
void radeon_legacy_set_engine_clock(struct radeon_device *rdev, uint32_t eng_clock);
|
||||||
|
uint32_t radeon_legacy_get_memory_clock(struct radeon_device *rdev);
|
||||||
void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable);
|
void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable);
|
||||||
|
|
||||||
uint32_t radeon_atom_get_engine_clock(struct radeon_device *rdev);
|
uint32_t radeon_atom_get_engine_clock(struct radeon_device *rdev);
|
||||||
@ -106,7 +107,7 @@ static struct radeon_asic r100_asic = {
|
|||||||
.copy = &r100_copy_blit,
|
.copy = &r100_copy_blit,
|
||||||
.get_engine_clock = &radeon_legacy_get_engine_clock,
|
.get_engine_clock = &radeon_legacy_get_engine_clock,
|
||||||
.set_engine_clock = &radeon_legacy_set_engine_clock,
|
.set_engine_clock = &radeon_legacy_set_engine_clock,
|
||||||
.get_memory_clock = NULL,
|
.get_memory_clock = &radeon_legacy_get_memory_clock,
|
||||||
.set_memory_clock = NULL,
|
.set_memory_clock = NULL,
|
||||||
.set_pcie_lanes = NULL,
|
.set_pcie_lanes = NULL,
|
||||||
.set_clock_gating = &radeon_legacy_set_clock_gating,
|
.set_clock_gating = &radeon_legacy_set_clock_gating,
|
||||||
@ -166,7 +167,7 @@ static struct radeon_asic r300_asic = {
|
|||||||
.copy = &r100_copy_blit,
|
.copy = &r100_copy_blit,
|
||||||
.get_engine_clock = &radeon_legacy_get_engine_clock,
|
.get_engine_clock = &radeon_legacy_get_engine_clock,
|
||||||
.set_engine_clock = &radeon_legacy_set_engine_clock,
|
.set_engine_clock = &radeon_legacy_set_engine_clock,
|
||||||
.get_memory_clock = NULL,
|
.get_memory_clock = &radeon_legacy_get_memory_clock,
|
||||||
.set_memory_clock = NULL,
|
.set_memory_clock = NULL,
|
||||||
.set_pcie_lanes = &rv370_set_pcie_lanes,
|
.set_pcie_lanes = &rv370_set_pcie_lanes,
|
||||||
.set_clock_gating = &radeon_legacy_set_clock_gating,
|
.set_clock_gating = &radeon_legacy_set_clock_gating,
|
||||||
@ -259,7 +260,7 @@ static struct radeon_asic rs400_asic = {
|
|||||||
.copy = &r100_copy_blit,
|
.copy = &r100_copy_blit,
|
||||||
.get_engine_clock = &radeon_legacy_get_engine_clock,
|
.get_engine_clock = &radeon_legacy_get_engine_clock,
|
||||||
.set_engine_clock = &radeon_legacy_set_engine_clock,
|
.set_engine_clock = &radeon_legacy_set_engine_clock,
|
||||||
.get_memory_clock = NULL,
|
.get_memory_clock = &radeon_legacy_get_memory_clock,
|
||||||
.set_memory_clock = NULL,
|
.set_memory_clock = NULL,
|
||||||
.set_pcie_lanes = NULL,
|
.set_pcie_lanes = NULL,
|
||||||
.set_clock_gating = &radeon_legacy_set_clock_gating,
|
.set_clock_gating = &radeon_legacy_set_clock_gating,
|
||||||
|
@ -62,7 +62,7 @@ uint32_t radeon_legacy_get_engine_clock(struct radeon_device *rdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 10 khz */
|
/* 10 khz */
|
||||||
static uint32_t radeon_legacy_get_memory_clock(struct radeon_device *rdev)
|
uint32_t radeon_legacy_get_memory_clock(struct radeon_device *rdev)
|
||||||
{
|
{
|
||||||
struct radeon_pll *mpll = &rdev->clock.mpll;
|
struct radeon_pll *mpll = &rdev->clock.mpll;
|
||||||
uint32_t fb_div, ref_div, post_div, mclk;
|
uint32_t fb_div, ref_div, post_div, mclk;
|
||||||
|
@ -391,6 +391,12 @@ int radeon_asic_init(struct radeon_device *rdev)
|
|||||||
/* FIXME: not supported yet */
|
/* FIXME: not supported yet */
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rdev->flags & RADEON_IS_IGP) {
|
||||||
|
rdev->asic->get_memory_clock = NULL;
|
||||||
|
rdev->asic->set_memory_clock = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user