Skip to content

Commit

Permalink
drm/i915: Fix cs timestamp frequency for cl/bw
Browse files Browse the repository at this point in the history
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ä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221031135703.14670-4-ville.syrjala@linux.intel.com
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
  • Loading branch information
Ville Syrjälä committed Nov 2, 2022
1 parent 78e418d commit dbea79a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/i915/gt/intel_gt_clock_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dbea79a

Please sign in to comment.