Lines Matching refs:mp
58 struct malidp_plane *mp = to_malidp_plane(plane); in malidp_de_plane_destroy() local
60 if (mp->base.fb) in malidp_de_plane_destroy()
61 drm_framebuffer_unreference(mp->base.fb); in malidp_de_plane_destroy()
65 devm_kfree(plane->dev->dev, mp); in malidp_de_plane_destroy()
139 static int malidp_se_check_scaling(struct malidp_plane *mp, in malidp_se_check_scaling() argument
162 mc->scaled_planes_mask &= ~(mp->layer->id); in malidp_se_check_scaling()
166 if (mp->layer->id & (DE_SMART | DE_GRAPHICS2)) in malidp_se_check_scaling()
171 mc->scaled_planes_mask |= mp->layer->id; in malidp_se_check_scaling()
179 struct malidp_plane *mp = to_malidp_plane(plane); in malidp_de_plane_check() local
189 ms->format = malidp_hw_get_format_id(&mp->hwdev->map, mp->layer->id, in malidp_de_plane_check()
196 if (!malidp_hw_pitch_valid(mp->hwdev, fb->pitches[i])) { in malidp_de_plane_check()
203 if ((state->crtc_w > mp->hwdev->max_line_size) || in malidp_de_plane_check()
204 (state->crtc_h > mp->hwdev->max_line_size) || in malidp_de_plane_check()
205 (state->crtc_w < mp->hwdev->min_line_size) || in malidp_de_plane_check()
206 (state->crtc_h < mp->hwdev->min_line_size)) in malidp_de_plane_check()
215 !(mp->hwdev->features & MALIDP_DEVICE_LV_HAS_3_STRIDES) && in malidp_de_plane_check()
219 ret = malidp_se_check_scaling(mp, state); in malidp_de_plane_check()
233 val = mp->hwdev->rotmem_required(mp->hwdev, state->crtc_h, in malidp_de_plane_check()
245 static void malidp_de_set_plane_pitches(struct malidp_plane *mp, in malidp_de_set_plane_pitches() argument
251 if (!mp->layer->stride_offset) in malidp_de_set_plane_pitches()
255 num_strides = (mp->hwdev->features & in malidp_de_set_plane_pitches()
259 malidp_hw_write(mp->hwdev, pitches[i], in malidp_de_set_plane_pitches()
260 mp->layer->base + in malidp_de_set_plane_pitches()
261 mp->layer->stride_offset + i * 4); in malidp_de_set_plane_pitches()
267 struct malidp_plane *mp; in malidp_de_plane_update() local
273 mp = to_malidp_plane(plane); in malidp_de_plane_update()
274 map = &mp->hwdev->map; in malidp_de_plane_update()
282 val = malidp_hw_read(mp->hwdev, mp->layer->base); in malidp_de_plane_update()
284 malidp_hw_write(mp->hwdev, val, mp->layer->base); in malidp_de_plane_update()
288 u16 ptr = mp->layer->ptr + (i << 4); in malidp_de_plane_update()
292 malidp_hw_write(mp->hwdev, lower_32_bits(fb_addr), ptr); in malidp_de_plane_update()
293 malidp_hw_write(mp->hwdev, upper_32_bits(fb_addr), ptr + 4); in malidp_de_plane_update()
295 malidp_de_set_plane_pitches(mp, ms->n_planes, in malidp_de_plane_update()
298 malidp_hw_write(mp->hwdev, LAYER_H_VAL(src_w) | LAYER_V_VAL(src_h), in malidp_de_plane_update()
299 mp->layer->base + MALIDP_LAYER_SIZE); in malidp_de_plane_update()
301 malidp_hw_write(mp->hwdev, LAYER_H_VAL(dest_w) | LAYER_V_VAL(dest_h), in malidp_de_plane_update()
302 mp->layer->base + MALIDP_LAYER_COMP_SIZE); in malidp_de_plane_update()
304 malidp_hw_write(mp->hwdev, LAYER_H_VAL(plane->state->crtc_x) | in malidp_de_plane_update()
306 mp->layer->base + MALIDP_LAYER_OFFSET); in malidp_de_plane_update()
308 if (mp->layer->id == DE_SMART) in malidp_de_plane_update()
309 malidp_hw_write(mp->hwdev, in malidp_de_plane_update()
311 mp->layer->base + MALIDP550_LS_R1_IN_SIZE); in malidp_de_plane_update()
314 val = malidp_hw_read(mp->hwdev, mp->layer->base + MALIDP_LAYER_CONTROL); in malidp_de_plane_update()
339 m->scaler_config.plane_src_id == mp->layer->id) in malidp_de_plane_update()
346 malidp_hw_write(mp->hwdev, val, in malidp_de_plane_update()
347 mp->layer->base + MALIDP_LAYER_CONTROL); in malidp_de_plane_update()
353 struct malidp_plane *mp = to_malidp_plane(plane); in malidp_de_plane_disable() local
355 malidp_hw_clearbits(mp->hwdev, in malidp_de_plane_disable()
357 mp->layer->base + MALIDP_LAYER_CONTROL); in malidp_de_plane_disable()