Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: make CRTC enable/disable asynchronous v2
Date: Fri, 30 May 2014 12:06:47 -0700	[thread overview]
Message-ID: <20140530120647.0640b411@jbarnes-desktop> (raw)
In-Reply-To: <20140530185622.GE10916@nuc-i3427.alporthouse.com>

On Fri, 30 May 2014 19:56:22 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Fri, May 30, 2014 at 11:05:21AM -0700, Jesse Barnes wrote:
> > +static void intel_queue_crtc_enable(struct drm_crtc *crtc)
> > +{
> > +	struct drm_device *dev = crtc->dev;
> > +	struct drm_i915_private *dev_priv = dev->dev_private;
> > +	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> > +	struct intel_crtc_work *work;
> > +
> > +	WARN(!mutex_is_locked(&dev->mode_config.mutex),
> > +	     "need mode_config mutex\n");
> > +
> > +	work = kmalloc(sizeof(*work), GFP_KERNEL);
> > +	if (!work) {
> > +		dev_priv->display._crtc_disable(&intel_crtc->base);
> > +		return;
> > +	}
> > +
> > +	work->enable = true;
> > +	work->intel_crtc = intel_crtc;
> > +	INIT_LIST_HEAD(&work->head);
> (redundant, list_add doesn't care)

Will fix.

> > +
> > +	list_add_tail(&dev_priv->crtc_work_queue, &work->head);
> > +	schedule_work(&dev_priv->crtc_work);
> > +}
> 
> If we tracked one queued item per crtc, we could avoid the allocation
> and allow for elision of pending operations.

Yeah I thought about that too, might make for a good optimization, but
I figured this was simplest to start with.

-- 
Jesse Barnes, Intel Open Source Technology Center

  reply	other threads:[~2014-05-30 19:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-30 18:05 [PATCH 1/2] drm/i915: make CRTC enable/disable asynchronous v2 Jesse Barnes
2014-05-30 18:05 ` [PATCH 2/2] drm/i915: make userspace mode sets asynchronous Jesse Barnes
2014-05-30 18:47 ` [PATCH 1/2] drm/i915: make CRTC enable/disable asynchronous v2 Chris Wilson
2014-05-30 18:50   ` Jesse Barnes
2014-05-30 18:53 ` Chris Wilson
2014-05-30 18:56 ` Chris Wilson
2014-05-30 19:06   ` Jesse Barnes [this message]
2014-05-30 21:28 ` [PATCH] drm/i915: make CRTC enable/disable asynchronous v3 Jesse Barnes
2014-05-30 22:02   ` Chris Wilson
2014-05-30 22:10     ` Jesse Barnes

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=20140530120647.0640b411@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@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