Skip to content

metal: fix updating of blob properties#1115

Merged
mahkoh merged 4 commits into
masterfrom
jorth/hdr-metadata
Jul 19, 2026
Merged

metal: fix updating of blob properties#1115
mahkoh merged 4 commits into
masterfrom
jorth/hdr-metadata

Conversation

@mahkoh

@mahkoh mahkoh commented Jul 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 19, 2026 15:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors object-id access by extending ObjWithId support to Rc<T> (and adding an Option helper), then uses those utilities in the Metal DRM backend to improve how blob-backed DRM properties (mode, gamma LUT, HDR metadata) are tracked and refreshed.

Changes:

  • Add ObjWithId blanket impl for Rc<T> and introduce ObjWithIdOptExt::id_or_default() for Option<T>.
  • Migrate several ObjWithId impls from Rc<...> wrappers to the underlying types, and make PropBlob implement ObjWithId.
  • Update Metal backend blob-property handling to compare blob IDs against cached blob objects and adjust HDR metadata retrieval behavior.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/video/drm.rs Makes PropBlob implement ObjWithId (removing the inherent id() method in favor of the trait).
src/utils/obj_and_id.rs Adds ObjWithId for Rc<T> and an Option extension trait for defaulting IDs.
src/tree/workspace.rs Moves ObjWithId impl to WorkspaceNode (leveraging new Rc<T> blanket impl).
src/tree/output.rs Moves ObjWithId impl to OutputNode (leveraging new Rc<T> blanket impl).
src/state.rs Moves ObjWithId impls to ConnectorData / DrmDevData (leveraging new Rc<T> blanket impl).
src/ifs/wl_surface/xdg_surface/xdg_toplevel/xdg_toplevel_icon_v1.rs Moves ObjWithId impl to XdgToplevelIconV1 (leveraging new Rc<T> blanket impl).
src/ifs/wl_surface/commit_timeline.rs Moves ObjWithId impl to Inner (leveraging new Rc<T> blanket impl).
src/cursor_user.rs Moves ObjWithId impl to CursorUser (leveraging new Rc<T> blanket impl).
src/backends/metal/video.rs Adjusts HDR metadata initialization and blob-id change detection for connector/crtc properties.
src/backends/metal/transaction.rs Imports ObjWithId (needed now that PropBlob::id() is trait-based).
src/backend.rs Moves ObjWithId impl to BackendGammaLut (leveraging new Rc<T> blanket impl).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/backends/metal/video.rs
Comment thread src/backends/metal/video.rs
Comment thread src/backends/metal/video.rs
@mahkoh
mahkoh merged commit 8bfd85c into master Jul 19, 2026
14 checks passed
@mahkoh
mahkoh deleted the jorth/hdr-metadata branch July 19, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants