Lines Matching refs:layer
87 struct logicvc_layer *layer = logicvc_layer(drm_plane); in logicvc_plane_atomic_check() local
111 ret = logicvc_layer_buffer_find_setup(logicvc, layer, new_state, in logicvc_plane_atomic_check()
123 layer->index != (logicvc->config.layers_count - 1) && in logicvc_plane_atomic_check()
140 struct logicvc_layer *layer = logicvc_layer(drm_plane); in logicvc_plane_atomic_update() local
149 u32 index = layer->index; in logicvc_plane_atomic_update()
167 logicvc_layer_buffer_find_setup(logicvc, layer, new_state, in logicvc_plane_atomic_update()
191 if (layer->config.alpha_mode == LOGICVC_LAYER_ALPHA_LAYER) { in logicvc_plane_atomic_update()
196 switch (layer->config.depth) { in logicvc_plane_atomic_update()
201 if (layer->config.colorspace == in logicvc_plane_atomic_update()
237 struct logicvc_layer *layer = logicvc_layer(drm_plane); in logicvc_plane_atomic_disable() local
239 u32 index = layer->index; in logicvc_plane_atomic_disable()
260 struct logicvc_layer *layer, in logicvc_layer_buffer_find_setup() argument
269 u32 base_offset = layer->config.base_offset * layer_stride; in logicvc_layer_buffer_find_setup()
270 u32 buffer_offset = layer->config.buffer_offset * layer_stride; in logicvc_layer_buffer_find_setup()
330 layer->index, fb_offset - base_offset); in logicvc_layer_buffer_find_setup()
335 layer->index, fb_offset - base_offset); in logicvc_layer_buffer_find_setup()
353 static struct logicvc_layer_formats *logicvc_layer_formats_lookup(struct logicvc_layer *layer) in logicvc_layer_formats_lookup() argument
358 alpha = (layer->config.alpha_mode == LOGICVC_LAYER_ALPHA_PIXEL); in logicvc_layer_formats_lookup()
361 if (logicvc_layer_formats[i].colorspace == layer->config.colorspace && in logicvc_layer_formats_lookup()
362 logicvc_layer_formats[i].depth == layer->config.depth && in logicvc_layer_formats_lookup()
383 struct logicvc_layer *layer) in logicvc_layer_config_parse() argument
385 struct device_node *of_node = layer->of_node; in logicvc_layer_config_parse()
386 struct logicvc_layer_config *config = &layer->config; in logicvc_layer_config_parse()
435 struct logicvc_layer *layer; in logicvc_layer_get_from_index() local
437 list_for_each_entry(layer, &logicvc->layers_list, list) in logicvc_layer_get_from_index()
438 if (layer->index == index) in logicvc_layer_get_from_index()
439 return layer; in logicvc_layer_get_from_index()
447 struct logicvc_layer *layer; in logicvc_layer_get_from_type() local
449 list_for_each_entry(layer, &logicvc->layers_list, list) in logicvc_layer_get_from_type()
450 if (layer->drm_plane.type == type) in logicvc_layer_get_from_type()
451 return layer; in logicvc_layer_get_from_type()
466 struct logicvc_layer *layer = NULL; in logicvc_layer_init() local
473 layer = devm_kzalloc(dev, sizeof(*layer), GFP_KERNEL); in logicvc_layer_init()
474 if (!layer) { in logicvc_layer_init()
479 layer->of_node = of_node; in logicvc_layer_init()
480 layer->index = index; in logicvc_layer_init()
482 ret = logicvc_layer_config_parse(logicvc, layer); in logicvc_layer_init()
489 formats = logicvc_layer_formats_lookup(layer); in logicvc_layer_init()
514 devm_kfree(dev, layer); in logicvc_layer_init()
519 if (layer->config.primary) in logicvc_layer_init()
524 ret = drm_universal_plane_init(drm_dev, &layer->drm_plane, 0, in logicvc_layer_init()
532 drm_plane_helper_add(&layer->drm_plane, &logicvc_plane_helper_funcs); in logicvc_layer_init()
537 if (layer->config.alpha_mode == LOGICVC_LAYER_ALPHA_LAYER) in logicvc_layer_init()
538 drm_plane_create_alpha_property(&layer->drm_plane); in logicvc_layer_init()
540 drm_plane_create_zpos_immutable_property(&layer->drm_plane, zpos); in logicvc_layer_init()
544 layer->formats = formats; in logicvc_layer_init()
546 list_add_tail(&layer->list, &logicvc->layers_list); in logicvc_layer_init()
551 if (layer) in logicvc_layer_init()
552 devm_kfree(dev, layer); in logicvc_layer_init()
558 struct logicvc_layer *layer) in logicvc_layer_fini() argument
562 list_del(&layer->list); in logicvc_layer_fini()
563 devm_kfree(dev, layer); in logicvc_layer_fini()
569 struct logicvc_layer *layer; in logicvc_layers_attach_crtc() local
571 list_for_each_entry(layer, &logicvc->layers_list, list) { in logicvc_layers_attach_crtc()
572 if (layer->drm_plane.type != DRM_PLANE_TYPE_OVERLAY) in logicvc_layers_attach_crtc()
575 layer->drm_plane.possible_crtcs = possible_crtcs; in logicvc_layers_attach_crtc()
586 struct logicvc_layer *layer; in logicvc_layers_init() local
607 layer = logicvc_layer_get_from_index(logicvc, index); in logicvc_layers_init()
608 if (layer) { in logicvc_layers_init()
626 list_for_each_entry_safe(layer, next, &logicvc->layers_list, list) in logicvc_layers_init()
627 logicvc_layer_fini(logicvc, layer); in logicvc_layers_init()