1. 20 Mar, 2012 32 commits
  2. 16 Mar, 2012 1 commit
  3. 15 Mar, 2012 7 commits
    • Dave Airlie's avatar
      drm/udl: initial UDL driver (v4) · 5320918b
      Dave Airlie authored
      This is an initial drm/kms driver for the displaylink devices.
      
      Supports fb_defio,
      supports KMS dumb interface
      supports 24bpp via conversion to 16bpp, hw can do this better.
      supports hot unplug using new drm core features.
      
      On an unplug, it disables connector polling, unplugs connectors
      from sysfs, unplugs fbdev layer (using Kay's API), drops all the
      USB device URBs, and call the drm core to unplug the device.
      
      This driver is based in large parts on udlfb.c so I've licensed
      it under GPLv2.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      5320918b
    • Dave Airlie's avatar
      drm: add core support for unplugging a device (v2) · 2c07a21d
      Dave Airlie authored
      Two parts to this, one is simple unplug from sysfs for the device node.
      
      The second adds an unplugged state, if we have device opens, we
      just set the unplugged state and return, if we have no device
      opens we drop the drm device.
      
      If after a lastclose we discover we are unplugged we then
      drop the drm device.
      
      v2: use an atomic for unplugged and wrap it for users,
      add checks on open + mmap + ioctl entry points.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      2c07a21d
    • Dave Airlie's avatar
      drm/modeset: add helper to unplug all connectors from sysfs · cbc7e221
      Dave Airlie authored
      In order to get correct ordering at hot-unplug for userspace,
      we need to tear down all the sysfs bits at the correct time.
      
      This adds a helper to allow drivers to remove the sysfs nodes
      for all connectors.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      cbc7e221
    • Dave Airlie's avatar
      drm/sysfs: protect sysfs removal code against being run twice. · 1828fe6c
      Dave Airlie authored
      a step towards correct hot unplug for USB devices, we need to
      remove the userspace facing bits at the unplug time for correct
      udev operation.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      1828fe6c
    • Kay Sievers's avatar
      udlfb: remove sysfs framebuffer device with USB .disconnect() · ce880cb8
      Kay Sievers authored
      The USB graphics card driver delays the unregistering of the framebuffer
      device to a workqueue, which breaks the userspace visible remove uevent
      sequence. Recent userspace tools started to support USB graphics card
      hotplug out-of-the-box and rely on proper events sent by the kernel.
      
      The framebuffer device is a direct child of the USB interface which is
      removed immediately after the USB .disconnect() callback. But the fb device
      in /sys stays around until its final cleanup, at a time where all the parent
      devices have been removed already.
      
      To work around that, we remove the sysfs fb device directly in the USB
      .disconnect() callback and leave only the cleanup of the internal fb
      data to the delayed work.
      
      Before:
       add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
       add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
       add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/graphics/fb0 (graphics)
       remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
       remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
       remove   /2-1.2:1.0/graphics/fb0 (graphics)
      
      After:
       add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
       add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
       add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/graphics/fb1 (graphics)
       remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/graphics/fb1 (graphics)
       remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
       remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
      
      Cc: stable@vger.kernel.org
      Tested-by: default avatarBernie Thompson <bernie@plugable.com>
      Acked-by: default avatarBernie Thompson <bernie@plugable.com>
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
      ce880cb8
    • Dave Airlie's avatar
      drm: Merge tag 'v3.3-rc7' into drm-core-next · 8229c885
      Dave Airlie authored
      Merge the fixes so far into core-next, needed to test
      intel driver.
      
      Conflicts:
      	drivers/gpu/drm/i915/intel_ringbuffer.c
      8229c885
    • Ville Syrjälä's avatar
      drm: Add drm_mode_copy() · c3c50e8b
      Ville Syrjälä authored
      Add a helper function to copy a display mode. Use it in
      drm_mode_duplicate() and nouveau mode_fixup hooks.
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      c3c50e8b