All of 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 4/5] drm/radeon: rework page flip handling
Date: Fri, 02 May 2014 16:25:59 +0900	[thread overview]
Message-ID: <53634887.4000907@daenzer.net> (raw)
In-Reply-To: <1398781773-2319-4-git-send-email-deathsimple@vodafone.de>

On 29.04.2014 23:29, 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.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>
[...]
> +/**
> + * radeon_flip_work_func - page flip framebuffer
> + *
> + * @work - kernel work item
> + *
> + * Wait for the buffer object to become idle and do the actual page flip
> + */
> +static void radeon_flip_work_func(struct work_struct *__work)
>  {
[...]
> +	if (radeon_crtc->flip_work) {
> +		DRM_DEBUG_DRIVER("flip queue: crtc already busy\n");
> +		spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
> +		goto pflip_cleanup1;
> +	}

I'm a little worried about this case. AFAICT this would drop the flip if
a previous one is still pending? I'm not sure current userspace can
actually hit this, but sooner or later we'll probably want to support
things like triple buffering, flips replacing previous ones still
pending, and asynchronous flips (not synchronized to vertical blank).
Those will probably require changes to the kernel/user interface, but it
might be good to at least keep them in mind already for the infrastructure.


Also, in patch 5, we could stop calling drm_vblank_get/put() when we're
not using the vblank interrupt for flipping?


The series looks good to me other than that.


-- 
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

  reply	other threads:[~2014-05-02  7:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29 14:29 [PATCH 1/5] drm/radeon: remove (pre|post)_page_flip callbacks Christian König
2014-04-29 14:29 ` [PATCH 2/5] drm/radeon: split page flip and pending callback Christian König
2014-04-29 14:29 ` [PATCH 3/5] drm/radeon: separate vblank and pflip crtc handling Christian König
2014-04-29 14:29 ` [PATCH 4/5] drm/radeon: rework page flip handling Christian König
2014-05-02  7:25   ` Michel Dänzer [this message]
2014-05-02 13:29     ` Christian König
2014-05-05  9:27       ` Michel Dänzer
2014-05-05 14:23         ` Daniel Vetter
2014-05-14  8:02         ` Michel Dänzer
2014-04-29 14:29 ` [PATCH 5/5] drm/radeon: stop using vblank irq on EG+ Christian König

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=53634887.4000907@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 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.