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

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat Apr 8 02:23:23 UTC 2017


 drivers/gpu/drm/via/crtc_hw.h    |  128 +++++++++++++++++++++------------------
 drivers/gpu/drm/via/via_analog.c |  105 ++++++++++++++++++-------------
 drivers/gpu/drm/via/via_drv.h    |    4 -
 3 files changed, 135 insertions(+), 102 deletions(-)

New commits:
commit 258049455c0fc4e26eb7abb01bbe1915ba30b604
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Apr 7 19:22:55 2017 -0700

    Version bumped to 3.0.28
    
    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 4cd3b54d9a1..e29dda07229 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         "20170406"
+#define DRIVER_DATE         "20170407"
 
 #define DRIVER_MAJOR		3
 #define DRIVER_MINOR		0
-#define DRIVER_PATCHLEVEL	27
+#define DRIVER_PATCHLEVEL	28
 
 #include <linux/module.h>
 
commit 251511673a88ae892f6b5f79375263fe96f3f4a2
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Apr 7 19:13:07 2017 -0700

    Making via_analog_mode_set to set display source
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_analog.c b/drivers/gpu/drm/via/via_analog.c
index cda7febf8dd..57261702016 100644
--- a/drivers/gpu/drm/via/via_analog.c
+++ b/drivers/gpu/drm/via/via_analog.c
@@ -139,10 +139,12 @@ via_analog_mode_set(struct drm_encoder *encoder,
 			struct drm_display_mode *adjusted_mode)
 {
 	struct via_device *dev_priv = encoder->dev->dev_private;
+	struct via_crtc *iga = container_of(encoder->crtc, struct via_crtc, base);
 
 	DRM_DEBUG_KMS("Entered via_analog_mode_set.\n");
 
 	viaAnalogSyncPolarity(dev_priv, adjusted_mode->flags);
+	viaAnalogDisplaySource(dev_priv, iga->index ? 0x01 : 0x00);
 
 	DRM_DEBUG_KMS("Exiting via_analog_mode_set.\n");
 }
commit 572f2cc0044f3bc6cee86718516871e06daf279e
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Apr 7 19:03:08 2017 -0700

    Added viaAnalogDisplaySource
    
    This function was added to via_analog.c.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_analog.c b/drivers/gpu/drm/via/via_analog.c
index a17b7177255..cda7febf8dd 100644
--- a/drivers/gpu/drm/via/via_analog.c
+++ b/drivers/gpu/drm/via/via_analog.c
@@ -69,6 +69,21 @@ viaAnalogSyncPolarity(struct via_device *dev_priv, unsigned int flags)
 }
 
 /*
+ * Sets analog (VGA) display source.
+ */
+static void
+viaAnalogDisplaySource(struct via_device *dev_priv, u8 displaySource)
+{
+	DRM_DEBUG_KMS("Entered viaAnalogDisplaySource.\n");
+
+	viaAnalogSetDisplaySource(VGABASE, displaySource);
+	DRM_INFO("Analog (VGA) Display Source: IGA%d\n",
+			(displaySource & 0x01) + 1);
+
+	DRM_DEBUG_KMS("Exiting viaAnalogDisplaySource.\n");
+}
+
+/*
  * Routines for controlling stuff on the analog port
  */
 static const struct drm_encoder_funcs via_dac_enc_funcs = {
commit cc4d84aaa7514e7a35cb6c0e870c8564292b7679
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Apr 7 18:55:27 2017 -0700

    Added viaAnalogSetDisplaySource
    
    This inline function was added to crtc_hw.h.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/crtc_hw.h b/drivers/gpu/drm/via/crtc_hw.h
index 38bce10b103..07a7cd9dac3 100644
--- a/drivers/gpu/drm/via/crtc_hw.h
+++ b/drivers/gpu/drm/via/crtc_hw.h
@@ -122,6 +122,21 @@ viaAnalogSetSyncPolarity(void __iomem *regs, u8 syncPolarity)
 }
 
 /*
+ * Sets analog (VGA) display source.
+ */
+static inline void
+viaAnalogSetDisplaySource(void __iomem *regs, u8 displaySource)
+{
+	/* Set analog (VGA) display source. */
+	/* 3C5.16[6] - CRT Display Source
+	 *             0: Primary Display Stream (IGA1)
+	 *             1: Secondary Display Stream (IGA2) */
+	svga_wseq_mask(regs, 0x16, displaySource << 6, BIT(6));
+	DRM_DEBUG_KMS("Analog (VGA) Display Source: IGA%d\n",
+			(displaySource & 0x01) + 1);
+}
+
+/*
  * Sets CX700 or later single chipset's LVDS1 power sequence type.
  */
 static inline void
