iter5 sweep follow-up: remove additional DEBUG sites flagged by Phase 5 review

Phase 5 sonnet review caught four DEBUG sites the first sweep pass
missed (the vaapi-copy + --vo=null stress test didn't exercise the
ExportSurfaceHandle path, so per-frame ExportSurfaceHandle dumps went
undetected).

Removed:
- surface.c::CreateSurfaces2 format-dump (per-CreateSurfaces2 noise,
  labeled DEBUG INSTRUMENTATION (surface-export diagnosis 2026-05-04))
- surface.c::ExportSurfaceHandle full-descriptor dump (per-frame for
  consumers using DMA-BUF, also labeled DEBUG)
- surface.c::QuerySurfaceStatus -> status= line (per-call noise)
- h264.c V4L2 readback block (~67 lines): static bool readback_warned
  + the per-frame VIDIOC_G_EXT_CTRLS attempt + the readback success
  log + the "V4L2 readback unavailable" fallback announcement. With
  the iter4 fixes landed, the readback EACCES is no longer load-bearing
  to investigate — drop the block + the per-process global state.

Removing the readback block also resolves Phase 5 finding C2: the
static bool readback_warned was new mutable process-global state
introduced post-Track-E, inconsistent with that track's intent.

Net: -107 lines from src/{h264,surface}.c.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 16:04:03 +00:00
parent b993355507
commit c8b6edec3d
2 changed files with 0 additions and 107 deletions
-40
View File
@@ -272,15 +272,6 @@ VAStatus RequestCreateSurfaces2(VADriverContextP context, unsigned int format,
* 15360 bytes early. Earlier ftrace shows hantro returns
* height=1088 — but verify in-driver to be sure.
*/
request_log("CreateSurfaces2: surf_width=%u surf_height=%u "
"fmt_width=%u fmt_height=%u bytesperline[0]=%u "
"sizes[0]=%u sizes[1]=%u planes_count=%u "
"v4l2_buffers_count=%u\n",
width, height, format_width, format_height,
destination_bytesperlines[0],
destination_sizes[0], destination_sizes[1],
destination_planes_count, video_format->v4l2_buffers_count);
/*
* Iter2 Fix 3: initialize the CAPTURE buffer pool on first call.
* Pool size = max(surfaces_count, MIN_CAP_POOL); the +headroom
@@ -618,10 +609,6 @@ VAStatus RequestQuerySurfaceStatus(VADriverContextP context,
*status = surface_object->status;
request_log(" -> status=%d (Ready=%d Rendering=%d Displaying=%d)\n",
*status, VASurfaceReady, VASurfaceRendering,
VASurfaceDisplaying);
return VA_STATUS_SUCCESS;
}
@@ -816,33 +803,6 @@ VAStatus RequestExportSurfaceHandle(VADriverContextP context,
}
}
/*
* DEBUG INSTRUMENTATION (surface-export diagnosis 2026-05-04):
* dump the full descriptor so we can compare against what mpv
* reports importing via --msg-level=vd=v --msg-level=vo=v.
* Phase 5 review identified DMA-BUF surface export as the
* likely root cause of the solid-blue render in mpv vaapi mode.
*/
request_log("ExportSurfaceHandle: surf=%u fd[0]=%d fourcc=0x%x "
"w=%u h=%u num_objects=%u num_layers=%u "
"obj[0].size=%u drm_fmt=0x%x drm_mod=0x%llx num_planes=%u "
"p[0].off=%u pitch=%u p[1].off=%u pitch=%u\n",
surface_id,
export_fds_count > 0 ? export_fds[0] : -1,
surface_descriptor->fourcc,
surface_descriptor->width,
surface_descriptor->height,
surface_descriptor->num_objects,
surface_descriptor->num_layers,
surface_descriptor->objects[0].size,
surface_descriptor->layers[0].drm_format,
(unsigned long long)surface_descriptor->objects[0].drm_format_modifier,
surface_descriptor->layers[0].num_planes,
surface_descriptor->layers[0].offset[0],
surface_descriptor->layers[0].pitch[0],
planes_count > 1 ? surface_descriptor->layers[0].offset[1] : 0,
planes_count > 1 ? surface_descriptor->layers[0].pitch[1] : 0);
status = VA_STATUS_SUCCESS;
goto complete;