All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon/kms/atom: bios scratch reg handling updates
@ 2012-02-13 13:59 alexdeucher
  2012-02-15 18:54 ` sylvain.bertrand
  0 siblings, 1 reply; 4+ messages in thread
From: alexdeucher @ 2012-02-13 13:59 UTC (permalink / raw)
  To: airlied, dri-devel; +Cc: Alex Deucher

From: Alex Deucher <alexander.deucher@amd.com>

- Add missing DFP6 connection state handling
- crtc routing bits not used on DCE4+

Noticed by sylware on phoronix.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/radeon_atombios.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index a9ce094..8577824 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -2981,6 +2981,20 @@ radeon_atombios_connected_scratch_regs(struct drm_connector *connector,
 			bios_6_scratch &= ~ATOM_S6_ACC_REQ_DFP5;
 		}
 	}
+	if ((radeon_encoder->devices & ATOM_DEVICE_DFP6_SUPPORT) &&
+	    (radeon_connector->devices & ATOM_DEVICE_DFP6_SUPPORT)) {
+		if (connected) {
+			DRM_DEBUG_KMS("DFP6 connected\n");
+			bios_0_scratch |= ATOM_S0_DFP6;
+			bios_3_scratch |= ATOM_S3_DFP6_ACTIVE;
+			bios_6_scratch |= ATOM_S6_ACC_REQ_DFP6;
+		} else {
+			DRM_DEBUG_KMS("DFP6 disconnected\n");
+			bios_0_scratch &= ~ATOM_S0_DFP6;
+			bios_3_scratch &= ~ATOM_S3_DFP6_ACTIVE;
+			bios_6_scratch &= ~ATOM_S6_ACC_REQ_DFP6;
+		}
+	}
 
 	if (rdev->family >= CHIP_R600) {
 		WREG32(R600_BIOS_0_SCRATCH, bios_0_scratch);
@@ -3001,6 +3015,9 @@ radeon_atombios_encoder_crtc_scratch_regs(struct drm_encoder *encoder, int crtc)
 	struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
 	uint32_t bios_3_scratch;
 
+	if (ASIC_IS_DCE4(rdev))
+		return;
+
 	if (rdev->family >= CHIP_R600)
 		bios_3_scratch = RREG32(R600_BIOS_3_SCRATCH);
 	else
-- 
1.7.7.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/radeon/kms/atom: bios scratch reg handling updates
  2012-02-13 13:59 [PATCH] drm/radeon/kms/atom: bios scratch reg handling updates alexdeucher
@ 2012-02-15 18:54 ` sylvain.bertrand
  2012-02-17 15:36   ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: sylvain.bertrand @ 2012-02-15 18:54 UTC (permalink / raw)
  To: alexdeucher; +Cc: Alex Deucher, dri-devel

If the atombios bits for dpms state are still used from dce4, we would miss explicitly 
the DFP6 device in radeon_atombios_encoder_dpms_scratch_regs, wouldn't
we?

-- 
Sylvain (or sylware on phoronix.com)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/radeon/kms/atom: bios scratch reg handling updates
  2012-02-15 18:54 ` sylvain.bertrand
@ 2012-02-17 15:36   ` Alex Deucher
  2012-02-20  2:42     ` [PATCH] drm/radeon/kms/atom: dpms bios scratch reg updates alexdeucher
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2012-02-17 15:36 UTC (permalink / raw)
  To: sylvain.bertrand; +Cc: Alex Deucher, dri-devel

On Wed, Feb 15, 2012 at 1:54 PM,  <sylvain.bertrand@gmail.com> wrote:
> If the atombios bits for dpms state are still used from dce4, we would miss explicitly
> the DFP6 device in radeon_atombios_encoder_dpms_scratch_regs, wouldn't
> we?

Yeah, we probably should.  I'll take a look when I get back to the office.

Alex

>
> --
> Sylvain (or sylware on phoronix.com)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] drm/radeon/kms/atom: dpms bios scratch reg updates
  2012-02-17 15:36   ` Alex Deucher
@ 2012-02-20  2:42     ` alexdeucher
  0 siblings, 0 replies; 4+ messages in thread
From: alexdeucher @ 2012-02-20  2:42 UTC (permalink / raw)
  To: airlied, dri-devel; +Cc: Alex Deucher

From: Alex Deucher <alexander.deucher@amd.com>

dpms bits not used on DCE4+

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/radeon_atombios.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index 8577824..361d56c 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -3070,6 +3070,9 @@ radeon_atombios_encoder_dpms_scratch_regs(struct drm_encoder *encoder, bool on)
 	struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
 	uint32_t bios_2_scratch;
 
+	if (ASIC_IS_DCE4(rdev))
+		return;
+
 	if (rdev->family >= CHIP_R600)
 		bios_2_scratch = RREG32(R600_BIOS_2_SCRATCH);
 	else
-- 
1.7.7.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-20  2:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13 13:59 [PATCH] drm/radeon/kms/atom: bios scratch reg handling updates alexdeucher
2012-02-15 18:54 ` sylvain.bertrand
2012-02-17 15:36   ` Alex Deucher
2012-02-20  2:42     ` [PATCH] drm/radeon/kms/atom: dpms bios scratch reg updates alexdeucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.