Skip to content
Commit f8ac863b authored by Noralf Trønnes's avatar Noralf Trønnes
Browse files

drm/gud: Free buffers on device removal



Free transfer and compression buffers on device removal instead of at
DRM device removal time. This ensures that the usual 2x8MB buffers are
released when the device is unplugged and not kept around should
userspace keep the DRM device fd open.

At least Ubuntu 20.04 doesn't release the DRM device on unplug.

The damage_lock mutex is not destroyed because it is used outside the
drm_dev_enter/exit block in gud_pipe_update(). AFAICT it's possible for
an open fbdev descriptor to trigger a commit after the USB device is gone.

v2: Don't destroy damage_lock

Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210701170748.58009-1-noralf@tronnes.org
parent 39a364a1
  • mirror @mirror

    mentioned in commit 13fead03

    ·

    mentioned in commit 13fead03

    Toggle commit list
  • mirror @mirror

    mentioned in commit e571cc2a4e6db50861d432e41741120417fd8e4d

    ·

    mentioned in commit e571cc2a4e6db50861d432e41741120417fd8e4d

    Toggle commit list
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment