vbox_crtc
#define to_vbox_crtc(x) container_of(x, struct vbox_crtc, base)
struct vbox_crtc *vbox_crtc;
hints = &vbox->last_mode_hints[vbox_conn->vbox_crtc->crtc_id];
crtc_id = vbox_conn->vbox_crtc->crtc_id;
vbox_conn->vbox_crtc->x_hint = hints->dx;
vbox_conn->vbox_crtc->y_hint = hints->dy;
if (vbox_conn->vbox_crtc->disconnected == disconnected)
vbox_conn->vbox_crtc->disconnected = disconnected;
p->view_index = vbox_crtc->crtc_id;
p->view_offset = vbox_crtc->fb_offset;
p->view_size = vbox->available_vram_size - vbox_crtc->fb_offset +
vbox_crtc->crtc_id * VBVA_MIN_BUFFER_SIZE;
p->max_screen_size = vbox->available_vram_size - vbox_crtc->fb_offset;
struct vbox_crtc *vbox_crtc = vbox_connector->vbox_crtc;
width = max_t(u16, width, vbox_crtc->x_hint +
height = max_t(u16, height, vbox_crtc->y_hint +
struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
vbox_crtc->width = crtc->state->mode.hdisplay;
vbox_crtc->height = crtc->state->mode.vdisplay;
vbox_crtc->x = x;
vbox_crtc->y = y;
vbox_crtc->fb_offset = drm_gem_vram_offset(gbo);
struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
struct vbox_crtc *vbox_crtc = to_vbox_crtc(new_state->crtc);
vbox_crtc->cursor_enabled = true;
struct vbox_crtc *vbox_crtc = to_vbox_crtc(old_state->crtc);
vbox_crtc->cursor_enabled = false;
width = vbox_crtc->width ? vbox_crtc->width : 640;
height = vbox_crtc->height ? vbox_crtc->height : 480;
x_offset = vbox->single_framebuffer ? vbox_crtc->x : vbox_crtc->x_hint;
y_offset = vbox->single_framebuffer ? vbox_crtc->y : vbox_crtc->y_hint;
static struct vbox_crtc *vbox_crtc_init(struct drm_device *dev, unsigned int i)
struct vbox_crtc *vbox_crtc;
vbox_crtc = kzalloc_obj(*vbox_crtc);
if (!vbox_crtc)
vbox_crtc->crtc_id = i;
ret = drm_crtc_init_with_planes(dev, &vbox_crtc->base, primary, cursor,
if (vbox_crtc->crtc_id == 0 && fb &&
drm_mode_crtc_set_gamma_size(&vbox_crtc->base, 256);
drm_crtc_helper_add(&vbox_crtc->base, &vbox_crtc_helper_funcs);
return vbox_crtc;
vbox_crtc->fb_offset / pitch < 0xffff - crtc->y &&
kfree(vbox_crtc);
vbox_crtc->fb_offset % (bpp / 8) == 0) {
vbox_crtc->fb_offset % pitch / bpp * 8 + vbox_crtc->x);
vbox_crtc->fb_offset / pitch + vbox_crtc->y);
if (vbox_connector->vbox_crtc->crtc_id == 0)
if (vbox_connector->vbox_crtc->x_hint != -1)
vbox_connector->vbox_crtc->x_hint);
if (vbox_connector->vbox_crtc->y_hint != -1)
vbox_connector->vbox_crtc->y_hint);
flags |= vbox_crtc->disconnected ? VBVA_SCREEN_F_DISABLED : 0;
hgsmi_process_display_info(vbox->guest_pool, vbox_crtc->crtc_id,
vbox_crtc->x * bpp / 8 +
vbox_crtc->y * pitch,
struct vbox_crtc *vbox_crtc,
vbox_connector->vbox_crtc = vbox_crtc;
struct vbox_crtc *vbox_crtc;
struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
vbox_crtc = vbox_crtc_init(dev, i);
if (IS_ERR(vbox_crtc)) {
ret = PTR_ERR(vbox_crtc);
ret = vbox_connector_init(dev, vbox_crtc, encoder);