Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af77b974 authored by Sonika Jindal's avatar Sonika Jindal Committed by Jani Nikula
Browse files

drm/i915: Sink rate read should be saved in deca-kHz



The sink rate read from supported link rate table is in KHz as per spec
while in drm, the saved clock is in deca-KHz. So divide the link rate by
10 before storing.

Reading of rates was added by:
commit fc0f8e25 ("drm/i915/skl: Read sink supported rates from edp
panel")

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarSonika Jindal <sonika.jindal@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 9fcb1704
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3812,7 +3812,8 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
			if (val == 0)
				break;

			intel_dp->sink_rates[i] = val * 200;
			/* Value read is in kHz while drm clock is saved in deca-kHz */
			intel_dp->sink_rates[i] = (val * 200) / 10;
		}
		intel_dp->num_sink_rates = i;
	}