intel_extreme: Dump more info on ports found. Build fixes.

This commit is contained in:
Alexander von Gluck IV 2015-10-17 09:43:24 -05:00
parent 50f0b3fe76
commit 27134c6697
3 changed files with 33 additions and 9 deletions

View File

@ -83,7 +83,7 @@ Port::GetEDID(edid1_info* edid, bool forceRead)
return fEDIDState;
}
TRACE("%s: using register %" B_PRIx32 "\n", PortName(), ddcRegister);
TRACE("%s: using register %" B_PRIxADDR "\n", PortName(), ddcRegister);
i2c_bus bus;
bus.cookie = (void*)ddcRegister;
@ -184,7 +184,7 @@ AnalogPort::IsConnected()
}
uint32
addr_t
AnalogPort::_DDCRegister()
{
// always fixed
@ -218,7 +218,7 @@ LVDSPort::IsConnected()
}
uint32
addr_t
LVDSPort::_DDCRegister()
{
// always fixed
@ -245,7 +245,7 @@ DigitalPort::IsConnected()
}
uint32
addr_t
DigitalPort::_DDCRegister()
{
switch (PortIndex()) {

View File

@ -64,7 +64,7 @@ static status_t _SetI2CSignals(void* cookie, int clock,
int data);
private:
virtual uint32 _DDCRegister() = 0;
virtual addr_t _DDCRegister() = 0;
port_index fPortIndex;
char* fPortName;
@ -84,7 +84,7 @@ virtual uint32 Type() const
virtual bool IsConnected();
protected:
virtual uint32 _DDCRegister();
virtual addr_t _DDCRegister();
};
@ -98,7 +98,7 @@ virtual uint32 Type() const
virtual bool IsConnected();
protected:
virtual uint32 _DDCRegister();
virtual addr_t _DDCRegister();
};
@ -114,7 +114,7 @@ virtual uint32 Type() const
virtual bool IsConnected();
protected:
virtual uint32 _DDCRegister();
virtual addr_t _DDCRegister();
};

View File

@ -181,6 +181,29 @@ uninit_common(void)
}
static void
dump_ports()
{
if (gInfo->port_count == 0) {
TRACE("%s: No ports connected\n", __func__);
return;
}
TRACE("%s: Connected ports: (port_count: %d)\n", __func__,
gInfo->port_count);
for (uint32 i = 0; i < gInfo->port_count; i++) {
Port* port = gInfo->ports[i];
if (!port) {
TRACE("port %d: INVALID ALLOC!\n", i);
continue;
}
TRACE("port %d: %s %s\n", i, port->PortName(),
port->IsConnected() ? "connected" : "disconnected");
}
}
static bool
has_connected_port(port_index portIndex, uint32 type)
{
@ -302,7 +325,8 @@ intel_init_accelerant(int device)
} else
delete analogPort;
TRACE("connected ports detected: %" B_PRIu32 "\n", gInfo->port_count);
// On TRACE, dump ports and states
dump_ports();
status = create_mode_list();
if (status != B_OK) {