[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-18 Thread Joonyoung Shim
Hi, On 09/18/2014 01:41 AM, Daniel Drake wrote: > On Wed, Sep 17, 2014 at 7:45 AM, Daniel Vetter wrote: >> I think fb refcounting in exynos is just plain busted. If you look at >> other drivers the only place the refcount framebuffers or backing >> storage objects is for pageflips to make sure

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-18 Thread Daniel Vetter
On Wed, Sep 17, 2014 at 6:41 PM, Daniel Drake wrote: > 2. drm_mode_rmfb then calls drm_framebuffer_remove, which calls > drm_mode_set_config_internal() in order to turn off the CRTC, dropping > another reference in the process. > if (tmp->old_fb) >

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-18 Thread Daniel Vetter
On Wed, Sep 17, 2014 at 6:41 PM, Daniel Drake wrote: > However there is *another* fb reference taken in > omap_plane_mode_set(). And my patch is modelled to do the same in > exynos-drm. This is because omapdrm does _everything_ asynchrously, even plain modesets. Unfortunately that async modeset

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-18 Thread Daniel Drake
On Thu, Sep 18, 2014 at 12:39 AM, Daniel Vetter wrote: > On Wed, Sep 17, 2014 at 6:41 PM, Daniel Drake wrote: >> 2. drm_mode_rmfb then calls drm_framebuffer_remove, which calls >> drm_mode_set_config_internal() in order to turn off the CRTC, dropping >> another reference in the process. >>

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-17 Thread Joonyoung Shim
Hi, On 09/17/2014 03:49 PM, Inki Dae wrote: > On 2014? 09? 17? 15:35, Andrzej Hajda wrote: >> Hi, >> >> On 09/16/2014 08:35 AM, Daniel Vetter wrote: >>> On Mon, Sep 15, 2014 at 12:52:17PM -0600, Daniel Drake wrote: Pageflipping currently causes some inconsistencies that lead to crashes.

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-17 Thread Inki Dae
On 2014? 09? 17? 15:35, Andrzej Hajda wrote: > Hi, > > On 09/16/2014 08:35 AM, Daniel Vetter wrote: >> On Mon, Sep 15, 2014 at 12:52:17PM -0600, Daniel Drake wrote: >>> Pageflipping currently causes some inconsistencies that lead to >>> crashes. Just run an app that causes a CRTC pageflip in a

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-17 Thread Daniel Vetter
On Wed, Sep 17, 2014 at 2:19 PM, Daniel Drake wrote: >> Chip specific drm driver internally doesn't have to care fb reference count >> if >> there is no special case. We should have switched to universal plane at that >> time. > > To me it seems like the chip-specific DRM drivers do need to add

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-17 Thread Daniel Drake
On Wed, Sep 17, 2014 at 7:45 AM, Daniel Vetter wrote: > I think fb refcounting in exynos is just plain busted. If you look at > other drivers the only place the refcount framebuffers or backing > storage objects is for pageflips to make sure the memory doesn't go > away while the hw is still

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-17 Thread Andrzej Hajda
Hi, On 09/16/2014 08:35 AM, Daniel Vetter wrote: > On Mon, Sep 15, 2014 at 12:52:17PM -0600, Daniel Drake wrote: >> Pageflipping currently causes some inconsistencies that lead to >> crashes. Just run an app that causes a CRTC pageflip in a raw X session >> and check that it exits cleanly and can

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-17 Thread Daniel Drake
On Wed, Sep 17, 2014 at 1:44 AM, Joonyoung Shim wrote: > It's problem to add this from commit 25c8b5c3048cb6c98d402ca8d4735ccf910f727c. My patch moves that drm_framebuffer_reference() call to the plane function which is called from crtc_mode_set context (and also called in crtc pageflip path),

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-16 Thread Daniel Vetter
On Mon, Sep 15, 2014 at 12:52:17PM -0600, Daniel Drake wrote: > Pageflipping currently causes some inconsistencies that lead to > crashes. Just run an app that causes a CRTC pageflip in a raw X session > and check that it exits cleanly and can be restarted - you'll see > crashes like: > Unable to

[PATCH] drm/exynos: fix plane-framebuffer linkage

2014-09-15 Thread Daniel Drake
Pageflipping currently causes some inconsistencies that lead to crashes. Just run an app that causes a CRTC pageflip in a raw X session and check that it exits cleanly and can be restarted - you'll see crashes like: Unable to handle kernel NULL pointer dereference at virtual address 0334 PC