Return-Path: X-Original-To: dennis@ausil.us Delivered-To: dennis@ausil.us Received: from localhost (unknown [127.0.0.1]) by mail.ausil.us (Postfix) with ESMTP id AE53C2E021E for ; Mon, 16 Jun 2014 18:14:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at ausil.us Authentication-Results: mail02.ausil.us (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mail.ausil.us ([127.0.0.1]) by localhost (mail02.ausil.us [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2AoZpXtuwNq4 for ; Mon, 16 Jun 2014 18:13:56 +0000 (GMT) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-qc0-f171.google.com (mail-qc0-f171.google.com [209.85.216.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.ausil.us (Postfix) with ESMTPS id 87F032E0261 for ; Mon, 16 Jun 2014 18:13:40 +0000 (GMT) Received: by mail-qc0-f171.google.com with SMTP id w7so8379019qcr.16 for ; Mon, 16 Jun 2014 11:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jsWdJaCBC84y12XEEHC+1YnahY8ti8aoJY04XygDevU=; b=OjrxhPzRTZhaFHrLBWNtwov2CyZrFrBXUAAao9IAvRq28P35R+fASLX17l/DUgxHHO cXhMF6daP4HsYk2565CLVY1CGakRJwhSrYR5BogqOL84+M1M678i0tUbK0O79Ah2ETlx KIT4ANg+EB1RWqkQMGbCPaMRGpyYSerYs3qn1qn0PFj0V8O1vni9hMfqrNVi8EMw0WEF vEp2omX0DMjOq4qnqBRTcixcnQEpxU7oX/JxqlLdtqAzB6fCKwhQvREDrOFHJyfSUV8o CeC1cM3IYiRbgvaUz2jFzCw/cDOl2Kk6I+VXAkiGRraH7QBPzJWUT7oEXjHgSvg/en+t qH7Q== X-Received: by 10.140.107.52 with SMTP id g49mr7021793qgf.100.1402942416014; Mon, 16 Jun 2014 11:13:36 -0700 (PDT) Received: from localhost (pool-108-20-245-130.bstnma.east.verizon.net. [108.20.245.130]) by mx.google.com with ESMTPSA id e8sm22833340qaa.12.2014.06.16.11.13.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jun 2014 11:13:35 -0700 (PDT) From: Rob Clark To: xorg-devel@lists.x.org Cc: Dennis Gilmore , Dave Airlie , Thierry Reding , Rob Clark Subject: [PATCH 2/2] add SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS Date: Mon, 16 Jun 2014 14:13:17 -0400 Message-Id: <1402942397-16427-3-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1402942397-16427-1-git-send-email-robdclark@gmail.com> References: <1402942397-16427-1-git-send-email-robdclark@gmail.com> Give the DDX a way to know whether non-pci platform devices are completely broken or not. For xserver prior to the fix, the DDX should not claim a platform device in platformProbe(), as the server will fallback to old ->Probe(), which will fail if the device is already claimed. Meaning that a user could not make things work even with a .conf file to explicitly specify the driver to use. Idea suggested by Hans de Goede. Signed-off-by: Rob Clark Reviewed-by: Hans de Goede --- hw/xfree86/common/xf86Init.c | 10 +++++++++- hw/xfree86/common/xf86str.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 5a45004..9b6a8b5 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -546,10 +546,18 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (xf86DriverList[i]->Identify != NULL) xf86DriverList[i]->Identify(0); - if (xf86DriverList[i]->driverFunc) + if (xf86DriverList[i]->driverFunc) { xf86DriverList[i]->driverFunc(NULL, GET_REQUIRED_HW_INTERFACES, &flags); + /* also let the driver know that it is safe to + * allow platformProbe() to claim the device + * if it is a non-pci platform device: + */ + xf86DriverList[i]->driverFunc(NULL, + SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS, + NULL); + } if (NEED_IO_ENABLED(flags)) want_hw_access = TRUE; diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index a81e886..6f27f18 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -258,6 +258,7 @@ typedef enum { RR_GET_MODE_MM, GET_REQUIRED_HW_INTERFACES = 10, SUPPORTS_SERVER_FDS = 11, + SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS = 12, } xorgDriverFuncOp; typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *); -- 1.9.3