STRUCT DPU_ENCODER_PHYS_OPS(9)
π struct dpu_encoder_phys_ops(9) β Kernel API Manual β¨
okay bestie, welcome to struct dpu_encoder_phys_ops, aka the glow-up of the whole kernel API Manual situation π this is literally the interface the physical encoders hand to the virtual encoder that contains them β it's giving "here's everything I can do for you, queen" π«Ά
πΈ NAME
struct dpu_encoder_phys_ops β the interface the physical encoders provide to the containing virtual encoder. that's it, that's the vibe β¨
π¦ SYNOPSIS
struct dpu_encoder_phys_ops {
void (*prepare_commit)(struct dpu_encoder_phys *encoder);
bool (*is_master)(struct dpu_encoder_phys *encoder);
void (*atomic_mode_set)(struct dpu_encoder_phys *encoder, struct drm_crtc_state *crtc_state, struct drm_connector_state *conn_state);
void (*enable)(struct dpu_encoder_phys *encoder);
void (*disable)(struct dpu_encoder_phys *encoder);
int (*control_vblank_irq)(struct dpu_encoder_phys *enc, bool enable);
int (*wait_for_commit_done)(struct dpu_encoder_phys *phys_enc);
int (*wait_for_tx_complete)(struct dpu_encoder_phys *phys_enc);
void (*prepare_for_kickoff)(struct dpu_encoder_phys *phys_enc);
void (*handle_post_kickoff)(struct dpu_encoder_phys *phys_enc);
void (*trigger_start)(struct dpu_encoder_phys *phys_enc);
bool (*needs_single_flush)(struct dpu_encoder_phys *phys_enc);
void (*irq_enable)(struct dpu_encoder_phys *phys);
void (*irq_disable)(struct dpu_encoder_phys *phys);
void (*prepare_idle_pc)(struct dpu_encoder_phys *phys_enc);
void (*restore)(struct dpu_encoder_phys *phys);
int (*get_line_count)(struct dpu_encoder_phys *phys);
int (*get_frame_count)(struct dpu_encoder_phys *phys);
void (*prepare_wb_job)(struct dpu_encoder_phys *phys_enc, struct drm_writeback_job *job);
void (*cleanup_wb_job)(struct dpu_encoder_phys *phys_enc, struct drm_writeback_job *job);
bool (*is_valid_for_commit)(struct dpu_encoder_phys *phys_enc);
};
like, look at all those function pointers π twenty-one of them, and not one is filler. main character struct fr fr.
π Members
prepare_commitβ MSM Atomic Call, start of the atomic commit sequence π« it's the opening number, the first thing that happens before the whole commit dance kicks off.is_masterβ whether thisphys_encis the current master encoder. and yes she can be switched at enable time π it's based onsplit_roleand the current mode (CMD/VID), so the crown can absolutely change hands, iykyk.atomic_mode_setβ DRM Call. sets a DRM mode π and it likely caches the mode, for use at enable β so it's basically stashing the fit for later, no cap.enableβ DRM Call. enables a DRM mode β¨ the moment everything turns tf on.disableβ DRM Call. disables the mode π we simply must say goodbye.control_vblank_irqβ Register/Deregister for VBLANK IRQ β‘ flip it on, flip it off, we love a toggle.wait_for_commit_doneβ wait for the hardware to have flushed the current pending frames to hardware β³ patience is a virtue bestie.wait_for_tx_completeβ wait for the hardware to transfer the pixels to the panel πΌοΈ like, the pixels are literally on their way, just let them land.prepare_for_kickoffβ do any work necessary prior to a kickoff π for the CMD encoder, it may wait for the previous tx done β so yes, it can genuinely sit there waiting.handle_post_kickoffβ do any work necessary post-kickoff work π¬ the afterparty cleanup.trigger_startβ process the start event on the physical encoder π¦ things are officially beginning.needs_single_flushβ whether the encoder slaves need to be flushed π one flush, or not? that's the question.irq_enableβ handler to enable all the encoder IRQs π all of them. every single one. go off.irq_disableβ handler to disable all the encoder IRQs π and now silence, iconic.prepare_idle_pcβ the phys encoder can update thevsync_enablestatus on idle power collapse prepare π΄ lowkey the "getting ready for a nap" function.restoreβ restore all the encoder configs π§ everything back to how it was, we love a comeback.get_line_countβ obtain the current vertical line count π just reading the room, vertically.get_frame_countβ π this page doesn't give it a description, but she's in the struct up there and she's valid, okurrr.prepare_wb_jobβ π again, no description on this page β but it takes astruct drm_writeback_job *job, and it's in the synopsis, so it counts.cleanup_wb_jobβ π same situation bestie: no blurb here, just astruct drm_writeback_job *joband good intentions.is_valid_for_commitβ β¨ no description given, but the name is doing a lot of heavy lifting and honestly? slay.
real talk π:get_frame_count,prepare_wb_job,cleanup_wb_jobandis_valid_for_commitlive in the struct but this page doesn't spell out a description for them β so don't go making stuff up about what they do, mkay? the facts stay the facts.
π₯ SEE ALSO
Kernel file ./drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h plus the whole friend group π:
enum dpu_enc_split_role(9)enum dpu_enc_enable_state(9)enum dpu_intr_idx(9)struct dpu_encoder_phys(9)struct dpu_encoder_phys_wb(9)struct dpu_encoder_phys_cmd(9)struct dpu_enc_phys_init_params(9)
and that's the whole page, bestie π«Ά this one came from ./drivers/gpu/drm/msm/disp/dpu1, dated October 2026, and it's filed as struct dpu_encoder_phys_ops(9) β go forth and read the source, it's giving required reading π
π¦ 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