/linux/drivers/gpu/drm/ |
A D | drm_gem_framebuffer_helper.c | 66 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_init() argument 158 info = drm_get_format_info(dev, mode_cmd); in drm_gem_fb_init_with_funcs() 178 + mode_cmd->offsets[i]; in drm_gem_fb_init_with_funcs() 272 const struct drm_mode_fb_cmd2 *mode_cmd) in drm_gem_fb_create() argument 500 info = drm_get_format_info(dev, mode_cmd); in drm_gem_afbc_get_bpp() 523 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_afbc_min_size() argument 544 mode_cmd->modifier[0] in drm_gem_afbc_min_size() 561 afbc_fb->offset = mode_cmd->offsets[0]; in drm_gem_afbc_min_size() 563 bpp = drm_gem_afbc_get_bpp(dev, mode_cmd); in drm_gem_afbc_min_size() 598 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_afbc_init() argument [all …]
|
A D | drm_modeset_helper.c | 81 const struct drm_mode_fb_cmd2 *mode_cmd) in drm_helper_mode_fill_fb_struct() argument 86 fb->format = drm_get_format_info(dev, mode_cmd); in drm_helper_mode_fill_fb_struct() 87 fb->width = mode_cmd->width; in drm_helper_mode_fill_fb_struct() 88 fb->height = mode_cmd->height; in drm_helper_mode_fill_fb_struct() 90 fb->pitches[i] = mode_cmd->pitches[i]; in drm_helper_mode_fill_fb_struct() 91 fb->offsets[i] = mode_cmd->offsets[i]; in drm_helper_mode_fill_fb_struct() 93 fb->modifier = mode_cmd->modifier[0]; in drm_helper_mode_fill_fb_struct() 94 fb->flags = mode_cmd->flags; in drm_helper_mode_fill_fb_struct()
|
/linux/drivers/gpu/drm/msm/ |
A D | msm_fb.c | 104 mode_cmd); in msm_framebuffer_create() 117 fb = msm_framebuffer_init(dev, mode_cmd, bos); in msm_framebuffer_create() 135 mode_cmd); in msm_framebuffer_init() 144 mode_cmd, mode_cmd->width, mode_cmd->height, in msm_framebuffer_init() 145 (char *)&mode_cmd->pixel_format); in msm_framebuffer_init() 149 mode_cmd->modifier[0]); in msm_framebuffer_init() 152 (char *)&mode_cmd->pixel_format); in msm_framebuffer_init() 177 min_size = (height - 1) * mode_cmd->pitches[i] in msm_framebuffer_init() 179 + mode_cmd->offsets[i]; in msm_framebuffer_init() 210 struct drm_mode_fb_cmd2 mode_cmd = { in msm_alloc_stolen_fb() local [all …]
|
/linux/drivers/gpu/drm/exynos/ |
A D | exynos_drm_fb.c | 59 const struct drm_mode_fb_cmd2 *mode_cmd, in exynos_drm_framebuffer_init() argument 79 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in exynos_drm_framebuffer_init() 97 const struct drm_mode_fb_cmd2 *mode_cmd) in exynos_user_fb_create() argument 99 const struct drm_format_info *info = drm_get_format_info(dev, mode_cmd); in exynos_user_fb_create() 106 unsigned int height = (i == 0) ? mode_cmd->height : in exynos_user_fb_create() 107 DIV_ROUND_UP(mode_cmd->height, info->vsub); in exynos_user_fb_create() 108 unsigned long size = height * mode_cmd->pitches[i] + in exynos_user_fb_create() 109 mode_cmd->offsets[i]; in exynos_user_fb_create() 112 mode_cmd->handles[i]); in exynos_user_fb_create() 127 fb = exynos_drm_framebuffer_init(dev, mode_cmd, exynos_gem, i); in exynos_user_fb_create()
|
A D | exynos_drm_fbdev.c | 108 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in exynos_drm_fbdev_create() local 117 mode_cmd.width = sizes->surface_width; in exynos_drm_fbdev_create() 118 mode_cmd.height = sizes->surface_height; in exynos_drm_fbdev_create() 119 mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); in exynos_drm_fbdev_create() 120 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in exynos_drm_fbdev_create() 123 size = mode_cmd.pitches[0] * mode_cmd.height; in exynos_drm_fbdev_create() 132 exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1); in exynos_drm_fbdev_create()
|
/linux/drivers/gpu/drm/shmobile/ |
A D | shmob_drm_kms.c | 93 const struct drm_mode_fb_cmd2 *mode_cmd) in shmob_drm_fb_create() argument 97 format = shmob_drm_format_info(mode_cmd->pixel_format); in shmob_drm_fb_create() 100 mode_cmd->pixel_format); in shmob_drm_fb_create() 104 if (mode_cmd->pitches[0] & 7 || mode_cmd->pitches[0] >= 65536) { in shmob_drm_fb_create() 106 mode_cmd->pitches[0]); in shmob_drm_fb_create() 113 if (mode_cmd->pitches[1] != mode_cmd->pitches[0] * chroma_cpp) { in shmob_drm_fb_create() 120 return drm_gem_fb_create(dev, file_priv, mode_cmd); in shmob_drm_fb_create()
|
/linux/drivers/gpu/drm/rockchip/ |
A D | rockchip_drm_fb.c | 28 rockchip_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd, in rockchip_fb_alloc() argument 39 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in rockchip_fb_alloc() 62 const struct drm_mode_fb_cmd2 *mode_cmd) in rockchip_fb_create() argument 68 info = drm_get_format_info(dev, mode_cmd); in rockchip_fb_create() 76 ret = drm_gem_fb_init_with_funcs(dev, &afbc_fb->base, file, mode_cmd, in rockchip_fb_create() 83 if (drm_is_afbc(mode_cmd->modifier[0])) { in rockchip_fb_create() 86 ret = drm_gem_fb_afbc_init(dev, mode_cmd, afbc_fb); in rockchip_fb_create() 110 const struct drm_mode_fb_cmd2 *mode_cmd, in rockchip_drm_framebuffer_init() argument 115 fb = rockchip_fb_alloc(dev, mode_cmd, &obj, 1); in rockchip_drm_framebuffer_init()
|
A D | rockchip_drm_fbdev.c | 43 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in rockchip_drm_fbdev_create() local 55 mode_cmd.width = sizes->surface_width; in rockchip_drm_fbdev_create() 56 mode_cmd.height = sizes->surface_height; in rockchip_drm_fbdev_create() 57 mode_cmd.pitches[0] = sizes->surface_width * bytes_per_pixel; in rockchip_drm_fbdev_create() 58 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in rockchip_drm_fbdev_create() 61 size = mode_cmd.pitches[0] * mode_cmd.height; in rockchip_drm_fbdev_create() 76 helper->fb = rockchip_drm_framebuffer_init(dev, &mode_cmd, in rockchip_drm_fbdev_create()
|
/linux/drivers/gpu/drm/omapdrm/ |
A D | omap_fb.c | 307 mode_cmd); in omap_framebuffer_create() 321 fb = omap_framebuffer_init(dev, mode_cmd, bos); in omap_framebuffer_create() 340 unsigned int pitch = mode_cmd->pitches[0]; in omap_framebuffer_init() 344 dev, mode_cmd, mode_cmd->width, mode_cmd->height, in omap_framebuffer_init() 345 (char *)&mode_cmd->pixel_format); in omap_framebuffer_init() 347 format = drm_get_format_info(dev, mode_cmd); in omap_framebuffer_init() 350 if (formats[i] == mode_cmd->pixel_format) in omap_framebuffer_init() 356 (char *)&mode_cmd->pixel_format); in omap_framebuffer_init() 395 size = pitch * mode_cmd->height / vsub; in omap_framebuffer_init() 400 bos[i]->size - mode_cmd->offsets[i], size); in omap_framebuffer_init() [all …]
|
A D | omap_fbdev.c | 99 struct drm_mode_fb_cmd2 mode_cmd = {0}; in omap_fbdev_create() local 110 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in omap_fbdev_create() 113 mode_cmd.width = sizes->surface_width; in omap_fbdev_create() 114 mode_cmd.height = sizes->surface_height; in omap_fbdev_create() 116 mode_cmd.pitches[0] = in omap_fbdev_create() 117 DIV_ROUND_UP(mode_cmd.width * sizes->surface_bpp, 8); in omap_fbdev_create() 122 mode_cmd.pitches[0] = PAGE_ALIGN(mode_cmd.pitches[0]); in omap_fbdev_create() 127 .bytes = PAGE_ALIGN(mode_cmd.pitches[0] * mode_cmd.height), in omap_fbdev_create() 137 fb = omap_framebuffer_init(dev, &mode_cmd, &fbdev->bo); in omap_fbdev_create()
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
A D | amdgpu_fb.c | 121 struct drm_mode_fb_cmd2 *mode_cmd, in amdgpufb_create_pinned_object() argument 132 int height = mode_cmd->height; in amdgpufb_create_pinned_object() 138 info = drm_get_format_info(adev_to_drm(adev), mode_cmd); in amdgpufb_create_pinned_object() 142 mode_cmd->pitches[0] = amdgpu_align_pitch(adev, mode_cmd->width, cpp, in amdgpufb_create_pinned_object() 145 height = ALIGN(mode_cmd->height, 8); in amdgpufb_create_pinned_object() 146 size = mode_cmd->pitches[0] * height; in amdgpufb_create_pinned_object() 204 struct drm_mode_fb_cmd2 mode_cmd; in amdgpufb_create() local 209 memset(&mode_cmd, 0, sizeof(mode_cmd)); in amdgpufb_create() 210 mode_cmd.width = sizes->surface_width; in amdgpufb_create() 211 mode_cmd.height = sizes->surface_height; in amdgpufb_create() [all …]
|
A D | amdgpu_display.c | 1065 const struct drm_mode_fb_cmd2 *mode_cmd, in amdgpu_display_gem_fb_init() argument 1071 drm_helper_mode_fill_fb_struct(dev, &rfb->base, mode_cmd); in amdgpu_display_gem_fb_init() 1096 drm_helper_mode_fill_fb_struct(dev, &rfb->base, mode_cmd); in amdgpu_display_gem_fb_verify_and_init() 1098 if (!drm_any_plane_has_format(dev, mode_cmd->pixel_format, in amdgpu_display_gem_fb_verify_and_init() 1099 mode_cmd->modifier[0])) { in amdgpu_display_gem_fb_verify_and_init() 1102 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in amdgpu_display_gem_fb_verify_and_init() 1125 const struct drm_mode_fb_cmd2 *mode_cmd, in amdgpu_display_framebuffer_init() argument 1136 if (mode_cmd->handles[i] != mode_cmd->handles[0]) { in amdgpu_display_framebuffer_init() 1138 i, mode_cmd->handles[0], mode_cmd->handles[i]); in amdgpu_display_framebuffer_init() 1181 const struct drm_mode_fb_cmd2 *mode_cmd) in amdgpu_display_user_framebuffer_create() argument [all …]
|
/linux/drivers/gpu/drm/nouveau/ |
A D | nouveau_display.c | 301 const struct drm_mode_fb_cmd2 *mode_cmd, in nouveau_framebuffer_new() argument 324 mode_cmd->pitches[0] != mode_cmd->pitches[1]))) { in nouveau_framebuffer_new() 326 &mode_cmd->pixel_format, in nouveau_framebuffer_new() 327 mode_cmd->pitches[0], mode_cmd->pitches[1]); in nouveau_framebuffer_new() 335 mode_cmd->modifier[0]); in nouveau_framebuffer_new() 343 info = drm_get_format_info(dev, mode_cmd); in nouveau_framebuffer_new() 347 mode_cmd->width, in nouveau_framebuffer_new() 350 mode_cmd->height, in nouveau_framebuffer_new() 355 mode_cmd->offsets[i], in nouveau_framebuffer_new() 356 mode_cmd->pitches[i], in nouveau_framebuffer_new() [all …]
|
A D | nouveau_fbcon.c | 320 struct drm_mode_fb_cmd2 mode_cmd = {}; in nouveau_fbcon_create() local 323 mode_cmd.width = sizes->surface_width; in nouveau_fbcon_create() 324 mode_cmd.height = sizes->surface_height; in nouveau_fbcon_create() 326 mode_cmd.pitches[0] = mode_cmd.width * (sizes->surface_bpp >> 3); in nouveau_fbcon_create() 327 mode_cmd.pitches[0] = roundup(mode_cmd.pitches[0], 256); in nouveau_fbcon_create() 329 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in nouveau_fbcon_create() 332 ret = nouveau_gem_new(&drm->client, mode_cmd.pitches[0] * in nouveau_fbcon_create() 333 mode_cmd.height, 0, NOUVEAU_GEM_DOMAIN_VRAM, in nouveau_fbcon_create() 340 ret = nouveau_framebuffer_new(dev, &mode_cmd, &nvbo->bo.base, &fb); in nouveau_fbcon_create()
|
/linux/drivers/gpu/drm/radeon/ |
A D | radeon_fb.c | 127 struct drm_mode_fb_cmd2 *mode_cmd, in radeonfb_create_pinned_object() argument 138 int height = mode_cmd->height; in radeonfb_create_pinned_object() 141 info = drm_get_format_info(rdev->ddev, mode_cmd); in radeonfb_create_pinned_object() 145 mode_cmd->pitches[0] = radeon_align_pitch(rdev, mode_cmd->width, cpp, in radeonfb_create_pinned_object() 149 height = ALIGN(mode_cmd->height, 8); in radeonfb_create_pinned_object() 150 size = mode_cmd->pitches[0] * height; in radeonfb_create_pinned_object() 180 mode_cmd->pitches[0]); in radeonfb_create_pinned_object() 220 struct drm_mode_fb_cmd2 mode_cmd; in radeonfb_create() local 226 mode_cmd.width = sizes->surface_width; in radeonfb_create() 227 mode_cmd.height = sizes->surface_height; in radeonfb_create() [all …]
|
/linux/drivers/gpu/drm/gma500/ |
A D | framebuffer.c | 169 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_init() argument 179 info = drm_get_format_info(dev, mode_cmd); in psb_framebuffer_init() 183 if (mode_cmd->pitches[0] & 63) in psb_framebuffer_init() 186 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in psb_framebuffer_init() 210 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_create() argument 220 ret = psb_framebuffer_init(dev, fb, mode_cmd, obj); in psb_framebuffer_create() 268 struct drm_mode_fb_cmd2 mode_cmd; in psbfb_create() local 274 mode_cmd.width = sizes->surface_width; in psbfb_create() 275 mode_cmd.height = sizes->surface_height; in psbfb_create() 283 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * DIV_ROUND_UP(bpp, 8), 64); in psbfb_create() [all …]
|
/linux/drivers/gpu/drm/arm/display/komeda/ |
A D | komeda_framebuffer.c | 41 const struct drm_mode_fb_cmd2 *mode_cmd) in komeda_fb_afbc_size_check() argument 49 obj = drm_gem_object_lookup(file, mode_cmd->handles[0]); in komeda_fb_afbc_size_check() 113 const struct drm_mode_fb_cmd2 *mode_cmd) in komeda_fb_none_afbc_size_check() argument 125 obj = drm_gem_object_lookup(file, mode_cmd->handles[i]); in komeda_fb_none_afbc_size_check() 160 const struct drm_mode_fb_cmd2 *mode_cmd) in komeda_fb_create() argument 171 mode_cmd->pixel_format, in komeda_fb_create() 172 mode_cmd->modifier[0]); in komeda_fb_create() 175 mode_cmd->pixel_format); in komeda_fb_create() 180 drm_helper_mode_fill_fb_struct(dev, &kfb->base, mode_cmd); in komeda_fb_create() 183 ret = komeda_fb_afbc_size_check(kfb, file, mode_cmd); in komeda_fb_create() [all …]
|
/linux/drivers/gpu/drm/arm/ |
A D | malidp_drv.c | 277 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_verify_afbc_framebuffer_caps() argument 280 mode_cmd->modifier[0]) == false) in malidp_verify_afbc_framebuffer_caps() 283 if (mode_cmd->offsets[0] != 0) { in malidp_verify_afbc_framebuffer_caps() 290 if ((mode_cmd->width % 16) || (mode_cmd->height % 16)) { in malidp_verify_afbc_framebuffer_caps() 325 info = drm_get_format_info(dev, mode_cmd); in malidp_verify_afbc_framebuffer_size() 328 (mode_cmd->height / afbc_superblock_height); in malidp_verify_afbc_framebuffer_size() 338 if ((mode_cmd->width * bpp) != (mode_cmd->pitches[0] * BITS_PER_BYTE)) { in malidp_verify_afbc_framebuffer_size() 342 mode_cmd->width, bpp); in malidp_verify_afbc_framebuffer_size() 376 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_fb_create() argument 378 if (mode_cmd->modifier[0]) { in malidp_fb_create() [all …]
|
/linux/include/drm/ |
A D | drm_gem_framebuffer_helper.h | 29 const struct drm_mode_fb_cmd2 *mode_cmd, 33 const struct drm_mode_fb_cmd2 *mode_cmd, 37 const struct drm_mode_fb_cmd2 *mode_cmd); 40 const struct drm_mode_fb_cmd2 *mode_cmd); 54 const struct drm_mode_fb_cmd2 *mode_cmd,
|
/linux/drivers/gpu/drm/i915/display/ |
A D | intel_plane_initial.c | 120 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in intel_alloc_initial_plane_obj() local 140 mode_cmd.pixel_format = fb->format->format; in intel_alloc_initial_plane_obj() 141 mode_cmd.width = fb->width; in intel_alloc_initial_plane_obj() 142 mode_cmd.height = fb->height; in intel_alloc_initial_plane_obj() 143 mode_cmd.pitches[0] = fb->pitches[0]; in intel_alloc_initial_plane_obj() 144 mode_cmd.modifier[0] = fb->modifier; in intel_alloc_initial_plane_obj() 145 mode_cmd.flags = DRM_MODE_FB_MODIFIERS; in intel_alloc_initial_plane_obj() 148 vma->obj, &mode_cmd)) { in intel_alloc_initial_plane_obj()
|
A D | intel_fb.c | 1325 struct drm_mode_fb_cmd2 *mode_cmd) in intel_framebuffer_init() argument 1365 mode_cmd->pixel_format, in intel_framebuffer_init() 1366 mode_cmd->modifier[0])) { in intel_framebuffer_init() 1369 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in intel_framebuffer_init() 1385 mode_cmd->modifier[0]); in intel_framebuffer_init() 1386 if (mode_cmd->pitches[0] > max_stride) { in intel_framebuffer_init() 1402 mode_cmd->pitches[0], stride); in intel_framebuffer_init() 1407 if (mode_cmd->offsets[0] != 0) { in intel_framebuffer_init() 1410 mode_cmd->offsets[0]); in intel_framebuffer_init() 1419 if (mode_cmd->handles[i] != mode_cmd->handles[0]) { in intel_framebuffer_init() [all …]
|
A D | intel_fbdev.c | 125 struct drm_mode_fb_cmd2 mode_cmd = {}; in intelfb_alloc() local 133 mode_cmd.width = sizes->surface_width; in intelfb_alloc() 134 mode_cmd.height = sizes->surface_height; in intelfb_alloc() 136 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * in intelfb_alloc() 138 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in intelfb_alloc() 141 size = mode_cmd.pitches[0] * mode_cmd.height; in intelfb_alloc() 165 fb = intel_framebuffer_create(obj, &mode_cmd); in intelfb_alloc()
|
/linux/drivers/gpu/drm/virtio/ |
A D | virtgpu_display.c | 68 const struct drm_mode_fb_cmd2 *mode_cmd, in virtio_gpu_framebuffer_init() argument 75 drm_helper_mode_fill_fb_struct(dev, &vgfb->base, mode_cmd); in virtio_gpu_framebuffer_init() 295 const struct drm_mode_fb_cmd2 *mode_cmd) in virtio_gpu_user_framebuffer_create() argument 301 if (mode_cmd->pixel_format != DRM_FORMAT_HOST_XRGB8888 && in virtio_gpu_user_framebuffer_create() 302 mode_cmd->pixel_format != DRM_FORMAT_HOST_ARGB8888) in virtio_gpu_user_framebuffer_create() 306 obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]); in virtio_gpu_user_framebuffer_create() 316 ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj); in virtio_gpu_user_framebuffer_create()
|
/linux/drivers/gpu/drm/vmwgfx/ |
A D | vmwgfx_kms.c | 902 *mode_cmd, in vmw_kms_new_framebuffer_surface() 948 &mode_cmd->pixel_format); in vmw_kms_new_framebuffer_surface() 1179 &mode_cmd->pixel_format); in vmw_create_bo_proxy() 1217 *mode_cmd) in vmw_kms_new_framebuffer_bo() 1225 requested_size = mode_cmd->height * mode_cmd->pitches[0]; in vmw_kms_new_framebuffer_bo() 1322 if (vmw_kms_srf_ok(dev_priv, mode_cmd->width, mode_cmd->height) && in vmw_kms_new_framebuffer() 1337 mode_cmd, in vmw_kms_new_framebuffer() 1348 mode_cmd); in vmw_kms_new_framebuffer() 1399 mode_cmd->handles[0], in vmw_kms_fb_create() 1406 !vmw_kms_srf_ok(dev_priv, mode_cmd->width, mode_cmd->height)) { in vmw_kms_fb_create() [all …]
|
A D | vmwgfx_fb.c | 493 struct drm_mode_fb_cmd2 mode_cmd; in vmw_fb_kms_framebuffer() local 505 mode_cmd.width = var->xres; in vmw_fb_kms_framebuffer() 506 mode_cmd.height = var->yres; in vmw_fb_kms_framebuffer() 507 mode_cmd.pitches[0] = ((var->bits_per_pixel + 7) / 8) * mode_cmd.width; in vmw_fb_kms_framebuffer() 508 mode_cmd.pixel_format = in vmw_fb_kms_framebuffer() 512 if (cur_fb && cur_fb->width == mode_cmd.width && in vmw_fb_kms_framebuffer() 513 cur_fb->height == mode_cmd.height && in vmw_fb_kms_framebuffer() 514 cur_fb->format->format == mode_cmd.pixel_format && in vmw_fb_kms_framebuffer() 515 cur_fb->pitches[0] == mode_cmd.pitches[0]) in vmw_fb_kms_framebuffer() 519 new_bo_size = (size_t) mode_cmd.pitches[0] * (size_t) mode_cmd.height; in vmw_fb_kms_framebuffer() [all …]
|