commit d7c7f7b0afa03a1b0854dd1f2a1898877c3df0e2
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Apr 6 21:12:02 2017 -0700

    Converting DRM_DEBUG to DRM_DEBUG_KMS inside via_analog.c
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_analog.c b/drivers/gpu/drm/via/via_analog.c
index 5bee667a273..a17b7177255 100644
--- a/drivers/gpu/drm/via/via_analog.c
+++ b/drivers/gpu/drm/via/via_analog.c
@@ -33,12 +33,12 @@
 static void
 viaAnalogOutput(struct via_device *dev_priv, bool outputState)
 {
-	DRM_DEBUG("Entered viaAnalogOutput.\n");
+	DRM_DEBUG_KMS("Entered viaAnalogOutput.\n");
 
 	viaAnalogSetDACOutput(VGABASE, outputState);
 	DRM_INFO("Analog (VGA) Output: %s\n", outputState ? "On" : "Off");
 
-	DRM_DEBUG("Exiting viaAnalogOutput.\n");
+	DRM_DEBUG_KMS("Exiting viaAnalogOutput.\n");
 }
 
 /*
@@ -83,7 +83,7 @@ via_analog_dpms(struct drm_encoder *encoder, int mode)
 {
 	struct via_device *dev_priv = encoder->dev->dev_private;
 
-	DRM_DEBUG("Entered via_analog_dpms.\n");
+	DRM_DEBUG_KMS("Entered via_analog_dpms.\n");
 
 	switch (mode) {
 	case DRM_MODE_DPMS_ON:
@@ -99,7 +99,7 @@ via_analog_dpms(struct drm_encoder *encoder, int mode)
 		break;
 	}
 
-	DRM_DEBUG("Exiting via_analog_dpms.\n");
+	DRM_DEBUG_KMS("Exiting via_analog_dpms.\n");
 }
 
 /* Pass our mode to the connectors and the CRTC to give them a chance to
commit 7fa877b20e21b9d339c1a92c76dd63e269a62494
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Apr 6 20:24:47 2017 -0700

    Converting DRM_DEBUG to DRM_DEBUG_KMS inside crtc_hw.h
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/crtc_hw.h b/drivers/gpu/drm/via/crtc_hw.h
index 93348f2d3ab..38bce10b103 100644
--- a/drivers/gpu/drm/via/crtc_hw.h
+++ b/drivers/gpu/drm/via/crtc_hw.h
@@ -97,7 +97,8 @@ viaAnalogSetDACOutput(void __iomem *regs, bool outputState)
 	 *             0: DAC on
 	 *             1: DAC off */
 	svga_wcrt_mask(regs, 0x47, outputState ? 0x00 : BIT(2), BIT(2));
-	DRM_DEBUG("Analog (VGA) DAC Output: %s\n", outputState ? "On" : "Off");
+	DRM_DEBUG_KMS("Analog (VGA) DAC Output: %s\n",
+			outputState ? "On" : "Off");
 }
 
 /*
@@ -131,7 +132,7 @@ viaLVDS1SetPowerSeq(void __iomem *regs, bool softCtrl)
 	 *             0: Hardware Control
 	 *             1: Software Control */
 	svga_wcrt_mask(regs, 0x91, softCtrl ? BIT(0) : 0, BIT(0));
-	DRM_DEBUG("LVDS1 Power Sequence: %s Control\n",
+	DRM_DEBUG_KMS("LVDS1 Power Sequence: %s Control\n",
 			softCtrl ? "Software" : "Hardware");
 }
 
@@ -147,7 +148,7 @@ viaLVDS1SetSoftData(void __iomem *regs, bool softOn)
 	 *             0: Off
 	 *             1: On */
 	svga_wcrt_mask(regs, 0x91, softOn ? BIT(3) : 0, BIT(3));
-	DRM_DEBUG("LVDS1 Software Controlled Data Path: %s\n",
+	DRM_DEBUG_KMS("LVDS1 Software Controlled Data Path: %s\n",
 			softOn ? "On" : "Off");
 }
 
