From 263d48ad93a0fb7100729d0c6e0443797c20c80a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 1 Oct 2007 16:23:30 -0700 Subject: Fix probing of the sample CH7017 device I found by allowing GPIO overrides. It may be that the LVDS chips need to be DVOA and GPIOB only on mobility devices with them, and DVOC/GPIOE on non-mobility like this 845. But until more examples are found, just make this one device probe. --- src/i830.h | 1 + src/i830_dvo.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/i830.h b/src/i830.h index b1f1f68f..0a4b4a7b 100644 --- a/src/i830.h +++ b/src/i830.h @@ -221,6 +221,7 @@ struct _I830DVODriver { char *modulename; char *fntablename; unsigned int dvo_reg; + uint32_t gpio; int address; const char **symbols; I830I2CVidOutputRec *vid_rec; diff --git a/src/i830_dvo.c b/src/i830_dvo.c index 8ba38bdb..e6ff6af6 100644 --- a/src/i830_dvo.c +++ b/src/i830_dvo.c @@ -99,9 +99,10 @@ struct _I830DVODriver i830_dvo_drivers[] = .type = I830_OUTPUT_DVO_LVDS, .modulename = "ch7017", .fntablename = "ch7017_methods", - .dvo_reg = DVOA, + .dvo_reg = DVOC, .address = 0xea, .symbols = ch7017_symbols, + .gpio = GPIOE, } }; @@ -430,7 +431,12 @@ i830_dvo_init(ScrnInfoPtr pScrn) ret_ptr = NULL; drv->vid_rec = LoaderSymbol(drv->fntablename); - if (drv->type == I830_OUTPUT_DVO_LVDS) + /* Allow the I2C driver info to specify the GPIO to be used in + * special cases, but otherwise default to what's defined in the spec. + */ + if (drv->gpio != 0) + gpio = drv->gpio; + else if (drv->type == I830_OUTPUT_DVO_LVDS) gpio = GPIOB; else gpio = GPIOE; -- cgit v1.2.3