RE: [Patch VIA UniChrome DRM][3/5 Ver1] Enhance DRM robustness

2009-10-09 Thread BruceChang
Hello Thomas
>> +if (!context_valid)
>> +return 0;
>>  
>>  via_release_futex(dev_priv, context);
> When is this function called with an invalid context? Could you describe 
> what error you are seeing.

There are some bugs in the DDMPEG(a user mode library realizing decode driver) 
before, which destroy his context more than once, it was the behavior causes 
DRM segment fault. We add this patch for enhancing DRM robustness, although it 
is DDMPEG's fault.

Thanks and Best Regards
=
Bruce C. Chang(張祖明)
VIA Technologies, Inc. 
Address: 1F, 531, Chung-Cheng Road, Hsin-Tien, 231 Taipei
Tel: +886-2-22185452 Ext 7323
Mobile: +886-968343824
Fax: +886-2-22186282
Skype: Bruce.C.Chang
Email: brucech...@via.com.tw
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [Patch VIA UniChrome DRM][3/5 Ver1] Enhance DRM robustness

2009-10-08 Thread Thomas Hellstrom
Bruce,
This looks OK, except for one modification below. Could you comment on 
that one?

brucech...@via.com.tw wrote:
> diff -Nur linux-2.6.32-rc3-old/drivers/gpu/drm/via/via_mm.c 
> linux-2.6.32-rc3-new/drivers/gpu/drm/via/via_mm.c
> --- linux-2.6.32-rc3-old/drivers/gpu/drm/via/via_mm.c 2009-10-08 
> 10:17:39.0 +0800
> +++ linux-2.6.32-rc3-new/drivers/gpu/drm/via/via_mm.c 2009-10-08 
> 10:18:08.0 +0800
> @@ -91,6 +91,17 @@
>  int via_final_context(struct drm_device *dev, int context)
>  {
>   drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
> + struct drm_ctx_list *pos, *n;
> + bool context_valid = 0;
> +
> + list_for_each_entry_safe(pos, n, &dev->ctxlist, head)
> + if (pos->handle == context) {
> + context_valid = 1;
> + break;
> + }
> +
> + if (!context_valid)
> + return 0;
>  
>   via_release_futex(dev_priv, context);
>   
When is this function called with an invalid context? Could you describe 
what error you are seeing.

Thanks,

Thomas



--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel