On Tue, 06 May 2025, Gustavo Sousa <gustavo.so...@intel.com> wrote: > Quoting Jani Nikula (2025-05-06 10:06:50-03:00) >>Observe that i915->irq_lock is no longer used to protect anything >>outside of display. Make it a display thing. >> >>This allows us to remove the ugly #define irq_lock irq.lock hack from xe >>compat header. >> >>Note that this is slightly more subtle than it first looks. For i915, >>there's no functional change here. The lock is moved. However, for xe, >>we'll now have *two* locks, xe->irq.lock and display->irq.lock. These >>should protect different things, though. Indeed, nesting in the past >>would've lead to a deadlock because they were the same lock. >> >>With the i915 references gone, we can make a handful more files >>independent of i915_drv.h. >> >>Signed-off-by: Jani Nikula <jani.nik...@intel.com> > > Besides reviewing the patch itself, I also did a git-grep to check for > lexical references to irq_lock in the code after this patch is applied. > > I found 2 references in comments: > > (1) A reference to "drm_i915_private::irq_lock" in the comment for member > detection_work_enabled of struct intel_hotplug. I think we can > simply refer to "intel_display::irq::lock" now. > > (2) A reference to "i915->irq_lock" in a comment inside struct intel_rps. > Looking at the history, it looks like we started using gt->irq_lock > with commit d762043f7ab1 ("drm/i915: Extract GT powermanagement > interrupt handling"), which failed to update the comment. I think > we can update the comment to make it more accurate. I guess that > could be on a patch of its own...
Thanks for spotting these! I sent a separate fix for (2), because it is kind of separate [1]. > So, with the small tweak suggested in (1), > > Reviewed-by: Gustavo Sousa <gustavo.so...@intel.com> Thanks a lot for the reviews! I took the liberty of tweaking the comment (1) while applying, and pushed the series to din. BR, Jani. [1] https://lore.kernel.org/r/20250507083136.1987023-1-jani.nik...@intel.com -- Jani Nikula, Intel