[RFC] xserver: add SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS
Hans de Goede
hdegoede at redhat.com
Mon Jun 16 08:12:43 PDT 2014
Hi,
On 06/16/2014 05:05 PM, Rob Clark wrote:
> Give the DDX a way to know whether non-pci platform devices are
> completley 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.
> ---
> hw/xfree86/common/xf86platformBus.c | 4 ++++
> hw/xfree86/common/xf86str.h | 3 ++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
> index bb4c71d..3af107e 100644
> --- a/hw/xfree86/common/xf86platformBus.c
> +++ b/hw/xfree86/common/xf86platformBus.c
> @@ -410,6 +410,10 @@ xf86platformProbeDev(DriverPtr drvp)
> const unsigned numDevs = xf86MatchDevice(drvp->driverName, &devList);
> int i, j;
>
> + /* let driver know to expect non-pci platform devices to work: */
> + if (drvp->driverFunc)
> + drvp->driverFunc(NULL, SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS, NULL);
> +
IMHO this call would fit better in hw/xfree86/common/xf86Init.c in the loop
around line 550 where xf86DriverList[i]->driverFunc(NULL, GET_REQUIRED_HW_INTERFACES
gets called.
> /* find the main device or any device specificed in xorg.conf */
> for (i = 0; i < numDevs; i++) {
> for (j = 0; j < xf86_num_platform_devices; j++) {
> diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
> index 4c2d147..969398d 100644
> --- a/hw/xfree86/common/xf86str.h
> +++ b/hw/xfree86/common/xf86str.h
> @@ -256,7 +256,8 @@ typedef enum {
> RR_GET_INFO,
> RR_SET_CONFIG,
> RR_GET_MODE_MM,
> - GET_REQUIRED_HW_INTERFACES = 10
> + GET_REQUIRED_HW_INTERFACES = 10,
> + SERVER_SUPPORTS_NON_PCI_PLATFORM_DEVS = 12,
> } xorgDriverFuncOp;
I see that you skip 11 because that is SUPPORTS_SERVER_FDS, but why is this
patch based on older server sources at all? I understand that you want to
backport this, but shouldn't we start with applying it on master ?
Regards,
Hans
More information about the xorg-devel
mailing list