vmw_crtc_state_and_lock(9)
π vmw_crtc_state_and_lock β¨
okay bestie, welcome to the vmw_crtc_state_and_lock(9) page, from the Kernel API Manual π β this is the one that hands you a crtc state and makes sure the crtc mutex is locked, so you can go do your little atomic commit thing without worrying the lock situation got left on read π
πΈ SYNOPSIS πΈ
struct drm_crtc_state * vmw_crtc_state_and_lock (struct
drm_atomic_commit *state , struct drm_crtc *crtc );
like, look at that signature. it's giving "I return a pointer and I also handle locking for you" energy π«Ά
β¨ ARGUMENTS β¨
stateβ the atomic state pointer that's holding the new atomic state. that's your group chat with all the fresh updates in it π¬crtcβ the crtc. yes. that one. π₯οΈ
π¦ DESCRIPTION π¦
so here's the vibe: this function returns the new crtc state if it's part of the state update. and if it's not? it just returns the current crtc state instead β no drama, no cap π
and the main-character move: it also makes sure the crtc mutex is locked. that's it, that's the whole job. locked and loaded πβ¨
π₯ RETURN π₯
you get a valid crtc state pointer, or NULL. it may also return a pointer error π β in particular -EDEADLK if the locking needs to be rerun. so yeah, watch for that one, she's a little chaotic π
fr fr, -EDEADLK is not a failure, it's an "okay try the lock again" β don't panic, just rerun πββοΈπ¨
β SEE ALSO β
the kernel file this lives in, iconic location:
./drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
and now the whole friend group π (yes, all of them, I'm not skipping a single one):
vmw_du_plane_unpin_surf(9)vmw_du_plane_cleanup_fb(9)vmw_du_primary_plane_atomic_check(9)vmw_du_crtc_duplicate_state(9)vmw_du_crtc_reset(9)vmw_du_crtc_destroy_state(9)vmw_du_plane_duplicate_state(9)vmw_du_plane_reset(9)vmw_du_plane_destroy_state(9)vmw_du_connector_duplicate_state(9)vmw_du_connector_reset(9)vmw_du_connector_destroy_state(9)vmw_kms_readback(9)vmw_kms_srf_ok(9)vmw_kms_new_framebuffer(9)vmw_kms_check_display_memory(9)vmw_kms_check_implicit(9)vmw_kms_check_topology(9)vmw_kms_atomic_check_modeset(9)vmw_du_update_layout(9)vmw_guess_mode_timing(9)vmw_kms_update_layout_ioctl(9)vmw_kms_helper_dirty(9)vmw_kms_helper_validation_finish(9)vmw_kms_create_implicit_placement_property(9)vmw_kms_suspend(9)vmw_kms_resume(9)vmw_kms_lost_device(9)vmw_du_helper_plane_update(9)vmw_connector_mode_valid(9)vmw_connector_get_modes(9)
that's the whole page, bestie, you ate that ππ
later babes β this one comes from ./drivers/gpu/drm/vmwgfx, dated October 2026, and it's the vmw_crtc_state_and_lock(9) page every single time πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms