Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Ben Widawsky <ben@bwidawsk.net>,
	Eugeni Dodonov <eugeni.dodonov@intel.com>
Subject: Re: [PATCH 1/2] drm/i915: enable semaphores on per-device defaults
Date: Mon, 21 Nov 2011 13:33:40 +0000	[thread overview]
Message-ID: <e39f63$2p7p78@fmsmga002.fm.intel.com> (raw)
In-Reply-To: <1321881730-21254-1-git-send-email-eugeni.dodonov@intel.com>

On Mon, 21 Nov 2011 11:22:09 -0200, Eugeni Dodonov <eugeni.dodonov@intel.com> wrote:
> We should enable semaphores on IVB by default, and on SNB in cases where
> dma remapping is disabled or iommu is not enabled.
> 
> v2: adapt patch according to the feedback, and put it in line with Keith's
> rc6 enabling patch.
> 
> v3: move the generation check into intel_enable_semaphores function, and
> fix variable type for i915_semaphores.
> 
> CC: Daniel Vetter <daniel.vetter@ffwll.ch>
> CC: Ben Widawsky <ben@bwidawsk.net>
> CC: Keith Packard <keithp@keithp.com>
> CC: Jesse Barnes <jbarnes@virtuousgeek.org>
> CC: Chris Wilson <chris@chris-wilson.co.uk>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42696
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40564
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41353
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38862
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
>  
> +static bool
> +intel_enable_semaphores(struct drm_device *dev)
> +{
> +	if (INTEL_INFO(dev)->gen < 6)
> +		return 0;
> +
> +	if (i915_semaphores >= 0)
> +		return i915_semaphores;
> +
> +	if (INTEL_INFO(dev)->gen >= 7)
> +		return 1;
> +#ifdef CONFIG_INTEL_IOMMU
> +	/* On gen6, we only enable semaphores if dma remapping is disabled,
> +	 * or if there is no iommu.
> +	 */
> +	if (INTEL_INFO(dev)->gen == 6)
> +		return no_iommu || dmar_disabled;
> +#endif
> +
> +	return 1;
> +}

Now this function can be written more compactly by just removing the
gen >= 7 check. Otherwise,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

      parent reply	other threads:[~2011-11-21 13:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 13:22 [PATCH 1/2] drm/i915: enable semaphores on per-device defaults Eugeni Dodonov
2011-11-21 13:22 ` [PATCH 2/2] drm/i915: allow per-device fbc to work with default settings Eugeni Dodonov
2011-11-21 13:34   ` Chris Wilson
2011-11-21 13:33 ` Chris Wilson [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='e39f63$2p7p78@fmsmga002.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=ben@bwidawsk.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=eugeni.dodonov@intel.com \
    --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