@@ -162,7 +163,7 @@ viaLVDS1SetSoftVdd(void __iomem *regs, bool softOn)
 	 *             0: Off
 	 *             1: On */
 	svga_wcrt_mask(regs, 0x91, softOn ? BIT(4) : 0, BIT(4));
-	DRM_DEBUG("LVDS1 Software Controlled Vdd: %s\n",
+	DRM_DEBUG_KMS("LVDS1 Software Controlled Vdd: %s\n",
 			softOn ? "On" : "Off");
 }
 
@@ -179,7 +180,7 @@ viaLVDS1SetSoftDisplayPeriod(void __iomem *regs, bool softOn)
 	 *             0: On
 	 *             1: Off */
 	svga_wcrt_mask(regs, 0x91, softOn ? 0 : BIT(7), BIT(7));
-	DRM_DEBUG("LVDS1 Software Controlled Display Period: %s\n",
+	DRM_DEBUG_KMS("LVDS1 Software Controlled Display Period: %s\n",
 			softOn ? "On" : "Off");
 }
 
@@ -194,7 +195,7 @@ viaTMDSSetPower(void __iomem *regs, bool powerState)
 	 *             0: TMDS power on
 	 *             1: TMDS power down */
 	svga_wcrt_mask(regs, 0xD2, powerState ? 0 : BIT(3), BIT(3));
-	DRM_DEBUG("TMDS (DVI) Power State: %s\n",
+	DRM_DEBUG_KMS("TMDS (DVI) Power State: %s\n",
 			powerState ? "On" : "Off");
 }
 
commit a248ac810469a8c1ff8791b4da1b765671957061
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Apr 6 20:16:28 2017 -0700

    Converted white spaces to tabs inside crtc_hw.h
    
    Suggested-by: Rafał Miłecki <zajec5 at gmail.com>
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/crtc_hw.h b/drivers/gpu/drm/via/crtc_hw.h
index 702a2e0fcd2..93348f2d3ab 100644
--- a/drivers/gpu/drm/via/crtc_hw.h
+++ b/drivers/gpu/drm/via/crtc_hw.h
@@ -19,7 +19,7 @@
  * DEALINGS IN THE SOFTWARE.
  *
  * Authors:
- *	James Simmons <jsimmons at infradead.org>
+ * James Simmons <jsimmons at infradead.org>
  */
 
 #ifndef __CRTC_HW_H__
