linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Chris Wilson" <chris@chris-wilson.co.uk>,
	"Jani Nikula" <jani.nikula@intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: linux-next: manual merge of the drm-intel tree with the  tree
Date: Tue, 15 Apr 2014 11:26:38 +1000	[thread overview]
Message-ID: <20140415112638.6c05845b810c49702985bc2f@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2991 bytes --]

Hi all,

Today's linux-next merge of the drm-intel tree got a conflict in
drivers/gpu/drm/i915/i915_gem_context.c between commit 691e6415c891
("drm/i915: Always use kref tracking for all contexts") from the
drm-intel-fixes tree and commit ad2ac08bf34b ("drm/i915: Make contexts
non-snooped on non-LLC platforms") from the drm-intel tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/gpu/drm/i915/i915_gem_context.c
index d72db15afa02,30b355afb362..000000000000
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@@ -231,32 -232,40 +231,40 @@@ __create_hw_context(struct drm_device *
  		return ERR_PTR(-ENOMEM);
  
  	kref_init(&ctx->ref);
 -	ctx->obj = i915_gem_alloc_object(dev, dev_priv->hw_context_size);
 -	INIT_LIST_HEAD(&ctx->link);
 -	if (ctx->obj == NULL) {
 -		kfree(ctx);
 -		DRM_DEBUG_DRIVER("Context object allocated failed\n");
 -		return ERR_PTR(-ENOMEM);
 -	}
 +	list_add_tail(&ctx->link, &dev_priv->context_list);
  
 -	/*
 -	 * Try to make the context utilize L3 as well as LLC.
 -	 *
 -	 * On VLV we don't have L3 controls in the PTEs so we
 -	 * shouldn't touch the cache level, especially as that
 -	 * would make the object snooped which might have a
 -	 * negative performance impact.
 -	 */
 -	if (INTEL_INFO(dev)->gen >= 7 && !IS_VALLEYVIEW(dev)) {
 -		ret = i915_gem_object_set_cache_level(ctx->obj,
 -						      I915_CACHE_L3_LLC);
 -		/* Failure shouldn't ever happen this early */
 -		if (WARN_ON(ret))
 +	if (dev_priv->hw_context_size) {
 +		ctx->obj = i915_gem_alloc_object(dev, dev_priv->hw_context_size);
 +		if (ctx->obj == NULL) {
 +			ret = -ENOMEM;
  			goto err_out;
 -	}
 +		}
  
- 		if (INTEL_INFO(dev)->gen >= 7) {
 -	list_add_tail(&ctx->link, &dev_priv->context_list);
++		/*
++		 * Try to make the context utilize L3 as well as LLC.
++		 *
++		 * On VLV we don't have L3 controls in the PTEs so we
++		 * shouldn't touch the cache level, especially as that
++		 * would make the object snooped which might have a
++		 * negative performance impact.
++		 */
++		if (INTEL_INFO(dev)->gen >= 7 && !IS_VALLEYVIEW(dev)) {
 +			ret = i915_gem_object_set_cache_level(ctx->obj,
 +							      I915_CACHE_L3_LLC);
 +			/* Failure shouldn't ever happen this early */
 +			if (WARN_ON(ret))
 +				goto err_out;
 +		}
 +	}
  
  	/* Default context will never have a file_priv */
 -	if (file_priv == NULL)
 -		return ctx;
 -
 -	ret = idr_alloc(&file_priv->context_idr, ctx, DEFAULT_CONTEXT_ID, 0,
 -			GFP_KERNEL);
 -	if (ret < 0)
 -		goto err_out;
 +	if (file_priv != NULL) {
 +		ret = idr_alloc(&file_priv->context_idr, ctx,
 +				DEFAULT_CONTEXT_ID, 0, GFP_KERNEL);
 +		if (ret < 0)
 +			goto err_out;
 +	} else
 +		ret = DEFAULT_CONTEXT_ID;
  
  	ctx->file_priv = file_priv;
  	ctx->id = ret;

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2014-04-15  1:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15  1:26 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-09-03 13:31 linux-next: manual merge of the drm-intel tree with the tree Mark Brown
2014-09-03 13:37 ` Mark Brown
2014-03-09 19:19 Mark Brown
2014-02-10  1:59 Stephen Rothwell

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=20140415112638.6c05845b810c49702985bc2f@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=ville.syrjala@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).