/drivers/gpu/drm/ |
D | drm_fb_cma_helper.c | 77 struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_cma_object **obj, in drm_fb_cma_alloc() argument 88 drm_helper_mode_fill_fb_struct(&fb_cma->fb, mode_cmd); in drm_fb_cma_alloc() 110 struct drm_file *file_priv, struct drm_mode_fb_cmd2 *mode_cmd) in drm_fb_cma_create() argument 120 hsub = drm_format_horz_chroma_subsampling(mode_cmd->pixel_format); in drm_fb_cma_create() 121 vsub = drm_format_vert_chroma_subsampling(mode_cmd->pixel_format); in drm_fb_cma_create() 123 for (i = 0; i < drm_format_num_planes(mode_cmd->pixel_format); i++) { in drm_fb_cma_create() 124 unsigned int width = mode_cmd->width / (i ? hsub : 1); in drm_fb_cma_create() 125 unsigned int height = mode_cmd->height / (i ? vsub : 1); in drm_fb_cma_create() 128 obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[i]); in drm_fb_cma_create() 135 min_size = (height - 1) * mode_cmd->pitches[i] in drm_fb_cma_create() [all …]
|
D | drm_crtc_helper.c | 905 struct drm_mode_fb_cmd2 *mode_cmd) in drm_helper_mode_fill_fb_struct() argument 909 fb->width = mode_cmd->width; in drm_helper_mode_fill_fb_struct() 910 fb->height = mode_cmd->height; in drm_helper_mode_fill_fb_struct() 912 fb->pitches[i] = mode_cmd->pitches[i]; in drm_helper_mode_fill_fb_struct() 913 fb->offsets[i] = mode_cmd->offsets[i]; in drm_helper_mode_fill_fb_struct() 915 drm_fb_get_bpp_depth(mode_cmd->pixel_format, &fb->depth, in drm_helper_mode_fill_fb_struct() 917 fb->pixel_format = mode_cmd->pixel_format; in drm_helper_mode_fill_fb_struct()
|
/drivers/gpu/drm/exynos/ |
D | exynos_drm_fb.c | 149 struct drm_mode_fb_cmd2 *mode_cmd, in exynos_drm_framebuffer_init() argument 170 drm_helper_mode_fill_fb_struct(&exynos_fb->fb, mode_cmd); in exynos_drm_framebuffer_init() 182 static u32 exynos_drm_format_num_buffers(struct drm_mode_fb_cmd2 *mode_cmd) in exynos_drm_format_num_buffers() argument 186 if (mode_cmd->pixel_format != DRM_FORMAT_NV12) in exynos_drm_format_num_buffers() 187 return drm_format_num_planes(mode_cmd->pixel_format); in exynos_drm_format_num_buffers() 190 if (!mode_cmd->handles[cnt]) in exynos_drm_format_num_buffers() 211 if (mode_cmd->offsets[1] && in exynos_drm_format_num_buffers() 212 mode_cmd->handles[0] == mode_cmd->handles[1]) in exynos_drm_format_num_buffers() 221 struct drm_mode_fb_cmd2 *mode_cmd) in exynos_user_fb_create() argument 236 obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]); in exynos_user_fb_create() [all …]
|
D | exynos_drm_fbdev.c | 146 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in exynos_drm_fbdev_create() local 157 mode_cmd.width = sizes->surface_width; in exynos_drm_fbdev_create() 158 mode_cmd.height = sizes->surface_height; in exynos_drm_fbdev_create() 159 mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); in exynos_drm_fbdev_create() 160 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in exynos_drm_fbdev_create() 172 size = mode_cmd.pitches[0] * mode_cmd.height; in exynos_drm_fbdev_create() 183 helper->fb = exynos_drm_framebuffer_init(dev, &mode_cmd, in exynos_drm_fbdev_create()
|
D | exynos_drm_fb.h | 19 struct drm_mode_fb_cmd2 *mode_cmd,
|
/drivers/gpu/drm/shmobile/ |
D | shmob_drm_kms.c | 107 struct drm_mode_fb_cmd2 *mode_cmd) in shmob_drm_fb_create() argument 111 format = shmob_drm_format_info(mode_cmd->pixel_format); in shmob_drm_fb_create() 114 mode_cmd->pixel_format); in shmob_drm_fb_create() 118 if (mode_cmd->pitches[0] & 7 || mode_cmd->pitches[0] >= 65536) { in shmob_drm_fb_create() 120 mode_cmd->pitches[0]); in shmob_drm_fb_create() 127 if (mode_cmd->pitches[1] != mode_cmd->pitches[0] * chroma_cpp) { in shmob_drm_fb_create() 134 return drm_fb_cma_create(dev, file_priv, mode_cmd); in shmob_drm_fb_create()
|
/drivers/gpu/drm/omapdrm/ |
D | omap_fb.c | 372 struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd) in omap_framebuffer_create() argument 378 ret = objects_lookup(dev, file, mode_cmd->pixel_format, in omap_framebuffer_create() 379 bos, mode_cmd->handles); in omap_framebuffer_create() 383 fb = omap_framebuffer_init(dev, mode_cmd, bos); in omap_framebuffer_create() 385 int i, n = drm_format_num_planes(mode_cmd->pixel_format); in omap_framebuffer_create() 394 struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos) in omap_framebuffer_init() argument 399 int ret, i, n = drm_format_num_planes(mode_cmd->pixel_format); in omap_framebuffer_init() 402 dev, mode_cmd, mode_cmd->width, mode_cmd->height, in omap_framebuffer_init() 403 (char *)&mode_cmd->pixel_format); in omap_framebuffer_init() 406 if (formats[i].pixel_format == mode_cmd->pixel_format) { in omap_framebuffer_init() [all …]
|
D | omap_fbdev.c | 145 struct drm_mode_fb_cmd2 mode_cmd = {0}; in omap_fbdev_create() local 159 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in omap_fbdev_create() 162 mode_cmd.width = sizes->surface_width; in omap_fbdev_create() 163 mode_cmd.height = sizes->surface_height; in omap_fbdev_create() 165 mode_cmd.pitches[0] = align_pitch( in omap_fbdev_create() 166 mode_cmd.width * ((sizes->surface_bpp + 7) / 8), in omap_fbdev_create() 167 mode_cmd.width, sizes->surface_bpp); in omap_fbdev_create() 172 mode_cmd.pitches[0] = ALIGN(mode_cmd.pitches[0], PAGE_SIZE); in omap_fbdev_create() 177 .bytes = PAGE_ALIGN(mode_cmd.pitches[0] * mode_cmd.height), in omap_fbdev_create() 187 fb = omap_framebuffer_init(dev, &mode_cmd, &fbdev->bo); in omap_fbdev_create()
|
D | omap_drv.h | 201 struct drm_file *file, struct drm_mode_fb_cmd2 *mode_cmd); 203 struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos);
|
/drivers/gpu/drm/qxl/ |
D | qxl_fb.c | 304 struct drm_mode_fb_cmd2 *mode_cmd, in qxlfb_create_pinned_object() argument 312 int height = mode_cmd->height; in qxlfb_create_pinned_object() 316 drm_fb_get_bpp_depth(mode_cmd->pixel_format, &bpp, &depth); in qxlfb_create_pinned_object() 318 size = mode_cmd->pitches[0] * height; in qxlfb_create_pinned_object() 335 qbo->surf.width = mode_cmd->width; in qxlfb_create_pinned_object() 336 qbo->surf.height = mode_cmd->height; in qxlfb_create_pinned_object() 337 qbo->surf.stride = mode_cmd->pitches[0]; in qxlfb_create_pinned_object() 366 struct drm_mode_fb_cmd2 mode_cmd; in qxlfb_create() local 376 mode_cmd.width = sizes->surface_width; in qxlfb_create() 377 mode_cmd.height = sizes->surface_height; in qxlfb_create() [all …]
|
D | qxl_display.c | 461 struct drm_mode_fb_cmd2 *mode_cmd, in qxl_framebuffer_init() argument 472 drm_helper_mode_fill_fb_struct(&qfb->base, mode_cmd); in qxl_framebuffer_init() 891 struct drm_mode_fb_cmd2 *mode_cmd) in qxl_user_framebuffer_create() argument 897 obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]); in qxl_user_framebuffer_create() 903 ret = qxl_framebuffer_init(dev, qxl_fb, mode_cmd, obj); in qxl_user_framebuffer_create()
|
/drivers/gpu/drm/mgag200/ |
D | mgag200_fb.c | 140 struct drm_mode_fb_cmd2 *mode_cmd, in mgag200fb_create_object() argument 148 size = mode_cmd->pitches[0] * mode_cmd->height; in mgag200fb_create_object() 162 struct drm_mode_fb_cmd2 mode_cmd; in mgag200fb_create() local 173 mode_cmd.width = sizes->surface_width; in mgag200fb_create() 174 mode_cmd.height = sizes->surface_height; in mgag200fb_create() 175 mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7) / 8); in mgag200fb_create() 177 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in mgag200fb_create() 179 size = mode_cmd.pitches[0] * mode_cmd.height; in mgag200fb_create() 181 ret = mgag200fb_create_object(mfbdev, &mode_cmd, &gobj); in mgag200fb_create() 198 ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj); in mgag200fb_create()
|
D | mgag200_main.c | 32 struct drm_mode_fb_cmd2 *mode_cmd, in mgag200_framebuffer_init() argument 37 drm_helper_mode_fill_fb_struct(&gfb->base, mode_cmd); in mgag200_framebuffer_init() 50 struct drm_mode_fb_cmd2 *mode_cmd) in mgag200_user_framebuffer_create() argument 56 obj = drm_gem_object_lookup(dev, filp, mode_cmd->handles[0]); in mgag200_user_framebuffer_create() 66 ret = mgag200_framebuffer_init(dev, mga_fb, mode_cmd, obj); in mgag200_user_framebuffer_create()
|
/drivers/gpu/drm/ast/ |
D | ast_fb.c | 165 struct drm_mode_fb_cmd2 *mode_cmd, in astfb_create_object() argument 174 drm_fb_get_bpp_depth(mode_cmd->pixel_format, &depth, &bpp); in astfb_create_object() 176 size = mode_cmd->pitches[0] * mode_cmd->height; in astfb_create_object() 190 struct drm_mode_fb_cmd2 mode_cmd; in astfb_create() local 198 mode_cmd.width = sizes->surface_width; in astfb_create() 199 mode_cmd.height = sizes->surface_height; in astfb_create() 200 mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7)/8); in astfb_create() 202 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in astfb_create() 205 size = mode_cmd.pitches[0] * mode_cmd.height; in astfb_create() 207 ret = astfb_create_object(afbdev, &mode_cmd, &gobj); in astfb_create() [all …]
|
D | ast_main.c | 256 struct drm_mode_fb_cmd2 *mode_cmd, in ast_framebuffer_init() argument 261 drm_helper_mode_fill_fb_struct(&ast_fb->base, mode_cmd); in ast_framebuffer_init() 274 struct drm_mode_fb_cmd2 *mode_cmd) in ast_user_framebuffer_create() argument 280 obj = drm_gem_object_lookup(dev, filp, mode_cmd->handles[0]); in ast_user_framebuffer_create() 290 ret = ast_framebuffer_init(dev, ast_fb, mode_cmd, obj); in ast_user_framebuffer_create()
|
/drivers/gpu/drm/radeon/ |
D | radeon_fb.c | 105 struct drm_mode_fb_cmd2 *mode_cmd, in radeonfb_create_pinned_object() argument 115 int height = mode_cmd->height; in radeonfb_create_pinned_object() 118 drm_fb_get_bpp_depth(mode_cmd->pixel_format, &depth, &bpp); in radeonfb_create_pinned_object() 121 mode_cmd->pitches[0] = radeon_align_pitch(rdev, mode_cmd->width, bpp, in radeonfb_create_pinned_object() 125 height = ALIGN(mode_cmd->height, 8); in radeonfb_create_pinned_object() 126 size = mode_cmd->pitches[0] * height; in radeonfb_create_pinned_object() 157 mode_cmd->pitches[0]); in radeonfb_create_pinned_object() 197 struct drm_mode_fb_cmd2 mode_cmd; in radeonfb_create() local 204 mode_cmd.width = sizes->surface_width; in radeonfb_create() 205 mode_cmd.height = sizes->surface_height; in radeonfb_create() [all …]
|
/drivers/gpu/drm/cirrus/ |
D | cirrus_fbdev.c | 137 struct drm_mode_fb_cmd2 *mode_cmd, in cirrusfb_create_object() argument 146 drm_fb_get_bpp_depth(mode_cmd->pixel_format, &depth, &bpp); in cirrusfb_create_object() 150 size = mode_cmd->pitches[0] * mode_cmd->height; in cirrusfb_create_object() 167 struct drm_mode_fb_cmd2 mode_cmd; in cirrusfb_create() local 174 mode_cmd.width = sizes->surface_width; in cirrusfb_create() 175 mode_cmd.height = sizes->surface_height; in cirrusfb_create() 176 mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7) / 8); in cirrusfb_create() 177 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in cirrusfb_create() 179 size = mode_cmd.pitches[0] * mode_cmd.height; in cirrusfb_create() 181 ret = cirrusfb_create_object(gfbdev, &mode_cmd, &gobj); in cirrusfb_create() [all …]
|
D | cirrus_main.c | 32 struct drm_mode_fb_cmd2 *mode_cmd, in cirrus_framebuffer_init() argument 37 drm_helper_mode_fill_fb_struct(&gfb->base, mode_cmd); in cirrus_framebuffer_init() 50 struct drm_mode_fb_cmd2 *mode_cmd) in cirrus_user_framebuffer_create() argument 57 drm_fb_get_bpp_depth(mode_cmd->pixel_format, &depth, &bpp); in cirrus_user_framebuffer_create() 62 obj = drm_gem_object_lookup(dev, filp, mode_cmd->handles[0]); in cirrus_user_framebuffer_create() 72 ret = cirrus_framebuffer_init(dev, cirrus_fb, mode_cmd, obj); in cirrus_user_framebuffer_create()
|
/drivers/gpu/drm/gma500/ |
D | framebuffer.c | 244 struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_init() argument 250 drm_fb_get_bpp_depth(mode_cmd->pixel_format, &depth, &bpp); in psb_framebuffer_init() 252 if (mode_cmd->pitches[0] & 63) in psb_framebuffer_init() 263 drm_helper_mode_fill_fb_struct(&fb->base, mode_cmd); in psb_framebuffer_init() 287 struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_create() argument 297 ret = psb_framebuffer_init(dev, fb, mode_cmd, gt); in psb_framebuffer_create() 347 struct drm_mode_fb_cmd2 mode_cmd; in psbfb_create() local 356 mode_cmd.width = sizes->surface_width; in psbfb_create() 357 mode_cmd.height = sizes->surface_height; in psbfb_create() 371 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((bpp + 7) / 8), 4096 >> pitch_lines); in psbfb_create() [all …]
|
/drivers/gpu/drm/udl/ |
D | udl_fb.c | 466 struct drm_mode_fb_cmd2 *mode_cmd, in udl_framebuffer_init() argument 473 drm_helper_mode_fill_fb_struct(&ufb->base, mode_cmd); in udl_framebuffer_init() 487 struct drm_mode_fb_cmd2 mode_cmd; in udlfb_create() local 495 mode_cmd.width = sizes->surface_width; in udlfb_create() 496 mode_cmd.height = sizes->surface_height; in udlfb_create() 497 mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7) / 8); in udlfb_create() 499 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in udlfb_create() 502 size = mode_cmd.pitches[0] * mode_cmd.height; in udlfb_create() 522 ret = udl_framebuffer_init(dev, &ufbdev->ufb, &mode_cmd, obj); in udlfb_create() 643 struct drm_mode_fb_cmd2 *mode_cmd) in udl_fb_user_fb_create() argument [all …]
|
/drivers/gpu/drm/i915/ |
D | intel_fb.c | 68 struct drm_mode_fb_cmd2 mode_cmd = {}; in intelfb_create() local 77 mode_cmd.width = sizes->surface_width; in intelfb_create() 78 mode_cmd.height = sizes->surface_height; in intelfb_create() 80 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((sizes->surface_bpp + 7) / in intelfb_create() 82 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in intelfb_create() 85 size = mode_cmd.pitches[0] * mode_cmd.height; in intelfb_create() 113 ret = intel_framebuffer_init(dev, &ifbdev->ifb, &mode_cmd, obj); in intelfb_create()
|
/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_kms.c | 643 *mode_cmd) in vmw_kms_new_framebuffer_surface() 666 surface->sizes[0].width < mode_cmd->width || in vmw_kms_new_framebuffer_surface() 667 surface->sizes[0].height < mode_cmd->height || in vmw_kms_new_framebuffer_surface() 674 switch (mode_cmd->depth) { in vmw_kms_new_framebuffer_surface() 691 DRM_ERROR("Invalid color depth: %d\n", mode_cmd->depth); in vmw_kms_new_framebuffer_surface() 713 vfbs->base.base.bits_per_pixel = mode_cmd->bpp; in vmw_kms_new_framebuffer_surface() 714 vfbs->base.base.pitches[0] = mode_cmd->pitch; in vmw_kms_new_framebuffer_surface() 715 vfbs->base.base.depth = mode_cmd->depth; in vmw_kms_new_framebuffer_surface() 716 vfbs->base.base.width = mode_cmd->width; in vmw_kms_new_framebuffer_surface() 717 vfbs->base.base.height = mode_cmd->height; in vmw_kms_new_framebuffer_surface() [all …]
|
/drivers/gpu/drm/nouveau/ |
D | nouveau_fbcon.c | 266 struct drm_mode_fb_cmd2 mode_cmd; in nouveau_fbcon_create() local 270 mode_cmd.width = sizes->surface_width; in nouveau_fbcon_create() 271 mode_cmd.height = sizes->surface_height; in nouveau_fbcon_create() 273 mode_cmd.pitches[0] = mode_cmd.width * (sizes->surface_bpp >> 3); in nouveau_fbcon_create() 274 mode_cmd.pitches[0] = roundup(mode_cmd.pitches[0], 256); in nouveau_fbcon_create() 276 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in nouveau_fbcon_create() 279 size = mode_cmd.pitches[0] * mode_cmd.height; in nouveau_fbcon_create() 330 nouveau_framebuffer_init(dev, &fbcon->nouveau_fb, &mode_cmd, nvbo); in nouveau_fbcon_create()
|
D | nouveau_display.c | 76 struct drm_mode_fb_cmd2 *mode_cmd, in nouveau_framebuffer_init() argument 83 drm_helper_mode_fill_fb_struct(fb, mode_cmd); in nouveau_framebuffer_init() 136 struct drm_mode_fb_cmd2 *mode_cmd) in nouveau_user_framebuffer_create() argument 142 gem = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]); in nouveau_user_framebuffer_create() 150 ret = nouveau_framebuffer_init(dev, nouveau_fb, mode_cmd, nouveau_gem_object(gem)); in nouveau_user_framebuffer_create()
|
/drivers/gpu/host1x/drm/ |
D | fb.c | 70 struct drm_mode_fb_cmd2 *mode_cmd, in tegra_fb_alloc() argument 88 drm_helper_mode_fill_fb_struct(&fb->base, mode_cmd); in tegra_fb_alloc()
|