[Openchrome-devel] drm-openchrome: Branch 'drm-next-4.13' - 2 commits - drivers/gpu/drm

Kevin Brace kevinbrace at kemper.freedesktop.org
Sun Oct 1 19:06:27 UTC 2017


 drivers/gpu/drm/openchrome/via_drv.c |    1 
 drivers/gpu/drm/openchrome/via_drv.h |    7 +++++-
 drivers/gpu/drm/openchrome/via_fp.c  |   39 +++++++----------------------------
 3 files changed, 15 insertions(+), 32 deletions(-)

New commits:
commit dbde3d39eccd449dd0c537e5f5f66c4702562d28
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Oct 1 12:05:48 2017 -0700

    Version bumped to 3.0.46
    
    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 0ad57f37113f..5279a281be24 100644
--- a/drivers/gpu/drm/openchrome/via_drv.h
+++ b/drivers/gpu/drm/openchrome/via_drv.h
@@ -34,7 +34,7 @@
 
 #define DRIVER_MAJOR		3
 #define DRIVER_MINOR		0
-#define DRIVER_PATCHLEVEL	45
+#define DRIVER_PATCHLEVEL	46
 
 #include <linux/module.h>
 
commit f035c7accee70f230cfcf480f606e2e18bab36f9
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sun Oct 1 11:02:21 2017 -0700

    Discontinue the use of DMI for detecting FP availability
    
    The use of DMI (Desktop Management Interface) is awkward, so it will
    be discontinued. The detection of Quanta IL1 netbook is done via DMI,
    but this will be changed to PCI Subvendor and Subdevice ID in the near
    future. Quanta IL1 netbook’s FP is connected to DVP1 since it is a TTL
    interface FP, not LVDS interface FP. Because of this, a special flag
    register will be used to properly recognize / control the FP of this
    computer.
    
    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 e2716f36b6a3..77defa5e0244 100644
--- a/drivers/gpu/drm/openchrome/via_drv.c
+++ b/drivers/gpu/drm/openchrome/via_drv.c
@@ -246,6 +246,7 @@ via_device_init(struct via_device *dev_priv)
 
     /* Temporary implementation. */
     dev_priv->is_via_nanobook = false;
+    dev_priv->is_quanta_il1 = false;
 
     ret = via_vram_init(dev_priv);
     if (ret) {
diff --git a/drivers/gpu/drm/openchrome/via_drv.h b/drivers/gpu/drm/openchrome/via_drv.h
index ccf589af7b33..0ad57f37113f 100644
--- a/drivers/gpu/drm/openchrome/via_drv.h
+++ b/drivers/gpu/drm/openchrome/via_drv.h
@@ -196,6 +196,11 @@ struct via_device {
 	 * FP and DVI to be properly detected. */
 	bool is_via_nanobook;
 
+	/* Quanta IL1 netbook has its FP connected to DVP1
+	 * rather than LVDS, hence, a special flag register
+	 * is needed for properly controlling its FP. */
+	bool is_quanta_il1;
+
 	bool int_fp1_presence;
 	u32 int_fp1_di_port;
 
diff --git a/drivers/gpu/drm/openchrome/via_fp.c b/drivers/gpu/drm/openchrome/via_fp.c
index 9d19f95fb5b9..c1cd804f24ea 100644
--- a/drivers/gpu/drm/openchrome/via_fp.c
+++ b/drivers/gpu/drm/openchrome/via_fp.c
@@ -1025,32 +1025,6 @@ struct drm_connector_helper_funcs via_lcd_connector_helper_funcs = {
 	.best_encoder = via_best_encoder,
 };
 
-static int __init via_ttl_lvds_dmi_callback(const struct dmi_system_id *id)
-{
-	DRM_INFO("LVDS is TTL type for %s\n", id->ident);
-	return 1;
-}
-
-static const struct dmi_system_id via_ttl_lvds[] = {
-	{
-		.callback = via_ttl_lvds_dmi_callback,
-		.ident = "VIA Quanta Netbook",
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "QCI"),
-			DMI_MATCH(DMI_PRODUCT_VERSION, "VT6413A"),
-		},
-	}, {
-		.callback = via_ttl_lvds_dmi_callback,
-		.ident = "Amilo Pro V2030",
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
-			DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
-		},
-	},
-
-	{ }
-};
-
 /*
  * Probe (pre-initialization detection) FP.
  */
@@ -1157,6 +1131,14 @@ void via_fp_probe(struct drm_device *dev)
 				dev_priv->int_fp2_presence = true;
 				dev_priv->int_fp2_di_port =
 						VIA_DI_PORT_LVDS2;
+			} else if (dev_priv->is_quanta_il1) {
+				/* From the Quanta IL1 schematic. */
+				dev_priv->int_fp1_presence = true;
+				dev_priv->int_fp1_di_port =
+						VIA_DI_PORT_DVP1;
+				dev_priv->int_fp2_presence = false;
+				dev_priv->int_fp2_di_port =
+						VIA_DI_PORT_NONE;
 
 			/* 3C5.13[7:6] - Integrated LVDS / DVI
 			 *               Mode Select (DVP1D15-14 pin
@@ -1326,11 +1308,6 @@ via_lvds_init(struct drm_device *dev)
 
 	enc->base.possible_crtcs = BIT(1);
 
-	/* There has to be a way to detect TTL LVDS
-	 * For now we use the DMI to handle this */
-	if (dmi_check_system(via_ttl_lvds))
-		enc->di_port = VIA_DI_PORT_DFPL | VIA_DI_PORT_DVP1;
-
 	if (dev_priv->int_fp1_presence) {
 		enc->di_port = dev_priv->int_fp1_di_port;
 	} else if (dev_priv->int_fp2_presence) {


More information about the Openchrome-devel mailing list