From: Ville Syrjälä <[email protected]>

Despite what the spec says the TIMESTAMP register seems to
tick once every hrawclk (confirmed on i965gm and g35).

v2: Rebase

Signed-off-by: Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c 
b/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c
index 23a27e49b898..2a6a4ca7fdad 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c
@@ -147,8 +147,10 @@ static u32 gen4_read_clock_frequency(struct intel_uncore 
*uncore)
         *     "The value in this register increments once every 16
         *      hclks." (through the “Clocking Configuration”
         *      (“CLKCFG”) MCHBAR register)
+        *
+        * Testing on actual hardware has shown there is no /16.
         */
-       return RUNTIME_INFO(uncore->i915)->rawclk_freq * 1000 / 16;
+       return RUNTIME_INFO(uncore->i915)->rawclk_freq * 1000;
 }
 
 static u32 read_clock_frequency(struct intel_uncore *uncore)
-- 
2.37.4

Reply via email to