]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dmc: use display instead of dereferencing dmc in intel_dmc_update_dc6_allowe...
authorDesnes Nunes <desnesn@redhat.com>
Thu, 23 Apr 2026 20:10:20 +0000 (17:10 -0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 24 Apr 2026 08:55:54 +0000 (11:55 +0300)
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 <desnesn@redhat.com>
Link: https://patch.msgid.link/20260423201020.506908-1-desnesn@redhat.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_dmc.c

index 2104164e136e4cb0fdf1eb384ce65dfda4d25518..0df4f42ba3e3e4a147e079e3ce1d45af523f4524 100644 (file)
@@ -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;