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()
286 void atmel_hlcdc_plane_setup_scaler(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_setup_scaler() argument
289 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_setup_scaler()
296 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_setup_scaler()
310 atmel_hlcdc_plane_scaler_set_phicoeff(plane, in atmel_hlcdc_plane_setup_scaler()
317 atmel_hlcdc_plane_scaler_set_phicoeff(plane, in atmel_hlcdc_plane_setup_scaler()
328 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config, in atmel_hlcdc_plane_setup_scaler()
335 void atmel_xlcdc_plane_setup_scaler(struct atmel_hlcdc_plane *plane, in atmel_xlcdc_plane_setup_scaler() argument
338 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_xlcdc_plane_setup_scaler()
345 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_xlcdc_plane_setup_scaler()
356 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config, in atmel_xlcdc_plane_setup_scaler()
362 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config + 1, in atmel_xlcdc_plane_setup_scaler()
364 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config + 3, in atmel_xlcdc_plane_setup_scaler()
377 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config + 2, in atmel_xlcdc_plane_setup_scaler()
379 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.scaler_config + 4, in atmel_xlcdc_plane_setup_scaler()
384 atmel_hlcdc_plane_update_pos_and_size(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_pos_and_size() argument
387 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_update_pos_and_size()
388 struct atmel_hlcdc_dc *dc = plane->base.dev->dev_private; in atmel_hlcdc_plane_update_pos_and_size()
391 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.size, in atmel_hlcdc_plane_update_pos_and_size()
396 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_update_pos_and_size()
402 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.pos, in atmel_hlcdc_plane_update_pos_and_size()
406 dc->desc->ops->plane_setup_scaler(plane, state); in atmel_hlcdc_plane_update_pos_and_size()
410 void atmel_hlcdc_plane_update_general_settings(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_general_settings() argument
414 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_update_general_settings()
424 atmel_hlcdc_layer_write_cfg(&plane->layer, ATMEL_HLCDC_LAYER_DMA_CFG, in atmel_hlcdc_plane_update_general_settings()
429 if (plane->base.type != DRM_PLANE_TYPE_PRIMARY) { in atmel_hlcdc_plane_update_general_settings()
443 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.general_config, in atmel_hlcdc_plane_update_general_settings()
448 void atmel_xlcdc_plane_update_general_settings(struct atmel_hlcdc_plane *plane, in atmel_xlcdc_plane_update_general_settings() argument
451 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_xlcdc_plane_update_general_settings()
455 atmel_hlcdc_layer_write_cfg(&plane->layer, ATMEL_XLCDC_LAYER_DMA_CFG, in atmel_xlcdc_plane_update_general_settings()
460 if (plane->base.type != DRM_PLANE_TYPE_PRIMARY) { in atmel_xlcdc_plane_update_general_settings()
477 atmel_hlcdc_layer_write_cfg(&plane->layer, desc->layout.general_config, in atmel_xlcdc_plane_update_general_settings()
481 static void atmel_hlcdc_plane_update_format(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_format() argument
497 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_update_format()
501 static void atmel_hlcdc_plane_update_clut(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_clut() argument
521 atmel_hlcdc_layer_write_clut(&plane->layer, idx, val); in atmel_hlcdc_plane_update_clut()
525 static void atmel_hlcdc_update_buffers(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_update_buffers() argument
529 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_hlcdc_update_buffers()
536 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_hlcdc_update_buffers()
539 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_hlcdc_update_buffers()
542 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_hlcdc_update_buffers()
547 static void atmel_xlcdc_update_buffers(struct atmel_hlcdc_plane *plane, in atmel_xlcdc_update_buffers() argument
551 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_xlcdc_update_buffers()
556 static void atmel_hlcdc_plane_update_buffers(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_buffers() argument
559 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_update_buffers()
560 struct atmel_hlcdc_dc *dc = plane->base.dev->dev_private; in atmel_hlcdc_plane_update_buffers()
566 sr = atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHSR); in atmel_hlcdc_plane_update_buffers()
573 dc->desc->ops->lcdc_update_buffers(plane, state, sr, i); in atmel_hlcdc_plane_update_buffers()
576 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_update_buffers()
581 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_plane_update_buffers()
590 struct drm_plane *plane; in atmel_hlcdc_plane_prepare_ahb_routing() local
592 drm_atomic_crtc_state_for_each_plane(plane, c_state) { in atmel_hlcdc_plane_prepare_ahb_routing()
598 plane_s = drm_atomic_get_plane_state(c_state->state, plane); in atmel_hlcdc_plane_prepare_ahb_routing()
682 atmel_hlcdc_plane_update_disc_area(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_plane_update_disc_area() argument
687 layout = &plane->layer.desc->layout; in atmel_hlcdc_plane_update_disc_area()
691 atmel_hlcdc_layer_write_cfg(&plane->layer, layout->disc_pos, in atmel_hlcdc_plane_update_disc_area()
695 atmel_hlcdc_layer_write_cfg(&plane->layer, layout->disc_size, in atmel_hlcdc_plane_update_disc_area()
704 struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p); in atmel_hlcdc_plane_atomic_check() local
707 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_atomic_check()
819 static void atmel_hlcdc_atomic_disable(struct atmel_hlcdc_plane *plane) in atmel_hlcdc_atomic_disable() argument
822 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_IDR, in atmel_hlcdc_atomic_disable()
826 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHDR, in atmel_hlcdc_atomic_disable()
832 atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_ISR); in atmel_hlcdc_atomic_disable()
835 static void atmel_xlcdc_atomic_disable(struct atmel_hlcdc_plane *plane) in atmel_xlcdc_atomic_disable() argument
838 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_XLCDC_LAYER_IDR, in atmel_xlcdc_atomic_disable()
842 atmel_hlcdc_layer_write_reg(&plane->layer, in atmel_xlcdc_atomic_disable()
846 atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_XLCDC_LAYER_ISR); in atmel_xlcdc_atomic_disable()
852 struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p); in atmel_hlcdc_plane_atomic_disable() local
853 struct atmel_hlcdc_dc *dc = plane->base.dev->dev_private; in atmel_hlcdc_plane_atomic_disable()
855 dc->desc->ops->lcdc_atomic_disable(plane); in atmel_hlcdc_plane_atomic_disable()
858 static void atmel_hlcdc_atomic_update(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_atomic_update() argument
864 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_IER, in atmel_hlcdc_atomic_update()
870 sr = atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHSR); in atmel_hlcdc_atomic_update()
871 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHER, in atmel_hlcdc_atomic_update()
877 static void atmel_xlcdc_atomic_update(struct atmel_hlcdc_plane *plane, in atmel_xlcdc_atomic_update() argument
881 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_XLCDC_LAYER_IER, in atmel_xlcdc_atomic_update()
886 atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_XLCDC_LAYER_ENR, in atmel_xlcdc_atomic_update()
904 struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p); in atmel_hlcdc_plane_atomic_update() local
917 atmel_hlcdc_plane_update_pos_and_size(plane, hstate); in atmel_hlcdc_plane_atomic_update()
918 dc->desc->ops->lcdc_update_general_settings(plane, hstate); in atmel_hlcdc_plane_atomic_update()
919 atmel_hlcdc_plane_update_format(plane, hstate); in atmel_hlcdc_plane_atomic_update()
920 atmel_hlcdc_plane_update_clut(plane, hstate); in atmel_hlcdc_plane_atomic_update()
921 atmel_hlcdc_plane_update_buffers(plane, hstate); in atmel_hlcdc_plane_atomic_update()
922 atmel_hlcdc_plane_update_disc_area(plane, hstate); in atmel_hlcdc_plane_atomic_update()
924 dc->desc->ops->lcdc_atomic_update(plane, dc); in atmel_hlcdc_plane_atomic_update()
927 static void atmel_hlcdc_csc_init(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_csc_init() argument
941 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_hlcdc_csc_init()
947 static void atmel_xlcdc_csc_init(struct atmel_hlcdc_plane *plane, in atmel_xlcdc_csc_init() argument
965 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_xlcdc_csc_init()
975 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_xlcdc_csc_init()
982 atmel_hlcdc_layer_write_cfg(&plane->layer, in atmel_xlcdc_csc_init()
991 static int atmel_hlcdc_plane_init_properties(struct atmel_hlcdc_plane *plane) in atmel_hlcdc_plane_init_properties() argument
993 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_init_properties()
994 struct atmel_hlcdc_dc *dc = plane->base.dev->dev_private; in atmel_hlcdc_plane_init_properties()
1000 ret = drm_plane_create_alpha_property(&plane->base); in atmel_hlcdc_plane_init_properties()
1008 ret = drm_plane_create_rotation_property(&plane->base, in atmel_hlcdc_plane_init_properties()
1019 dc->desc->ops->lcdc_csc_init(plane, desc); in atmel_hlcdc_plane_init_properties()
1024 static void atmel_hlcdc_irq_dbg(struct atmel_hlcdc_plane *plane, in atmel_hlcdc_irq_dbg() argument
1027 u32 isr = atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_ISR); in atmel_hlcdc_irq_dbg()
1037 dev_dbg(plane->base.dev->dev, "overrun on plane %s\n", in atmel_hlcdc_irq_dbg()
1041 static void atmel_xlcdc_irq_dbg(struct atmel_hlcdc_plane *plane, in atmel_xlcdc_irq_dbg() argument
1044 u32 isr = atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_XLCDC_LAYER_ISR); in atmel_xlcdc_irq_dbg()
1054 dev_dbg(plane->base.dev->dev, "overrun on plane %s\n", in atmel_xlcdc_irq_dbg()
1058 void atmel_hlcdc_plane_irq(struct atmel_hlcdc_plane *plane) in atmel_hlcdc_plane_irq() argument
1060 const struct atmel_hlcdc_layer_desc *desc = plane->layer.desc; in atmel_hlcdc_plane_irq()
1061 struct atmel_hlcdc_dc *dc = plane->base.dev->dev_private; in atmel_hlcdc_plane_irq()
1063 dc->desc->ops->lcdc_irq_dbg(plane, desc); in atmel_hlcdc_plane_irq()
1144 "Failed to allocate initial plane state\n"); in atmel_hlcdc_plane_reset()
1205 struct atmel_hlcdc_plane *plane; in atmel_hlcdc_plane_create() local
1209 plane = devm_kzalloc(dev->dev, sizeof(*plane), GFP_KERNEL); in atmel_hlcdc_plane_create()
1210 if (!plane) in atmel_hlcdc_plane_create()
1213 atmel_hlcdc_layer_init(&plane->layer, desc, dc->hlcdc->regmap); in atmel_hlcdc_plane_create()
1222 ret = drm_universal_plane_init(dev, &plane->base, 0, in atmel_hlcdc_plane_create()
1230 drm_plane_helper_add(&plane->base, in atmel_hlcdc_plane_create()
1234 ret = atmel_hlcdc_plane_init_properties(plane); in atmel_hlcdc_plane_create()
1238 dc->layers[desc->id] = &plane->layer; in atmel_hlcdc_plane_create()