/Linux-v6.1/drivers/gpu/drm/ |
D | drm_gem_framebuffer_helper.c | 70 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_init() argument 77 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in drm_gem_fb_init() 154 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_init_with_funcs() argument 162 info = drm_get_format_info(dev, mode_cmd); in drm_gem_fb_init_with_funcs() 169 unsigned int width = mode_cmd->width / (i ? info->hsub : 1); in drm_gem_fb_init_with_funcs() 170 unsigned int height = mode_cmd->height / (i ? info->vsub : 1); in drm_gem_fb_init_with_funcs() 173 objs[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in drm_gem_fb_init_with_funcs() 180 min_size = (height - 1) * mode_cmd->pitches[i] in drm_gem_fb_init_with_funcs() 182 + mode_cmd->offsets[i]; in drm_gem_fb_init_with_funcs() 194 ret = drm_gem_fb_init(dev, fb, mode_cmd, objs, i, funcs); in drm_gem_fb_init_with_funcs() [all …]
|
D | drm_modeset_helper.c | 82 const struct drm_mode_fb_cmd2 *mode_cmd) in drm_helper_mode_fill_fb_struct() argument 87 fb->format = drm_get_format_info(dev, mode_cmd); in drm_helper_mode_fill_fb_struct() 88 fb->width = mode_cmd->width; in drm_helper_mode_fill_fb_struct() 89 fb->height = mode_cmd->height; in drm_helper_mode_fill_fb_struct() 91 fb->pitches[i] = mode_cmd->pitches[i]; in drm_helper_mode_fill_fb_struct() 92 fb->offsets[i] = mode_cmd->offsets[i]; in drm_helper_mode_fill_fb_struct() 94 fb->modifier = mode_cmd->modifier[0]; in drm_helper_mode_fill_fb_struct() 95 fb->flags = mode_cmd->flags; in drm_helper_mode_fill_fb_struct()
|
/Linux-v6.1/drivers/gpu/drm/msm/ |
D | msm_fb.c | 33 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos); 137 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd) in msm_framebuffer_create() argument 140 mode_cmd); in msm_framebuffer_create() 146 bos[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in msm_framebuffer_create() 153 fb = msm_framebuffer_init(dev, mode_cmd, bos); in msm_framebuffer_create() 168 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos) in msm_framebuffer_init() argument 171 mode_cmd); in msm_framebuffer_init() 180 mode_cmd, mode_cmd->width, mode_cmd->height, in msm_framebuffer_init() 181 (char *)&mode_cmd->pixel_format); in msm_framebuffer_init() 184 format = kms->funcs->get_format(kms, mode_cmd->pixel_format, in msm_framebuffer_init() [all …]
|
/Linux-v6.1/drivers/gpu/drm/shmobile/ |
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-v6.1/drivers/gpu/drm/exynos/ |
D | exynos_drm_fb.c | 60 const struct drm_mode_fb_cmd2 *mode_cmd, in exynos_drm_framebuffer_init() argument 80 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in exynos_drm_framebuffer_init() 98 const struct drm_mode_fb_cmd2 *mode_cmd) in exynos_user_fb_create() argument 100 const struct drm_format_info *info = drm_get_format_info(dev, mode_cmd); in exynos_user_fb_create() 107 unsigned int height = (i == 0) ? mode_cmd->height : in exynos_user_fb_create() 108 DIV_ROUND_UP(mode_cmd->height, info->vsub); in exynos_user_fb_create() 109 unsigned long size = height * mode_cmd->pitches[i] + in exynos_user_fb_create() 110 mode_cmd->offsets[i]; in exynos_user_fb_create() 113 mode_cmd->handles[i]); in exynos_user_fb_create() 128 fb = exynos_drm_framebuffer_init(dev, mode_cmd, exynos_gem, i); in exynos_user_fb_create()
|
D | exynos_drm_fbdev.c | 93 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in exynos_drm_fbdev_create() local 102 mode_cmd.width = sizes->surface_width; in exynos_drm_fbdev_create() 103 mode_cmd.height = sizes->surface_height; in exynos_drm_fbdev_create() 104 mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); in exynos_drm_fbdev_create() 105 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in exynos_drm_fbdev_create() 108 size = mode_cmd.pitches[0] * mode_cmd.height; in exynos_drm_fbdev_create() 117 exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1); in exynos_drm_fbdev_create()
|
/Linux-v6.1/drivers/gpu/drm/rockchip/ |
D | rockchip_drm_fb.c | 29 rockchip_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd, in rockchip_fb_alloc() argument 40 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in rockchip_fb_alloc() 63 const struct drm_mode_fb_cmd2 *mode_cmd) in rockchip_fb_create() argument 69 info = drm_get_format_info(dev, mode_cmd); in rockchip_fb_create() 77 ret = drm_gem_fb_init_with_funcs(dev, &afbc_fb->base, file, mode_cmd, in rockchip_fb_create() 84 if (drm_is_afbc(mode_cmd->modifier[0])) { in rockchip_fb_create() 87 ret = drm_gem_fb_afbc_init(dev, mode_cmd, afbc_fb); in rockchip_fb_create() 111 const struct drm_mode_fb_cmd2 *mode_cmd, in rockchip_drm_framebuffer_init() argument 116 fb = rockchip_fb_alloc(dev, mode_cmd, &obj, 1); in rockchip_drm_framebuffer_init()
|
/Linux-v6.1/drivers/gpu/drm/omapdrm/ |
D | omap_fb.c | 337 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd) in omap_framebuffer_create() argument 340 mode_cmd); in omap_framebuffer_create() 347 bos[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in omap_framebuffer_create() 354 fb = omap_framebuffer_init(dev, mode_cmd, bos); in omap_framebuffer_create() 368 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos) in omap_framebuffer_init() argument 373 unsigned int pitch = mode_cmd->pitches[0]; in omap_framebuffer_init() 377 dev, mode_cmd, mode_cmd->width, mode_cmd->height, in omap_framebuffer_init() 378 (char *)&mode_cmd->pixel_format); in omap_framebuffer_init() 380 format = drm_get_format_info(dev, mode_cmd); in omap_framebuffer_init() 383 if (formats[i] == mode_cmd->pixel_format) in omap_framebuffer_init() [all …]
|
D | omap_fbdev.c | 100 struct drm_mode_fb_cmd2 mode_cmd = {0}; in omap_fbdev_create() local 111 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in omap_fbdev_create() 114 mode_cmd.width = sizes->surface_width; in omap_fbdev_create() 115 mode_cmd.height = sizes->surface_height; in omap_fbdev_create() 117 mode_cmd.pitches[0] = in omap_fbdev_create() 118 DIV_ROUND_UP(mode_cmd.width * sizes->surface_bpp, 8); in omap_fbdev_create() 123 mode_cmd.pitches[0] = PAGE_ALIGN(mode_cmd.pitches[0]); in omap_fbdev_create() 128 .bytes = PAGE_ALIGN(mode_cmd.pitches[0] * mode_cmd.height), in omap_fbdev_create() 138 fb = omap_framebuffer_init(dev, &mode_cmd, &fbdev->bo); in omap_fbdev_create()
|
D | omap_fb.h | 23 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd); 25 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos);
|
/Linux-v6.1/drivers/gpu/drm/nouveau/ |
D | nouveau_display.c | 301 const struct drm_mode_fb_cmd2 *mode_cmd, in nouveau_framebuffer_new() argument 317 (mode_cmd->pixel_format == DRM_FORMAT_YUYV || in nouveau_framebuffer_new() 318 mode_cmd->pixel_format == DRM_FORMAT_UYVY || in nouveau_framebuffer_new() 319 mode_cmd->pixel_format == DRM_FORMAT_NV12 || in nouveau_framebuffer_new() 320 mode_cmd->pixel_format == DRM_FORMAT_NV21) && in nouveau_framebuffer_new() 321 (mode_cmd->pitches[0] & 0x3f || /* align 64 */ in nouveau_framebuffer_new() 322 mode_cmd->pitches[0] >= 0x10000 || /* at most 64k pitch */ in nouveau_framebuffer_new() 323 (mode_cmd->pitches[1] && /* pitches for planes must match */ in nouveau_framebuffer_new() 324 mode_cmd->pitches[0] != mode_cmd->pitches[1]))) { in nouveau_framebuffer_new() 326 &mode_cmd->pixel_format, in nouveau_framebuffer_new() [all …]
|
D | nouveau_fbcon.c | 321 struct drm_mode_fb_cmd2 mode_cmd = {}; in nouveau_fbcon_create() local 324 mode_cmd.width = sizes->surface_width; in nouveau_fbcon_create() 325 mode_cmd.height = sizes->surface_height; in nouveau_fbcon_create() 327 mode_cmd.pitches[0] = mode_cmd.width * (sizes->surface_bpp >> 3); in nouveau_fbcon_create() 328 mode_cmd.pitches[0] = roundup(mode_cmd.pitches[0], 256); in nouveau_fbcon_create() 330 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in nouveau_fbcon_create() 333 ret = nouveau_gem_new(&drm->client, mode_cmd.pitches[0] * in nouveau_fbcon_create() 334 mode_cmd.height, 0, NOUVEAU_GEM_DOMAIN_VRAM, in nouveau_fbcon_create() 341 ret = nouveau_framebuffer_new(dev, &mode_cmd, &nvbo->bo.base, &fb); in nouveau_fbcon_create()
|
/Linux-v6.1/drivers/gpu/drm/radeon/ |
D | radeon_fb.c | 128 struct drm_mode_fb_cmd2 *mode_cmd, in radeonfb_create_pinned_object() argument 139 int height = mode_cmd->height; in radeonfb_create_pinned_object() 142 info = drm_get_format_info(rdev->ddev, mode_cmd); in radeonfb_create_pinned_object() 146 mode_cmd->pitches[0] = radeon_align_pitch(rdev, mode_cmd->width, cpp, in radeonfb_create_pinned_object() 150 height = ALIGN(mode_cmd->height, 8); in radeonfb_create_pinned_object() 151 size = mode_cmd->pitches[0] * height; in radeonfb_create_pinned_object() 181 mode_cmd->pitches[0]); in radeonfb_create_pinned_object() 221 struct drm_mode_fb_cmd2 mode_cmd; in radeonfb_create() local 227 mode_cmd.width = sizes->surface_width; in radeonfb_create() 228 mode_cmd.height = sizes->surface_height; in radeonfb_create() [all …]
|
/Linux-v6.1/include/drm/ |
D | drm_gem_framebuffer_helper.h | 27 const struct drm_mode_fb_cmd2 *mode_cmd, 31 const struct drm_mode_fb_cmd2 *mode_cmd, 35 const struct drm_mode_fb_cmd2 *mode_cmd); 38 const struct drm_mode_fb_cmd2 *mode_cmd); 50 const struct drm_mode_fb_cmd2 *mode_cmd,
|
/Linux-v6.1/drivers/gpu/drm/arm/display/komeda/ |
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-v6.1/drivers/gpu/drm/gma500/ |
D | framebuffer.c | 168 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_init() argument 178 info = drm_get_format_info(dev, mode_cmd); in psb_framebuffer_init() 182 if (mode_cmd->pitches[0] & 63) in psb_framebuffer_init() 185 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in psb_framebuffer_init() 209 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_create() argument 219 ret = psb_framebuffer_init(dev, fb, mode_cmd, obj); in psb_framebuffer_create() 242 struct drm_mode_fb_cmd2 mode_cmd; in psbfb_create() local 249 mode_cmd.width = sizes->surface_width; in psbfb_create() 250 mode_cmd.height = sizes->surface_height; in psbfb_create() 258 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * DIV_ROUND_UP(bpp, 8), 64); in psbfb_create() [all …]
|
/Linux-v6.1/drivers/gpu/drm/arm/ |
D | malidp_drv.c | 277 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_verify_afbc_framebuffer_caps() argument 279 if (malidp_format_mod_supported(dev, mode_cmd->pixel_format, in malidp_verify_afbc_framebuffer_caps() 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() 288 switch (mode_cmd->modifier[0] & AFBC_SIZE_MASK) { in malidp_verify_afbc_framebuffer_caps() 290 if ((mode_cmd->width % 16) || (mode_cmd->height % 16)) { in malidp_verify_afbc_framebuffer_caps() 306 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_verify_afbc_framebuffer_size() argument 315 switch (mode_cmd->modifier[0] & AFBC_SIZE_MASK) { in malidp_verify_afbc_framebuffer_size() 325 info = drm_get_format_info(dev, mode_cmd); in malidp_verify_afbc_framebuffer_size() 327 n_superblocks = (mode_cmd->width / afbc_superblock_width) * in malidp_verify_afbc_framebuffer_size() [all …]
|
/Linux-v6.1/drivers/gpu/drm/i915/display/ |
D | intel_plane_initial.c | 166 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in intel_alloc_initial_plane_obj() local 187 mode_cmd.pixel_format = fb->format->format; in intel_alloc_initial_plane_obj() 188 mode_cmd.width = fb->width; in intel_alloc_initial_plane_obj() 189 mode_cmd.height = fb->height; in intel_alloc_initial_plane_obj() 190 mode_cmd.pitches[0] = fb->pitches[0]; in intel_alloc_initial_plane_obj() 191 mode_cmd.modifier[0] = fb->modifier; in intel_alloc_initial_plane_obj() 192 mode_cmd.flags = DRM_MODE_FB_MODIFIERS; in intel_alloc_initial_plane_obj() 195 vma->obj, &mode_cmd)) { in intel_alloc_initial_plane_obj()
|
D | intel_fb.c | 1865 struct drm_mode_fb_cmd2 *mode_cmd) in intel_framebuffer_init() argument 1883 if (mode_cmd->flags & DRM_MODE_FB_MODIFIERS) { in intel_framebuffer_init() 1889 tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { in intel_framebuffer_init() 1896 mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED; in intel_framebuffer_init() 1905 mode_cmd->pixel_format, in intel_framebuffer_init() 1906 mode_cmd->modifier[0])) { in intel_framebuffer_init() 1909 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in intel_framebuffer_init() 1918 tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { in intel_framebuffer_init() 1924 max_stride = intel_fb_max_stride(dev_priv, mode_cmd->pixel_format, in intel_framebuffer_init() 1925 mode_cmd->modifier[0]); in intel_framebuffer_init() [all …]
|
D | intel_fbdev.c | 142 struct drm_mode_fb_cmd2 mode_cmd = {}; in intelfb_alloc() local 150 mode_cmd.width = sizes->surface_width; in intelfb_alloc() 151 mode_cmd.height = sizes->surface_height; in intelfb_alloc() 153 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * in intelfb_alloc() 155 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in intelfb_alloc() 158 size = mode_cmd.pitches[0] * mode_cmd.height; in intelfb_alloc() 182 fb = intel_framebuffer_create(obj, &mode_cmd); in intelfb_alloc()
|
/Linux-v6.1/drivers/gpu/drm/virtio/ |
D | virtgpu_display.c | 69 const struct drm_mode_fb_cmd2 *mode_cmd, in virtio_gpu_framebuffer_init() argument 76 drm_helper_mode_fill_fb_struct(dev, &vgfb->base, mode_cmd); in virtio_gpu_framebuffer_init() 298 const struct drm_mode_fb_cmd2 *mode_cmd) in virtio_gpu_user_framebuffer_create() argument 304 if (mode_cmd->pixel_format != DRM_FORMAT_HOST_XRGB8888 && in virtio_gpu_user_framebuffer_create() 305 mode_cmd->pixel_format != DRM_FORMAT_HOST_ARGB8888) in virtio_gpu_user_framebuffer_create() 309 obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]); in virtio_gpu_user_framebuffer_create() 319 ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj); in virtio_gpu_user_framebuffer_create()
|
/Linux-v6.1/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_kms.c | 1156 *mode_cmd, in vmw_kms_new_framebuffer_surface() 1174 mode_cmd->pixel_format, in vmw_kms_new_framebuffer_surface() 1175 mode_cmd->modifier[0])) { in vmw_kms_new_framebuffer_surface() 1178 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in vmw_kms_new_framebuffer_surface() 1188 surface->metadata.base_size.width < mode_cmd->width || in vmw_kms_new_framebuffer_surface() 1189 surface->metadata.base_size.height < mode_cmd->height || in vmw_kms_new_framebuffer_surface() 1196 switch (mode_cmd->pixel_format) { in vmw_kms_new_framebuffer_surface() 1211 &mode_cmd->pixel_format); in vmw_kms_new_framebuffer_surface() 1230 drm_helper_mode_fill_fb_struct(dev, &vfbs->base.base, mode_cmd); in vmw_kms_new_framebuffer_surface() 1232 vfbs->base.user_handle = mode_cmd->handles[0]; in vmw_kms_new_framebuffer_surface() [all …]
|
D | vmwgfx_fb.c | 486 struct drm_mode_fb_cmd2 mode_cmd = {0}; in vmw_fb_kms_framebuffer() local 498 mode_cmd.width = var->xres; in vmw_fb_kms_framebuffer() 499 mode_cmd.height = var->yres; in vmw_fb_kms_framebuffer() 500 mode_cmd.pitches[0] = ((var->bits_per_pixel + 7) / 8) * mode_cmd.width; in vmw_fb_kms_framebuffer() 501 mode_cmd.pixel_format = in vmw_fb_kms_framebuffer() 505 if (cur_fb && cur_fb->width == mode_cmd.width && in vmw_fb_kms_framebuffer() 506 cur_fb->height == mode_cmd.height && in vmw_fb_kms_framebuffer() 507 cur_fb->format->format == mode_cmd.pixel_format && in vmw_fb_kms_framebuffer() 508 cur_fb->pitches[0] == mode_cmd.pitches[0]) in vmw_fb_kms_framebuffer() 512 new_bo_size = (size_t) mode_cmd.pitches[0] * (size_t) mode_cmd.height; in vmw_fb_kms_framebuffer() [all …]
|
/Linux-v6.1/drivers/gpu/drm/rcar-du/ |
D | rcar_du_kms.c | 397 const struct drm_mode_fb_cmd2 *mode_cmd) in rcar_du_fb_create() argument 406 format = rcar_du_format_info(mode_cmd->pixel_format); in rcar_du_fb_create() 409 &mode_cmd->pixel_format); in rcar_du_fb_create() 437 if (mode_cmd->pitches[0] & (align - 1) || in rcar_du_fb_create() 438 mode_cmd->pitches[0] > max_pitch) { in rcar_du_fb_create() 440 mode_cmd->pitches[0]); in rcar_du_fb_create() 449 chroma_pitch = mode_cmd->pitches[0] / format->hsub; in rcar_du_fb_create() 454 if (mode_cmd->pitches[i] != chroma_pitch) { in rcar_du_fb_create() 461 return drm_gem_fb_create(dev, file_priv, mode_cmd); in rcar_du_fb_create()
|
/Linux-v6.1/drivers/gpu/drm/tiny/ |
D | cirrus.c | 497 const struct drm_mode_fb_cmd2 *mode_cmd) in cirrus_fb_create() argument 499 if (mode_cmd->pixel_format != DRM_FORMAT_RGB565 && in cirrus_fb_create() 500 mode_cmd->pixel_format != DRM_FORMAT_RGB888 && in cirrus_fb_create() 501 mode_cmd->pixel_format != DRM_FORMAT_XRGB8888) in cirrus_fb_create() 503 if (cirrus_check_size(mode_cmd->width, mode_cmd->height, NULL) < 0) in cirrus_fb_create() 505 return drm_gem_fb_create_with_dirty(dev, file_priv, mode_cmd); in cirrus_fb_create()
|