All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: Peter Stuge <peter@stuge.se>,
	"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/gud: Free buffers on device removal
Date: Mon, 14 Jun 2021 22:31:25 +0200	[thread overview]
Message-ID: <CACRpkdZvq_xL58Ns6S8cddd2hHmwVHALqVDqmvWjZpa3J5p1KQ@mail.gmail.com> (raw)
In-Reply-To: <20210329180120.27380-1-noralf@tronnes.org>

On Mon, Mar 29, 2021 at 8:01 PM Noralf Trønnes <noralf@tronnes.org> wrote:

> 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.
>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>

Interesting, we have exactly the same thing with a shim device
staying around for open file handles after the actual physical
device dies in gpiolib. I guess this is a common problem.

Connect the buffer allocations to the device which will use
them not the userspace facing device, indeed.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

      parent reply	other threads:[~2021-06-14 20:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 18:01 [PATCH 1/2] drm/gud: Free buffers on device removal Noralf Trønnes
2021-03-29 18:01 ` [PATCH 2/2] drm/gud: Use scatter-gather USB bulk transfer Noralf Trønnes
2021-06-14 20:54   ` Linus Walleij
2021-06-15  8:48     ` Noralf Trønnes
2021-06-15  9:17       ` Peter Stuge
2021-06-15 12:19         ` Noralf Trønnes
2021-06-14 20:31 ` Linus Walleij [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkdZvq_xL58Ns6S8cddd2hHmwVHALqVDqmvWjZpa3J5p1KQ@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=noralf@tronnes.org \
    --cc=peter@stuge.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.