From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/i915: handle failure from vga_get_uninterruptible() Date: Mon, 09 Mar 2026 08:44:57 +1000 Message-ID: In-Reply-To: <20260306152413.758919-2-Simon.Richter@hogyros.de> References: <20260306152413.758919-1-Simon.Richter@hogyros.de> <20260306152413.758919-2-Simon.Richter@hogyros.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Note:** The cover letter subject says "handle failure from vga_get()" but= the patch subject says "vga_get_uninterruptible()" =E2=80=94 the patch sub= ject is more accurate. **Changes in `intel_vga_disable()`:** The `goto skip` pattern is used correctly here. When `vga_get_uninterruptib= le()` fails, the code skips the `outb()`/`inb()` VGA register accesses and = the matching `vga_put()`, but still performs the MMIO write to `VGA_DISP_DI= SABLE`: ```c err =3D vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO); if (err) goto skip; outb(0x01, VGA_SEQ_I); sr1 =3D inb(VGA_SEQ_D); outb(sr1 | VGA_SR01_SCREEN_OFF, VGA_SEQ_D); vga_put(pdev, VGA_RSRC_LEGACY_IO); udelay(300); skip: intel_de_write(display, vga_reg, VGA_DISP_DISABLE); ``` This is correct =E2=80=94 the `VGA_DISP_DISABLE` write goes through MMIO (n= ot legacy I/O), so it must still happen regardless of VGA arbitration statu= s. The `udelay(300)` is also correctly skipped since it's only needed after= the VGA sequencer register write. **Changes in `intel_vga_reset_io_mem()`:** The early `return` on error is clean and appropriate here, since the entire= function body is about touching VGA legacy I/O registers: ```c err =3D vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO); if (err) return; ``` The added comment explaining the rationale is helpful: ```c * We ignore this issue if we can't access the VGA registers, because * neither can vgacon. ``` **Minor nits (non-blocking):** - The `err` variable is declared but only used for a single check-and-branc= h. This is fine and follows kernel convention. - The comment in `intel_vga_disable()` could start with a capital letter ("= If the VGA ports...") per kernel comment style, but this is truly trivial. **Verdict:** Patch looks correct and ready to apply. The error handling log= ic is sound, the skip/return patterns are appropriate for each call site, a= nd the comments explain the reasoning well. --- Generated by Claude Code Patch Reviewer