Lines Matching full:plane

23  * struct atmel_hlcdc_plane_state - Atmel HLCDC Plane state structure.
25 * @base: DRM plane state
26 * @crtc_x: x position of the plane relative to the CRTC
27 * @crtc_y: y position of the plane relative to the CRTC
28 * @crtc_w: visible width of the plane
29 * @crtc_h: visible height of the plane
274 atmel_hlcdc_plane_scaler_set_phicoeff(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_scaler_set_phicoeff() argument
281 atmel_hlcdc_layer_write_cfg(&plane->layer, cfg_offs + i, in atmel_hlcdc_plane_scaler_set_phicoeff()
285 static void atmel_hlcdc_plane_setup_scaler(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_setup_scaler() argument
288 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_setup_scaler()
295 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_setup_scaler()
309 atmel_hlcdc_plane_scaler_set_phicoeff(plane, in atmel_hlcdc_plane_setup_scaler()
316 atmel_hlcdc_plane_scaler_set_phicoeff(plane, in atmel_hlcdc_plane_setup_scaler()
327 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config, in atmel_hlcdc_plane_setup_scaler()
334 atmel_hlcdc_plane_update_pos_and_size(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_pos_and_size() argument
337 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_update_pos_and_size()
340 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.size, in atmel_hlcdc_plane_update_pos_and_size()
345 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_update_pos_and_size()
351 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.pos, in atmel_hlcdc_plane_update_pos_and_size()
355 atmel_hlcdc_plane_setup_scaler(plane, state); in atmel_hlcdc_plane_update_pos_and_size()
359 atmel_hlcdc_plane_update_general_settings(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_general_settings() argument
363 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_update_general_settings()
373 atmel_hlcdc_layer_write_cfg(&plane->layer, ATMEL_HLCDC_LAYER_DMA_CFG, in atmel_hlcdc_plane_update_general_settings()
378 if (plane->base.type != DRM_PLANE_TYPE_PRIMARY) { in atmel_hlcdc_plane_update_general_settings()
392 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.general_config, in atmel_hlcdc_plane_update_general_settings()
396 static void atmel_hlcdc_plane_update_format(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_format() argument
412 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_update_format()
416 static void atmel_hlcdc_plane_update_clut(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_clut() argument
436 atmel_hlcdc_layer_write_clut(&plane->layer, idx, val); in atmel_hlcdc_plane_update_clut()
440 static void atmel_hlcdc_plane_update_buffers(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_buffers() argument
443 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_update_buffers()
448 sr = atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHSR); in atmel_hlcdc_plane_update_buffers()
455 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_hlcdc_plane_update_buffers()
460 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_hlcdc_plane_update_buffers()
463 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_hlcdc_plane_update_buffers()
466 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_hlcdc_plane_update_buffers()
472 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_update_buffers()
477 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_update_buffers()
486 struct drm_plane *plane; in atmel_hlcdc_plane_prepare_ahb_routing() local
488 drm_atomic_crtc_state_for_each_plane(plane, c_state) { in atmel_hlcdc_plane_prepare_ahb_routing()
494 plane_s = drm_atomic_get_plane_state(c_state->state, plane); in atmel_hlcdc_plane_prepare_ahb_routing()
578 atmel_hlcdc_plane_update_disc_area(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_disc_area() argument
583 layout = &plane->layer.desc->layout; in atmel_hlcdc_plane_update_disc_area()
587 atmel_hlcdc_layer_write_cfg(&plane->layer, layout->disc_pos, in atmel_hlcdc_plane_update_disc_area()
591 atmel_hlcdc_layer_write_cfg(&plane->layer, layout->disc_size, in atmel_hlcdc_plane_update_disc_area()
600 struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p); in atmel_hlcdc_plane_atomic_check() local
603 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_atomic_check()
718 struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p); in atmel_hlcdc_plane_atomic_disable() local
721 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_IDR, in atmel_hlcdc_plane_atomic_disable()
725 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHDR, in atmel_hlcdc_plane_atomic_disable()
731 atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_ISR); in atmel_hlcdc_plane_atomic_disable()
739 struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p); in atmel_hlcdc_plane_atomic_update() local
752 atmel_hlcdc_plane_update_pos_and_size(plane, hstate); in atmel_hlcdc_plane_atomic_update()
753 atmel_hlcdc_plane_update_general_settings(plane, hstate); in atmel_hlcdc_plane_atomic_update()
754 atmel_hlcdc_plane_update_format(plane, hstate); in atmel_hlcdc_plane_atomic_update()
755 atmel_hlcdc_plane_update_clut(plane, hstate); in atmel_hlcdc_plane_atomic_update()
756 atmel_hlcdc_plane_update_buffers(plane, hstate); in atmel_hlcdc_plane_atomic_update()
757 atmel_hlcdc_plane_update_disc_area(plane, hstate); in atmel_hlcdc_plane_atomic_update()
760 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_IER, in atmel_hlcdc_plane_atomic_update()
766 sr = atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHSR); in atmel_hlcdc_plane_atomic_update()
767 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHER, in atmel_hlcdc_plane_atomic_update()
773 static int atmel_hlcdc_plane_init_properties(struct atmel_hlcdc_plane *plane) in atmel_hlcdc_plane_init_properties() argument
775 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_init_properties()
781 ret = drm_plane_create_alpha_property(&plane->base); in atmel_hlcdc_plane_init_properties()
789 ret = drm_plane_create_rotation_property(&plane->base, in atmel_hlcdc_plane_init_properties()
804 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_init_properties()
807 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_init_properties()
810 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_init_properties()
818 void atmel_hlcdc_plane_irq(struct atmel_hlcdc_plane *plane) in atmel_hlcdc_plane_irq() argument
820 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_irq()
823 isr = atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_ISR); in atmel_hlcdc_plane_irq()
833 dev_dbg(plane->base.dev->dev, "overrun on plane %s\n", in atmel_hlcdc_plane_irq()
895 "Failed to allocate initial plane state\n"); in atmel_hlcdc_plane_reset()
956 struct atmel_hlcdc_plane *plane; in atmel_hlcdc_plane_create() local
960 plane = devm_kzalloc(dev->dev, sizeof(*plane), GFP_KERNEL); in atmel_hlcdc_plane_create()
961 if (!plane) in atmel_hlcdc_plane_create()
964 atmel_hlcdc_layer_init(&plane->layer, desc, dc->hlcdc->regmap); in atmel_hlcdc_plane_create()
973 ret = drm_universal_plane_init(dev, &plane->base, 0, in atmel_hlcdc_plane_create()
981 drm_plane_helper_add(&plane->base, in atmel_hlcdc_plane_create()
985 ret = atmel_hlcdc_plane_init_properties(plane); in atmel_hlcdc_plane_create()
989 dc->layers[desc->id] = &plane->layer; in atmel_hlcdc_plane_create()