summaryrefslogtreecommitdiffstats
path: root/tools/ddcprobe/xbox.c
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-02-28 23:06:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-02-28 23:06:31 +0000
commitb32fd10dd6fc1292d78a3a6a6cb87e1ad904f142 (patch)
tree3de51de387129c058de30ba6b769989e53c61ad3 /tools/ddcprobe/xbox.c
parent1f2d53396dd61b3ee999db70f1b373dd015d0b73 (diff)
downloaddrakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.tar
drakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.tar.gz
drakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.tar.bz2
drakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.tar.xz
drakx-b32fd10dd6fc1292d78a3a6a6cb87e1ad904f142.zip
- remove ddcxinfos, replaced by monitor-edid (which is in a separate package)
- add many resolutions (they are structured by aspect ratio for next move) - put the "Monitor preferred modeline" from EDID in xorg.conf - for this ModeLine must be exported from the monitor section - specifying a VendorName|ModelName in auto_inst is valid, don't overwrite it with edid probe - the strange /dev/zero needed (?) by ddcxinfos is no more needed - field {size} is now {diagonal_size}, and is no more "corrected" - add @CVT_ratios and @CVT_vfreqs (unused at the moment) - Getopt::Long is needed by monitor-parse-edid
Diffstat (limited to 'tools/ddcprobe/xbox.c')
-rw-r--r--tools/ddcprobe/xbox.c90
1 files changed, 0 insertions, 90 deletions
diff --git a/tools/ddcprobe/xbox.c b/tools/ddcprobe/xbox.c
deleted file mode 100644
index ae1d8f0d7..000000000
--- a/tools/ddcprobe/xbox.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/* test for an xbox and return video ram from fb device
- * sbenedict@mandrakesoft.com
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <sys/ioctl.h>
-#include <linux/fb.h>
-#include "vbe.h"
-
-int box_is_xbox() {
- int is_xbox = 0;
- int result = -1;
- int fd;
- size_t rd;
- char *xbox_id = "0000\t10de02a5";
- char id[13];
-
- if (!(fd = open("/proc/bus/pci/devices", O_RDONLY))) {
- printf("Unable to open /proc/bus/pci/devices\n");
- }
- if (!(rd = read(fd, id, sizeof(id)))) {
- printf("Unable to read /proc/bus/pci/devices\n");
- }
-
- if (fd > 0)
- close(fd);
-
-#if DEBUG
- printf("read_id: %s\n", id);
- printf("xbox_id: %s\n", xbox_id);
-#endif
- result = strncmp(id, xbox_id, 13);
- if (result == 0)
- is_xbox = 1;
- return is_xbox;
-}
-
-/* taken from of.c */
-int get_fb_info(struct vbe_info *ret)
-{
- struct fb_fix_screeninfo fix;
- unsigned char *mem;
- int rc = 0;
- int fd = -1;
- int i;
-
- if (ret == NULL)
- return 0;
-
- if (!rc && !(fd = open("/dev/fb0", O_RDONLY)))
- {
- rc = 1;
- fprintf(stderr, "Unable to open /dev/fb0. Exiting.\n");
- }
-
- if ((!rc) && (ioctl(fd, FBIOGET_FSCREENINFO, &fix)))
- {
- rc = 1;
- fprintf(stderr, "Framebuffer ioctl failed. Exiting.\n");
- }
-
- if (fd > 0)
- close(fd);
-
- if (!rc)
- {
- // Note: if OFfb, vram info is unreliable!
- if (strcmp(fix.id, "OFfb"))
- {
- mem = strdup(fix.id);
- while(((i = strlen(mem)) > 0) && isspace(mem[i - 1])) {
- mem[i - 1] = '\0';
- }
- ret->oem_name = strdup(mem);
- ret->product_name = NULL;
- ret->vendor_name = NULL;
- ret->product_revision = NULL;
- ret->memory_size = fix.smem_len;
- }
- }
-
- return !rc;
-}