This simplifies drm fb lifetime, and if the crtc/plane needs to hold
a ref to the fb when disabling a pipe until the next vblank, this
avoids the need to make disabling an overlay synchronous. This is a
problem that shows up when userspace is using a drm plane to
implement a hw cursor.. making overlay disable synchronous causes
a performance problem when x11 is rapidly enabling/disabling the
hw cursor. But not making it synchronous opens up a race condition
for crashing if userspace turns around and immediately deletes the
fb. Refcnt'ing the fb makes it possible to solve this problem.
v1: original
v2: add drm_framebuffer_remove() which is called in all paths where
fb->funcs->destroy() was directly called before. This cleans
up the CRTCs/planes that the fb was attached to. You should
only directly use drm_framebuffer_unreference() if you are also
using drm_framebuffer_reference() to keep a ref to the fb.
v3: add comment explaining the fb refcount
v4: remove duplicate 'list_del(&fb->filp_head)'
[airlied: v4.1: fix local rejection]
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||
|---|---|---|
| .. | ||
| android | ||
| asus_oled | ||
| bcm | ||
| ccg | ||
| comedi | ||
| cptm1217 | ||
| crystalhd | ||
| csr | ||
| cxt1e1 | ||
| echo | ||
| et131x | ||
| frontier | ||
| ft1000 | ||
| gdm72xx | ||
| iio | ||
| ipack | ||
| keucr | ||
| line6 | ||
| media | ||
| net | ||
| nvec | ||
| octeon | ||
| olpc_dcon | ||
| omap-thermal | ||
| omapdrm | ||
| ozwpan | ||
| panel | ||
| phison | ||
| quickstart | ||
| ramster | ||
| rtl8187se | ||
| rtl8192e | ||
| rtl8192u | ||
| rtl8712 | ||
| rts5139 | ||
| rts_pstor | ||
| sbe-2t3e3 | ||
| sep | ||
| serqt_usb2 | ||
| slicoss | ||
| sm7xxfb | ||
| speakup | ||
| ste_rmi4 | ||
| telephony | ||
| tidspbridge | ||
| usbip | ||
| vme | ||
| vt6655 | ||
| vt6656 | ||
| winbond | ||
| wlags49_h2 | ||
| wlags49_h25 | ||
| wlan-ng | ||
| xgifb | ||
| zcache | ||
| zram | ||
| zsmalloc | ||
| Kconfig | ||
| Makefile | ||
| staging.c | ||