Lines Matching full:plane
201 * intel_vgpu_decode_primary_plane - Decode primary plane
203 * @plane: primary plane to save decoded info
204 * This function is called for decoding plane
210 struct intel_vgpu_primary_plane_format *plane) in intel_vgpu_decode_primary_plane() argument
221 plane->enabled = !!(val & DISP_ENABLE); in intel_vgpu_decode_primary_plane()
222 if (!plane->enabled) in intel_vgpu_decode_primary_plane()
226 plane->tiled = val & PLANE_CTL_TILED_MASK; in intel_vgpu_decode_primary_plane()
238 plane->bpp = skl_pixel_formats[fmt].bpp; in intel_vgpu_decode_primary_plane()
239 plane->drm_format = skl_pixel_formats[fmt].drm_format; in intel_vgpu_decode_primary_plane()
241 plane->tiled = val & DISP_TILED; in intel_vgpu_decode_primary_plane()
243 plane->bpp = bdw_pixel_formats[fmt].bpp; in intel_vgpu_decode_primary_plane()
244 plane->drm_format = bdw_pixel_formats[fmt].drm_format; in intel_vgpu_decode_primary_plane()
247 if (!plane->bpp) { in intel_vgpu_decode_primary_plane()
252 plane->hw_format = fmt; in intel_vgpu_decode_primary_plane()
254 plane->base = vgpu_vreg_t(vgpu, DSPSURF(dev_priv, pipe)) & I915_GTT_PAGE_MASK; in intel_vgpu_decode_primary_plane()
255 if (!vgpu_gmadr_is_valid(vgpu, plane->base)) in intel_vgpu_decode_primary_plane()
258 plane->base_gpa = intel_vgpu_gma_to_gpa(vgpu->gtt.ggtt_mm, plane->base); in intel_vgpu_decode_primary_plane()
259 if (plane->base_gpa == INTEL_GVT_INVALID_ADDR) { in intel_vgpu_decode_primary_plane()
260 gvt_vgpu_err("Translate primary plane gma 0x%x to gpa fail\n", in intel_vgpu_decode_primary_plane()
261 plane->base); in intel_vgpu_decode_primary_plane()
265 plane->stride = intel_vgpu_get_stride(vgpu, pipe, plane->tiled, in intel_vgpu_decode_primary_plane()
268 _PRI_PLANE_STRIDE_MASK, plane->bpp); in intel_vgpu_decode_primary_plane()
270 plane->width = (vgpu_vreg_t(vgpu, PIPESRC(dev_priv, pipe)) & _PIPE_H_SRCSZ_MASK) >> in intel_vgpu_decode_primary_plane()
272 plane->width += 1; in intel_vgpu_decode_primary_plane()
273 plane->height = (vgpu_vreg_t(vgpu, PIPESRC(dev_priv, pipe)) & in intel_vgpu_decode_primary_plane()
275 plane->height += 1; /* raw height is one minus the real value */ in intel_vgpu_decode_primary_plane()
278 plane->x_offset = (val & _PRI_PLANE_X_OFF_MASK) >> in intel_vgpu_decode_primary_plane()
280 plane->y_offset = (val & _PRI_PLANE_Y_OFF_MASK) >> in intel_vgpu_decode_primary_plane()
331 * intel_vgpu_decode_cursor_plane - Decode sprite plane
333 * @plane: cursor plane to save decoded info
334 * This function is called for decoding plane
340 struct intel_vgpu_cursor_plane_format *plane) in intel_vgpu_decode_cursor_plane() argument
353 plane->enabled = (mode != MCURSOR_MODE_DISABLE); in intel_vgpu_decode_cursor_plane()
354 if (!plane->enabled) in intel_vgpu_decode_cursor_plane()
363 plane->mode = mode; in intel_vgpu_decode_cursor_plane()
364 plane->bpp = cursor_pixel_formats[index].bpp; in intel_vgpu_decode_cursor_plane()
365 plane->drm_format = cursor_pixel_formats[index].drm_format; in intel_vgpu_decode_cursor_plane()
366 plane->width = cursor_pixel_formats[index].width; in intel_vgpu_decode_cursor_plane()
367 plane->height = cursor_pixel_formats[index].height; in intel_vgpu_decode_cursor_plane()
377 plane->base = vgpu_vreg_t(vgpu, CURBASE(dev_priv, pipe)) & I915_GTT_PAGE_MASK; in intel_vgpu_decode_cursor_plane()
378 if (!vgpu_gmadr_is_valid(vgpu, plane->base)) in intel_vgpu_decode_cursor_plane()
381 plane->base_gpa = intel_vgpu_gma_to_gpa(vgpu->gtt.ggtt_mm, plane->base); in intel_vgpu_decode_cursor_plane()
382 if (plane->base_gpa == INTEL_GVT_INVALID_ADDR) { in intel_vgpu_decode_cursor_plane()
383 gvt_vgpu_err("Translate cursor plane gma 0x%x to gpa fail\n", in intel_vgpu_decode_cursor_plane()
384 plane->base); in intel_vgpu_decode_cursor_plane()
389 plane->x_pos = (val & _CURSOR_POS_X_MASK) >> _CURSOR_POS_X_SHIFT; in intel_vgpu_decode_cursor_plane()
390 plane->x_sign = (val & _CURSOR_SIGN_X_MASK) >> _CURSOR_SIGN_X_SHIFT; in intel_vgpu_decode_cursor_plane()
391 plane->y_pos = (val & _CURSOR_POS_Y_MASK) >> _CURSOR_POS_Y_SHIFT; in intel_vgpu_decode_cursor_plane()
392 plane->y_sign = (val & _CURSOR_SIGN_Y_MASK) >> _CURSOR_SIGN_Y_SHIFT; in intel_vgpu_decode_cursor_plane()
394 plane->x_hot = vgpu_vreg_t(vgpu, vgtif_reg(cursor_x_hot)); in intel_vgpu_decode_cursor_plane()
395 plane->y_hot = vgpu_vreg_t(vgpu, vgtif_reg(cursor_y_hot)); in intel_vgpu_decode_cursor_plane()
410 * intel_vgpu_decode_sprite_plane - Decode sprite plane
412 * @plane: sprite plane to save decoded info
413 * This function is called for decoding plane
419 struct intel_vgpu_sprite_plane_format *plane) in intel_vgpu_decode_sprite_plane() argument
431 plane->enabled = !!(val & SPRITE_ENABLE); in intel_vgpu_decode_sprite_plane()
432 if (!plane->enabled) in intel_vgpu_decode_sprite_plane()
435 plane->tiled = !!(val & SPRITE_TILED); in intel_vgpu_decode_sprite_plane()
445 plane->hw_format = fmt; in intel_vgpu_decode_sprite_plane()
446 plane->bpp = sprite_pixel_formats[fmt].bpp; in intel_vgpu_decode_sprite_plane()
479 plane->drm_format = drm_format; in intel_vgpu_decode_sprite_plane()
481 plane->base = vgpu_vreg_t(vgpu, SPRSURF(pipe)) & I915_GTT_PAGE_MASK; in intel_vgpu_decode_sprite_plane()
482 if (!vgpu_gmadr_is_valid(vgpu, plane->base)) in intel_vgpu_decode_sprite_plane()
485 plane->base_gpa = intel_vgpu_gma_to_gpa(vgpu->gtt.ggtt_mm, plane->base); in intel_vgpu_decode_sprite_plane()
486 if (plane->base_gpa == INTEL_GVT_INVALID_ADDR) { in intel_vgpu_decode_sprite_plane()
487 gvt_vgpu_err("Translate sprite plane gma 0x%x to gpa fail\n", in intel_vgpu_decode_sprite_plane()
488 plane->base); in intel_vgpu_decode_sprite_plane()
492 plane->stride = vgpu_vreg_t(vgpu, SPRSTRIDE(pipe)) & in intel_vgpu_decode_sprite_plane()
496 plane->height = (val & _SPRITE_SIZE_HEIGHT_MASK) >> in intel_vgpu_decode_sprite_plane()
498 plane->width = (val & _SPRITE_SIZE_WIDTH_MASK) >> in intel_vgpu_decode_sprite_plane()
500 plane->height += 1; /* raw height is one minus the real value */ in intel_vgpu_decode_sprite_plane()
501 plane->width += 1; /* raw width is one minus the real value */ in intel_vgpu_decode_sprite_plane()
504 plane->x_pos = (val & _SPRITE_POS_X_MASK) >> _SPRITE_POS_X_SHIFT; in intel_vgpu_decode_sprite_plane()
505 plane->y_pos = (val & _SPRITE_POS_Y_MASK) >> _SPRITE_POS_Y_SHIFT; in intel_vgpu_decode_sprite_plane()
508 plane->x_offset = (val & _SPRITE_OFFSET_START_X_MASK) >> in intel_vgpu_decode_sprite_plane()
510 plane->y_offset = (val & _SPRITE_OFFSET_START_Y_MASK) >> in intel_vgpu_decode_sprite_plane()