diff options
author | Kevin E Martin <kem@kem.org> | 2001-03-14 22:22:50 +0000 |
---|---|---|
committer | Kevin E Martin <kem@kem.org> | 2001-03-14 22:22:50 +0000 |
commit | 74e19a40187ac3b5907922e5dc01418135a5794b (patch) | |
tree | 6623cfe435730e28c25829ebc6931e46871b81ce /linux/r128_cce.c | |
parent | e2b2bffc6b25361b2f09afc5a28030645440cd03 (diff) |
Merged sarea-1-0-0sarea-1-0-0-20010314-mergefull-1-0-0-20010315-head
Diffstat (limited to 'linux/r128_cce.c')
-rw-r--r-- | linux/r128_cce.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/linux/r128_cce.c b/linux/r128_cce.c index 5c67bec9..c0e20c21 100644 --- a/linux/r128_cce.c +++ b/linux/r128_cce.c @@ -344,7 +344,7 @@ static void r128_cce_init_ring_buffer( drm_device_t *dev ) static int r128_do_init_cce( drm_device_t *dev, drm_r128_init_t *init ) { drm_r128_private_t *dev_priv; - int i; + struct list_head *list; dev_priv = DRM(alloc)( sizeof(drm_r128_private_t), DRM_MEM_DRIVER ); if ( dev_priv == NULL ) @@ -451,15 +451,15 @@ static int r128_do_init_cce( drm_device_t *dev, drm_r128_init_t *init ) dev_priv->span_pitch_offset_c = (((dev_priv->depth_pitch/8) << 21) | (dev_priv->span_offset >> 5)); - /* FIXME: We want multiple shared areas, including one shared - * only by the X Server and kernel module. - */ - for ( i = 0 ; i < dev->map_count ; i++ ) { - if ( dev->maplist[i]->type == _DRM_SHM ) { - dev_priv->sarea = dev->maplist[i]; - break; - } - } + list_for_each(list, &dev->maplist->head) { + drm_map_list_t *r_list = (drm_map_list_t *)list; + if( r_list->map && + r_list->map->type == _DRM_SHM && + r_list->map->flags & _DRM_CONTAINS_LOCK ) { + dev_priv->sarea = r_list->map; + break; + } + } DRM_FIND_MAP( dev_priv->fb, init->fb_offset ); DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset ); |