/kernel/linux/linux-5.10/drivers/gpu/drm/ |
D | drm_gem_framebuffer_helper.c | 67 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_init() argument 73 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in drm_gem_fb_init() 150 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_init_with_funcs() argument 157 info = drm_get_format_info(dev, mode_cmd); in drm_gem_fb_init_with_funcs() 162 unsigned int width = mode_cmd->width / (i ? info->hsub : 1); in drm_gem_fb_init_with_funcs() 163 unsigned int height = mode_cmd->height / (i ? info->vsub : 1); in drm_gem_fb_init_with_funcs() 166 objs[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in drm_gem_fb_init_with_funcs() 173 min_size = (height - 1) * mode_cmd->pitches[i] in drm_gem_fb_init_with_funcs() 175 + mode_cmd->offsets[i]; in drm_gem_fb_init_with_funcs() 184 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 | 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()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/msm/ |
D | msm_fb.c | 25 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos); 100 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd) in msm_framebuffer_create() argument 103 mode_cmd); in msm_framebuffer_create() 109 bos[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in msm_framebuffer_create() 116 fb = msm_framebuffer_init(dev, mode_cmd, bos); in msm_framebuffer_create() 131 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos) in msm_framebuffer_init() argument 134 mode_cmd); in msm_framebuffer_init() 143 dev, mode_cmd, mode_cmd->width, mode_cmd->height, in msm_framebuffer_init() 144 (char *)&mode_cmd->pixel_format); in msm_framebuffer_init() 147 format = kms->funcs->get_format(kms, mode_cmd->pixel_format, in msm_framebuffer_init() [all …]
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/rockchip/ |
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()
|
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()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/exynos/ |
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()
|
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()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/omapdrm/ |
D | omap_fb.c | 304 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd) in omap_framebuffer_create() argument 307 mode_cmd); in omap_framebuffer_create() 314 bos[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in omap_framebuffer_create() 321 fb = omap_framebuffer_init(dev, mode_cmd, bos); in omap_framebuffer_create() 335 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos) in omap_framebuffer_init() argument 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() [all …]
|
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()
|
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);
|
/kernel/linux/linux-5.10/drivers/gpu/drm/radeon/ |
D | radeon_fb.c | 126 struct drm_mode_fb_cmd2 *mode_cmd, in radeonfb_create_pinned_object() argument 137 int height = mode_cmd->height; in radeonfb_create_pinned_object() 140 info = drm_get_format_info(rdev->ddev, mode_cmd); in radeonfb_create_pinned_object() 144 mode_cmd->pitches[0] = radeon_align_pitch(rdev, mode_cmd->width, cpp, in radeonfb_create_pinned_object() 148 height = ALIGN(mode_cmd->height, 8); in radeonfb_create_pinned_object() 149 size = mode_cmd->pitches[0] * height; in radeonfb_create_pinned_object() 178 mode_cmd->pitches[0]); in radeonfb_create_pinned_object() 219 struct drm_mode_fb_cmd2 mode_cmd; in radeonfb_create() local 225 mode_cmd.width = sizes->surface_width; in radeonfb_create() 226 mode_cmd.height = sizes->surface_height; in radeonfb_create() [all …]
|
/kernel/linux/linux-5.10/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() 327 drm_get_format_name(mode_cmd->pixel_format, in nouveau_framebuffer_new() [all …]
|
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()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdgpu/ |
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 210 mode_cmd.width = sizes->surface_width; in amdgpufb_create() 211 mode_cmd.height = sizes->surface_height; in amdgpufb_create() 216 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in amdgpufb_create() [all …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/gma500/ |
D | framebuffer.c | 211 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_init() argument 221 info = drm_get_format_info(dev, mode_cmd); in psb_framebuffer_init() 225 if (mode_cmd->pitches[0] & 63) in psb_framebuffer_init() 228 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in psb_framebuffer_init() 252 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_create() argument 262 ret = psb_framebuffer_init(dev, fb, mode_cmd, obj); in psb_framebuffer_create() 308 struct drm_mode_fb_cmd2 mode_cmd; in psbfb_create() local 316 mode_cmd.width = sizes->surface_width; in psbfb_create() 317 mode_cmd.height = sizes->surface_height; in psbfb_create() 331 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((bpp + 7) / 8), 4096 >> pitch_lines); in psbfb_create() [all …]
|
/kernel/linux/linux-5.10/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); 44 const struct drm_mode_fb_cmd2 *mode_cmd,
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/arm/ |
D | malidp_drv.c | 274 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_verify_afbc_framebuffer_caps() argument 276 if (malidp_format_mod_supported(dev, mode_cmd->pixel_format, in malidp_verify_afbc_framebuffer_caps() 277 mode_cmd->modifier[0]) == false) in malidp_verify_afbc_framebuffer_caps() 280 if (mode_cmd->offsets[0] != 0) { in malidp_verify_afbc_framebuffer_caps() 285 switch (mode_cmd->modifier[0] & AFBC_SIZE_MASK) { in malidp_verify_afbc_framebuffer_caps() 287 if ((mode_cmd->width % 16) || (mode_cmd->height % 16)) { in malidp_verify_afbc_framebuffer_caps() 303 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_verify_afbc_framebuffer_size() argument 312 switch (mode_cmd->modifier[0] & AFBC_SIZE_MASK) { in malidp_verify_afbc_framebuffer_size() 322 info = drm_get_format_info(dev, mode_cmd); in malidp_verify_afbc_framebuffer_size() 324 n_superblocks = (mode_cmd->width / afbc_superblock_width) * in malidp_verify_afbc_framebuffer_size() [all …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/virtio/ |
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() 314 ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj); in virtio_gpu_user_framebuffer_create()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/bochs/ |
D | bochs_kms.c | 123 const struct drm_mode_fb_cmd2 *mode_cmd) in bochs_gem_fb_create() argument 125 if (mode_cmd->pixel_format != DRM_FORMAT_XRGB8888 && in bochs_gem_fb_create() 126 mode_cmd->pixel_format != DRM_FORMAT_BGRX8888) in bochs_gem_fb_create() 129 return drm_gem_fb_create(dev, file, mode_cmd); in bochs_gem_fb_create()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/display/ |
D | intel_fbdev.c | 121 struct drm_mode_fb_cmd2 mode_cmd = {}; in intelfb_alloc() local 129 mode_cmd.width = sizes->surface_width; in intelfb_alloc() 130 mode_cmd.height = sizes->surface_height; in intelfb_alloc() 132 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * in intelfb_alloc() 134 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in intelfb_alloc() 137 size = mode_cmd.pitches[0] * mode_cmd.height; in intelfb_alloc() 153 fb = intel_framebuffer_create(obj, &mode_cmd); in intelfb_alloc()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_fb.c | 501 struct drm_mode_fb_cmd2 mode_cmd = {0}; in vmw_fb_kms_framebuffer() local 513 mode_cmd.width = var->xres; in vmw_fb_kms_framebuffer() 514 mode_cmd.height = var->yres; in vmw_fb_kms_framebuffer() 515 mode_cmd.pitches[0] = ((var->bits_per_pixel + 7) / 8) * mode_cmd.width; in vmw_fb_kms_framebuffer() 516 mode_cmd.pixel_format = in vmw_fb_kms_framebuffer() 520 if (cur_fb && cur_fb->width == mode_cmd.width && in vmw_fb_kms_framebuffer() 521 cur_fb->height == mode_cmd.height && in vmw_fb_kms_framebuffer() 522 cur_fb->format->format == mode_cmd.pixel_format && in vmw_fb_kms_framebuffer() 523 cur_fb->pitches[0] == mode_cmd.pitches[0]) in vmw_fb_kms_framebuffer() 527 new_bo_size = (size_t) mode_cmd.pitches[0] * (size_t) mode_cmd.height; in vmw_fb_kms_framebuffer() [all …]
|
D | vmwgfx_kms.c | 889 *mode_cmd, in vmw_kms_new_framebuffer_surface() 913 surface->metadata.base_size.width < mode_cmd->width || in vmw_kms_new_framebuffer_surface() 914 surface->metadata.base_size.height < mode_cmd->height || in vmw_kms_new_framebuffer_surface() 921 switch (mode_cmd->pixel_format) { in vmw_kms_new_framebuffer_surface() 936 drm_get_format_name(mode_cmd->pixel_format, &format_name)); in vmw_kms_new_framebuffer_surface() 955 drm_helper_mode_fill_fb_struct(dev, &vfbs->base.base, mode_cmd); in vmw_kms_new_framebuffer_surface() 957 vfbs->base.user_handle = mode_cmd->handles[0]; in vmw_kms_new_framebuffer_surface() 1143 const struct drm_mode_fb_cmd2 *mode_cmd, in vmw_create_bo_proxy() argument 1154 switch (mode_cmd->pixel_format) { in vmw_create_bo_proxy() 1174 drm_get_format_name(mode_cmd->pixel_format, &format_name)); in vmw_create_bo_proxy() [all …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/rcar-du/ |
D | rcar_du_kms.c | 350 const struct drm_mode_fb_cmd2 *mode_cmd) in rcar_du_fb_create() argument 359 format = rcar_du_format_info(mode_cmd->pixel_format); in rcar_du_fb_create() 362 mode_cmd->pixel_format); in rcar_du_fb_create() 390 if (mode_cmd->pitches[0] & (align - 1) || in rcar_du_fb_create() 391 mode_cmd->pitches[0] > max_pitch) { in rcar_du_fb_create() 393 mode_cmd->pitches[0]); in rcar_du_fb_create() 402 chroma_pitch = mode_cmd->pitches[0] / format->hsub; in rcar_du_fb_create() 407 if (mode_cmd->pitches[i] != chroma_pitch) { in rcar_du_fb_create() 414 return drm_gem_fb_create(dev, file_priv, mode_cmd); in rcar_du_fb_create()
|