[Openchrome-devel] drm-openchrome: Branch 'drm-next-3.19' - 6 commits - drivers/gpu/drm

Kevin Brace kevinbrace at kemper.freedesktop.org
Mon Oct 16 02:07:45 UTC 2017


 drivers/gpu/drm/openchrome/via_analog.c |    2 +-
 drivers/gpu/drm/openchrome/via_crtc.c   |   14 ++++++++++++++
 drivers/gpu/drm/openchrome/via_drv.c    |   10 ++++++++--
 drivers/gpu/drm/openchrome/via_drv.h    |    4 ++--
 drivers/gpu/drm/openchrome/via_fp.c     |    7 ++++++-
 5 files changed, 31 insertions(+), 6 deletions(-)

New commits:
commit 4a8b47868c2bf0e61331c0befd98452da2aee06d
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Oct 15 19:06:21 2017 -0700

    Version bumped to 3.0.49
    
    Another important upgrade to the code where the second display's
    cursor will be restored correctly after standby resume. Along with
    the previous version, there is now initial support for standby resume.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/via_drv.h b/drivers/gpu/drm/openchrome/via_drv.h
index aa5e9c8f1392..c1950ef1cca5 100644
--- a/drivers/gpu/drm/openchrome/via_drv.h
+++ b/drivers/gpu/drm/openchrome/via_drv.h
@@ -30,11 +30,11 @@
 #define DRIVER_AUTHOR       "OpenChrome Project"
 #define DRIVER_NAME         "openchrome"
 #define DRIVER_DESC         "OpenChrome DRM for VIA Technologies Chrome IGP"
-#define DRIVER_DATE         "20171014"
+#define DRIVER_DATE         "20171015"
 
 #define DRIVER_MAJOR		3
 #define DRIVER_MINOR		0
-#define DRIVER_PATCHLEVEL	48
+#define DRIVER_PATCHLEVEL	49
 
 #include <linux/module.h>
 
commit 8256271ae1f8dbbe1c688f26006bbeaaba9c236f
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Oct 15 18:43:52 2017 -0700

    Simplifying the code inside via_init
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/via_drv.c b/drivers/gpu/drm/openchrome/via_drv.c
index 85899bda2e6e..62251cd93cae 100644
--- a/drivers/gpu/drm/openchrome/via_drv.c
+++ b/drivers/gpu/drm/openchrome/via_drv.c
@@ -589,6 +589,8 @@ via_pci_remove(struct pci_dev *pdev)
 static struct pci_driver via_pci_driver = {
 	.name		= DRIVER_NAME,
 	.id_table	= via_pci_table,
+	.probe		= via_pci_probe,
+	.remove		= via_pci_remove,
 	.driver.pm	= &via_dev_pm_ops,
 };
 
@@ -597,10 +599,9 @@ static int __init via_init(void)
 	via_driver.num_ioctls = via_max_ioctl;
 
 	if (via_modeset) {
-		via_pci_driver.probe	= via_pci_probe;
-		via_pci_driver.remove	= via_pci_remove;
 		via_driver.driver_features |= DRIVER_MODESET;
 	}
+
 	return pci_register_driver(&via_pci_driver);
 }
 
commit b4cf2b72988a50eee1da918660fe6d0706363a32
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Oct 15 18:42:15 2017 -0700

    Add copyright holder names and acknowledgement to via_drv.c
    
    The code for standby and resume was borrowed from Radeon DRM, but
    was shortened and simplified. For the rest of the code, the previous
    developer's name should be added as well.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/via_drv.c b/drivers/gpu/drm/openchrome/via_drv.c
