dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: "Christian König" <deathsimple@vodafone.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm/radeon: rework page flip handling v3
Date: Wed, 28 May 2014 15:56:16 +0900	[thread overview]
Message-ID: <53858890.6080503@daenzer.net> (raw)
In-Reply-To: <1401202162-1925-5-git-send-email-deathsimple@vodafone.de>

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.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2014-05-28  6:56 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 [this message]
2014-06-03 13:31     ` Alex Deucher
2014-06-03 13:45       ` Christian König
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=53858890.6080503@daenzer.net \
    --to=michel@daenzer.net \
    --cc=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox