From: Desnes Nunes Date: Thu, 23 Apr 2026 20:10:20 +0000 (-0300) Subject: drm/i915/dmc: use display instead of dereferencing dmc in intel_dmc_update_dc6_allowe... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3507e53562fd0e2483a61f68acf1ae5fc698ce0;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c index 2104164e136e4..0df4f42ba3e3e 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;