index d02e76bb6d89..85899bda2e6e 100644
--- a/drivers/gpu/drm/openchrome/via_drv.c
+++ b/drivers/gpu/drm/openchrome/via_drv.c
@@ -1,7 +1,12 @@
 /*
+ * Copyright 2017 Kevin Brace. All Rights Reserved.
+ * Copyright 2012 James Simmons <jsimmons at infradead.org>. All Rights Reserved.
  * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
  * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
  *
+ * This DRM's standby and resume code is based on Radeon DRM's code,
+ * but it was shortened and simplified.
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
commit 356c9c5bd31fecd3e9b569f3fcb3c08ff415fc58
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Oct 15 18:36:52 2017 -0700

    Add copyright holder names to via_fp.c
    
    Many of via_fp.c lines of code were written by me (Kevin Brace), so
    I feel like I can now add my name to the file. Obviously, previous
    developer's name should be added as well. Also, VIA Technologies
    and S3 Graphics names should be added since many of the FP register
    settings information originally came from their open source DDX.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/via_fp.c b/drivers/gpu/drm/openchrome/via_fp.c
index acaf864c8a9e..7d91f06b2dc6 100644
--- a/drivers/gpu/drm/openchrome/via_fp.c
+++ b/drivers/gpu/drm/openchrome/via_fp.c
@@ -1,4 +1,9 @@
 /*
+ * Copyright 2017 Kevin Brace. All Rights Reserved.
+ * Copyright 2012 James Simmons <jsimmons at infradead.org>. All Rights Reserved.
+ * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
+ * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
commit 2623ee39b27cda3fdbbfcf770f4ed7eb3756b3c2
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Oct 15 17:30:47 2017 -0700

    Swap the available display controller for analog (VGA) and FP
    
    This is a temporary solution until a bug that causes IGA2's (display
    controller 2) display cursor to disappear after standby resume is
    fixed.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/via_analog.c b/drivers/gpu/drm/openchrome/via_analog.c
index 0270b87872eb..2e4d97e2476c 100644
--- a/drivers/gpu/drm/openchrome/via_analog.c
+++ b/drivers/gpu/drm/openchrome/via_analog.c
@@ -273,7 +273,7 @@ via_analog_init(struct drm_device *dev)
 	drm_encoder_init(dev, &enc->base, &via_dac_enc_funcs, DRM_MODE_ENCODER_DAC);
 	drm_encoder_helper_add(&enc->base, &via_dac_enc_helper_funcs);
 
-	enc->base.possible_crtcs = BIT(1);
+	enc->base.possible_crtcs = BIT(1) | BIT(0);
 	enc->base.possible_clones = 0;
 	enc->di_port = VIA_DI_PORT_NONE;
 
diff --git a/drivers/gpu/drm/openchrome/via_fp.c b/drivers/gpu/drm/openchrome/via_fp.c
index 254e1d2b09d3..acaf864c8a9e 100644
--- a/drivers/gpu/drm/openchrome/via_fp.c
+++ b/drivers/gpu/drm/openchrome/via_fp.c
@@ -1367,7 +1367,7 @@ via_lvds_init(struct drm_device *dev)
 				DRM_MODE_ENCODER_LVDS);
 	drm_encoder_helper_add(&enc->base, &via_lvds_helper_funcs);
 
-	enc->base.possible_crtcs = BIT(0);
+	enc->base.possible_crtcs = BIT(1) | BIT(0);
 
 	if (dev_priv->int_fp1_presence) {
 		enc->di_port = dev_priv->int_fp1_di_port;
commit 70850e6e76c2f34e7dd0932fe8589838f3b62a61
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Oct 15 17:20:44 2017 -0700

    Always set HI FIFO and colors when displaying display cursor
    
    Not doing this will cause IGA2 (Display Controller 2) to lose the
    display cursor after standby resume.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/drivers/gpu/drm/openchrome/via_crtc.c b/drivers/gpu/drm/openchrome/via_crtc.c
index f6bcd82b0c00..2f4a2644f572 100644
--- a/drivers/gpu/drm/openchrome/via_crtc.c
+++ b/drivers/gpu/drm/openchrome/via_crtc.c
@@ -220,6 +220,20 @@ via_show_cursor(struct drm_crtc *crtc)
         VIA_WRITE(PRIM_HI_FBOFFSET, iga->cursor_kmap.bo->offset);
         VIA_WRITE(PRIM_HI_CTRL, 0x36000005);
     }
+
+    /* Program Hardware Icon (HI) FIFO and foreground
+     * and background colors. */
+    if (iga->index) {
+        VIA_WRITE(HI_TRANSPARENT_COLOR, 0x00000000);
+        VIA_WRITE(HI_INVTCOLOR, 0x00FFFFFF);
+        VIA_WRITE(ALPHA_V3_PREFIFO_CONTROL, 0x000E0000);
+        VIA_WRITE(ALPHA_V3_FIFO_CONTROL, 0x0E0F0000);
+    } else {
+        VIA_WRITE(PRIM_HI_TRANSCOLOR, 0x00000000);
+        VIA_WRITE(PRIM_HI_INVTCOLOR, 0x00FFFFFF);
+        VIA_WRITE(V327_HI_INVTCOLOR, 0x00FFFFFF);
+        VIA_WRITE(PRIM_HI_FIFO, 0x0D000D0F);
+    }
 }
 
 static int


More information about the Openchrome-devel mailing list