From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 16 Apr 2005 15:20:36 -0700 Subject: Linux-2.6.12-rc2 Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip! --- drivers/video/nvidia/nv_of.c | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 drivers/video/nvidia/nv_of.c (limited to 'drivers/video/nvidia/nv_of.c') diff --git a/drivers/video/nvidia/nv_of.c b/drivers/video/nvidia/nv_of.c new file mode 100644 index 00000000000..7d12eb85310 --- /dev/null +++ b/drivers/video/nvidia/nv_of.c @@ -0,0 +1,59 @@ +/* + * linux/drivers/video/nvidia/nv_of.c + * + * Copyright 2004 Antonino A. Daplas + * + * Based on rivafb-i2c.c + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of this archive + * for more details. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "nv_type.h" +#include "nv_local.h" +#include "nv_proto.h" + +void nvidia_create_i2c_busses(struct nvidia_par *par) {} +void nvidia_delete_i2c_busses(struct nvidia_par *par) {} + +int nvidia_probe_i2c_connector(struct nvidia_par *par, int conn, u8 **out_edid) +{ + struct device_node *dp; + unsigned char *pedid = NULL; + unsigned char *disptype = NULL; + static char *propnames[] = { + "DFP,EDID", "LCD,EDID", "EDID", "EDID1", "EDID,B", "EDID,A", NULL }; + int i; + + dp = pci_device_to_OF_node(par->pci_dev); + for (; dp != NULL; dp = dp->child) { + disptype = (unsigned char *)get_property(dp, "display-type", NULL); + if (disptype == NULL) + continue; + if (strncmp(disptype, "LCD", 3) != 0) + continue; + for (i = 0; propnames[i] != NULL; ++i) { + pedid = (unsigned char *) + get_property(dp, propnames[i], NULL); + if (pedid != NULL) { + *out_edid = pedid; + return 0; + } + } + } + return 1; +} -- cgit v1.2.3