intel_extreme: Power up DDI

This commit is contained in:
Alexander von Gluck IV 2016-04-09 14:02:09 -05:00
parent ca95e9dad9
commit 10f2e843a6
2 changed files with 21 additions and 1 deletions

View File

@ -1022,6 +1022,24 @@ DigitalDisplayInterface::_DDCRegister()
} }
status_t
DigitalDisplayInterface::Power(bool enabled)
{
TRACE("%s: %s DDI enabled: %s\n", __func__, PortName(),
enabled ? "true" : "false");
fPipe->Enable(enabled);
addr_t portRegister = _PortRegister();
uint32 state = read32(portRegister);
write32(portRegister,
enabled ? (state | DDI_BUF_CTL_ENABLE) : (state & ~DDI_BUF_CTL_ENABLE));
read32(portRegister);
return B_OK;
}
bool bool
DigitalDisplayInterface::IsConnected() DigitalDisplayInterface::IsConnected()
{ {

View File

@ -60,7 +60,7 @@ virtual bool IsConnected() = 0;
::Pipe* GetPipe() ::Pipe* GetPipe()
{ return fPipe; }; { return fPipe; };
status_t Power(bool enabled); virtual status_t Power(bool enabled);
bool HasEDID(); bool HasEDID();
virtual status_t GetEDID(edid1_info* edid, virtual status_t GetEDID(edid1_info* edid,
@ -209,6 +209,8 @@ public:
virtual uint32 Type() const virtual uint32 Type() const
{ return INTEL_PORT_TYPE_DVI; } { return INTEL_PORT_TYPE_DVI; }
virtual status_t Power(bool enabled);
virtual bool IsConnected(); virtual bool IsConnected();
virtual status_t SetDisplayMode(display_mode* mode, virtual status_t SetDisplayMode(display_mode* mode,