From e3507e53562fd0e2483a61f68acf1ae5fc698ce0 Mon Sep 17 00:00:00 2001 From: Desnes Nunes Date: Thu, 23 Apr 2026 17:10:20 -0300 Subject: [PATCH] drm/i915/dmc: use display instead of dereferencing dmc in intel_dmc_update_dc6_allowed_count() There is no need for dereferencing the dmc pointer if the display is already in the scope of intel_dmc_update_dc6_allowed_count function. No functional change. Signed-off-by: Desnes Nunes Link: https://patch.msgid.link/20260423201020.506908-1-desnesn@redhat.com Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_dmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c index 2104164e136e..0df4f42ba3e3 100644 --- a/drivers/gpu/drm/i915/display/intel_dmc.c +++ b/drivers/gpu/drm/i915/display/intel_dmc.c @@ -1582,10 +1582,10 @@ void intel_dmc_update_dc6_allowed_count(struct intel_display *display, struct intel_dmc *dmc = display_to_dmc(display); u32 dc5_cur_count; - if (DISPLAY_VER(dmc->display) < 14) + if (DISPLAY_VER(display) < 14) return; - dc5_cur_count = intel_de_read(dmc->display, DG1_DMC_DEBUG_DC5_COUNT); + dc5_cur_count = intel_de_read(display, DG1_DMC_DEBUG_DC5_COUNT); if (!start_tracking) dmc->dc6_allowed.count += dc5_cur_count - dmc->dc6_allowed.dc5_start;