ps3fb.c (c9f289701540baeef9ac7c9977d67a7259f404db) ps3fb.c (7bfc3c84cbf5167d943cff9b3d2619dab0b7894c)
1/*
2 * linux/drivers/video/ps3fb.c -- PS3 GPU frame buffer device
3 *
4 * Copyright (C) 2006 Sony Computer Entertainment Inc.
5 * Copyright 2006, 2007 Sony Corporation
6 *
7 * This file is based on :
8 *

--- 30 unchanged lines hidden (view full) ---

39#include <asm/ps3gpu.h>
40
41
42#define DEVICE_NAME "ps3fb"
43
44#define GPU_CMD_BUF_SIZE (2 * 1024 * 1024)
45#define GPU_FB_START (64 * 1024)
46#define GPU_IOIF (0x0d000000UL)
1/*
2 * linux/drivers/video/ps3fb.c -- PS3 GPU frame buffer device
3 *
4 * Copyright (C) 2006 Sony Computer Entertainment Inc.
5 * Copyright 2006, 2007 Sony Corporation
6 *
7 * This file is based on :
8 *

--- 30 unchanged lines hidden (view full) ---

39#include <asm/ps3gpu.h>
40
41
42#define DEVICE_NAME "ps3fb"
43
44#define GPU_CMD_BUF_SIZE (2 * 1024 * 1024)
45#define GPU_FB_START (64 * 1024)
46#define GPU_IOIF (0x0d000000UL)
47#define GPU_ALIGN_UP(x) _ALIGN_UP((x), 64)
47#define GPU_ALIGN_UP(x) ALIGN((x), 64)
48#define GPU_MAX_LINE_LENGTH (65536 - 64)
49
50#define GPU_INTR_STATUS_VSYNC_0 0 /* vsync on head A */
51#define GPU_INTR_STATUS_VSYNC_1 1 /* vsync on head B */
52#define GPU_INTR_STATUS_FLIP_0 3 /* flip head A */
53#define GPU_INTR_STATUS_FLIP_1 4 /* flip head B */
54#define GPU_INTR_STATUS_QUEUE_0 5 /* queue head A */
55#define GPU_INTR_STATUS_QUEUE_1 6 /* queue head B */

--- 954 unchanged lines hidden (view full) ---

1010 if (status) {
1011 dev_err(&dev->core, "%s: lv1_gpu_display_sync failed: %d\n",
1012 __func__, status);
1013 retval = -ENODEV;
1014 goto err_close_device;
1015 }
1016#endif
1017
48#define GPU_MAX_LINE_LENGTH (65536 - 64)
49
50#define GPU_INTR_STATUS_VSYNC_0 0 /* vsync on head A */
51#define GPU_INTR_STATUS_VSYNC_1 1 /* vsync on head B */
52#define GPU_INTR_STATUS_FLIP_0 3 /* flip head A */
53#define GPU_INTR_STATUS_FLIP_1 4 /* flip head B */
54#define GPU_INTR_STATUS_QUEUE_0 5 /* queue head A */
55#define GPU_INTR_STATUS_QUEUE_1 6 /* queue head B */

--- 954 unchanged lines hidden (view full) ---

1010 if (status) {
1011 dev_err(&dev->core, "%s: lv1_gpu_display_sync failed: %d\n",
1012 __func__, status);
1013 retval = -ENODEV;
1014 goto err_close_device;
1015 }
1016#endif
1017
1018 max_ps3fb_size = _ALIGN_UP(GPU_IOIF, 256*1024*1024) - GPU_IOIF;
1018 max_ps3fb_size = ALIGN(GPU_IOIF, 256*1024*1024) - GPU_IOIF;
1019 if (ps3fb_videomemory.size > max_ps3fb_size) {
1020 dev_info(&dev->core, "Limiting ps3fb mem size to %lu bytes\n",
1021 max_ps3fb_size);
1022 ps3fb_videomemory.size = max_ps3fb_size;
1023 }
1024
1025 /* get gpu context handle */
1026 status = lv1_gpu_memory_allocate(ps3fb_videomemory.size, 0, 0, 0, 0,

--- 281 unchanged lines hidden ---
1019 if (ps3fb_videomemory.size > max_ps3fb_size) {
1020 dev_info(&dev->core, "Limiting ps3fb mem size to %lu bytes\n",
1021 max_ps3fb_size);
1022 ps3fb_videomemory.size = max_ps3fb_size;
1023 }
1024
1025 /* get gpu context handle */
1026 status = lv1_gpu_memory_allocate(ps3fb_videomemory.size, 0, 0, 0, 0,

--- 281 unchanged lines hidden ---