@@ -82,7 +82,7 @@ static inline void svga_wcrt_mask(void __iomem *regbase, u8 index, u8 data, u8 m
 
 /***********************************************************************
 
-   VIA Technologies Chrome IGP Register Access Helper Functions
+ VIA Technologies Chrome IGP Register Access Helper Functions
 
 ***********************************************************************/
 
@@ -92,12 +92,12 @@ static inline void svga_wcrt_mask(void __iomem *regbase, u8 index, u8 data, u8 m
 static inline void
 viaAnalogSetDACOutput(void __iomem *regs, bool outputState)
 {
-    /* Set analog (VGA) DAC output state. */
-    /* 3X5.47[2] - DACOFF Backdoor Register
-     *             0: DAC on
-     *             1: DAC off */
-    svga_wcrt_mask(regs, 0x47, outputState ? 0x00 : BIT(2), BIT(2));
-    DRM_DEBUG("Analog (VGA) DAC Output: %s\n", outputState ? "On" : "Off");
+	/* Set analog (VGA) DAC output state. */
+	/* 3X5.47[2] - DACOFF Backdoor Register
+	 *             0: DAC on
+	 *             1: DAC off */
+	svga_wcrt_mask(regs, 0x47, outputState ? 0x00 : BIT(2), BIT(2));
+	DRM_DEBUG("Analog (VGA) DAC Output: %s\n", outputState ? "On" : "Off");
 }
 
 /*
@@ -106,18 +106,18 @@ viaAnalogSetDACOutput(void __iomem *regs, bool outputState)
 static inline void
 viaAnalogSetSyncPolarity(void __iomem *regs, u8 syncPolarity)
 {
-    /* Set analog (VGA) sync polarity. */
-    /* 3C2[7] - Analog Vertical Sync Polarity
-     *          0: Positive
-     *          1: Negative
-     * 3C2[6] - Analog Horizontal Sync Polarity
-     *          0: Positive
-     *          1: Negative */
-    svga_wmisc_mask(regs, syncPolarity << 6, (BIT(1) | BIT(0)) << 6);
-    DRM_DEBUG_KMS("Analog (VGA) Horizontal Sync Polarity: %s\n",
-                (syncPolarity & BIT(0)) ? "-" : "+");
-    DRM_DEBUG_KMS("Analog (VGA) Vertical Sync Polarity: %s\n",
-                (syncPolarity & BIT(1)) ? "-" : "+");
+	/* Set analog (VGA) sync polarity. */
+	/* 3C2[7] - Analog Vertical Sync Polarity
+	 *          0: Positive
+	 *          1: Negative
+	 * 3C2[6] - Analog Horizontal Sync Polarity
+	 *          0: Positive
+	 *          1: Negative */
+	svga_wmisc_mask(regs, syncPolarity << 6, (BIT(1) | BIT(0)) << 6);
+	DRM_DEBUG_KMS("Analog (VGA) Horizontal Sync Polarity: %s\n",
+			(syncPolarity & BIT(0)) ? "-" : "+");
+	DRM_DEBUG_KMS("Analog (VGA) Vertical Sync Polarity: %s\n",
+			(syncPolarity & BIT(1)) ? "-" : "+");
 }
 
 /*
@@ -126,13 +126,13 @@ viaAnalogSetSyncPolarity(void __iomem *regs, u8 syncPolarity)
 static inline void
 viaLVDS1SetPowerSeq(void __iomem *regs, bool softCtrl)
 {
-    /* Set LVDS1 power sequence type. */
-    /* 3X5.91[0] - LVDS1 Hardware or Software Control Power Sequence
-     *             0: Hardware Control
-     *             1: Software Control */
-    svga_wcrt_mask(regs, 0x91, softCtrl ? BIT(0) : 0, BIT(0));
-    DRM_DEBUG("LVDS1 Power Sequence: %s Control\n",
-                softCtrl ? "Software" : "Hardware");
+	/* Set LVDS1 power sequence type. */
+	/* 3X5.91[0] - LVDS1 Hardware or Software Control Power Sequence
+	 *             0: Hardware Control
+	 *             1: Software Control */
+	svga_wcrt_mask(regs, 0x91, softCtrl ? BIT(0) : 0, BIT(0));
+	DRM_DEBUG("LVDS1 Power Sequence: %s Control\n",
+			softCtrl ? "Software" : "Hardware");
 }
 
 /*
@@ -142,13 +142,13 @@ viaLVDS1SetPowerSeq(void __iomem *regs, bool softCtrl)
 static inline void
 viaLVDS1SetSoftData(void __iomem *regs, bool softOn)
 {
-    /* Set LVDS1 software controlled data path state. */
-    /* 3X5.91[3] - Software Data On
-     *             0: Off
-     *             1: On */
-    svga_wcrt_mask(regs, 0x91, softOn ? BIT(3) : 0, BIT(3));
-    DRM_DEBUG("LVDS1 Software Controlled Data Path: %s\n",
-                softOn ? "On" : "Off");
+	/* Set LVDS1 software controlled data path state. */
+	/* 3X5.91[3] - Software Data On
+	 *             0: Off
+	 *             1: On */
+	svga_wcrt_mask(regs, 0x91, softOn ? BIT(3) : 0, BIT(3));
+	DRM_DEBUG("LVDS1 Software Controlled Data Path: %s\n",
+			softOn ? "On" : "Off");
 }
 
 /*
@@ -157,13 +157,13 @@ viaLVDS1SetSoftData(void __iomem *regs, bool softOn)
 static inline void
 viaLVDS1SetSoftVdd(void __iomem *regs, bool softOn)
 {
-    /* Set LVDS1 software controlled Vdd. */
-    /* 3X5.91[4] - Software VDD On
-     *             0: Off
-     *             1: On */
-    svga_wcrt_mask(regs, 0x91, softOn ? BIT(4) : 0, BIT(4));
-    DRM_DEBUG("LVDS1 Software Controlled Vdd: %s\n",
-                softOn ? "On" : "Off");
+	/* Set LVDS1 software controlled Vdd. */
+	/* 3X5.91[4] - Software VDD On
+	 *             0: Off
+	 *             1: On */
+	svga_wcrt_mask(regs, 0x91, softOn ? BIT(4) : 0, BIT(4));
+	DRM_DEBUG("LVDS1 Software Controlled Vdd: %s\n",
+			softOn ? "On" : "Off");
 }
 
 /*
@@ -173,14 +173,14 @@ viaLVDS1SetSoftVdd(void __iomem *regs, bool softOn)
 static inline void
 viaLVDS1SetSoftDisplayPeriod(void __iomem *regs, bool softOn)
 {
-    /* Set LVDS1 software controlled display period state. */
-    /* 3X5.91[7] - Software Direct On / Off Display Period
-     *             in the Panel Path
-     *             0: On
-     *             1: Off */
-    svga_wcrt_mask(regs, 0x91, softOn ? 0 : BIT(7), BIT(7));
-    DRM_DEBUG("LVDS1 Software Controlled Display Period: %s\n",
-                softOn ? "On" : "Off");
+	/* Set LVDS1 software controlled display period state. */
+	/* 3X5.91[7] - Software Direct On / Off Display Period
+	 *             in the Panel Path
+	 *             0: On
+	 *             1: Off */
+	svga_wcrt_mask(regs, 0x91, softOn ? 0 : BIT(7), BIT(7));
+	DRM_DEBUG("LVDS1 Software Controlled Display Period: %s\n",
+			softOn ? "On" : "Off");
 }
 
 /*
@@ -189,13 +189,13 @@ viaLVDS1SetSoftDisplayPeriod(void __iomem *regs, bool softOn)
 static inline void
 viaTMDSSetPower(void __iomem *regs, bool powerState)
 {
-    /* Set TMDS (DVI) power state. */
-    /* 3X5.D2[3] - Power Down (Active High) for DVI
-     *             0: TMDS power on
-     *             1: TMDS power down */
-    svga_wcrt_mask(regs, 0xD2, powerState ? 0 : BIT(3), BIT(3));
-    DRM_DEBUG("TMDS (DVI) Power State: %s\n",
-                powerState ? "On" : "Off");
+	/* Set TMDS (DVI) power state. */
+	/* 3X5.D2[3] - Power Down (Active High) for DVI
+	 *             0: TMDS power on
+	 *             1: TMDS power down */
+	svga_wcrt_mask(regs, 0xD2, powerState ? 0 : BIT(3), BIT(3));
+	DRM_DEBUG("TMDS (DVI) Power State: %s\n",
+			powerState ? "On" : "Off");
 }
 
 
