Repository navigation
drmkit 0.1.2
Added
drmkit-scene:LayerBufferSource::with_mapping, a provided method that runs a closure over a CPU view of the pixels. The scene's composition reads through it; its default maps withmap, so existing sources need nothing.drmkit-scene:LayerScene::on_session_pausedandon_session_resumed, as the reference has them. A pause hands every held buffer back and pauses each source and the canvas; a resume rebuilds the allocator's view of the output, resumes each source on the new device, makes the canvas again, and lifts any suspension. Every caller had to walk the layers itself (P-74).
Deprecated
drmkit-scene:OutputSignallingandderive_output_signallingare nowOutputSignalingandderive_output_signaling, in the US spelling the rest of the API uses. The old names remain as deprecated aliases until 0.2.
Fixed
drmkit-scene: a source's damage is bounded before it reaches the kernel, as the reference does. More than 16 rectangles repaints the whole frame, each rectangle is clipped to the buffer, and one left empty is dropped. A clip outside the buffer could otherwise make the kernel refuse the whole commit (P-53).drmkit-scene: the first fast-path frame the kernel refuses is logged as a warning, once, as the reference does. The latch was set but nothing logged (P-54).drmkit-core:Device::openreports a node the caller may not open asCoreError::Io(EACCES), the errno as the reference returns it, rather thanCoreError::NotMaster, whose "not DRM master" misdiagnosed a permissions problem.drmkit-display:DriverProfile::probeturns on universal planes and atomic before scanning, as the reference does, sofb_damage_clipsno longer reads false on a descriptor that has not gone atomic yet; and a node whose resource list cannot be read probes to defaults rather than failing.ScanoutTargetdiscovery no longer fails when a driver refuses universal planes (P-55).drmkit-planes:Allocation::compositedreports transient-composited layers, which were neither placed nor reported, and no longer reports an unplaced composition layer, as the reference marks them (P-56).drmkit-cursor: an animated cursor with many sizes loads, as it does in the reference. The 256-frame cap counted every size in the file, so Adwaita's busy cursors (six sizes of sixty frames) were refused as too large; the size is now chosen first and only its frames count (P-57).drmkit-capture: JPEG output is 4:2:0 at every quality, as the reference's libjpeg writes it; from quality 90 up it was 4:4:4. A dimension past 65,500 pixels is refused rather than cropped or sheared and reported as written (P-58).drmkit-cursor:Renderer::set_rotationrefuses a rotation on the legacy path withUnsupported, ascreatedoes and as the reference does, rather than pre-rotating the pixels in software (P-59).drmkit-sync: converting aSyncErrortoio::Errorgives the reference's errno --EBADFfor an empty fence or an empty merge,ETIMEDOUTfor a timeout -- where it gave errno-less kinds. An empty fence'sErrorKindis no longerInvalidInput(P-60).drmkit-capture: the warning for a capture with nothing readable gives the enumerated and unbound plane counts, as the reference's does, so a missing client cap can be told from a blank CRTC (P-61).drmkit-scene-sources: a dma-buf import closes its GEM handles when it goes, and when it fails, as the reference does. They were never closed, so every buffer a producer had handed over stayed pinned until the device was closed (P-62).drmkit-scene-sources: an external dma-buf source and an external ring re-import their buffers on a session resume, as the reference does. After a VT switch the source's layer failed every commit and the ring's went blank. The GBM source no longer tears its old import down through the dead descriptor when it re-allocates (P-63).drmkit-session: a device that cannot be reopened on resume no longer costs the others. It is reported as the newSessionEvent::DeviceLostand the rest resume, as the reference reports it throughresume_failed_cb;dispatchreturned the first failure and left every later device closed (P-64).drmkit-scene-sources:DumbBufferSourceallocates for its format, as the reference does: a packed format at its own depth, soRGB565gets a 16-bit stride, and the semi-planar 4:2:0 formats as two planes. Every format was sized at 32 bits a pixel in one plane, soRGB565scanned out sheared andNV12could not be created. A format with no known depth is refused asInvalidConfig, and a resume that cannot re-allocate reports the kernel's errno rather thanENOMEM(P-65).drmkit-present: when nothing is negotiated -- no plane advertisesIN_FORMATS, or none takes a layout the producer can make --ScanoutBackend::createallows the producerLINEAR, as the reference does and asScanoutProducerdocumented. It passed an empty set, which a producer reads as no constraint, so a tiled or compressed buffer no plane takes could reach the first commit (P-66).drmkit-scene-gbm: the producer's acquire fence covers one frame, as the reference hands it over: the acquire that takes it clears it. Every later frame got a copy, so the display engine waited on a render long finished, and a frame the producer had not fenced was never told apart. A framebuffer the kernel refuses reports the kernel's errno rather thanEINVAL(P-67).drmkit-present:FrameEconomy::default()is the same asnew(); its first decision commits in full. The derived default started as though a frame had gone out already, so an unchanged first frame was skipped (P-67).drmkit-scene-set: a mirrored layer's plane binding reaches its source, as the reference forwards it, and a removed layer's slot is reused, so a set whose layers come and go no longer grows by one slot each time (P-68).drmkit-present:DumbRingSourceforgets its repaint history when the session pauses, along with its buffers. The first paint after a resume could be asked for a partial repaint of a freshly allocated, blank buffer, leaving the rest of it blank on screen; every slot now starts over with a full repaint (P-69).drmkit-csd: seven small departures from the reference, each now as the reference has it (P-70):ShadowCache::blit_intoandblit_cross_fadecomposite source-over onto the destination rather than overwriting it;blit_cross_faderefuses two keys of different sizes, and its endpoints are exactlyblit_into;theme_idhashes each 32-bit field most significant byte first, so it is the reference's hash;Color::from_hexrefuses a sign, so#+1+2+3is no longer a color;- a noise amplitude past one is full strength;
Surface::exportis close-on-exec and reports a refusal as the newSurfaceError::Export, with the kernel's errno, where it wasEmpty;decoration_geometryno longer overflows, and panics, on a shadow extent or title bar pasti32::MAX / 2.
drmkit-input:Keyboard::process_keytreats a repeat as a read, as the reference does, rather than feeding xkb another press of a key it holds; and keymap names with no options take the user'sXKB_DEFAULT_OPTIONS, which an empty options string had been overriding (P-71).drmkit-session: a seat that cannot be opened is logged as an error, as the reference logs it, where it was debug; and a dispatch that fails before the seat activates isSessionError::NoBackend, the "no seat" a caller falls back on, rather thanSessionError::Seat(P-71).drmkit-scene-sources: a GBM source that cannot re-allocate on resume reports the errno, as the reference does, rather thanUnsupported(P-71).drmkit-present:DumbRingSource::newrefuses a zero width, height or slot count as the newPaintError::Zero, as the reference refuses it withEINVAL, rather than failing at the first paint (P-72).drmkit-scene-sources: a dma-buf import tears down on the device file it was made on, through a descriptor of its own, rather than through the caller's descriptor number. After a session loss the next open can take that number, and clearing aDmaBufSourceCache-- documented for session loss -- removed the new file's framebuffer (P-73).drmkit-input:InputError::Seatsays libinput could not enumerate the seat through udev, which is what it reports. It said "no such seat, or no permission for it", but libinput accepts an unknown seat name and finds no devices on it.drmkit-scene-set: a mirrored layer that falls to composition, or is forced there, is blended from the shared source, as the reference blends it. It was dropped from every frame, since a shared source could not be mapped (P-68).drmkit-dumb,drmkit-scene-gbm: a dumb buffer, and a GBM surface source's framebuffers, are torn down on the device file they were made on, through a descriptor of their own, as dma-buf imports are since P-73. A buffer dropped after a session loss destroyed the buffer of whatever file reused its descriptor number (P-75).
All 21 crates are on crates.io at 0.1.2. Full diff: v0.1.1...v0.1.2.