For kernel 2.6.29.

Calvin
-----Original Message-----
From: Zhao, Chunfeng [mailto:chunfeng.z...@intel.com] 
Sent: Tuesday, January 20, 2009 1:16 PM
To: Jesse Barnes; intel-...@lists.freedesktop.org
Cc: Dave Airlie; dri-devel@lists.sourceforge.net
Subject: DRM tree?

Hi Jesse,
We would like to integrate our MRST GFX driver with your drm code, could you 
provide the info on the git tree, branch etc.?

Thanks!

Calvin

-----Original Message-----
From: Jesse Barnes [mailto:jbar...@virtuousgeek.org]
Sent: Monday, January 19, 2009 2:57 PM
To: intel-...@lists.freedesktop.org
Cc: Dave Airlie; dri-devel@lists.sourceforge.net
Subject: Re: [Intel-gfx] [PATCH] fix off by one in phys object cleanup

On Monday, January 19, 2009 12:58 pm Jesse Barnes wrote:
> Fix an off by one in the phys object cleanup code (the cleanup code was
> going from 0-max_objs-1, but it looks like the free_phys_obj code was
> expecting 1-max_objs?), and fix up a related warning while we're at it.
>
> Signed-off-by: Jesse Barnes <jbar...@virtuousgeek.org>
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c
> b/drivers/gpu/drm/i915/i915_gem.c index 96316fd..cfb19b8 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3344,10 +3344,10 @@ void i915_gem_free_phys_object(struct drm_device
> *dev, int id) drm_i915_private_t *dev_priv = dev->dev_private;
>       struct drm_i915_gem_phys_object *phys_obj;
>
> -     if (!dev_priv->mm.phys_objs[id - 1])
> +     if (!dev_priv->mm.phys_objs[id])
>               return;
>
> -     phys_obj = dev_priv->mm.phys_objs[id - 1];
> +     phys_obj = dev_priv->mm.phys_objs[id];
>       if (phys_obj->cur_obj) {
>               i915_gem_detach_phys_object(dev, phys_obj->cur_obj);
>       }
> @@ -3357,7 +3357,7 @@ void i915_gem_free_phys_object(struct drm_device
> *dev, int id) #endif
>       drm_pci_free(dev, phys_obj->handle);
>       kfree(phys_obj);
> -     dev_priv->mm.phys_objs[id - 1] = NULL;
> +     dev_priv->mm.phys_objs[id] = NULL;
>  }
>
>  void i915_gem_free_all_phys_object(struct drm_device *dev)
> @@ -3427,7 +3427,7 @@ i915_gem_attach_phys_object(struct drm_device *dev,
>               ret = i915_gem_init_phys_object(dev, id,
>                                               obj->size);
>               if (ret) {
> -                     DRM_ERROR("failed to init phys object %d size: %d\n", 
> id, obj->size);
> +                     DRM_ERROR("failed to init phys object %d size: %d\n", 
> id,
> (int)obj->size); goto out;
>               }
>       }

Ah I see now, the loop in free_all_phys_obj should probably be this instead:

        for (i = I915_GEM_PHYS_CURSOR_0; i < I915_MAX_PHYS_OBJECT; i++)
                i915_gem_free_phys_object(dev, i);

since all the real objects start at ID 1 (index 0).


--
Jesse Barnes, Intel Open Source Technology Center

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to