~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/gpu/drm/drm_bufs.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
        list_for_each_entry(entry, &dev->maplist, head) {
47
47
                /*
48
48
                 * Because the kernel-userspace ABI is fixed at a 32-bit offset
49
 
                 * while PCI resources may live above that, we ignore the map
50
 
                 * offset for maps of type _DRM_FRAMEBUFFER or _DRM_REGISTERS.
51
 
                 * It is assumed that each driver will have only one resource of
52
 
                 * each type.
 
49
                 * while PCI resources may live above that, we only compare the
 
50
                 * lower 32 bits of the map offset for maps of type
 
51
                 * _DRM_FRAMEBUFFER or _DRM_REGISTERS.
 
52
                 * It is assumed that if a driver have more than one resource
 
53
                 * of each type, the lower 32 bits are different.
53
54
                 */
54
55
                if (!entry->map ||
55
56
                    map->type != entry->map->type ||
59
60
                case _DRM_SHM:
60
61
                        if (map->flags != _DRM_CONTAINS_LOCK)
61
62
                                break;
 
63
                        return entry;
62
64
                case _DRM_REGISTERS:
63
65
                case _DRM_FRAME_BUFFER:
64
 
                        return entry;
 
66
                        if ((entry->map->offset & 0xffffffff) ==
 
67
                            (map->offset & 0xffffffff))
 
68
                                return entry;
65
69
                default: /* Make gcc happy */
66
70
                        ;
67
71
                }
183
187
                        return -EINVAL;
184
188
                }
185
189
#endif
186
 
#ifdef __alpha__
187
 
                map->offset += dev->hose->mem_space->start;
188
 
#endif
189
190
                /* Some drivers preinitialize some maps, without the X Server
190
191
                 * needing to be aware of it.  Therefore, we just return success
191
192
                 * when the server tries to create a duplicate map.