1. 24 4月, 2019 3 次提交
  2. 18 4月, 2019 1 次提交
  3. 25 3月, 2019 1 次提交
  4. 04 3月, 2019 3 次提交
  5. 21 2月, 2019 2 次提交
  6. 19 2月, 2019 1 次提交
  7. 12 1月, 2019 1 次提交
  8. 27 12月, 2018 1 次提交
  9. 25 11月, 2018 1 次提交
  10. 06 11月, 2018 1 次提交
  11. 25 10月, 2018 1 次提交
  12. 13 9月, 2018 1 次提交
  13. 16 7月, 2018 1 次提交
    • L
      drm/dp_helper: Add DP aux channel tracing · a18b2192
      Lyude Paul 提交于
      This is something we've needed for a very long time now, as it makes
      debugging issues with faulty MST hubs along with debugging issues
      regarding us interfacing with hubs correctly vastly easier to debug.
      Currently this can actually be done if you trace the i2c devices for DP
      using ftrace but that's significantly less useful for a couple of
      reasons:
      
      - Tracing the i2c devices through ftrace means all of the traces are
        going to contain a lot of "garbage" output that we're sending over the
        i2c line. Most of this garbage comes from retrying transactions, DRM's
        helper library adding extra transactions to work around bad hubs, etc.
      - Having a user set up ftrace so that they can provide debugging
        information is a lot more difficult then being able to say "just boot
        with drm.debug=0x100"
      - We can potentially expand upon this tracing in the future to print
        debugging information in regards to other DP transactions like MST
        sideband transactions
      
      This is inspired by a patch Rob Clark sent to do this a long time back.
      Neither of us could find the patch however, so we both assumed it would
      probably just be easier to rewrite it anyway.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180716154432.13433-1-lyude@redhat.com
      a18b2192
  14. 10 7月, 2018 1 次提交
  15. 31 5月, 2018 1 次提交
  16. 11 5月, 2018 1 次提交
    • H
      drm: Match sysfs name in link removal to link creation · 7f6df440
      Haneen Mohammed 提交于
      This patch matches the sysfs name used in the unlinking with the
      linking function. Otherwise, remove_compat_control_link() fails to remove
      sysfs created by create_compat_control_link() in drm_dev_register().
      
      Fixes: 6449b088 ("drm: Add fake controlD* symlinks for backwards
      compat")
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Emil Velikov <emil.l.velikov@gmail.com>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Gustavo Padovan <gustavo@padovan.org>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: dri-devel@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v4.10+
      Signed-off-by: NHaneen Mohammed <hamohammed.sa@gmail.com>
      [seanpaul added Fixes and Cc tags]
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180511041542.GA4253@haneen-vb
      7f6df440
  17. 04 5月, 2018 1 次提交
  18. 29 3月, 2018 1 次提交
  19. 06 3月, 2018 1 次提交
  20. 25 10月, 2017 1 次提交
  21. 21 10月, 2017 1 次提交
  22. 26 9月, 2017 1 次提交
  23. 11 8月, 2017 3 次提交
  24. 11 7月, 2017 1 次提交
    • A
      drm: inhibit drm drivers register to uninitialized drm core · 371c2279
      Alexandru Moise 提交于
      If the DRM core fails to init for whatever reason, ensure that
      no driver ever calls drm_dev_register().
      
      This is best done at drm_dev_init() as it covers drivers that call
      drm_dev_alloc() as well as drivers that prefer to embed struct
      drm_device into their own device struct and call drm_dev_init()
      themselves.
      
      In my case I had so many dynamic device majors used that the major
      number for DRM (226) was stolen, causing DRM core init to fail after
      failing to register a chrdev, and ultimately calling debugfs_remove()
      on drm_debugfs_root in drm_core_exit().
      
      After drm core failed to init, VGEM was still calling drm_dev_register(),
      ultimately leading to drm_debugfs_init(), with drm_debugfs_root passed
      as the root for the new debugfs dir at debugfs_create_dir().
      
      This led to a kernel panic once we were either derefencing root->d_inode
      while it was NULL or calling root->d_inode->i_op->lookup() while it was
      NULL in debugfs at inode_lock() or lookup_*().
      Signed-off-by: NAlexandru Moise <00moses.alexander00@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170708214352.GA27205@gmail.com
      371c2279
  25. 02 6月, 2017 1 次提交
    • H
      drm: Fix oops + Xserver hang when unplugging USB drm devices · 75fb6363
      Hans de Goede 提交于
      commit a39be606 ("drm: Do a full device unregister when unplugging")
      causes backtraces like this one when unplugging an usb drm device while
      it is in use:
      
      usb 2-3: USB disconnect, device number 25
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 242 at drivers/gpu/drm/drm_mode_config.c:424
         drm_mode_config_cleanup+0x220/0x280 [drm]
      ...
      RIP: 0010:drm_mode_config_cleanup+0x220/0x280 [drm]
      ...
      Call Trace:
       gm12u320_modeset_cleanup+0xe/0x10 [gm12u320]
       gm12u320_driver_unload+0x35/0x70 [gm12u320]
       drm_dev_unregister+0x3c/0xe0 [drm]
       drm_unplug_dev+0x12/0x60 [drm]
       gm12u320_usb_disconnect+0x36/0x40 [gm12u320]
       usb_unbind_interface+0x72/0x280
       device_release_driver_internal+0x158/0x210
       device_release_driver+0x12/0x20
       bus_remove_device+0x104/0x180
       device_del+0x1d2/0x350
       usb_disable_device+0x9f/0x270
       usb_disconnect+0xc6/0x260
      ...
      [drm:drm_mode_config_cleanup [drm]] *ERROR* connector Unknown-1 leaked!
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 242 at drivers/gpu/drm/drm_mode_config.c:458
         drm_mode_config_cleanup+0x268/0x280 [drm]
      ...
      <same Call Trace>
      ---[ end trace 80df975dae439ed6 ]---
      general protection fault: 0000 [#1] SMP
      ...
      Call Trace:
       ? __switch_to+0x225/0x450
       drm_mode_rmfb_work_fn+0x55/0x70 [drm]
       process_one_work+0x193/0x3c0
       worker_thread+0x4a/0x3a0
      ...
      RIP: drm_framebuffer_remove+0x62/0x3f0 [drm] RSP: ffffb776c39dfd98
      ---[ end trace 80df975dae439ed7 ]---
      
      After which the system is unusable this is caused by drm_dev_unregister
      getting called immediately on unplug, which calls the drivers unload
      function which calls drm_mode_config_cleanup which removes the framebuffer
      object while userspace is still holding a reference to it.
      
      Reverting commit a39be606 ("drm: Do a full device unregister
      when unplugging") leads to the following oops on unplug instead,
      when userspace closes the last fd referencing the drm_dev:
      
      sysfs group 'power' not found for kobject 'card1-Unknown-1'
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 2459 at fs/sysfs/group.c:237
         sysfs_remove_group+0x80/0x90
      ...
      RIP: 0010:sysfs_remove_group+0x80/0x90
      ...
      Call Trace:
       dpm_sysfs_remove+0x57/0x60
       device_del+0xfd/0x350
       device_unregister+0x1a/0x60
       drm_sysfs_connector_remove+0x39/0x50 [drm]
       drm_connector_unregister+0x5a/0x70 [drm]
       drm_connector_unregister_all+0x45/0xa0 [drm]
       drm_modeset_unregister_all+0x12/0x30 [drm]
       drm_dev_unregister+0xca/0xe0 [drm]
       drm_put_dev+0x32/0x60 [drm]
       drm_release+0x2f3/0x380 [drm]
       __fput+0xdf/0x1e0
      ...
      ---[ end trace ecfb91ac85688bbe ]---
      BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8
      IP: down_write+0x1f/0x40
      ...
      Call Trace:
       debugfs_remove_recursive+0x55/0x1b0
       drm_debugfs_connector_remove+0x21/0x40 [drm]
       drm_connector_unregister+0x62/0x70 [drm]
       drm_connector_unregister_all+0x45/0xa0 [drm]
       drm_modeset_unregister_all+0x12/0x30 [drm]
       drm_dev_unregister+0xca/0xe0 [drm]
       drm_put_dev+0x32/0x60 [drm]
       drm_release+0x2f3/0x380 [drm]
       __fput+0xdf/0x1e0
      ...
      ---[ end trace ecfb91ac85688bbf ]---
      
      This is caused by the revert moving back to drm_unplug_dev calling
      drm_minor_unregister which does:
      
              device_del(minor->kdev);
              dev_set_drvdata(minor->kdev, NULL); /* safety belt */
              drm_debugfs_cleanup(minor);
      
      Causing the sysfs entries to already be removed even though we still
      have references to them in e.g. drm_connector.
      
      Note we must call drm_minor_unregister to notify userspace of the unplug
      of the device, so calling drm_dev_unregister is not completely wrong the
      problem is that drm_dev_unregister does too much.
      
      This commit fixes drm_unplug_dev by not only reverting
      commit a39be606 ("drm: Do a full device unregister when unplugging")
      but by also adding a call to drm_modeset_unregister_all before the
      drm_minor_unregister calls to make sure all sysfs entries are removed
      before calling device_del(minor->kdev) thereby also fixing the second
      set of oopses caused by just reverting the commit.
      
      Fixes: a39be606 ("drm: Do a full device unregister when unplugging")
      Cc: stable@vger.kernel.org
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Jeffy <jeffy.chen@rock-chips.com>
      Cc: Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
      Reported-by: NMarco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NSean Paul <seanpaul@chromium.org>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170601115430.4113-1-hdegoede@redhat.com
      75fb6363
  26. 02 2月, 2017 1 次提交
    • C
      drm: Provide a driver hook for drm_dev_release() · f30c9257
      Chris Wilson 提交于
      Some state is coupled into the device lifetime outside of the
      load/unload timeframe and requires teardown during final unreference
      from drm_dev_release(). For example, dmabufs hold both a device and
      module reference and may live longer than expected (i.e. the current
      pattern of the driver tearing down its state and then releasing a
      reference to the drm device) and yet touch driver private state when
      destroyed.
      
      v2: Export drm_dev_fini() and move the responsibility for finalizing the
      drm_device and freeing it to the release callback. (If no callback is
      provided, the core will call drm_dev_fini() and kfree(dev) as before.)
      v3: Remember to add drm_dev_fini() to drm_drv.h
      v4: Tidy language for kerneldoc
      v5: Cross reference from drm_dev_init() to note that driver->release()
      allows for arbitrary embedding.
      v6: Refer to driver data rather than driver state, as state is now
      becoming associated with the struct drm_atomic_state and friends.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      [danvet: Use the proper reference for struct members, which is
      &drm_driver.release.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170202093632.31017-1-chris@chris-wilson.co.uk
      f30c9257
  27. 30 1月, 2017 1 次提交
  28. 27 1月, 2017 1 次提交
  29. 25 1月, 2017 1 次提交
  30. 30 12月, 2016 4 次提交