From: "Christian König" <deathsimple@vodafone.de>
To: "Alex Deucher" <alexdeucher@gmail.com>,
"Michel Dänzer" <michel@daenzer.net>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 5/5] drm/radeon: rework page flip handling v3
Date: Tue, 03 Jun 2014 15:45:42 +0200 [thread overview]
Message-ID: <538DD186.7010300@vodafone.de> (raw)
In-Reply-To: <CADnq5_N3FuGDNs74Dvz8d87pnGToterStueKTCLZTGTVnfNCpg@mail.gmail.com>
Am 03.06.2014 15:31, schrieb Alex Deucher:
> On Wed, May 28, 2014 at 2:56 AM, Michel Dänzer <michel@daenzer.net> wrote:
>> On 27.05.2014 23:49, Christian König wrote:
>>> From: Christian König <christian.koenig@amd.com>
>>>
>>> Instead of trying to flip inside the vblank period when
>>> the buffer is idle, offload blocking for idle to a kernel
>>> thread and program the flip directly into the hardware.
>>>
>>> v2: add error handling, fix EBUSY handling
>>> v3: add proper exclusive_lock handling
>> [...]
>>
>>> + /* update crtc fb */
>>> + crtc->primary->fb = fb;
>>> +
>>> + /* We borrow the event spin lock for protecting flip_work */
>>> + spin_lock_irqsave(&crtc->dev->event_lock, flags);
>>> +
>>> + if (radeon_crtc->flip_work) {
>>> + DRM_DEBUG_DRIVER("flip queue: crtc already busy\n");
>>> + spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
>>> + drm_gem_object_unreference_unlocked(&work->old_rbo->gem_base);
>>> + radeon_fence_unref(&work->fence);
>>> + kfree(work);
>>> + return -EBUSY;
>>> + }
>> If we return -EBUSY, we shouldn't change crtc->primary->fb, should we? I
>> wonder if crtc->primary->fb shouldn't be changed in
>> radeon_flip_work_func(), when we're sure we can actually flip.
> How about this?
Looks good to me. Reviewed-by: Christian König <christian.koenig@amd.com>
>
> Alex
next prev parent reply other threads:[~2014-06-03 13:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 14:49 [PATCH 1/5] drm/radeon: remove (pre|post)_page_flip callbacks Christian König
2014-05-27 14:49 ` [PATCH 2/5] drm/radeon: remove drm_vblank_get|put from pflip handling Christian König
2014-05-27 15:56 ` Alex Deucher
2014-05-27 14:49 ` [PATCH 3/5] drm/radeon: split page flip and pending callback Christian König
2014-05-27 15:57 ` Alex Deucher
2014-05-27 14:49 ` [PATCH 4/5] drm/radeon: separate vblank and pflip crtc handling Christian König
2014-05-27 16:49 ` Alex Deucher
2014-05-27 14:49 ` [PATCH 5/5] drm/radeon: rework page flip handling v3 Christian König
2014-05-27 17:03 ` Alex Deucher
2014-05-28 6:56 ` Michel Dänzer
2014-06-03 13:31 ` Alex Deucher
2014-06-03 13:45 ` Christian König [this message]
2014-05-27 15:56 ` [PATCH 1/5] drm/radeon: remove (pre|post)_page_flip callbacks Alex Deucher
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=538DD186.7010300@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=alexdeucher@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=michel@daenzer.net \
/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.