Lines Matching refs:plane

77 static int virtio_gpu_plane_atomic_check(struct drm_plane *plane,
81 plane);
83 plane);
84 bool is_cursor = plane->type == DRM_PLANE_TYPE_CURSOR;
92 * Ignore damage clips if the framebuffer attached to the plane's state
93 * has changed since the last plane update (page-flip). In this case, a
94 * full plane update should happen because uploads are done per-buffer.
134 static void virtio_gpu_resource_flush(struct drm_plane *plane,
138 struct drm_device *dev = plane->dev;
143 vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
168 static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
172 plane);
173 struct drm_device *dev = plane->dev;
179 if (plane->state->crtc)
180 output = drm_crtc_to_virtio_gpu_output(plane->state->crtc);
186 if (!plane->state->fb || !output->crtc.state->active) {
189 plane->state->src_w >> 16,
190 plane->state->src_h >> 16,
196 if (!drm_atomic_helper_damage_merged(old_state, plane->state, &rect))
199 bo = gem_to_virtio_gpu_obj(plane->state->fb->obj[0]);
201 virtio_gpu_update_dumb_bo(vgdev, plane->state, &rect);
203 if (plane->state->fb != old_state->fb ||
204 plane->state->src_w != old_state->src_w ||
205 plane->state->src_h != old_state->src_h ||
206 plane->state->src_x != old_state->src_x ||
207 plane->state->src_y != old_state->src_y ||
212 plane->state->crtc_w, plane->state->crtc_h,
213 plane->state->crtc_x, plane->state->crtc_y,
214 plane->state->src_w >> 16,
215 plane->state->src_h >> 16,
216 plane->state->src_x >> 16,
217 plane->state->src_y >> 16);
222 plane->state->fb,
223 plane->state->src_w >> 16,
224 plane->state->src_h >> 16,
225 plane->state->src_x >> 16,
226 plane->state->src_y >> 16);
230 plane->state->src_w >> 16,
231 plane->state->src_h >> 16,
232 plane->state->src_x >> 16,
233 plane->state->src_y >> 16);
237 virtio_gpu_resource_flush(plane,
244 static int virtio_gpu_plane_prepare_fb(struct drm_plane *plane,
247 struct drm_device *dev = plane->dev;
257 if (!bo || (plane->type == DRM_PLANE_TYPE_PRIMARY && !bo->guest_blob))
260 if (bo->dumb && (plane->state->fb != new_state->fb)) {
270 static void virtio_gpu_plane_cleanup_fb(struct drm_plane *plane,
285 static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
289 plane);
290 struct drm_device *dev = plane->dev;
297 if (plane->state->crtc)
298 output = drm_crtc_to_virtio_gpu_output(plane->state->crtc);
304 if (plane->state->fb) {
305 vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
312 if (bo && bo->dumb && (plane->state->fb != old_state->fb)) {
323 plane->state->crtc_w,
324 plane->state->crtc_h,
332 if (plane->state->fb != old_state->fb) {
334 plane->state->crtc_x,
335 plane->state->crtc_y,
336 plane->state->hotspot_x,
337 plane->state->hotspot_y);
341 if (plane->state->fb) {
343 cpu_to_le32(plane->state->hotspot_x);
345 cpu_to_le32(plane->state->hotspot_y);
352 plane->state->crtc_x,
353 plane->state->crtc_y);
357 output->cursor.pos.x = cpu_to_le32(plane->state->crtc_x);
358 output->cursor.pos.y = cpu_to_le32(plane->state->crtc_y);
382 struct drm_plane *plane;
396 plane = drmm_universal_plane_alloc(dev, struct drm_plane, dev,
399 if (IS_ERR(plane))
400 return plane;
402 drm_plane_helper_add(plane, funcs);
405 drm_plane_enable_fb_damage_clips(plane);
407 return plane;