All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Qiang Yu <yuq825@gmail.com>
Cc: Simon Shields <simon@lineageos.org>, Marek Vasut <marex@denx.de>,
	Connor Abbott <cwabbott0@gmail.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Andrei Paulau <7134956@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Vasily Khoruzhick <anarsoul@gmail.com>,
	Erico Nunes <nunes.erico@gmail.com>
Subject: Re: [PATCH RFC 05/24] Revert "drm: Nerf the preclose callback for modern drivers"
Date: Thu, 31 May 2018 10:51:13 -0700	[thread overview]
Message-ID: <87po1br9wu.fsf@anholt.net> (raw)
In-Reply-To: <CAKGbVbvcmYUSVNWXAJE3jqP90MCohgwKft3EF8pziRCov3aAUQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1514 bytes --]

Qiang Yu <yuq825@gmail.com> writes:

>>>
>>> It is OK if evil user free/unmap the buffer when task is not done
>>> in my implementation. It will generate a MMU fault in that case and kernel
>>> driver will do recovery.
>>>
>>> So does the Ctrl+C case, if don't deal with it, just get some noisy MMU
>>> fault warning and a HW reset recovery.
>>
>> How about an app rendering to shared buffers, which glFlush()es and
>> exits cleanly but doesn't close the DRI screen?  What would cause that
>> app's rendering to get completed succesfully instead of faulting to
>> death?
> Do you mean the same case as Ctrl+C when an app exit without waiting
> all task finished in userspace?

Basically the same, but I'm saying that the app is doing everything
right and terminating successfully, rather than being interrupted (which
you might otherwise use to justify its rendering failing)

>> You really do need to refcount the buffers used in a rendering job so
>> they don't get freed early.
> Do you mean refcount the buffers in kernel space job? This is OK but
> not necessary, I can wait task complete in gem_close_object which
> will be called by drm_release for each buffer too (I still think better
> waiting in preclose at once but it's gone).

Just wait for all tasks to complete when any object is freed?  That's
going to be bad for performance.  Or are you saying that you already
have the connection between the task and its objects (and, if so, why
aren't you just doing refcounting correctly through that path?)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-05-31 17:51 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-19  6:52 [PATCH RFC 00/24] Lima DRM driver Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 01/24] ARM: dts: add gpu node to exynos4 Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 02/24] dt-bindings: add switch-delay property for mali-utgard Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 03/24] arm64/dts: add switch-delay for meson mali Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 04/24] " Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 05/24] Revert "drm: Nerf the preclose callback for modern drivers" Qiang Yu
2018-05-21 19:37   ` Eric Anholt
2018-05-22  1:04     ` Qiang Yu
2018-05-23  9:04       ` Daniel Vetter
2018-05-23 12:59         ` Qiang Yu
2018-05-23 20:31           ` Daniel Vetter
2018-05-24  1:18             ` Qiang Yu
2018-05-24  7:51               ` Daniel Vetter
2018-05-24  8:55                 ` Qiang Yu
2018-05-30 18:13                   ` Eric Anholt
2018-05-31 14:04                     ` Qiang Yu
2018-05-31 17:51                       ` Eric Anholt [this message]
2018-05-31 18:04                         ` Keith Packard
2018-06-01  2:03                           ` Qiang Yu
2018-06-01  1:58                         ` Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 06/24] drm/lima: add lima uapi header Qiang Yu
2018-05-21 19:51   ` Eric Anholt
2018-05-22  1:33     ` Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 07/24] drm/lima: add mali 4xx GPU hardware regs Qiang Yu
2018-05-19 11:20   ` Marek Vasut
2018-05-19  6:52 ` [PATCH RFC 08/24] drm/lima: add lima core driver Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 09/24] drm/lima: add GPU device functions Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 10/24] drm/lima: add PMU related functions Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 11/24] drm/lima: add L2 cache functions Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 12/24] drm/lima: add GP related functions Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 13/24] drm/lima: add PP " Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 14/24] drm/lima: add MMU " Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 15/24] drm/lima: add BCAST related function Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 16/24] drm/lima: add DLBU related functions Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 17/24] drm/lima: add GPU virtual memory space handing Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 18/24] drm/lima: add TTM subsystem functions Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 19/24] drm/lima: add buffer object functions Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 20/24] drm/lima: add GEM related functions Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 21/24] drm/lima: add GEM Prime " Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 22/24] drm/lima: add GPU schedule using DRM_SCHED Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 23/24] drm/lima: add context related functions Qiang Yu
2018-05-19  6:52 ` [PATCH RFC 24/24] drm/lima: add makefile and kconfig Qiang Yu
  -- strict thread matches above, loose matches on Subject: below --
2018-05-18  9:27 [PATCH RFC 00/24] Lima DRM driver Qiang Yu
2018-05-18  9:27 ` [PATCH RFC 05/24] Revert "drm: Nerf the preclose callback for modern drivers" Qiang Yu
2018-05-23  9:35   ` Christian König
2018-05-23 13:13     ` Qiang Yu
2018-05-23 13:41       ` Christian König
2018-05-24  1:38         ` Qiang Yu
2018-05-24  6:46           ` Christian König
2018-05-24  9:24             ` Qiang Yu
2018-05-24  9:41               ` Christian König
2018-05-24 12:54                 ` Qiang Yu

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=87po1br9wu.fsf@anholt.net \
    --to=eric@anholt.net \
    --cc=7134956@gmail.com \
    --cc=anarsoul@gmail.com \
    --cc=cwabbott0@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=marex@denx.de \
    --cc=narmstrong@baylibre.com \
    --cc=nunes.erico@gmail.com \
    --cc=simon@lineageos.org \
    --cc=yuq825@gmail.com \
    /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.