On Fri, Mar 29, 2013 at 12:33:32PM +1100, Jonathan Gray wrote:
> On Thu, Mar 28, 2013 at 09:38:20AM +0100, Ralf Horstmann wrote:
> > Hi,
> > 
> > with current snapshot (i386) the DVI output of the docking station of
> > my Fujitsu Lifebook T4215 is not detected anymore. Under Linux (Debian
> > kernel 3.2) it's detected as DVI1. With older OpenBSD versions it was
> > detected as TMDS-1.
> > 
> > VGA on the docking station works fine as well as directly attached to the
> > laptop. In contrast to VGA, there is no DVI output at the laptop, only at 
> > the
> > docking station.
> > 
> > Cheers,
> > Ralf
> 
> It sounds like your docking station has a SDVO output, which
> apparently requires bitbanging for gmbus which we don't
> yet do.

Looking over the sdvo code it seems part of the i2c code
is wrong, try this:

Index: intel_sdvo.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/intel_sdvo.c,v
retrieving revision 1.2
diff -u -p -r1.2 intel_sdvo.c
--- intel_sdvo.c        19 Mar 2013 03:58:10 -0000      1.2
+++ intel_sdvo.c        29 Mar 2013 02:21:05 -0000
@@ -393,12 +393,23 @@ bool
 intel_sdvo_read_byte(struct intel_sdvo *intel_sdvo, u8 addr, u8 *ch)
 {
        uint8_t cmd = 0;
+       int ret;
 
        iic_acquire_bus(intel_sdvo->i2c, 0);
-       iic_exec(intel_sdvo->i2c, I2C_OP_READ_WITH_STOP, addr, &cmd, 1, ch, 1, 
0);
+       ret = iic_exec(intel_sdvo->i2c, I2C_OP_WRITE_WITH_STOP,
+           intel_sdvo->slave_addr, &cmd, 1, &addr, 1, 0); 
+       if (ret) {
+               iic_release_bus(intel_sdvo->i2c, 0);
+               return (false);
+       }
+       ret = iic_exec(intel_sdvo->i2c, I2C_OP_READ_WITH_STOP,
+           intel_sdvo->slave_addr, &cmd, 1, ch, 1, 0);
        iic_release_bus(intel_sdvo->i2c, 0);
 
-       return true;
+       if (ret)
+               return (false);
+       else
+               return (true);
 }
 
 #define SDVO_CMD_NAME_ENTRY(cmd) {cmd, #cmd}

Reply via email to