Lines Matching defs:afbdev

96 static void vbox_dirty_update(struct vbox_fbdev *afbdev,
99 struct drm_device *dev = afbdev->helper.dev;
107 int bpp = (afbdev->afb.base.bits_per_pixel + 7)/8;
116 obj = afbdev->afb.obj;
137 if (afbdev->y1 < y)
138 y = afbdev->y1;
139 if (afbdev->y2 > y2)
140 y2 = afbdev->y2;
141 if (afbdev->x1 < x)
142 x = afbdev->x1;
143 if (afbdev->x2 > x2)
144 x2 = afbdev->x2;
148 afbdev->x1 = x;
149 afbdev->x2 = x2;
150 afbdev->y1 = y;
151 afbdev->y2 = y2;
157 afbdev->x1 = afbdev->y1 = INT_MAX;
158 afbdev->x2 = afbdev->y2 = 0;
175 src_offset = dst_offset = i * afbdev->afb.base.pitches[0] + (x * bpp);
176 memcpy_toio(bo->kmap.virtual + src_offset, afbdev->sysram + src_offset, (x2 - x + 1) * bpp);
184 vbox_framebuffer_dirty_rectangles(&afbdev->afb.base, &rect, 1);
195 struct vbox_fbdev *afbdev = info->par;
198 vbox_dirty_update(afbdev, rect->dx, rect->dy, rect->width,
205 struct vbox_fbdev *afbdev = info->par;
208 vbox_dirty_update(afbdev, area->dx, area->dy, area->width,
215 struct vbox_fbdev *afbdev = info->par;
218 vbox_dirty_update(afbdev, image->dx, image->dy, image->width,
237 static int vboxfb_create_object(struct vbox_fbdev *afbdev,
241 struct drm_device *dev = afbdev->helper.dev;
265 static int vboxfb_create(struct vbox_fbdev *afbdev,
268 struct drm_device *dev = afbdev->helper.dev;
295 ret = vboxfb_create_object(afbdev, &mode_cmd, &gobj);
313 info->par = afbdev;
315 ret = vbox_framebuffer_init(dev, &afbdev->afb, &mode_cmd, gobj);
319 afbdev->sysram = sysram;
320 afbdev->size = size;
322 fb = &afbdev->afb.base;
323 afbdev->helper.fb = fb;
324 afbdev->helper.fbdev = info;
353 drm_fb_helper_fill_var(info, &afbdev->helper, sizes->fb_width, sizes->fb_height);
387 struct vbox_fbdev *afbdev = (struct vbox_fbdev *)helper;
394 ret = vboxfb_create(afbdev, sizes);
411 struct vbox_fbdev *afbdev)
414 struct vbox_framebuffer *afb = &afbdev->afb;
416 if (afbdev->helper.fbdev)
418 info = afbdev->helper.fbdev;
430 drm_fb_helper_fini(&afbdev->helper);
432 vfree(afbdev->sysram);
440 struct vbox_fbdev *afbdev;
444 afbdev = kzalloc(sizeof(struct vbox_fbdev), GFP_KERNEL);
445 if (!afbdev)
448 vbox->fbdev = afbdev;
449 afbdev->helper.funcs = &vbox_fb_helper_funcs;
450 ret = drm_fb_helper_init(dev, &afbdev->helper, vbox->cCrtcs, vbox->cCrtcs);
453 kfree(afbdev);
457 drm_fb_helper_single_add_all_connectors(&afbdev->helper);
458 drm_fb_helper_initial_config(&afbdev->helper, 32);