Skip to contentSkip to conversation

drm/radeon/kms: define TMDS/LVTM HDMI enabling bits

PATCH In review Rafał Miłecki 2 participants 2 messages Dec 24, 2011 – Dec 27, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: define TMDS/LVTM HDMI enabling bits

The names has been taken from free M76 specs.

---
 drivers/gpu/drm/radeon/r500_reg.h  |    2 ++
 drivers/gpu/drm/radeon/r600_hdmi.c |   12 ++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/radeon/r500_reg.h +2 -0
index fc43705..3bd8f1b 100644
@@ -573,6 +573,7 @@
 
 #define AVIVO_TMDSA_CNTL                    0x7880
 #   define AVIVO_TMDSA_CNTL_ENABLE               (1 << 0)
+#   define AVIVO_TMDSA_CNTL_HDMI_EN              (1 << 2)
 #   define AVIVO_TMDSA_CNTL_HPD_MASK             (1 << 4)
 #   define AVIVO_TMDSA_CNTL_HPD_SELECT           (1 << 8)
 #   define AVIVO_TMDSA_CNTL_SYNC_PHASE           (1 << 12)
@@ -633,6 +634,7 @@
 
 #define AVIVO_LVTMA_CNTL					0x7a80
 #   define AVIVO_LVTMA_CNTL_ENABLE               (1 << 0)
+#   define AVIVO_LVTMA_CNTL_HDMI_EN              (1 << 2)
 #   define AVIVO_LVTMA_CNTL_HPD_MASK             (1 << 4)
 #   define AVIVO_LVTMA_CNTL_HPD_SELECT           (1 << 8)
 #   define AVIVO_LVTMA_CNTL_SYNC_PHASE           (1 << 12)
drivers/gpu/drm/radeon/r600_hdmi.c +8 -4
index 2c70a85..0b59206 100644
@@ -533,11 +533,13 @@ void r600_hdmi_enable(struct drm_encoder *encoder)
 	} else if (rdev->family >= CHIP_R600) {
 		switch (radeon_encoder->encoder_id) {
 		case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
-			WREG32_P(AVIVO_TMDSA_CNTL, 0x4, ~0x4);
+			WREG32_P(AVIVO_TMDSA_CNTL, AVIVO_TMDSA_CNTL_HDMI_EN,
+				 ~AVIVO_TMDSA_CNTL_HDMI_EN);
 			WREG32(offset + R600_HDMI_ENABLE, 0x101);
 			break;
 		case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
-			WREG32_P(AVIVO_LVTMA_CNTL, 0x4, ~0x4);
+			WREG32_P(AVIVO_LVTMA_CNTL, AVIVO_LVTMA_CNTL_HDMI_EN,
+				 ~AVIVO_LVTMA_CNTL_HDMI_EN);
 			WREG32(offset + R600_HDMI_ENABLE, 0x105);
 			break;
 		default:
@@ -603,11 +605,13 @@ void r600_hdmi_disable(struct drm_encoder *encoder)
 	} else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) {
 		switch (radeon_encoder->encoder_id) {
 		case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
-			WREG32_P(AVIVO_TMDSA_CNTL, 0, ~0x4);
+			WREG32_P(AVIVO_TMDSA_CNTL, 0,
+				 ~AVIVO_TMDSA_CNTL_HDMI_EN);
 			WREG32(offset + R600_HDMI_ENABLE, 0);
 			break;
 		case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
-			WREG32_P(AVIVO_LVTMA_CNTL, 0, ~0x4);
+			WREG32_P(AVIVO_LVTMA_CNTL, 0,
+				 ~AVIVO_LVTMA_CNTL_HDMI_EN);
 			WREG32(offset + R600_HDMI_ENABLE, 0);
 			break;
 		default:
Signature · 6 lines
1.7.7

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw

2011/12/24 Rafał Miłecki <[email protected]>:

Quoted 3 lines

The names has been taken from free M76 specs.

Quoted 55 lines

---
 drivers/gpu/drm/radeon/r500_reg.h  |    2 ++ drivers/gpu/drm/radeon/r600_hdmi.c |   12 ++++++++----

 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/radeon/r500_reg.h +2 -0
index fc43705..3bd8f1b 100644
@@ -573,6 +573,7 @@
 
  #define AVIVO_TMDSA_CNTL                    0x7880
  #   define AVIVO_TMDSA_CNTL_ENABLE               (1 << 0)
+#   define AVIVO_TMDSA_CNTL_HDMI_EN              (1 << 2)
  #   define AVIVO_TMDSA_CNTL_HPD_MASK             (1 << 4)
  #   define AVIVO_TMDSA_CNTL_HPD_SELECT           (1 << 8)
  #   define AVIVO_TMDSA_CNTL_SYNC_PHASE           (1 << 12)
@@ -633,6 +634,7 @@
 
  #define AVIVO_LVTMA_CNTL                                       0x7a80
  #   define AVIVO_LVTMA_CNTL_ENABLE               (1 << 0)
+#   define AVIVO_LVTMA_CNTL_HDMI_EN              (1 << 2)
  #   define AVIVO_LVTMA_CNTL_HPD_MASK             (1 << 4)
  #   define AVIVO_LVTMA_CNTL_HPD_SELECT           (1 << 8)
  #   define AVIVO_LVTMA_CNTL_SYNC_PHASE           (1 << 12)
drivers/gpu/drm/radeon/r600_hdmi.c +0 -0
index 2c70a85..0b59206 100644
@@ -533,11 +533,13 @@ void r600_hdmi_enable(struct drm_encoder *encoder)
        } else if (rdev->family >= CHIP_R600) {
                switch (radeon_encoder->encoder_id) {

               case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
-                       WREG32_P(AVIVO_TMDSA_CNTL, 0x4, ~0x4);
+                       WREG32_P(AVIVO_TMDSA_CNTL, AVIVO_TMDSA_CNTL_HDMI_EN,
+                                ~AVIVO_TMDSA_CNTL_HDMI_EN); WREG32(offset + R600_HDMI_ENABLE, 0x101); break;
               case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
-                       WREG32_P(AVIVO_LVTMA_CNTL, 0x4, ~0x4);
+                       WREG32_P(AVIVO_LVTMA_CNTL, AVIVO_LVTMA_CNTL_HDMI_EN,
+                                ~AVIVO_LVTMA_CNTL_HDMI_EN); WREG32(offset + R600_HDMI_ENABLE, 0x105); break;
               default:

drivers/gpu/drm/radeon/r600_hdmi.c +0 -0
@@ -603,11 +605,13 @@ void r600_hdmi_disable(struct drm_encoder *encoder)
        } else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) {
                switch (radeon_encoder->encoder_id) {

               case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1:
-                       WREG32_P(AVIVO_TMDSA_CNTL, 0, ~0x4);
+                       WREG32_P(AVIVO_TMDSA_CNTL, 0,
+                                ~AVIVO_TMDSA_CNTL_HDMI_EN); WREG32(offset + R600_HDMI_ENABLE, 0); break;
               case ENCODER_OBJECT_ID_INTERNAL_LVTM1:

Quoted 9 lines

-                       WREG32_P(AVIVO_LVTMA_CNTL, 0, ~0x4);
+                       WREG32_P(AVIVO_LVTMA_CNTL, 0,
+                                ~AVIVO_LVTMA_CNTL_HDMI_EN); WREG32(offset + R600_HDMI_ENABLE, 0); break;
               default:
--
1.7.7

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel