Skip to content

Commit 7b9b765

Browse files
committed
Merge tag 'drm-intel-fixes-2024-08-01' of https://gitlab.freedesktop.org/drm/i915/kernel into drm-fixes
- Static analysis fix for int overflow - Fix for HDCP2_STREAM_STATUS macro and removal of PWR_CLK_STATE for gen12 Signed-off-by: Dave Airlie <[email protected]> From: Joonas Lahtinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 774c6f2 + 5b51157 commit 7b9b765

File tree

3 files changed

+4
-37
lines changed

3 files changed

+4
-37
lines changed

drivers/gpu/drm/i915/display/intel_dpll_mgr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,7 @@ static void skl_wrpll_params_populate(struct skl_wrpll_params *params,
16581658
}
16591659

16601660
static int
1661-
skl_ddi_calculate_wrpll(int clock /* in Hz */,
1661+
skl_ddi_calculate_wrpll(int clock,
16621662
int ref_clock,
16631663
struct skl_wrpll_params *wrpll_params)
16641664
{
@@ -1683,7 +1683,7 @@ skl_ddi_calculate_wrpll(int clock /* in Hz */,
16831683
};
16841684
unsigned int dco, d, i;
16851685
unsigned int p0, p1, p2;
1686-
u64 afe_clock = clock * 5; /* AFE Clock is 5x Pixel clock */
1686+
u64 afe_clock = (u64)clock * 1000 * 5; /* AFE Clock is 5x Pixel clock, in Hz */
16871687

16881688
for (d = 0; d < ARRAY_SIZE(dividers); d++) {
16891689
for (dco = 0; dco < ARRAY_SIZE(dco_central_freq); dco++) {
@@ -1808,7 +1808,7 @@ static int skl_ddi_hdmi_pll_dividers(struct intel_crtc_state *crtc_state)
18081808
struct skl_wrpll_params wrpll_params = {};
18091809
int ret;
18101810

1811-
ret = skl_ddi_calculate_wrpll(crtc_state->port_clock * 1000,
1811+
ret = skl_ddi_calculate_wrpll(crtc_state->port_clock,
18121812
i915->display.dpll.ref_clks.nssc, &wrpll_params);
18131813
if (ret)
18141814
return ret;

drivers/gpu/drm/i915/display/intel_hdcp_regs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
#define HDCP2_STREAM_STATUS(dev_priv, trans, port) \
252252
(TRANS_HDCP(dev_priv) ? \
253253
TRANS_HDCP2_STREAM_STATUS(trans) : \
254-
PIPE_HDCP2_STREAM_STATUS(pipe))
254+
PIPE_HDCP2_STREAM_STATUS(port))
255255

256256
#define _PORTA_HDCP2_AUTH_STREAM 0x66F00
257257
#define _PORTB_HDCP2_AUTH_STREAM 0x66F04

drivers/gpu/drm/i915/i915_perf.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,26 +2748,6 @@ oa_configure_all_contexts(struct i915_perf_stream *stream,
27482748
return 0;
27492749
}
27502750

2751-
static int
2752-
gen12_configure_all_contexts(struct i915_perf_stream *stream,
2753-
const struct i915_oa_config *oa_config,
2754-
struct i915_active *active)
2755-
{
2756-
struct flex regs[] = {
2757-
{
2758-
GEN8_R_PWR_CLK_STATE(RENDER_RING_BASE),
2759-
CTX_R_PWR_CLK_STATE,
2760-
},
2761-
};
2762-
2763-
if (stream->engine->class != RENDER_CLASS)
2764-
return 0;
2765-
2766-
return oa_configure_all_contexts(stream,
2767-
regs, ARRAY_SIZE(regs),
2768-
active);
2769-
}
2770-
27712751
static int
27722752
lrc_configure_all_contexts(struct i915_perf_stream *stream,
27732753
const struct i915_oa_config *oa_config,
@@ -2874,7 +2854,6 @@ gen12_enable_metric_set(struct i915_perf_stream *stream,
28742854
{
28752855
struct drm_i915_private *i915 = stream->perf->i915;
28762856
struct intel_uncore *uncore = stream->uncore;
2877-
struct i915_oa_config *oa_config = stream->oa_config;
28782857
bool periodic = stream->periodic;
28792858
u32 period_exponent = stream->period_exponent;
28802859
u32 sqcnt1;
@@ -2918,15 +2897,6 @@ gen12_enable_metric_set(struct i915_perf_stream *stream,
29182897

29192898
intel_uncore_rmw(uncore, GEN12_SQCNT1, 0, sqcnt1);
29202899

2921-
/*
2922-
* Update all contexts prior writing the mux configurations as we need
2923-
* to make sure all slices/subslices are ON before writing to NOA
2924-
* registers.
2925-
*/
2926-
ret = gen12_configure_all_contexts(stream, oa_config, active);
2927-
if (ret)
2928-
return ret;
2929-
29302900
/*
29312901
* For Gen12, performance counters are context
29322902
* saved/restored. Only enable it for the context that
@@ -2980,9 +2950,6 @@ static void gen12_disable_metric_set(struct i915_perf_stream *stream)
29802950
_MASKED_BIT_DISABLE(GEN12_DISABLE_DOP_GATING));
29812951
}
29822952

2983-
/* Reset all contexts' slices/subslices configurations. */
2984-
gen12_configure_all_contexts(stream, NULL, NULL);
2985-
29862953
/* disable the context save/restore or OAR counters */
29872954
if (stream->ctx)
29882955
gen12_configure_oar_context(stream, NULL);

0 commit comments

Comments
 (0)