Skip to content

Commit 35d38d1

Browse files
committed
drm/i915: Read out hrawclk from CCK on vlv/chv
Currently we assume that hrawclk is 200MHz on VLV/CHV. That should be true always, but just to avoid such asumptions we can read out the actual frequency from CCK. Signed-off-by: Ville Syrjälä <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Imre Deak <[email protected]>
1 parent 193709c commit 35d38d1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ enum skl_disp_power_wells {
786786
#define DSI_PLL_M1_DIV_MASK (0x1ff << 0)
787787
#define CCK_CZ_CLOCK_CONTROL 0x62
788788
#define CCK_DISPLAY_CLOCK_CONTROL 0x6b
789+
#define CCK_DISPLAY_REF_CLOCK_CONTROL 0x6c
789790
#define CCK_TRUNK_FORCE_ON (1 << 17)
790791
#define CCK_TRUNK_FORCE_OFF (1 << 16)
791792
#define CCK_FREQUENCY_STATUS (0x1f << 8)

drivers/gpu/drm/i915/intel_display.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ intel_pch_rawclk(struct drm_i915_private *dev_priv)
178178
static int
179179
intel_vlv_hrawclk(struct drm_i915_private *dev_priv)
180180
{
181-
return 200000;
181+
return vlv_get_cck_clock_hpll(dev_priv, "hrawclk",
182+
CCK_DISPLAY_REF_CLOCK_CONTROL);
182183
}
183184

184185
static int

0 commit comments

Comments
 (0)