comparison src/video/ps2gs/SDL_gsyuv.c @ 3626:596468a8459e

Merged r5016:5017 from branches/SDL-1.2: PS2 DMA mapping fix. I assume this video target is slated for removal in 1.3, but I merged this, just in case.
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 10 Jan 2010 06:32:41 +0000
parents 99210400e8b9
children
comparison
equal deleted inserted replaced
3625:83910f4c373f 3626:596468a8459e
182 return (NULL); 182 return (NULL);
183 } 183 }
184 184
185 /* Allocate a DMA area for pixel conversion */ 185 /* Allocate a DMA area for pixel conversion */
186 bpp = this->screen->format->BytesPerPixel; 186 bpp = this->screen->format->BytesPerPixel;
187 map_offset = (mapped_len + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); 187 map_offset = (mapped_len + (sysconf(_SC_PAGESIZE) - 1)) & ~(sysconf(_SC_PAGESIZE) - 1);
188 hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) + 188 hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) +
189 width * height * bpp + 189 width * height * bpp +
190 hwdata->macroblocks * (16 * sizeof(long long)) + 190 hwdata->macroblocks * (16 * sizeof(long long)) +
191 12 * sizeof(long long); 191 12 * sizeof(long long);
192 hwdata->dma_mem = mmap(0, hwdata->dma_len, PROT_READ | PROT_WRITE, 192 hwdata->dma_mem = mmap(0, hwdata->dma_len, PROT_READ | PROT_WRITE,