1. 21 Nov, 2018 1 commit
  2. 25 Jul, 2018 1 commit
  3. 30 May, 2018 1 commit
  4. 21 Mar, 2018 1 commit
    • Lukas Wunner's avatar
      drm/nouveau/bl: Fix oops on driver unbind · bdbd0a20
      Lukas Wunner authored
      commit 76f2e2bc upstream.
      
      Unbinding nouveau on a dual GPU MacBook Pro oopses because we iterate
      over the bl_connectors list in nouveau_backlight_exit() but skipped
      initializing it in nouveau_backlight_init().  Stacktrace for posterity:
      
          BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
          IP: nouveau_backlight_exit+0x2b/0x70 [nouveau]
          nouveau_display_destroy+0x29/0x80 [nouveau]
          nouveau_drm_unload+0x65/0xe0 [nouveau]
          drm_dev_unregister+0x3c/0xe0 [drm]
          drm_put_dev+0x2e/0x60 [drm]
          nouveau_drm_device_remove+0x47/0x70 [nouveau]
          pci_device_remove+0x36/0xb0
          device_release_driver_internal+0x157/0x220
          driver_detach+0x39/0x70
          bus_remove_driver+0x51/0xd0
          pci_unregister_driver+0x2a/0xa0
          nouveau_drm_exit+0x15/0xfb0 [nouveau]
          SyS_delete_module+0x18c/0x290
          system_call_fast_compare_end+0xc/0x6f
      
      Fixes: b53ac1ee
      
       ("drm/nouveau/bl: Do not register interface if Apple GMUX detected")
      Cc: stable@vger.kernel.org # v4.10+
      Cc: Pierre Moreau <pierre.morrow@free.fr>
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bdbd0a20
  5. 17 Feb, 2017 1 commit
  6. 13 Dec, 2016 2 commits
    • Pierre Moreau's avatar
      drm/nouveau/bl: Do not register interface if Apple GMUX detected · b53ac1ee
      Pierre Moreau authored
      
      
      The Apple GMUX is the one managing the backlight, so there is no need for
      Nouveau to register its own backlight interface.
      
      v2: Do not split information message on two lines as it prevents from grepping
          it, as pointed out by Lukas Wunner
      
      v3: Add a missing end-of-line character to the printed message
      Signed-off-by: default avatarPierre Moreau <pierre.morrow@free.fr>
      Reviewed-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      b53ac1ee
    • Pierre Moreau's avatar
      drm/nouveau/bl: Assign different names to interfaces · db1a0ae2
      Pierre Moreau authored
      Currently, every backlight interface created by Nouveau uses the same name,
      nv_backlight. This leads to a sysfs warning as it tries to create an already
      existing folder. This patch adds a incremented number to the name, but keeps
      the initial name as nv_backlight, to avoid possibly breaking userspace; the
      second interface will be named nv_backlight1, and so on.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86539
      
      
      
      v2:
      * Switch to using ida for generating unique IDs, as suggested by Ilia Mirkin;
      * Allocate backlight name on the stack, as suggested by Ilia Mirkin;
      * Move `nouveau_get_backlight_name()` to avoid forward declaration, as
        suggested by Ilia Mirkin;
      * Fix reference to bug report formatting, as reported by Nick Tenney.
      
      v3:
      * Define a macro for the size of the backlight name, to avoid defining
        it multiple times;
      * Use snprintf in place of sprintf.
      
      v4:
      * Do not create similarly named interfaces when reaching the maximum
        amount of unique names, but fail instead, as pointed out by Lukas Wunner
      Signed-off-by: default avatarPierre Moreau <pierre.morrow@free.fr>
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      db1a0ae2
  7. 12 Oct, 2016 1 commit
  8. 20 May, 2016 1 commit
  9. 28 Aug, 2015 1 commit
    • Ben Skeggs's avatar
      drm/nouveau/nvif: simplify and tidy library interfaces · a01ca78c
      Ben Skeggs authored
      
      
      A variety of tweaks to the NVIF library interfaces, mostly ripping out
      things that turned out to be not so useful.
      
      - Removed refcounting from nvif_object, callers are expected to not be
        stupid instead.
      - nvif_client is directly reachable from anything derived from nvif_object,
        removing the need for heuristics to locate it
      - _new() versions of interfaces, that allocate memory for the object
        they construct, have been removed.  The vast majority of callers used
        the embedded _init() interfaces.
      - No longer storing constructor arguments (and the data returned from
        nvkm) inside nvif_object, it's more or less unused and just wastes
        memory.
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      a01ca78c
  10. 09 Aug, 2014 3 commits
  11. 26 May, 2014 1 commit
    • Hans de Goede's avatar
      nouveau: Don't check acpi_video_backlight_support() before registering backlight · bee56443
      Hans de Goede authored
      acpi_video_backlight_support() is supposed to be called by other (vendor
      specific) firmware backlight controls, not by native / raw backlight controls
      like nv_backlight.
      
      Userspace will normally prefer firmware interfaces over raw interfaces, so
      if acpi_video backlight support is present it will use that even if
      nv_backlight is registered as well.
      
      Except when video.use_native_backlight is present on the kernel cmdline
      (or enabled through a dmi based quirk). As the name indicates the goal here
      is to make only the raw interface available to userspace so that it will use
      that (it only does this when it sees a win8 compliant bios).
      
      This is done by:
      1) Not registering any acpi_video# backlight devices; and
      2) Making acpi_video_backlight_support() return true so that other firmware
      drivers, ie acer_wmi, thinkpad_acpi, dell_laptop, etc. Don't register their
      own vender specific interfaces.
      
      Currently nouveau breaks this setup, as when acpi_video_backlight_support()
      returns true, it does not register itself, resulting in no backlight control
      at all.
      
      This is esp. going to be a problem with 3.16 which will default to
      video.use_native_backlight=1, and thus nouveau based laptops with a win8 bios
      will get no backlight control at all.
      
      This also likely explains why the previous attempt to make
      video.use_native_backlight=1 the default was not a success, as without this
      patch having a default of video.use_native_backlight=1 will cause regressions.
      
      Note this effectively reverts commit 5bead799 (drm/nouveau: don't
      expose backlight control when available through ACPI).
      
      References: https://bugzilla.redhat.com/show_bug.cgi?id=1093171
      
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bee56443
  12. 22 Oct, 2013 1 commit
    • Dave Airlie's avatar
      drm/sysfs: sort out minor and connector device object lifetimes. · 5bdebb18
      Dave Airlie authored
      
      
      So drm was abusing device lifetimes, by having embedded device structures
      in the minor and connector it meant that the lifetime of the internal drm
      objects (drm_minor and drm_connector) were tied to the lifetime of the device
      files in sysfs, so if something kept those files opened the current code
      would kfree the objects and things would go downhill from there.
      
      Now in reality there is no need for these lifetimes to be so intertwined,
      especailly with hotplugging of devices where we wish to remove the sysfs
      and userspace facing pieces before we can unwind the internal objects due
      to open userspace files or mmaps, so split the objects out so the struct
      device is no longer embedded and do what fbdev does and just allocate
      and remove the sysfs inodes separately.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      5bdebb18
  13. 26 Apr, 2013 1 commit
  14. 20 Feb, 2013 1 commit
  15. 03 Oct, 2012 4 commits
  16. 02 Oct, 2012 1 commit
  17. 20 Sep, 2011 4 commits
  18. 23 Mar, 2011 2 commits
  19. 18 Nov, 2010 1 commit
  20. 16 Nov, 2010 1 commit
  21. 16 Mar, 2010 1 commit
  22. 11 Dec, 2009 1 commit
    • Ben Skeggs's avatar
      drm/nouveau: Add DRM driver for NVIDIA GPUs · 6ee73861
      Ben Skeggs authored
      
      
      This adds a drm/kms staging non-API stable driver for GPUs from NVIDIA.
      
      This driver is a KMS-based driver and requires a compatible nouveau
      userspace libdrm and nouveau X.org driver.
      
      This driver requires firmware files not available in this kernel tree,
      interested parties can find them via the nouveau project git archive.
      
      This driver is reverse engineered, and is in no way supported by nVidia.
      
      Support for nearly the complete range of nvidia hw from nv04->g80 (nv50)
      is available, and the kms driver should support driving nearly all
      output types (displayport is under development still) along with supporting
      suspend/resume.
      
      This work is all from the upstream nouveau project found at
      nouveau.freedesktop.org.
      
      The original authors list from nouveau git tree is:
      Anssi Hannula <anssi.hannula@iki.fi>
      Ben Skeggs <bskeggs@redhat.com>
      Francisco Jerez <currojerez@riseup.net>
      Maarten Maathuis <madman2003@gmail.com>
      Marcin Kościelnicki <koriakin@0x04.net>
      Matthew Garrett <mjg@redhat.com>
      Matt Parnell <mparnell@gmail.com>
      Patrice Mandin <patmandin@gmail.com>
      Pekka Paalanen <pq@iki.fi>
      Xavier Chantry <shiningxc@gmail.com>
      along with project founder Stephane Marchesin <marchesin@icps.u-strasbg.fr>
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      6ee73861