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

Commit 65cd2b3f authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter
Browse files

drm/i915: Fix 852GM/GMV cdclk



It seems 852GM/GMV uses a different HPLLCC encoding than the other
85x platforms. For 852GM/GMV cdclk is always 133MHz. Try to detect that
using the PCI revision (sinc the device ID seems useless for that). I'm
not at all sure this is a good idea, but according to the specs it
should work.

v2: Rebased to the latest
v3: Rebased to the latest

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
Signed-off-by: default avatarMika Kahola <mika.kahola@intel.com>
Acked-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 1b1d2716
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -6826,6 +6826,14 @@ static int i85x_get_display_clock_speed(struct drm_device *dev)
{
	u16 hpllcc = 0;

	/*
	 * 852GM/852GMV only supports 133 MHz and the HPLLCC
	 * encoding is different :(
	 * FIXME is this the right way to detect 852GM/852GMV?
	 */
	if (dev->pdev->revision == 0x1)
		return 133333;

	pci_bus_read_config_word(dev->pdev->bus,
				 PCI_DEVFN(0, 3), HPLLCC, &hpllcc);