commit a0abfcfb7485ddfd9307c3b57bc511ef623a88af
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Apr 6 19:56:54 2017 -0700

    Converted white spaces to tabs inside via_analog.c
    
    Suggested-by: Rafał Miłecki <zajec5 at gmail.com>
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_analog.c b/drivers/gpu/drm/via/via_analog.c
index 02ea47c229b..5bee667a273 100644
--- a/drivers/gpu/drm/via/via_analog.c
+++ b/drivers/gpu/drm/via/via_analog.c
@@ -21,7 +21,7 @@
  * DEALINGS IN THE SOFTWARE.
  *
  * Authors:
- *	James Simmons <jsimmons at infradead.org>
+ * James Simmons <jsimmons at infradead.org>
  */
 #include "via_drv.h"
 #include "crtc_hw.h"
@@ -33,12 +33,12 @@
 static void
 viaAnalogOutput(struct via_device *dev_priv, bool outputState)
 {
-    DRM_DEBUG("Entered viaAnalogOutput.\n");
+	DRM_DEBUG("Entered viaAnalogOutput.\n");
 
-    viaAnalogSetDACOutput(VGABASE, outputState);
-    DRM_INFO("Analog (VGA) Output: %s\n", outputState ? "On" : "Off");
+	viaAnalogSetDACOutput(VGABASE, outputState);
+	DRM_INFO("Analog (VGA) Output: %s\n", outputState ? "On" : "Off");
 
-    DRM_DEBUG("Exiting viaAnalogOutput.\n");
+	DRM_DEBUG("Exiting viaAnalogOutput.\n");
 }
 
 /*
@@ -47,25 +47,25 @@ viaAnalogOutput(struct via_device *dev_priv, bool outputState)
 static void
 viaAnalogSyncPolarity(struct via_device *dev_priv, unsigned int flags)
 {
-    u8 syncPolarity = 0x00;
+	u8 syncPolarity = 0x00;
 
-    DRM_DEBUG_KMS("Entered viaAnalogSyncPolarity.\n");
+	DRM_DEBUG_KMS("Entered viaAnalogSyncPolarity.\n");
 
-    if (flags & DRM_MODE_FLAG_NHSYNC) {
-        syncPolarity |= BIT(0);
-    }
+	if (flags & DRM_MODE_FLAG_NHSYNC) {
+		syncPolarity |= BIT(0);
+	}
 
-    if (flags & DRM_MODE_FLAG_NVSYNC) {
-        syncPolarity |= BIT(1);
-    }
+	if (flags & DRM_MODE_FLAG_NVSYNC) {
+		syncPolarity |= BIT(1);
+	}
 
-    viaAnalogSetSyncPolarity(VGABASE, syncPolarity);
-    DRM_INFO("Analog (VGA) Horizontal Sync Polarity: %s\n",
-                (syncPolarity & BIT(0)) ? "-" : "+");
-    DRM_INFO("Analog (VGA) Vertical Sync Polarity: %s\n",
-                (syncPolarity & BIT(1)) ? "-" : "+");
+	viaAnalogSetSyncPolarity(VGABASE, syncPolarity);
+	DRM_INFO("Analog (VGA) Horizontal Sync Polarity: %s\n",
+		(syncPolarity & BIT(0)) ? "-" : "+");
+	DRM_INFO("Analog (VGA) Vertical Sync Polarity: %s\n",
+		(syncPolarity & BIT(1)) ? "-" : "+");
 
-    DRM_DEBUG_KMS("Exiting viaAnalogSyncPolarity.\n");
+	DRM_DEBUG_KMS("Exiting viaAnalogSyncPolarity.\n");
 }
 
 /*
@@ -81,25 +81,25 @@ static const struct drm_encoder_funcs via_dac_enc_funcs = {
 static void
 via_analog_dpms(struct drm_encoder *encoder, int mode)
 {
-    struct via_device *dev_priv = encoder->dev->dev_private;
-
-    DRM_DEBUG("Entered via_analog_dpms.\n");
-
-    switch (mode) {
-    case DRM_MODE_DPMS_ON:
-        viaAnalogOutput(dev_priv, true);
-        break;
-    case DRM_MODE_DPMS_SUSPEND:
-    case DRM_MODE_DPMS_STANDBY:
-    case DRM_MODE_DPMS_OFF:
-        viaAnalogOutput(dev_priv, false);
-        break;
-    default:
-        DRM_ERROR("Bad DPMS mode.");
-        break;
-    }
-
-    DRM_DEBUG("Exiting via_analog_dpms.\n");
+	struct via_device *dev_priv = encoder->dev->dev_private;
+
+	DRM_DEBUG("Entered via_analog_dpms.\n");
+
+	switch (mode) {
+	case DRM_MODE_DPMS_ON:
+		viaAnalogOutput(dev_priv, true);
+		break;
+	case DRM_MODE_DPMS_SUSPEND:
+	case DRM_MODE_DPMS_STANDBY:
+	case DRM_MODE_DPMS_OFF:
+		viaAnalogOutput(dev_priv, false);
+		break;
+	default:
+		DRM_ERROR("Bad DPMS mode.");
+		break;
+	}
+
+	DRM_DEBUG("Exiting via_analog_dpms.\n");
 }
 
 /* Pass our mode to the connectors and the CRTC to give them a chance to
@@ -120,16 +120,16 @@ via_dac_mode_fixup(struct drm_encoder *encoder,
  */
 static void
 via_analog_mode_set(struct drm_encoder *encoder,
-                    struct drm_display_mode *mode,
-                    struct drm_display_mode *adjusted_mode)
+			struct drm_display_mode *mode,
+			struct drm_display_mode *adjusted_mode)
 {
-    struct via_device *dev_priv = encoder->dev->dev_private;
+	struct via_device *dev_priv = encoder->dev->dev_private;
 
-    DRM_DEBUG_KMS("Entered via_analog_mode_set.\n");
+	DRM_DEBUG_KMS("Entered via_analog_mode_set.\n");
 
-    viaAnalogSyncPolarity(dev_priv, adjusted_mode->flags);
+	viaAnalogSyncPolarity(dev_priv, adjusted_mode->flags);
 
-    DRM_DEBUG_KMS("Exiting via_analog_mode_set.\n");
+	DRM_DEBUG_KMS("Exiting via_analog_mode_set.\n");
 }
 
 static const struct drm_encoder_helper_funcs via_dac_enc_helper_funcs = {


More information about the Openchrome-devel mailing list