diff --git a/amd/amdgpu/amdgpu_connectors.c b/amd/amdgpu/amdgpu_connectors.c index 818d589..cb78d1c 100644 --- a/amd/amdgpu/amdgpu_connectors.c +++ b/amd/amdgpu/amdgpu_connectors.c @@ -168,12 +168,20 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector) } /* Any defined maximum tmds clock limit we must not exceed? */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) + if (connector->display_info.max_tmds_clock > 0) { +#else if (connector->max_tmds_clock > 0) { +#endif /* mode_clock is clock in kHz for mode to be modeset on this connector */ mode_clock = amdgpu_connector->pixelclock_for_modeset; /* Maximum allowable input clock in kHz */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) + max_tmds_clock = connector->display_info.max_tmds_clock * 1000; +#else max_tmds_clock = connector->max_tmds_clock * 1000; +#endif DRM_DEBUG("%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n", connector->name, mode_clock, max_tmds_clock);