Lines Matching full:vc4
7 * DOC: VC4 KMS
50 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_get_ctm_state() local
54 ret = drm_modeset_lock(&vc4->ctm_state_lock, state->acquire_ctx); in vc4_get_ctm_state()
94 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_ctm_obj_fini() local
96 drm_atomic_private_obj_fini(&vc4->ctm_manager); in vc4_ctm_obj_fini()
99 static int vc4_ctm_obj_init(struct vc4_dev *vc4) in vc4_ctm_obj_init() argument
103 drm_modeset_lock_init(&vc4->ctm_state_lock); in vc4_ctm_obj_init()
109 drm_atomic_private_obj_init(&vc4->base, &vc4->ctm_manager, &ctm_state->base, in vc4_ctm_obj_init()
112 return drmm_add_action_or_reset(&vc4->base, vc4_ctm_obj_fini, NULL); in vc4_ctm_obj_init()
135 vc4_ctm_commit(struct vc4_dev *vc4, struct drm_atomic_state *state) in vc4_ctm_commit() argument
137 struct vc4_hvs *hvs = vc4->hvs; in vc4_ctm_commit()
138 struct vc4_ctm_state *ctm_state = to_vc4_ctm_state(vc4->ctm_manager.state); in vc4_ctm_commit()
172 struct vc4_dev *vc4 = to_vc4_dev(state->dev); in vc4_hvs_get_new_global_state() local
175 priv_state = drm_atomic_get_new_private_obj_state(state, &vc4->hvs_channels); in vc4_hvs_get_new_global_state()
185 struct vc4_dev *vc4 = to_vc4_dev(state->dev); in vc4_hvs_get_old_global_state() local
188 priv_state = drm_atomic_get_old_private_obj_state(state, &vc4->hvs_channels); in vc4_hvs_get_old_global_state()
198 struct vc4_dev *vc4 = to_vc4_dev(state->dev); in vc4_hvs_get_global_state() local
201 priv_state = drm_atomic_get_private_obj_state(state, &vc4->hvs_channels); in vc4_hvs_get_global_state()
208 static void vc4_hvs_pv_muxing_commit(struct vc4_dev *vc4, in vc4_hvs_pv_muxing_commit() argument
211 struct vc4_hvs *hvs = vc4->hvs; in vc4_hvs_pv_muxing_commit()
249 static void vc5_hvs_pv_muxing_commit(struct vc4_dev *vc4, in vc5_hvs_pv_muxing_commit() argument
252 struct vc4_hvs *hvs = vc4->hvs; in vc5_hvs_pv_muxing_commit()
269 drm_WARN_ON(&vc4->base, in vc5_hvs_pv_muxing_commit()
326 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_atomic_commit_tail() local
327 struct vc4_hvs *hvs = vc4->hvs; in vc4_atomic_commit_tail()
372 if (vc4->is_vc5) { in vc4_atomic_commit_tail()
389 vc4_ctm_commit(vc4, state); in vc4_atomic_commit_tail()
391 if (vc4->is_vc5) in vc4_atomic_commit_tail()
392 vc5_hvs_pv_muxing_commit(vc4, state); in vc4_atomic_commit_tail()
394 vc4_hvs_pv_muxing_commit(vc4, state); in vc4_atomic_commit_tail()
409 if (vc4->is_vc5) { in vc4_atomic_commit_tail()
461 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_fb_create() local
464 if (WARN_ON_ONCE(vc4->is_vc5)) in vc4_fb_create()
507 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_ctm_atomic_check() local
517 ctm_state = vc4_get_ctm_state(state, &vc4->ctm_manager); in vc4_ctm_atomic_check()
529 ctm_state = vc4_get_ctm_state(state, &vc4->ctm_manager); in vc4_ctm_atomic_check()
574 struct vc4_dev *vc4 = to_vc4_dev(state->dev); in vc4_load_tracker_atomic_check() local
581 &vc4->load_tracker); in vc4_load_tracker_atomic_check()
604 if (!vc4->load_tracker_enabled) in vc4_load_tracker_atomic_check()
652 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_load_tracker_obj_fini() local
654 drm_atomic_private_obj_fini(&vc4->load_tracker); in vc4_load_tracker_obj_fini()
657 static int vc4_load_tracker_obj_init(struct vc4_dev *vc4) in vc4_load_tracker_obj_init() argument
665 drm_atomic_private_obj_init(&vc4->base, &vc4->load_tracker, in vc4_load_tracker_obj_init()
669 return drmm_add_action_or_reset(&vc4->base, vc4_load_tracker_obj_fini, NULL); in vc4_load_tracker_obj_init()
735 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_hvs_channels_obj_fini() local
737 drm_atomic_private_obj_fini(&vc4->hvs_channels); in vc4_hvs_channels_obj_fini()
740 static int vc4_hvs_channels_obj_init(struct vc4_dev *vc4) in vc4_hvs_channels_obj_init() argument
748 drm_atomic_private_obj_init(&vc4->base, &vc4->hvs_channels, in vc4_hvs_channels_obj_init()
752 return drmm_add_action_or_reset(&vc4->base, vc4_hvs_channels_obj_fini, NULL); in vc4_hvs_channels_obj_init()
923 struct vc4_dev *vc4 = to_vc4_dev(state->dev); in vc4_core_clock_atomic_check() local
935 &vc4->load_tracker); in vc4_core_clock_atomic_check()
1035 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_kms_load() local
1043 if (!vc4->is_vc5) { in vc4_kms_load()
1047 vc4->load_tracker_enabled = true; in vc4_kms_load()
1059 if (vc4->is_vc5) { in vc4_kms_load()
1067 dev->mode_config.funcs = vc4->is_vc5 ? &vc5_mode_funcs : &vc4_mode_funcs; in vc4_kms_load()
1073 ret = vc4_ctm_obj_init(vc4); in vc4_kms_load()
1077 ret = vc4_load_tracker_obj_init(vc4); in vc4_kms_load()
1081 ret = vc4_hvs_channels_obj_init(vc4); in vc4_kms_load()