1. 18 Oct, 2018 1 commit
    • Adam Jackson's avatar
      linux: Make platform device probe less fragile · 0816e8fc
      Adam Jackson authored
      At the point where xf86BusProbe runs we haven't yet taken our own VT,
      which means we can't perform drm "master" operations on the device. This
      is tragic, because we need master to fish the bus id string out of the
      kernel, which we can only do after drmSetInterfaceVersion, which for
      some reason stores that string on the device not the file handle and
      thus needs master access.
      
      Fortunately we know the format of the busid string, and it happens to
      almost be the same as the ID_PATH variable from udev. Use that instead
      and stop calling drmSetInterfaceVersion.
      Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      0816e8fc
  2. 21 May, 2018 1 commit
  3. 29 Nov, 2017 1 commit
    • Daniel Martin's avatar
      xfree86: Fix set but not used warnings in lnx_platform · 02981fe1
      Daniel Martin authored
      Those warnings are generated, when building without systemd support:
      
      ../hw/xfree86/os-support/linux/lnx_platform.c: In function ‘get_drm_info’:
      ../hw/xfree86/os-support/linux/lnx_platform.c:29:16: warning: variable ‘minor’ set but not used [-Wunused-but-set-variable]
           int major, minor, fd;
                      ^~~~~
      ../hw/xfree86/os-support/linux/lnx_platform.c:29:9: warning: variable ‘major’ set but not used [-Wunused-but-set-variable]
           int major, minor, fd;
               ^~~~~
      
      In this case the functions are macros, which don't use theese arguments.
      
      v2: Add comments, why the warnings appear. Suggested by Emil Velikov
      Reviewed-by: Emil Velikov's avatarEmil Velikov <emil.velikov@collabora.com>
      Signed-off-by: default avatarDaniel Martin <consume.noise@gmail.com>
      02981fe1
  4. 18 Jul, 2014 1 commit
  5. 07 Jul, 2014 2 commits
  6. 04 May, 2014 1 commit
    • Peter Hutterer's avatar
      systemd-logind: let the logind code decided whether to close an fd · 15460eae
      Peter Hutterer authored
      We can only request one fd per device from systemd-logind. If a fd is re-used
      by the same device, releasing the fd from one device doesn't mean we can close
      it. The systemd code knows when it's really released, so let it close the fd.
      
      Test case: xorg.conf section for an input device with hotplugging enabled.
      evdev detects the duplicate and closes the hotplugged device, which closes the
      fd. The other instance of evdev thinks the fd is still valid so now you're
      playing a double lottery. First, which client(s) will get the evdev fd?
      Second, which requests will be picked up by evdev and which ones will be
      picked up by the client? You'll never know, but the fun is in finding out.
      Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      15460eae
  7. 12 Mar, 2014 1 commit
  8. 03 Mar, 2014 3 commits
  9. 12 Apr, 2013 3 commits
  10. 08 Apr, 2013 6 commits
  11. 06 Jul, 2012 2 commits
    • Dave Airlie's avatar
      xfree86: add platform bus hotplug support (v3) · ef668648
      Dave Airlie authored
      This provides add/remove support for platform devices at xfree86 ddx level.
      
      v2: cleanup properly if no driver found.
      
      v3: load the modesetting driver before checking driver list.
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      ef668648
    • Dave Airlie's avatar
      xfree86: use udev to provide device enumeration for kms devices (v10) · cf664713
      Dave Airlie authored
      On Linux in order for future hotplug work, we are required to interface
      to udev to detect device creation/removal. In order to try and get
      some earlier testing on this, this patch adds the ability to use
      udev for device enumeration on Linux.
      
      At startup the list of drm/kms devices is probed and this info is
      used to load drivers.
      
      A new driver probing method is introduced that passes the udev
      device info to the driver for probing.
      
      The probing integrates with the pci probing code and will fallback
      to the pci probe and old school probe functions in turn.
      
      The flags parameter to the probe function will be used later
      to provide hotplug and gpu screen flags for the driver to behave
      in a different way.
      
      This patch changes the driver ABI, all drivers should at least
      be set with a NULL udev probe function after this commit.
      
      v2: rename to platform bus, now with 100% less udev specific,
      
      this version passes config_odev_attribs around which are an array
      of id/string pairs, then the udev code can attach the set of attribs
      it understands, the OS specific code can attach its attrib, and then
      the core/drivers can lookup the required attribs.
      
      also add MATCH_PCI_DEVICES macro.
      
      This version is mainly to address concerns raised by ajax.
      
      v3: Address comments from Peter.
      fix whitespace that snuck in.
      rework to use a linked list with some core functions that
      xf86 wraps.
      
      v4: add free list, fix struct whitespace.
      ajax this address most of your issues?
      
      v5: drop probe ifdef, fix logic issue
      
      v6: some overhaul after more testing.
      
      Implement primaryBus for platform devices.
      document hotplug.h dev attribs - drop sysname attrib
      fix build with udev kms disabled
      make probing work like the PCI probe code,
         match against bus id if one exists, or primary device.
      
      RFC: add new bus id support "PLAT:syspath". we probably
      want to match on this a bit different, or use a different
      property maybe. I was mainly wanting this for use with
      specifying usb devices in xorg.conf directly, but PLAT:path
      could also work I suppose.
      
      v6.1: add missing noop platform function
      
      v7: fix two interactions with pci probing and slot claiming, prevents
      pci and platform trying to load two drivers for same slot.
      
      v8: test with zaphod mode on -ati driver, fixup resulting issue
      clean up common probe code into another function, change busid
      matching to allow dropping end of strings.
      
      v9: fix platform probing logic so it actually works.
      v9.1: fix pdev init to NULL properly.
      
      v10: address most of Keith's concerns.
      
      v4 was thanks to Reviewed-by: Adam Jackson <ajax@redhat.com>
      v5 was Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
      Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      cf664713