On Tue, Mar 18, 2014 at 07:53:30AM +1000, Dave Airlie wrote:
> On Mon, Mar 17, 2014 at 10:48 PM, Stefan Dirsch <[email protected]> wrote:
> > Seems some code came from cirrus driver by copy & paste. Fixed
> > this in error message about device already in use by KMS module.
> >
> > Signed-off-by: Stefan Dirsch <[email protected]>
> 
> Both of these ast patches are
> 
> Reviewed-by: Dave Airlie <[email protected]>

Thanks.

> can you push them?

I just wanted to do this, but meanwhile the kernel module check has been
removed by the following commit. :-(

commit 7f24775a468066601a79beaffb4efa5a36c5ed59
Author: Y.C. Chen <[email protected]>
Date:   Fri Mar 14 18:23:04 2014 +0800

    Support AST2400

I don't understand why.

Best regards,
Stefan

Public Key available
------------------------------------------------------
Stefan Dirsch (Res. & Dev.)   SUSE LINUX Products GmbH
Tel: 0911-740 53 0            Maxfeldstraße 5
FAX: 0911-740 53 479          D-90409 Nürnberg
http://www.suse.de            Germany 
--------------------------------------------------------------
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix
Imendörffer, HRB 16746 (AG Nürnberg)
--------------------------------------------------------------
>From 78066bfa6cae9d0a13852a131a8da379378aae5b Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <[email protected]>
Date: Thu, 13 Mar 2014 12:31:20 +0100
Subject: [PATCH 1/2] ast: fix falling back after kernel check

if we find a kernel driver the code leave the pci slot claimed which
stops us falling back. unclaim the pci slot. patch inspired by
correspondant patch for cirrus driver by Dave Airlie.

Signed-off-by: Stefan Dirsch <[email protected]>
---
 src/ast_driver.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/ast_driver.c b/src/ast_driver.c
index e0dd4fa..677c170 100644
--- a/src/ast_driver.c
+++ b/src/ast_driver.c
@@ -291,7 +291,10 @@ ASTProbe(DriverPtr drv, int flags)
 				   devSections, numDevSections,
 				   drv, &usedChips);
 
-    free(devSections);
+    if (numUsed <= 0) {
+	free(devSections);
+	return FALSE;
+    }
 
     if (flags & PROBE_DETECT) {
         if (numUsed > 0)
@@ -310,6 +313,8 @@ ASTProbe(DriverPtr drv, int flags)
                                pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func);
                     xf86DrvMsg(0, X_ERROR,
                                "cirrus: This driver cannot operate until it has been unloaded.\n");
+                    xf86UnclaimPciSlot(pPci, devSections[0]);
+                    free(devSections);
                     return FALSE;
                 }
             }
@@ -343,6 +348,7 @@ ASTProbe(DriverPtr drv, int flags)
         }  /* end of for-loop */
     } /* end of if flags */
 
+    free(devSections);
     free(usedChips);
 
     return foundScreen;
-- 
1.8.4.5

>From 8bf2837eb22e0833e4354dddd23358387f8a00b5 Mon Sep 17 00:00:00 2001
From: Stefan Dirsch <[email protected]>
Date: Fri, 14 Mar 2014 16:00:50 +0100
Subject: [PATCH 2/2] Fixed driver name in error message about KMS active.

Seems some code came from cirrus driver by copy & paste. Fixed
this in error message about device already in use by KMS module.

Signed-off-by: Stefan Dirsch <[email protected]>
---
 src/ast_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ast_driver.c b/src/ast_driver.c
index 677c170..3f81558 100644
--- a/src/ast_driver.c
+++ b/src/ast_driver.c
@@ -312,7 +312,7 @@ ASTProbe(DriverPtr drv, int flags)
                                "ast: The PCI device 0x%x at %2.2d@%2.2d:%2.2d:%1.1d has a kernel module claiming it.\n",
                                pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func);
                     xf86DrvMsg(0, X_ERROR,
-                               "cirrus: This driver cannot operate until it has been unloaded.\n");
+                               "ast: This driver cannot operate until it has been unloaded.\n");
                     xf86UnclaimPciSlot(pPci, devSections[0]);
                     free(devSections);
                     return FALSE;
-- 
1.8.4.5

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to