6

I am modifying a monitor controller for a prototype. It would be convenient to send commands to the prototype using DDC/CI. In Windows, I can't find an obvious way to send a DDC/CI command to a "display dependent device".

The Monitor Configuration API can send virtual control panel commands, but it does not give access to display dependent devices (which would have an I2C address other than 0x6e).

Nicomsoft's WinI2C/DDC product seems to give access to a display dependent device, but it is end-of-life. I would prefer not to build a dependency on an end-of-life product.

NVIDIA's NVAPI has an I2C API, but I would like a solution that also works with Intel and AMD graphics adaptors.

joshuanapoli
  • 2,509
  • 3
  • 25
  • 34

1 Answers1

1

A solution exists for windows which respect XDDM driver display model. Windows 8 and 10 use WDDM.

In XDDM there is a windows O.S. supplied video port driver, and the hardware vendor supplies a miniport driver. When the miniport driver call's the video port driver's edid helper api (VideoPortDDCMonitorHelper), the miniport must supply 4 i2c function pointers as arguments.

In order to utilize these interfaces however you must be acting as the video port driver. So you have to write a video port lower filter driver which just passes along all the interfaces on from the windows supplied video port driver to the miniport driver. Hook the api's and export them to a usermode driver or ioctl which an application can call.

It may be possible to simply mount an instance of the miniport driver and some how get it to call VideoPortDDCMonitorHelper. But with out the help of the actual video port driver it would be difficult to get guidance on how to do that. Also you would have 2 instances of the driver running which may be against the rules for windows.

It does not appear this solution works for windows 8 and 10 because they use a different display driver model which doesn't appear to expose low level control of i2c. It is internal to the miniport driver.

marshal craft
  • 439
  • 5
  • 18
  • 1
    Here is a list of functions which must be registered by your filter driver https://msdn.microsoft.com/en-us/library/windows/hardware/ff566464(v=vs.85).aspx. You have to mimic the video miniport driver, passing everything inbetween the driver pair. – marshal craft May 18 '16 at 06:33
  • Thank you for letting me know that an XDDM video port filter driver would solve the problem. – joshuanapoli May 18 '16 at 14:33
  • I think a solution also exist and is easier with WDDM however there is a small caveat. You do not get as low a level access to the data and clock lines instead you simply send a buffer. However according to msdn dispaly miniport drivers are permited to reject requests to i2c addresses other than the edid address. Therefore while a cross platform driver may be possible, it is not mandated by windows to provide such support but rather left up to the oem. – marshal craft May 18 '16 at 23:09
  • The upside is that instead of requiring a filter driver to intercept the needed api, now it is registered and so should be sendable by a usermode display driver generated IRP for the registered miniport driver. So no driver would be necessary at all let alone a kernel mode one! – marshal craft May 18 '16 at 23:11