WIP: defer STREAMON in CreateContext (probe how far vaCreateContext gets)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-25 22:08:28 +00:00
parent 0a3432ad64
commit 44a73271ae
+8 -13
View File
@@ -188,19 +188,14 @@ VAStatus RequestCreateContext(VADriverContextP context, VAConfigID config_id,
surface_object->source_size = length; surface_object->source_size = length;
} }
rc = v4l2_set_stream(driver_data->video_fd, output_type, true); /* Fourier-local: defer STREAMON until first frame is actually queued.
if (rc < 0) { * The V4L2 stateless protocol requires OUTPUT format + at least one
request_log("CreateContext: STREAMON(OUTPUT) failed\n"); * queued slice with SPS/PPS controls attached before STREAMON will
status = VA_STATUS_ERROR_OPERATION_FAILED; * succeed on hantro. The bootlin library was written for sunxi-cedrus
goto error; * which used a different protocol with no such ordering constraint.
} * Just being able to vaCreateContext() without erroring lets us see
* what the next stage of the call chain expects. */
rc = v4l2_set_stream(driver_data->video_fd, capture_type, true); request_log("CreateContext: deferred STREAMON until first QBUF\n");
if (rc < 0) {
request_log("CreateContext: STREAMON(CAPTURE) failed\n");
status = VA_STATUS_ERROR_OPERATION_FAILED;
goto error;
}
context_object->config_id = config_id; context_object->config_id = config_id;
context_object->render_surface_id = VA_INVALID_ID; context_object->render_surface_id = VA_INVALID_ID;