[PATCH 2/9] drm/i915: Convert renderctx to a regular context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 14, 2013 at 09:22:46AM -0700, Ben Widawsky wrote:
> @@ -3650,10 +3650,14 @@ static int ironlake_setup_rc6(struct drm_device *dev)
>  {
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  
> -	if (dev_priv->ips.renderctx == NULL)
> -		dev_priv->ips.renderctx = intel_alloc_context_page(dev);
> -	if (!dev_priv->ips.renderctx)
> +	if (dev_priv->ips.renderctx.obj == NULL)
> +		dev_priv->ips.renderctx.obj = intel_alloc_context_page(dev);
> +	if (!dev_priv->ips.renderctx.obj)
>  		return -ENOMEM;
> +	else {
> +		dev_priv->ips.renderctx.id = DEFAULT_CONTEXT_ID;
> +		dev_priv->ips.renderctx.ring = &dev_priv->ring[RCS];
> +	}

Make this a bit more consistent style wise. You are mixing here !obj and
obj == NULL, along with a superfluous else{}.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux