Commit Graph

44 Commits

Author SHA1 Message Date
claude-noether e1aca9cc6b fresnel-fourier iter3 Phase 6 commit D: buffer.c whitelist for
VAProbabilityBufferType

Phase 2 source-read assumed buffer.c was type-agnostic ("the buffer
registry is type-agnostic" per phase2_iter3_situation.md non-bugs
list). FALSE. RequestCreateBuffer at buffer.c:59-70 has an explicit
allow-list switch:

  case VAPictureParameterBufferType:
  case VAIQMatrixBufferType:
  case VASliceParameterBufferType:
  case VASliceDataBufferType:
  case VAImageBufferType:
      break;
  default:
      return VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE;

Without VAProbabilityBufferType in the allow-list, the consumer gets
VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE on vaCreateBuffer for the
probability buffer, BEFORE codec_store_buffer is ever reached.
ffmpeg-vaapi log:

  [vp8] Failed to create parameter buffer (type 13): 15
        (the requested VABufferType is not supported).

Same iter1 Commit D pattern: Phase 2 grep didn't find this, runtime
enumerated authoritatively. Per memory feedback_header_deletion_
check.md ("let the compiler enumerate them") — but extended here:
runtime enumerates allow-list violations the same way the compiler
enumerates include-site violations.

Fix: add `case VAProbabilityBufferType:` to the buffer.c allow-list.
+1 line, mechanical.

Refs:
  ../fresnel-fourier/phase2_iter3_situation.md (incorrect non-bug
                                                 claim about buffer.c)
  ../fresnel-fourier/phase4_iter3_plan.md (Commit D placeholder for
                                            fix-forward — used)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 23:03:59 +00:00
test0r 951233a12e iter5 sweep: remove iter1 ENTER traces (13 call sites across 4 files)
Removes the iter1 patch-0014 ENTER traces from buffer.c, image.c,
picture.c, surface.c. These were diagnostic-only entry-point logs
added during iter1's "where does Firefox RDD crash?" investigation.
With the iter1+iter2+iter3+iter4 fixes landed, the entry-point
traces are pure noise.

If a future investigation needs entry-point coverage, strace -e trace
on the libva consumer process gives equivalent visibility without
modifying the driver.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 14:47:25 +00:00
test0r 21ae311077 DEBUG: ENTER on CreateBuffer + BeginPicture for frame-1 crash narrowing 2026-05-04 14:43:29 +00:00
test0r 92f5b254e6 DEBUG: ENTER on buffer/image entry points to localize Firefox RDD crash 2026-05-04 14:28:53 +00:00
Paul Kocialkowski 518d7a0c59 Update and harmonize heading author lists
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2019-03-07 11:37:12 +01:00
Paul Kocialkowski 7ff2543e64 Add support for the single-planar V4L2 API
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-09-07 16:43:13 +02:00
Paul Kocialkowski 25a8ac4d7e Register video format directly instead of tiled indicator
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-09-07 12:58:44 +02:00
Paul Kocialkowski 48a6e0a7ef fixup! buffer: Add Acquire/ReleaseBufferHandle support for dma-buf export 2018-07-18 14:55:06 +02:00
Paul Kocialkowski 019a0ccb42 buffer: Add Acquire/ReleaseBufferHandle support for dma-buf export
This is the first version of dma-buf export, that does not support
specifying a DRM modifier.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 14:51:11 +02:00
Paul Kocialkowski 9a4693ca0d buffer: Store derived surface id and buffer info for dma-buf export
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-18 14:46:26 +02:00
Maxime Ripard 92f6546596 tree: Remove void * casts
void * can be assigned from and stored to any pointer type without any
warning. Remove the explicit casts.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 111f5b209a tree: Rename cedrus_data to request_data
The cedrus_data structure carries the old name. In order to migrate to the
new name, let's rename it to request_data.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 4ad990e087 tree: Rename the header and defines
The sunxi_cedrus.h header contains a bunch of defines prefixed with
SUNXI_CEDRUS.

As part as the ongoing migration to a more generic name, change that prefix
for V4L2_REQUEST, and the header file to request.h

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 913e1e642c tree: Rename the libva hooks
As part of our renaming effort, Rename the libva hooks names to mention
request instead of SunxiCedrus

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 17:02:23 +02:00
Maxime Ripard 5aeb07f8bf tree: Run clang-format to conform to the kernel coding style
The coding style has been a bit erratic. Enforce the linux kernel coding
style by reusing their .clang-format file, running clang-format on the
source, and ignoring the few shortcomings that clang-format has at the
moment (especially on aligning the define values).

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 10:12:15 +02:00
Maxime Ripard b938824c48 tree: Shorten struct sunxi_cedrus_driver_data name
This long structure name makes it quite difficult to fit within the 80
characters limit. Shorten it.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 09:34:15 +02:00
Maxime Ripard 5aa1604a6c tree: add the driver_data parameter to the BUFFER macro as well
The BUFFER macro takes an implicit driver_data argument. In order to make
it obvious that we need it, let's put it as an explicit parameter.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-07-17 09:27:57 +02:00
Paul Kocialkowski 03fd51b3b3 Reduce switch/case indentation
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-07-11 15:32:52 +02:00
Paul Kocialkowski f872e345d0 Centralize buffer-related ressources in surface object and avoid dynamic indexes
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-25 10:48:17 +02:00
Paul Kocialkowski 61ccf702a1 buffer: Resolve various trivial build issues
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-25 09:22:11 +02:00
Paul Kocialkowski 6cd00b758c Move log function to a dedicated file and rename it along the way
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 17:12:29 +02:00
Paul Kocialkowski a8c191b544 Rename mem2mem_fd to video_fd to prepare for media introduction
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 16:40:42 +02:00
Paul Kocialkowski c7f0d7684a Introduce and use dedicated v4l2 helpers to replace inline ioctls
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 15:39:31 +02:00
Paul Kocialkowski c2e98f6c7e buffer: Harmonize coding style
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-24 09:56:39 +02:00
Paul Kocialkowski 6be573d090 Sanitize unimplemented functions
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 17:08:05 +02:00
Paul Kocialkowski 4b7e71668e Reorder functions, with a straightforward logic
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 16:51:15 +02:00
Paul Kocialkowski a5354efe43 Rework comments by splitting them into README and removing redundant ones
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 16:40:00 +02:00
Paul Kocialkowski 8fe67675c5 buffer: Rename functions arguments for more clarity
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 11:42:12 +02:00
Paul Kocialkowski 34066fc0a7 buffer: Rename object buffer structure fields for more clarity
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 11:25:13 +02:00
Paul Kocialkowski d8a51f0cd4 Use libVA naming style for public API functions
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 11:23:10 +02:00
Paul Kocialkowski b0a8023644 Remove INIT_DRIVER_DATA and replace it with explicit definition
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 11:22:49 +02:00
Paul Kocialkowski 4354922570 Drop the _drv_video suffix from sunxi_cedrus files for conciseness
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 10:56:11 +02:00
Paul Kocialkowski 6a06b4570b context: Use object context structure directly instead of abstract type
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 10:04:58 +02:00
Paul Kocialkowski 5c26862913 buffer: Use object buffer structure directly instead of abstract type
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
2018-04-23 09:59:08 +02:00
Maxime Ripard 5e82668680 buffer: Return an error on unmap if buffer is null
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-04-20 11:23:38 +02:00
Maxime Ripard d758a0d425 Rework buffer and slice handling
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-04-20 11:23:14 +02:00
Maxime Ripard 056d24d20f buffer: don't cast the pointer anymore
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-04-20 10:33:39 +02:00
Maxime Ripard 51ac90481a buffer: cosmetic change
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-04-20 10:24:41 +02:00
Maxime Ripard 073baf070a buffer: cosmetic change
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-04-20 10:05:54 +02:00
Maxime Ripard 4624e95b1b buffer: cosmetic change
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-04-20 10:05:43 +02:00
Maxime Ripard d988545672 buffer: cosmetic change
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-04-20 10:05:31 +02:00
Maxime Ripard d10aec071b buffer: remove intermediate vaStatus variable
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-04-20 10:05:15 +02:00
Florent Revest c8e187aed5 Always clear v4l2_plane before sending them to the kernel 2016-08-29 17:44:23 +02:00
Florent Revest e263c9542c Adds a sunxi-cedrus-drv-video libVA backend
This VA backend uses v4l2's Frame API proposal to interface with the
"sunxi-cedrus" video driver on Allwinner SoC. Only a few parts of the
code are really dependent on sunxi-cedrus and this VA backend could be
reused for other v4l drivers using the Frame API.
2016-08-25 16:19:34 +02:00