From: Alex Deucher <alexdeucher@gmail.com>
To: airlied@gmail.com, dri-devel@lists.freedesktop.org
Subject: [PATCH 06/20] drm/radeon/kms: atom changes for DCE4.1 devices
Date: Mon, 22 Nov 2010 17:56:23 -0500 [thread overview]
Message-ID: <1290466597-30596-6-git-send-email-alexdeucher@gmail.com> (raw)
In-Reply-To: <1290466597-30596-1-git-send-email-alexdeucher@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
---
drivers/gpu/drm/radeon/radeon_asic.c | 4 +++-
drivers/gpu/drm/radeon/radeon_encoders.c | 25 +++++++++++++++++++++----
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index 64fb89e..bf7ec04 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -849,7 +849,9 @@ int radeon_asic_init(struct radeon_device *rdev)
if (rdev->flags & RADEON_SINGLE_CRTC)
rdev->num_crtc = 1;
else {
- if (ASIC_IS_DCE4(rdev))
+ if (ASIC_IS_DCE41(rdev))
+ rdev->num_crtc = 2;
+ else if (ASIC_IS_DCE4(rdev))
rdev->num_crtc = 6;
else
rdev->num_crtc = 2;
diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
index 041943d..806d552 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -713,7 +713,7 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
* DIG1/2 can drive UNIPHY0/1/2 link A or link B
*
* DCE 4.0
- * - 3 DIG transmitter blocks UNPHY0/1/2 (links A and B).
+ * - 3 DIG transmitter blocks UNIPHY0/1/2 (links A and B).
* Supports up to 6 digital outputs
* - 6 DIG encoder blocks.
* - DIG to PHY mapping is hardcoded
@@ -724,6 +724,12 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
* DIG5 drives UNIPHY2 link A, A+B
* DIG6 drives UNIPHY2 link B
*
+ * DCE 4.1
+ * - 3 DIG transmitter blocks UNIPHY0/1/2 (links A and B).
+ * Supports up to 6 digital outputs
+ * - 2 DIG encoder blocks.
+ * DIG1/2 can drive UNIPHY0/1/2 link A or link B
+ *
* Routing
* crtc -> dig encoder -> UNIPHY/LVTMA (1 or 2 links)
* Examples:
@@ -904,9 +910,15 @@ atombios_dig_transmitter_setup(struct drm_encoder *encoder, int action, uint8_t
else
args.v3.ucLaneNum = 4;
- if (dig->linkb) {
- args.v3.acConfig.ucLinkSel = 1;
- args.v3.acConfig.ucEncoderSel = 1;
+ if (ASIC_IS_DCE41(rdev)) {
+ args.v3.acConfig.ucEncoderSel = dig->dig_encoder;
+ if (dig->linkb)
+ args.v3.acConfig.ucLinkSel = 1;
+ } else {
+ if (dig->linkb) {
+ args.v3.acConfig.ucLinkSel = 1;
+ args.v3.acConfig.ucEncoderSel = 1;
+ }
}
/* Select the PLL for the PHY
@@ -1483,6 +1495,11 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder)
struct radeon_encoder_atom_dig *dig;
uint32_t dig_enc_in_use = 0;
+ /* on DCE41 and encoder can driver any phy so just crtc id */
+ if (ASIC_IS_DCE41(rdev)) {
+ return radeon_crtc->crtc_id;
+ }
+
if (ASIC_IS_DCE4(rdev)) {
dig = radeon_encoder->enc_priv;
switch (radeon_encoder->encoder_id) {
--
1.7.1.1
next prev parent reply other threads:[~2010-11-22 22:56 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 ` Alex Deucher [this message]
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 ` [PATCH 08/20] drm/radeon/kms: add support for ss overrides on Fusion APUs Alex Deucher
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-6-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