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

Kevin Brace kevinbrace at kemper.freedesktop.org
Thu Dec 22 23:29:37 UTC 2016


 drivers/gpu/drm/via/via_crtc.c |   34 ++++++++++++++++++++++------------
 drivers/gpu/drm/via/via_drv.h  |    4 ++--
 2 files changed, 24 insertions(+), 14 deletions(-)

New commits:
commit 51efdc14e459e3c0b66636ad44b2bdfcbf2ceb05
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Dec 22 15:28:10 2016 -0800

    Version bumped to 3.0.5
    
    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 d9dae95..4a4e37b 100644
--- a/drivers/gpu/drm/via/via_drv.h
+++ b/drivers/gpu/drm/via/via_drv.h
@@ -27,11 +27,11 @@
 #define DRIVER_AUTHOR       "The OpenChrome Project"
 #define DRIVER_NAME         "via"
 #define DRIVER_DESC         "OpenChrome DRM for VIA Technologies Chrome IGP"
-#define DRIVER_DATE         "20161220"
+#define DRIVER_DATE         "20161222"
 
 #define DRIVER_MAJOR		3
 #define DRIVER_MINOR		0
-#define DRIVER_PATCHLEVEL	4
+#define DRIVER_PATCHLEVEL	5
 
 #include <linux/module.h>
 
commit 39d455bb23f25ade7c33223e0900f6a5359c9cde
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Dec 22 15:27:35 2016 -0800

    Added viaIGA2InterlaceMode function
    
    This function will set the interlace mode for IGA2.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_crtc.c b/drivers/gpu/drm/via/via_crtc.c
index 16cad0d..41804e2 100644
--- a/drivers/gpu/drm/via/via_crtc.c
+++ b/drivers/gpu/drm/via/via_crtc.c
@@ -137,6 +137,14 @@ viaIGA2SetColorDepth(struct drm_via_private *dev_priv,
     DRM_DEBUG("Exiting viaIGA2SetColorDepth.\n");
 }
 
+static inline void
+viaIGA2InterlaceMode(void __iomem *regs, bool interlaceMode)
+{
+    svga_wcrt_mask(regs, 0x67, interlaceMode ? BIT(5) : 0, BIT(5));
+    DRM_INFO("IGA2 Interlace Mode: %s\n",
+            interlaceMode ? "On" : "Off");
+}
+
 static void
 via_hide_cursor(struct drm_crtc *crtc)
 {
@@ -1347,12 +1355,9 @@ via_iga2_crtc_mode_set(struct drm_crtc *crtc,
     /* Relock */
     via_lock_crtc(VGABASE);
 
-    /* interlace setting */
-    if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
-        svga_wcrt_mask(VGABASE, 0x67, BIT(5), BIT(5));
-    } else {
-        svga_wcrt_mask(VGABASE, 0x67, 0, BIT(5));
-    }
+    /* Set non-interlace / interlace mode. */
+    viaIGA2InterlaceMode(VGABASE,
+                            adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE);
 
     /* Load FIFO */
     if ((dev->pdev->device != PCI_DEVICE_ID_VIA_CLE266)
commit 2526540d4d51902e8a1665a69288a11b673a2199
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Dec 22 15:25:45 2016 -0800

    Fixing a regression with IGA2 interlace mode set
    
    When the IGA1 and IGA2 mode set code was separated, the code to set
    IGA2 interlace mode was mistakenly setting IGA1's interlace mode. This
    commit will correct this error.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_crtc.c b/drivers/gpu/drm/via/via_crtc.c
index c2baec77..16cad0d 100644
--- a/drivers/gpu/drm/via/via_crtc.c
+++ b/drivers/gpu/drm/via/via_crtc.c
@@ -1349,9 +1349,9 @@ via_iga2_crtc_mode_set(struct drm_crtc *crtc,
 
     /* interlace setting */
     if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
-        svga_wcrt_mask(VGABASE, 0x33, BIT(6), BIT(6));
+        svga_wcrt_mask(VGABASE, 0x67, BIT(5), BIT(5));
     } else {
-        svga_wcrt_mask(VGABASE, 0x33, 0, BIT(6));
+        svga_wcrt_mask(VGABASE, 0x67, 0, BIT(5));
     }
 
     /* Load FIFO */
commit 864f8efcfc856851b9830258a4643e2dbb8cf38e
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Dec 22 15:23:28 2016 -0800

    Added viaIGA1InterlaceMode function
    
    This function will set the interlace mode for IGA1.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/via/via_crtc.c b/drivers/gpu/drm/via/via_crtc.c
index f0c6571..c2baec77 100644
--- a/drivers/gpu/drm/via/via_crtc.c
+++ b/drivers/gpu/drm/via/via_crtc.c
@@ -89,6 +89,14 @@ viaIGA1SetColorDepth(struct drm_via_private *dev_priv,
     DRM_DEBUG("Exiting viaIGA1SetColorDepth.\n");
 }
 
+static inline void
+viaIGA1InterlaceMode(void __iomem *regs, bool interlaceMode)
+{
+    svga_wcrt_mask(regs, 0x33, interlaceMode ? BIT(6) : 0, BIT(6));
+    DRM_INFO("IGA1 Interlace Mode: %s\n",
+            interlaceMode ? "On" : "Off");
+}
+
 static void
 viaIGA2SetColorDepth(struct drm_via_private *dev_priv,
                         u8 depth)
@@ -1125,12 +1133,9 @@ via_iga1_crtc_mode_set(struct drm_crtc *crtc,
     /* Relock */
     via_lock_crtc(VGABASE);
 
-    /* interlace setting */
-    if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
-        svga_wcrt_mask(VGABASE, 0x33, BIT(6), BIT(6));
-    } else {
-        svga_wcrt_mask(VGABASE, 0x33, 0, BIT(6));
-    }
+    /* Set non-interlace / interlace mode. */
+    viaIGA1InterlaceMode(VGABASE,
+                            adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE);
 
     /* Load FIFO */
     if ((dev->pdev->device != PCI_DEVICE_ID_VIA_CLE266)


More information about the Openchrome-devel mailing list