From: Alex Deucher <alexdeucher@gmail.com>
To: airlied@gmail.com, dri-devel@lists.freedesktop.org
Subject: [PATCH 08/20] drm/radeon/kms: add support for ss overrides on Fusion APUs
Date: Mon, 22 Nov 2010 17:56:25 -0500 [thread overview]
Message-ID: <1290466597-30596-8-git-send-email-alexdeucher@gmail.com> (raw)
In-Reply-To: <1290466597-30596-1-git-send-email-alexdeucher@gmail.com>
System specific spread spectrum overrides can be specified in
the integrated system info table for Fusion APUs. This adds
support for using those overrides.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
---
drivers/gpu/drm/radeon/radeon_atombios.c | 39 ++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 87ead09..4d37b2d 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -1321,6 +1321,43 @@ bool radeon_atombios_get_ppll_ss_info(struct radeon_device *rdev,
return false;
}
+static void radeon_atombios_get_igp_ss_overrides(struct radeon_device *rdev,
+ struct radeon_atom_ss *ss,
+ int id)
+{
+ struct radeon_mode_info *mode_info = &rdev->mode_info;
+ int index = GetIndexIntoMasterTable(DATA, IntegratedSystemInfo);
+ u16 data_offset, size;
+ struct _ATOM_INTEGRATED_SYSTEM_INFO_V6 *igp_info;
+ u8 frev, crev;
+ u16 percentage = 0, rate = 0;
+
+ /* get any igp specific overrides */
+ if (atom_parse_data_header(mode_info->atom_context, index, &size,
+ &frev, &crev, &data_offset)) {
+ igp_info = (struct _ATOM_INTEGRATED_SYSTEM_INFO_V6 *)
+ (mode_info->atom_context->bios + data_offset);
+ switch (id) {
+ case ASIC_INTERNAL_SS_ON_TMDS:
+ percentage = le16_to_cpu(igp_info->usDVISSPercentage);
+ rate = le16_to_cpu(igp_info->usDVISSpreadRateIn10Hz);
+ break;
+ case ASIC_INTERNAL_SS_ON_HDMI:
+ percentage = le16_to_cpu(igp_info->usHDMISSPercentage);
+ rate = le16_to_cpu(igp_info->usHDMISSpreadRateIn10Hz);
+ break;
+ case ASIC_INTERNAL_SS_ON_LVDS:
+ percentage = le16_to_cpu(igp_info->usLvdsSSPercentage);
+ rate = le16_to_cpu(igp_info->usLvdsSSpreadRateIn10Hz);
+ break;
+ }
+ if (percentage)
+ ss->percentage = percentage;
+ if (rate)
+ ss->rate = rate;
+ }
+}
+
union asic_ss_info {
struct _ATOM_ASIC_INTERNAL_SS_INFO info;
struct _ATOM_ASIC_INTERNAL_SS_INFO_V2 info_2;
@@ -1385,6 +1422,8 @@ bool radeon_atombios_get_asic_ss_info(struct radeon_device *rdev,
le16_to_cpu(ss_info->info_3.asSpreadSpectrum[i].usSpreadSpectrumPercentage);
ss->type = ss_info->info_3.asSpreadSpectrum[i].ucSpreadSpectrumMode;
ss->rate = le16_to_cpu(ss_info->info_3.asSpreadSpectrum[i].usSpreadRateIn10Hz);
+ if (rdev->flags & RADEON_IS_IGP)
+ radeon_atombios_get_igp_ss_overrides(rdev, ss, id);
return true;
}
}
--
1.7.1.1
next prev parent reply other threads:[~2010-11-22 22:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-22 22:56 [PATCH 01/20] drm/radeon/kms: setup mc chremap properly on r7xx/evergreen Alex Deucher
2010-11-22 22:56 ` [PATCH 02/20] drm/radeon/kms: upstream ObjectID.h updates Alex Deucher
2010-11-22 22:56 ` [PATCH 03/20] drm/radeon/kms: upstream atombios.h updates Alex Deucher
2010-11-22 22:56 ` [PATCH 04/20] drm/radeon/kms: upstream power table updates Alex Deucher
2010-11-22 22:56 ` [PATCH 05/20] drm/radeon/kms: add new family id for AMD Ontario APUs Alex Deucher
2010-11-22 22:56 ` [PATCH 06/20] drm/radeon/kms: atom changes for DCE4.1 devices Alex Deucher
2010-11-22 22:56 ` [PATCH 07/20] drm/radeon/kms: Add support for external encoders on fusion APUs Alex Deucher
2010-11-22 22:56 ` Alex Deucher [this message]
2010-11-22 22:56 ` [PATCH 09/20] drm/radeon/kms: move r7xx/evergreen to its own vram_gtt setup function Alex Deucher
2010-11-22 22:56 ` [PATCH 10/20] drm/radeon/kms: MC setup changes for fusion APUs Alex Deucher
2010-11-22 22:56 ` [PATCH 11/20] drm/radeon/kms: evergreen.c updates for fusion Alex Deucher
2010-11-22 22:56 ` [PATCH 12/20] drm/radeon/kms: fill in GPU init for AMD Ontario Fusion APUs Alex Deucher
2010-11-22 22:56 ` [PATCH 13/20] drm/radeon/kms: add radeon_asic struct for AMD Ontario fusion APUs Alex Deucher
2010-11-22 22:56 ` [PATCH 14/20] drm/radeon/kms: add Ontario APU ucode loading support Alex Deucher
2010-11-22 22:56 ` [PATCH 15/20] drm/radeon/kms: add thermal sensor support for fusion APUs Alex Deucher
2010-11-22 22:56 ` [PATCH 16/20] drm/radeon/kms: add bo blit support for Ontario " Alex Deucher
2010-11-22 22:56 ` [PATCH 17/20] drm/radeon/kms: refactor atombios power state fetching Alex Deucher
2010-11-22 22:56 ` [PATCH 18/20] drm/radeon/kms: add power table parsing support for Ontario fusion APUs Alex Deucher
2010-11-22 22:56 ` [PATCH 19/20] drm/radeon/kms: enable MSIs on " Alex Deucher
2010-11-22 22:56 ` [PATCH 20/20] drm/radeon/kms: add Ontario Fusion APU pci ids Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1290466597-30596-8-git-send-email-alexdeucher@gmail.com \
--to=alexdeucher@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox