All of lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Stone <daniel@fooishbar.org>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Rob Clark <robdclark@gmail.com>
Subject: Re: [PATCH] drm/exynos: fix kernel panic issue at drm releasing
Date: Tue, 05 Jan 2016 21:30:10 +0900	[thread overview]
Message-ID: <568BB752.7050603@samsung.com> (raw)
In-Reply-To: <20160105110811.GB8076@phenom.ffwll.local>

+ Rob Clark,

Hi Daniel and Rob,

2016년 01월 05일 20:08에 Daniel Vetter 이(가) 쓴 글:
> On Tue, Jan 05, 2016 at 07:55:52PM +0900, Inki Dae wrote:
>> Hi Daniel,
>>
>> 2016년 01월 05일 05:24에 Daniel Stone 이(가) 쓴 글:
>>> Hi Inki,
>>>
>>> On 4 January 2016 at 12:57, Inki Dae <inki.dae@samsung.com> wrote:
>>>> 2015년 12월 24일 22:32에 Daniel Stone 이(가) 쓴 글:
>>>>> On 24 December 2015 at 09:10, Inki Dae <inki.dae@samsung.com> wrote:
>>>>>> +void exynos_drm_crtc_cancel_page_flip(struct drm_crtc *crtc)
>>>>>> +{
>>>>>> +       struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
>>>>>> +       unsigned long flags;
>>>>>> +
>>>>>> +       spin_lock_irqsave(&crtc->dev->event_lock, flags);
>>>>>> +       exynos_crtc->event = NULL;
>>>>>> +       spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
>>>>>> +}
>>>>>
>>>>> This will leak the event and event space; you should call
>>>>> event->base.destroy() here. With that fixed:
>>>>
>>>> Right. we don't use exynos specific page flip function anymore which managed the event as a list so that the event objects can be freed by postclose callback.
>>>> Anyway, would it be better for event->base.destory() to be called between spin lock/unlock?
>>>
>>> You must increment event->base.file_priv->event_space (see
>>> drm_atomic.c:destroy_vblank_event), as well as calling
>>
>> Reasonable to me. Seems other DRM drivers don't increment event_space.
>>
>>> event->base.destroy (see drm_fops.c:drm_read) underneath event_lock,
>>> yes.
>>
>> In addition, only event objects belonging to the request process should be destroyed.
> 
> Just random comment out of the far left field, but robclark had a bunch of
> patches to clean up all that event alloc/cleanup code a bit and extract it
> into core functions. Might be good to ping him on irc to figure out where
> that series is and whether you could take it over.

Good news. I'll try to ping him on irc.

To Rob,
Can you let me know where your bunch of patches are? I'd like to look into the patches. I'd planned to have pull request so that this patch can go to 4.4.
As you had already relevant patch set maybe, we would need to check whether my patch can be replaced with your patch set or there is any corner case.

Thanks,
Inki Dae

> 
> Cheers, Daniel
> 

      reply	other threads:[~2016-01-05 12:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24  9:10 [PATCH] drm/exynos: fix kernel panic issue at drm releasing Inki Dae
2015-12-24 13:32 ` Daniel Stone
2016-01-04 11:57   ` Inki Dae
2016-01-04 20:24     ` Daniel Stone
2016-01-05 10:55       ` Inki Dae
2016-01-05 11:08         ` Daniel Vetter
2016-01-05 12:30           ` Inki Dae [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=568BB752.7050603@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=daniel@ffwll.ch \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=robdclark@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.