[Openchrome-devel] drm-openchrome: 4 commits - drivers/gpu/drm

Kevin Brace kevinbrace at kemper.freedesktop.org
Tue Jul 4 06:30:13 UTC 2017


 drivers/gpu/drm/via/via_drv.h |    4 +--
 drivers/gpu/drm/via/via_fp.c  |   54 ++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 54 insertions(+), 4 deletions(-)

New commits:
commit ca2df04f390a7877ec8fe8150743c00795431add
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Jul 4 01:26:25 2017 -0500

    Version bumped to 3.0.37
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_drv.h b/drivers/gpu/drm/via/via_drv.h
index 9c7cbd85e0c..6704b382f80 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -30,11 +30,11 @@
 #define DRIVER_AUTHOR       "The OpenChrome Project"
 #define DRIVER_NAME         "via"
 #define DRIVER_DESC         "OpenChrome DRM for VIA Technologies Chrome IGP"
-#define DRIVER_DATE         "20170629"
+#define DRIVER_DATE         "20170704"
 
 #define DRIVER_MAJOR		3
 #define DRIVER_MINOR		0
-#define DRIVER_PATCHLEVEL	36
+#define DRIVER_PATCHLEVEL	37
 
 #include <linux/module.h>
 
commit 685738b467ddd825462e954f3d134c19b3fa04f0
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Jul 4 01:25:13 2017 -0500

    Now actively controlling FP I/O state from via_fp_dpms
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_fp.c b/drivers/gpu/drm/via/via_fp.c
index 98896f8fec3..b7e90b8ac0d 100644
--- a/drivers/gpu/drm/via/via_fp.c
+++ b/drivers/gpu/drm/via/via_fp.c
@@ -328,6 +328,7 @@ via_fp_display_source(struct via_device *dev_priv, u32 di_port, int index)
 static void
 via_fp_dpms(struct drm_encoder *encoder, int mode)
 {
+	struct via_encoder *enc = container_of(encoder, struct via_encoder, base);
 	struct via_device *dev_priv = encoder->dev->dev_private;
 	struct drm_device *dev = encoder->dev;
 	struct via_crtc *iga = NULL;
@@ -357,12 +358,14 @@ via_fp_dpms(struct drm_encoder *encoder, int mode)
 			svga_wseq_mask(VGABASE, 0x1E, BIT(3), BIT(3));
 		}
 		via_enable_internal_lvds(encoder);
+		via_fp_io_pad_state(dev_priv, enc->di_port, true);
 		break;
 
 	case DRM_MODE_DPMS_STANDBY:
 	case DRM_MODE_DPMS_SUSPEND:
 	case DRM_MODE_DPMS_OFF:
 		via_disable_internal_lvds(encoder);
+		via_fp_io_pad_state(dev_priv, enc->di_port, false);
 		break;
 	}
 }
commit 9bf17e465982450b2eaf0f4813210a442e6c9fc0
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Jul 4 00:34:23 2017 -0500

    Added via_fp_io_pad_state
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_fp.c b/drivers/gpu/drm/via/via_fp.c
index 9714bddac40..98896f8fec3 100644
--- a/drivers/gpu/drm/via/via_fp.c
+++ b/drivers/gpu/drm/via/via_fp.c
@@ -228,6 +228,53 @@ via_disable_internal_lvds(struct drm_encoder *encoder)
 }
 
 /*
+ * Sets flat panel I/O pad state.
+ */
+static void
+via_fp_io_pad_state(struct via_device *dev_priv, u32 di_port, bool io_pad_on)
+{
+	DRM_DEBUG_KMS("Entered via_fp_io_pad_state.\n");
+
+	switch(di_port) {
+	case VIA_DI_PORT_DVP0:
+		via_dvp0_set_io_pad_state(VGABASE, io_pad_on ? 0x03 : 0x00);
+		break;
+	case VIA_DI_PORT_DVP1:
+		via_dvp1_set_io_pad_state(VGABASE, io_pad_on ? 0x03 : 0x00);
+		break;
+	case VIA_DI_PORT_FPDPLOW:
+		via_fpdp_low_set_io_pad_state(VGABASE, io_pad_on ? 0x03 : 0x00);
+		break;
+	case VIA_DI_PORT_FPDPHIGH:
+		via_fpdp_high_set_io_pad_state(VGABASE, io_pad_on ? 0x03 : 0x00);
+		break;
+	case (VIA_DI_PORT_FPDPLOW |
+	      VIA_DI_PORT_FPDPHIGH):
+		via_fpdp_low_set_io_pad_state(VGABASE, io_pad_on ? 0x03 : 0x00);
+		via_fpdp_high_set_io_pad_state(VGABASE, io_pad_on ? 0x03 : 0x00);
+		break;
+	case VIA_DI_PORT_LVDS1:
+		via_lvds1_set_io_pad_setting(VGABASE, io_pad_on ? 0x03 : 0x00);
+		break;
+	case VIA_DI_PORT_LVDS2:
+		via_lvds2_set_io_pad_setting(VGABASE, io_pad_on ? 0x03 : 0x00);
+		break;
+	case (VIA_DI_PORT_LVDS1 |
+	      VIA_DI_PORT_LVDS2):
+		via_lvds1_set_io_pad_setting(VGABASE, io_pad_on ? 0x03 : 0x00);
+		via_lvds2_set_io_pad_setting(VGABASE, io_pad_on ? 0x03 : 0x00);
+		break;
+	default:
+		break;
+	}
+
+	DRM_DEBUG_KMS("FP I/O Pad: %s\n", io_pad_on ? "On": "Off");
+
+	DRM_DEBUG_KMS("Exiting via_fp_io_pad_state.\n");
+}
+
+
+/*
  * Sets flat panel display source.
  */
 static void
commit ddf727fddb2a6f12aa7fc4dd541bc3ec2190e2b7
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Jul 3 23:46:40 2017 -0500

    Rename via_lvds_dpms to via_fp_dpms
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_fp.c b/drivers/gpu/drm/via/via_fp.c
index be8d621fd4a..9714bddac40 100644
--- a/drivers/gpu/drm/via/via_fp.c
+++ b/drivers/gpu/drm/via/via_fp.c
@@ -279,7 +279,7 @@ via_fp_display_source(struct via_device *dev_priv, u32 di_port, int index)
 }
 
 static void
-via_lvds_dpms(struct drm_encoder *encoder, int mode)
+via_fp_dpms(struct drm_encoder *encoder, int mode)
 {
 	struct via_device *dev_priv = encoder->dev->dev_private;
 	struct drm_device *dev = encoder->dev;
@@ -386,7 +386,7 @@ via_lvds_mode_fixup(struct drm_encoder *encoder,
 }
 
 const struct drm_encoder_helper_funcs via_lvds_helper_funcs = {
-	.dpms = via_lvds_dpms,
+	.dpms = via_fp_dpms,
 	.mode_fixup = via_lvds_mode_fixup,
 	.mode_set = via_set_sync_polarity,
 	.prepare = via_encoder_prepare,


More information about the Openchrome-devel mailing list