Repository navigation
Added
drmkit-cursor:Renderer::prepare, which redraws the sprite when a move near the top or left edge needs it shifted, andedge_shift, the shift itself.Renderer::commitcallsprepare; a caller coalescing throughstage_intocalls it first (drm-cxx#384, P-101).drmkit-display:CrtcColorPipeline::pauseandPausedPipeline::resume, the port of the reference'sclear_for_session_lossand newon_session_resumed. A paused pipeline forgets its blobs and has no setters; resumed on the new device, it keeps the CRTC's property ids and stages there (drm-cxx#372, P-82).
Changed
- The upstream baseline moves to drm-cxx
d7641ed(v5.0.0 and thirteen fixes since). Every upstream change tosrc/in2b260d0..d7641edis ported.
Deprecated
drmkit-display:CrtcColorPipeline::forget_for_session_loss, which kept the pipeline on the device whose session was lost. UsepauseandPausedPipeline::resume. It remains until 0.2.
Fixed
drmkit-display:DriverProfile::vrr_capableis true only when a connected sink reportsvrr_capable. It was true whenever a CRTC hadVRR_ENABLED, which the DRM core gives every CRTC of an atomic driver, soVrrPolicy::Autoarmed variable refresh on sinks that cannot do it. The reference has the same bug, filed as drm-cxx#371 (P-76).drmkit-display:ToneMapperinterpolates its tables as the reference does, taking the difference of two entries inf32before widening it. Widening first left some 16-bit pixels one step higher than the reference's (P-77).drmkit-display: aToneMapperreports zero for the parameter its direction does not use, as the reference does:target_max_nitson a mapper up to PQ,sdr_white_nitson one down to SDR. It reported 100 (P-78).drmkit-display:curves::bt1886_oetfreturns NaN for NaN, as the reference does, rather than 0.0 (P-79).drmkit-display: the hotplug monitor reads the kernel'sCONNECTOR=hint as digits only, as the reference does, so a leading+means re-enumerate rather than a connector id (P-80).drmkit-capture:snapshotcloses the GEM handles its framebuffer queries open. Each capture left one open per plane, pinning every buffer it had read until the descriptor closed. The reference has the same bug, filed as drm-cxx#373 (P-83).drmkit-cursor: a cursor near the top or left edge commits. A negative plane origin was written as a 32-bit two's complement, which the kernel range-checks as a 64-bit signed value and refuses, so with a buffer of the driver's size every commit within about half a buffer of either edge failed withEINVAL. It is now sign-extended, as the reference does (P-84).drmkit-scene: a layer partly off the top or left edge is placed on a plane. Its negative position was written as a 32-bit two's complement, which the kernel range-checks as a 64-bit signed value and refuses, so the layer was left unassigned and did not appear. It is now sign-extended, as the reference does (P-85).drmkit-capture:snapshotreads a plane from where its framebuffer starts. It read from byte 0 of the buffer object and ignored the framebuffer's offset, so a framebuffer starting partway in came out shifted and short of its last rows. The reference has the same bug, filed as drm-cxx#374 (P-86).drmkit-capture:snapshotexports each plane's buffer close-on-exec, as the reference does, so a child spawned on another thread during a capture does not inherit the descriptor (P-87).drmkit-capture:snapshotreports a CRTC that does not exist asCaptureError::IocarryingENOENT, as the reference does. Id 0 was reported asNoMode, and an unknown id as an I/O error with its errno turned into text (P-88).drmkit-capture:write_jpgaverages chroma over each two-by-two block, as the reference's libjpeg does. The encoder took one pixel of each block, so one-pixel color detail decoded in the wrong hue (P-89).drmkit-cursor: dropping aRenderertakes its cursor off the CRTC, as the reference's destructor does. On the legacy path the sprite stayed on screen after the renderer was gone, since the kernel holds its own reference to the cursor's framebuffer (P-90).drmkit-cursor:Renderer::set_cursormakes the next commit hand the buffer to the CRTC again, as the reference does. On the legacy path a new shape was only moved, which leaves the old one showing on a driver that uploads the sprite only when given a buffer (P-91).drmkit-cursor: a cursor falling back to an overlay passes over one this CRTC is already showing, as the reference does. It treated only an overlay on another CRTC as taken, and could take the compositor's own layer (P-92).drmkit-cursor: a hotspot on the frame's far edge is placed as the reference places it when the cursor is rotated in software. It was clamped to the sprite before the centering offset was added, one pixel off (P-93).drmkit-cursor: a cursor file is read as the reference's libxcursor reads it. A chunk's length and version fields are no longer checked, a chunk must match its table-of-contents entry, more than 65,536 entries or a file header under 16 bytes is refused, a requested size pasti32::MAXis refused, a tie between two sizes goes to the one listed first rather than the smaller, and a nominal size of zero is never chosen (P-94).drmkit-cursor: a theme'sindex.themeis read as bytes, as the reference reads it. One that is not UTF-8, such as an older theme with a Latin-1Comment=, lost itsInherits=line and resolved through the wrong theme (P-95).drmkit-capture: each color channel of anARGB8888plane is clamped to its alpha before the blend, as the reference now does. A pixel with color above its alpha, such as a transparent pixel that kept its color, carried past 255 into the next channel and came out the wrong color (drm-cxx#375, P-96).drmkit-capture: a scaled plane is resampled as the reference's Blend2D resamples it, bilinearly and to the bit, rather than nearest-neighbor. One deliberate exception: a scaledXRGB8888plane stays opaque, where the reference's alpha comes from the undefined top byte, filed as drm-cxx#376 (P-98).drmkit-scene: a plane written in full has the downstream SDE driver's private state zeroed first (scaler_v2,csc_v1,excl_rect_v1and the LUT blobs), as the reference now does. State another client left there, such as weston's scaler setup on the SA8155P, made every test commit placing a small layer on that plane fail (drm-cxx#382, P-99).drmkit-scene: a layer whose destination starts above or left of the CRTC is clipped to it, with its source trimmed to match as the kernel's own clip would, instead of being written with a negative position. The SA8155P's driver refuses a negativeCRTC_X/CRTC_Y, so such a layer got no plane. The reference has the same bug, drm-cxx#384 (P-100).drmkit-cursor: a cursor near the top or left edge commits on drivers that refuse a negative plane position, such as the SA8155P's. The sprite is drawn moved up and left inside its buffer and the plane starts at the edge, with no source offset, which i915 and amdgpu refuse on a cursor plane. The reference has the same bug, drm-cxx#384 (P-101).drmkit-fmt: a vendor-0x0bmodifier is told apart as MediaTek's or VeriSilicon's by its body, as the reference now does. Every one was read as VeriSilicon, so a MediaTek modifier was classified and described as a VS tile mode.vendor_0b_is_mtkis new (drm-cxx#365, P-102).drmkit-planes: a CRTC's blend-stage limit is read as the reference reads it.use_baselayer_for_stage=1now counts the base stage, and asec_ui_blendstageof 0 no longer leaves the CRTC with no limit (drm-cxx#363, P-103).drmkit-scene: the canvas is reserved only a plane that scans it out in its own format, linear, as the reference asks. A plane that took only some other canvas format could be reserved and then refuse the canvas (drm-cxx#364, P-104).drmkit-planes:PlaneCapabilities::scans_outreads a plane withoutIN_FORMATSas linear only, as the reference does (drm-cxx#364, P-104).drmkit-planes: on a CRTC that blends fewer planes than it offers, the allocator keeps the layers with the highestkeep_prioritywithin the limit, counting pinned and externally bound layers and leaving one stage for the canvas when anything composites, as the reference now does. The layers it kept were the ones its search happened to place first, so high-priority layers could be composited while low-priority ones held planes (drm-cxx#363, P-105).drmkit-cursor: the cursor's plane is written with the top of itszposrange, capped below the CRTC's blend-stage limit, as the reference's cursor fix does. Left at an overlay's default of 0 it shared the primary's blend stage, which the SA8155P refuses, so the cursor never committed there (drm-cxx#384, P-106).drmkit-scene: the off-screen clip skips the formats the reference skips, a list of chroma-subsampled ones, and nothing else, so a 4:4:4 YUV layer such asNV24is clipped too. A source extent past 32 bits is left as given (drm-cxx#384, P-107).drmkit-cursor: an overlay picked for the cursor is never a multirect virtual plane, which the driver refuses unless its parent is armed too (drm-cxx#387, P-108).
All 21 crates are on crates.io at 0.1.3. Full diff: v0.1.2...v0.1.3.