diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-06-07 07:10:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:23:58 -0400 |
commit | 890be2bb55774290479672b98fcb0486b57e758e (patch) | |
tree | bbd83809d81cd3e5ed0c3560e68b18064a8caa10 /drivers/media/video/zoran_driver.c | |
parent | b7c97abd8171709cc35d8aab70b9962fcad9f9fa (diff) |
V4L/DVB (5774a): Remove CONFIG_BIGPHYS_AREA from zoran_driver
CONFIG_BIGPHYS_AREA is an out-of-tree kernel patch. It makes no sense to
keep supporting this on mainstream.
The out-of-tree compilation with CONFIG_BIGPHYS_AREA will still be
preserved at the v4l-dvb development tree at:
http://linuxtv.org/hg/v4l-dvb
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/zoran_driver.c')
-rw-r--r-- | drivers/media/video/zoran_driver.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c index cf0ed6cbb0e3..17118a490f81 100644 --- a/drivers/media/video/zoran_driver.c +++ b/drivers/media/video/zoran_driver.c | |||
@@ -183,14 +183,7 @@ static const int zoran_num_formats = | |||
183 | (sizeof(zoran_formats) / sizeof(struct zoran_format)); | 183 | (sizeof(zoran_formats) / sizeof(struct zoran_format)); |
184 | 184 | ||
185 | // RJ: Test only - want to test BUZ_USE_HIMEM even when CONFIG_BIGPHYS_AREA is defined | 185 | // RJ: Test only - want to test BUZ_USE_HIMEM even when CONFIG_BIGPHYS_AREA is defined |
186 | #if !defined(CONFIG_BIGPHYS_AREA) | ||
187 | //#undef CONFIG_BIGPHYS_AREA | ||
188 | #define BUZ_USE_HIMEM | ||
189 | #endif | ||
190 | 186 | ||
191 | #if defined(CONFIG_BIGPHYS_AREA) | ||
192 | # include <linux/bigphysarea.h> | ||
193 | #endif | ||
194 | 187 | ||
195 | extern int *zr_debug; | 188 | extern int *zr_debug; |
196 | 189 | ||
@@ -250,7 +243,6 @@ static void jpg_fbuffer_free(struct file *file); | |||
250 | * Linux with the necessary memory left over). | 243 | * Linux with the necessary memory left over). |
251 | */ | 244 | */ |
252 | 245 | ||
253 | #if defined(BUZ_USE_HIMEM) && !defined(CONFIG_BIGPHYS_AREA) | ||
254 | static unsigned long | 246 | static unsigned long |
255 | get_high_mem (unsigned long size) | 247 | get_high_mem (unsigned long size) |
256 | { | 248 | { |
@@ -314,7 +306,6 @@ get_high_mem (unsigned long size) | |||
314 | 306 | ||
315 | return hi_mem_ph; | 307 | return hi_mem_ph; |
316 | } | 308 | } |
317 | #endif | ||
318 | 309 | ||
319 | static int | 310 | static int |
320 | v4l_fbuffer_alloc (struct file *file) | 311 | v4l_fbuffer_alloc (struct file *file) |
@@ -323,9 +314,7 @@ v4l_fbuffer_alloc (struct file *file) | |||
323 | struct zoran *zr = fh->zr; | 314 | struct zoran *zr = fh->zr; |
324 | int i, off; | 315 | int i, off; |
325 | unsigned char *mem; | 316 | unsigned char *mem; |
326 | #if defined(BUZ_USE_HIMEM) && !defined(CONFIG_BIGPHYS_AREA) | ||
327 | unsigned long pmem = 0; | 317 | unsigned long pmem = 0; |
328 | #endif | ||
329 | 318 | ||
330 | /* we might have old buffers lying around... */ | 319 | /* we might have old buffers lying around... */ |
331 | if (fh->v4l_buffers.ready_to_be_freed) { | 320 | if (fh->v4l_buffers.ready_to_be_freed) { |
@@ -369,39 +358,6 @@ v4l_fbuffer_alloc (struct file *file) | |||
369 | ZR_DEVNAME(zr), i, (unsigned long) mem, | 358 | ZR_DEVNAME(zr), i, (unsigned long) mem, |
370 | virt_to_bus(mem)); | 359 | virt_to_bus(mem)); |
371 | } else { | 360 | } else { |
372 | #if defined(CONFIG_BIGPHYS_AREA) | ||
373 | /* Use bigphysarea_alloc_pages */ | ||
374 | |||
375 | int n = | ||
376 | (fh->v4l_buffers.buffer_size + PAGE_SIZE - | ||
377 | 1) / PAGE_SIZE; | ||
378 | |||
379 | mem = | ||
380 | (unsigned char *) bigphysarea_alloc_pages(n, 0, | ||
381 | GFP_KERNEL); | ||
382 | if (mem == 0) { | ||
383 | dprintk(1, | ||
384 | KERN_ERR | ||
385 | "%s: v4l_fbuffer_alloc() - bigphysarea_alloc_pages for V4L buf %d failed\n", | ||
386 | ZR_DEVNAME(zr), i); | ||
387 | v4l_fbuffer_free(file); | ||
388 | return -ENOBUFS; | ||
389 | } | ||
390 | fh->v4l_buffers.buffer[i].fbuffer = mem; | ||
391 | fh->v4l_buffers.buffer[i].fbuffer_phys = | ||
392 | virt_to_phys(mem); | ||
393 | fh->v4l_buffers.buffer[i].fbuffer_bus = | ||
394 | virt_to_bus(mem); | ||
395 | dprintk(4, | ||
396 | KERN_INFO | ||
397 | "%s: Bigphysarea frame %d mem 0x%x (bus: 0x%x)\n", | ||
398 | ZR_DEVNAME(zr), i, (unsigned) mem, | ||
399 | (unsigned) virt_to_bus(mem)); | ||
400 | |||
401 | /* Zero out the allocated memory */ | ||
402 | memset(fh->v4l_buffers.buffer[i].fbuffer, 0, | ||
403 | fh->v4l_buffers.buffer_size); | ||
404 | #elif defined(BUZ_USE_HIMEM) | ||
405 | 361 | ||
406 | /* Use high memory which has been left at boot time */ | 362 | /* Use high memory which has been left at boot time */ |
407 | 363 | ||
@@ -441,20 +397,6 @@ v4l_fbuffer_alloc (struct file *file) | |||
441 | fh->v4l_buffers.buffer[i].fbuffer_bus = | 397 | fh->v4l_buffers.buffer[i].fbuffer_bus = |
442 | pmem + i * fh->v4l_buffers.buffer_size; | 398 | pmem + i * fh->v4l_buffers.buffer_size; |
443 | } | 399 | } |
444 | #else | ||
445 | /* No bigphysarea present, usage of high memory disabled, | ||
446 | * but user wants buffers of more than MAX_KMALLOC_MEM */ | ||
447 | dprintk(1, | ||
448 | KERN_ERR | ||
449 | "%s: v4l_fbuffer_alloc() - no bigphysarea_patch present, usage of high memory disabled,\n", | ||
450 | ZR_DEVNAME(zr)); | ||
451 | dprintk(1, | ||
452 | KERN_ERR | ||
453 | "%s: v4l_fbuffer_alloc() - sorry, could not allocate %d V4L buffers of size %d KB.\n", | ||
454 | ZR_DEVNAME(zr), fh->v4l_buffers.num_buffers, | ||
455 | fh->v4l_buffers.buffer_size >> 10); | ||
456 | return -ENOBUFS; | ||
457 | #endif | ||
458 | } | 400 | } |
459 | } | 401 | } |
460 | 402 | ||
@@ -485,11 +427,6 @@ v4l_fbuffer_free (struct file *file) | |||
485 | ClearPageReserved(MAP_NR(mem + off)); | 427 | ClearPageReserved(MAP_NR(mem + off)); |
486 | kfree((void *) fh->v4l_buffers.buffer[i].fbuffer); | 428 | kfree((void *) fh->v4l_buffers.buffer[i].fbuffer); |
487 | } | 429 | } |
488 | #if defined(CONFIG_BIGPHYS_AREA) | ||
489 | else | ||
490 | bigphysarea_free_pages((void *) fh->v4l_buffers. | ||
491 | buffer[i].fbuffer); | ||
492 | #endif | ||
493 | fh->v4l_buffers.buffer[i].fbuffer = NULL; | 430 | fh->v4l_buffers.buffer[i].fbuffer = NULL; |
494 | } | 431 | } |
495 | 432 | ||