On the Gigabyte Z170N Gaming 5, the DVI is actually HDMI 1.4 just like the HDMI port, so both the DVI and HDMI ports were able to do 3840x2160@30Hz (297MHz) in Mac OS X without any problem.
They were also both able to do 2560x1440@60Hz (241.5MHz) and 2560x1600@60Hz (268MHz) using an HDMI to DisplayPort adapter for my Dell 5K monitor, and an HDMI to DisplayPort adapter and a DisplayPort to Dual Link DVI adapter for my Apple 30" Cinema Display. This was in Ubuntu though. Even with the 4K patch for Mac OS X, the screens would quickly go blank for no apparent reason. There may be a way to patch that to make the driver fail less but I haven't found it yet. If you're monitor has HDMI input, then you will probably avoid my problems with these adapters or maybe you can get some adapters that will work without problems.