diff options
author | Noralf Trønnes <[email protected]> | 2019-02-08 15:01:02 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2019-03-25 15:58:05 +1000 |
commit | 3f04e0a6cfebf48152ac64502346cdc258811f79 (patch) | |
tree | 4ccc47708c31d7198068575adf781b581eb00d91 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
parent | b23b52b6720e4be1652a4c92819f34d91e735559 (diff) |
drm: Fix drm_release() and device unplug
If userspace has open fd(s) when drm_dev_unplug() is run, it will result
in drm_dev_unregister() being called twice. First in drm_dev_unplug() and
then later in drm_release() through the call to drm_put_dev().
Since userspace already holds a ref on drm_device through the drm_minor,
it's not necessary to add extra ref counting based on no open file
handles. Instead just drm_dev_put() unconditionally in drm_dev_unplug().
We now have this:
- Userpace holds a ref on drm_device as long as there's open fd(s)
- The driver holds a ref on drm_device as long as it's bound to the
struct device
When both sides are done with drm_device, it is released.
Signed-off-by: Noralf Trønnes <[email protected]>
Reviewed-by: Oleksandr Andrushchenko <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions