/linux-6.3-rc2/drivers/gpu/drm/ |
A D | drm_gem_framebuffer_helper.c | 69 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_init() argument 161 info = drm_get_format_info(dev, mode_cmd); in drm_gem_fb_init_with_funcs() 181 + mode_cmd->offsets[i]; in drm_gem_fb_init_with_funcs() 275 const struct drm_mode_fb_cmd2 *mode_cmd) in drm_gem_fb_create() argument 499 info = drm_get_format_info(dev, mode_cmd); in drm_gem_afbc_get_bpp() 514 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_afbc_min_size() argument 535 mode_cmd->modifier[0] in drm_gem_afbc_min_size() 552 afbc_fb->offset = mode_cmd->offsets[0]; in drm_gem_afbc_min_size() 554 bpp = drm_gem_afbc_get_bpp(dev, mode_cmd); in drm_gem_afbc_min_size() 589 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_afbc_init() argument [all …]
|
A 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-6.3-rc2/drivers/gpu/drm/msm/ |
A D | msm_fb.c | 140 mode_cmd); in msm_framebuffer_create() 153 fb = msm_framebuffer_init(dev, mode_cmd, bos); in msm_framebuffer_create() 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() 185 mode_cmd->modifier[0]); in msm_framebuffer_init() 188 (char *)&mode_cmd->pixel_format); in msm_framebuffer_init() 213 min_size = (height - 1) * mode_cmd->pitches[i] in msm_framebuffer_init() 215 + mode_cmd->offsets[i]; in msm_framebuffer_init() 248 struct drm_mode_fb_cmd2 mode_cmd = { in msm_alloc_stolen_fb() local [all …]
|
/linux-6.3-rc2/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-6.3-rc2/drivers/gpu/drm/exynos/ |
A 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()
|
A D | exynos_drm_fbdev.c | 95 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in exynos_drm_fbdev_create() local 104 mode_cmd.width = sizes->surface_width; in exynos_drm_fbdev_create() 105 mode_cmd.height = sizes->surface_height; in exynos_drm_fbdev_create() 106 mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); in exynos_drm_fbdev_create() 107 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in exynos_drm_fbdev_create() 110 size = mode_cmd.pitches[0] * mode_cmd.height; in exynos_drm_fbdev_create() 119 exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1); in exynos_drm_fbdev_create()
|
/linux-6.3-rc2/drivers/gpu/drm/omapdrm/ |
A D | omap_fb.c | 340 mode_cmd); in omap_framebuffer_create() 354 fb = omap_framebuffer_init(dev, mode_cmd, bos); in omap_framebuffer_create() 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() 389 (char *)&mode_cmd->pixel_format); in omap_framebuffer_init() 428 size = pitch * mode_cmd->height / vsub; in omap_framebuffer_init() 433 bos[i]->size - mode_cmd->offsets[i], size); in omap_framebuffer_init() [all …]
|
A 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()
|
A 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-6.3-rc2/drivers/gpu/drm/radeon/ |
A D | radeon_fb.c | 130 struct drm_mode_fb_cmd2 *mode_cmd, in radeonfb_create_pinned_object() argument 141 int height = mode_cmd->height; in radeonfb_create_pinned_object() 144 info = drm_get_format_info(rdev->ddev, mode_cmd); in radeonfb_create_pinned_object() 148 mode_cmd->pitches[0] = radeon_align_pitch(rdev, mode_cmd->width, cpp, in radeonfb_create_pinned_object() 152 height = ALIGN(mode_cmd->height, 8); in radeonfb_create_pinned_object() 153 size = mode_cmd->pitches[0] * height; in radeonfb_create_pinned_object() 183 mode_cmd->pitches[0]); in radeonfb_create_pinned_object() 223 struct drm_mode_fb_cmd2 mode_cmd; in radeonfb_create() local 229 mode_cmd.width = sizes->surface_width; in radeonfb_create() 230 mode_cmd.height = sizes->surface_height; in radeonfb_create() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/nouveau/ |
A D | nouveau_display.c | 295 const struct drm_mode_fb_cmd2 *mode_cmd, in nouveau_framebuffer_new() argument 318 mode_cmd->pitches[0] != mode_cmd->pitches[1]))) { in nouveau_framebuffer_new() 320 &mode_cmd->pixel_format, in nouveau_framebuffer_new() 321 mode_cmd->pitches[0], mode_cmd->pitches[1]); in nouveau_framebuffer_new() 325 if (mode_cmd->flags & DRM_MODE_FB_MODIFIERS) { in nouveau_framebuffer_new() 329 mode_cmd->modifier[0]); in nouveau_framebuffer_new() 337 info = drm_get_format_info(dev, mode_cmd); in nouveau_framebuffer_new() 341 mode_cmd->height, in nouveau_framebuffer_new() 346 mode_cmd->offsets[i], in nouveau_framebuffer_new() 347 mode_cmd->pitches[i], in nouveau_framebuffer_new() [all …]
|
/linux-6.3-rc2/include/drm/ |
A 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-6.3-rc2/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-6.3-rc2/drivers/gpu/drm/rockchip/ |
A D | rockchip_drm_fb.c | 33 const struct drm_mode_fb_cmd2 *mode_cmd) in rockchip_fb_create() argument 39 info = drm_get_format_info(dev, mode_cmd); in rockchip_fb_create() 47 ret = drm_gem_fb_init_with_funcs(dev, &afbc_fb->base, file, mode_cmd, in rockchip_fb_create() 54 if (drm_is_afbc(mode_cmd->modifier[0])) { in rockchip_fb_create() 57 ret = drm_gem_fb_afbc_init(dev, mode_cmd, afbc_fb); in rockchip_fb_create()
|
/linux-6.3-rc2/drivers/gpu/drm/gma500/ |
A D | framebuffer.c | 172 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_init() argument 182 info = drm_get_format_info(dev, mode_cmd); in psb_framebuffer_init() 186 if (mode_cmd->pitches[0] & 63) in psb_framebuffer_init() 189 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in psb_framebuffer_init() 213 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_create() argument 246 struct drm_mode_fb_cmd2 mode_cmd; in psbfb_create() local 253 mode_cmd.width = sizes->surface_width; in psbfb_create() 254 mode_cmd.height = sizes->surface_height; in psbfb_create() 262 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * DIV_ROUND_UP(bpp, 8), 64); in psbfb_create() 264 size = mode_cmd.pitches[0] * mode_cmd.height; in psbfb_create() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/arm/ |
A D | malidp_drv.c | 278 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_verify_afbc_framebuffer_caps() argument 281 mode_cmd->modifier[0]) == false) in malidp_verify_afbc_framebuffer_caps() 284 if (mode_cmd->offsets[0] != 0) { in malidp_verify_afbc_framebuffer_caps() 291 if ((mode_cmd->width % 16) || (mode_cmd->height % 16)) { in malidp_verify_afbc_framebuffer_caps() 326 info = drm_get_format_info(dev, mode_cmd); in malidp_verify_afbc_framebuffer_size() 329 (mode_cmd->height / afbc_superblock_height); in malidp_verify_afbc_framebuffer_size() 339 if ((mode_cmd->width * bpp) != (mode_cmd->pitches[0] * BITS_PER_BYTE)) { in malidp_verify_afbc_framebuffer_size() 343 mode_cmd->width, bpp); in malidp_verify_afbc_framebuffer_size() 377 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_fb_create() argument 379 if (mode_cmd->modifier[0]) { in malidp_fb_create() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/i915/display/ |
A 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()
|
A D | intel_fb.c | 1878 struct drm_mode_fb_cmd2 *mode_cmd) in intel_framebuffer_init() argument 1918 mode_cmd->pixel_format, in intel_framebuffer_init() 1919 mode_cmd->modifier[0])) { in intel_framebuffer_init() 1922 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in intel_framebuffer_init() 1938 mode_cmd->modifier[0]); in intel_framebuffer_init() 1939 if (mode_cmd->pitches[0] > max_stride) { in intel_framebuffer_init() 1955 mode_cmd->pitches[0], stride); in intel_framebuffer_init() 1960 if (mode_cmd->offsets[0] != 0) { in intel_framebuffer_init() 1963 mode_cmd->offsets[0]); in intel_framebuffer_init() 1972 if (mode_cmd->handles[i] != mode_cmd->handles[0]) { in intel_framebuffer_init() [all …]
|
A D | intel_fbdev.c | 144 struct drm_mode_fb_cmd2 mode_cmd = {}; in intelfb_alloc() local 152 mode_cmd.width = sizes->surface_width; in intelfb_alloc() 153 mode_cmd.height = sizes->surface_height; in intelfb_alloc() 155 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * in intelfb_alloc() 157 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in intelfb_alloc() 160 size = mode_cmd.pitches[0] * mode_cmd.height; in intelfb_alloc() 184 fb = intel_framebuffer_create(obj, &mode_cmd); in intelfb_alloc()
|
/linux-6.3-rc2/drivers/gpu/drm/virtio/ |
A 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-6.3-rc2/drivers/gpu/drm/vmwgfx/ |
A D | vmwgfx_kms.c | 1303 *mode_cmd, in vmw_kms_new_framebuffer_surface() 1325 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in vmw_kms_new_framebuffer_surface() 1636 *mode_cmd) in vmw_kms_new_framebuffer_bo() 1644 requested_size = mode_cmd->height * mode_cmd->pitches[0]; in vmw_kms_new_framebuffer_bo() 1656 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in vmw_kms_new_framebuffer_bo() 1735 if (vmw_kms_srf_ok(dev_priv, mode_cmd->width, mode_cmd->height) && in vmw_kms_new_framebuffer() 1750 mode_cmd, in vmw_kms_new_framebuffer() 1760 mode_cmd); in vmw_kms_new_framebuffer() 1794 mode_cmd->handles[0], mode_cmd->handles[0]); in vmw_kms_fb_create() 1800 !vmw_kms_srf_ok(dev_priv, mode_cmd->width, mode_cmd->height)) { in vmw_kms_fb_create() [all …]
|
/linux-6.3-rc2/drivers/gpu/drm/rcar-du/ |
A D | rcar_du_kms.c | 427 const struct drm_mode_fb_cmd2 *mode_cmd) in rcar_du_fb_create() argument 436 format = rcar_du_format_info(mode_cmd->pixel_format); in rcar_du_fb_create() 439 &mode_cmd->pixel_format); in rcar_du_fb_create() 467 if (mode_cmd->pitches[0] & (align - 1) || in rcar_du_fb_create() 468 mode_cmd->pitches[0] > max_pitch) { in rcar_du_fb_create() 470 mode_cmd->pitches[0]); in rcar_du_fb_create() 479 chroma_pitch = mode_cmd->pitches[0] / format->hsub; in rcar_du_fb_create() 484 if (mode_cmd->pitches[i] != chroma_pitch) { in rcar_du_fb_create() 491 return drm_gem_fb_create(dev, file_priv, mode_cmd); in rcar_du_fb_create()
|
/linux-6.3-rc2/drivers/gpu/drm/tiny/ |
A 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()
|
/linux-6.3-rc2/drivers/gpu/drm/mxsfb/ |
A D | mxsfb_drv.c | 91 const struct drm_mode_fb_cmd2 *mode_cmd) in mxsfb_fb_create() argument 95 info = drm_get_format_info(dev, mode_cmd); in mxsfb_fb_create() 99 if (mode_cmd->width * info->cpp[0] != mode_cmd->pitches[0]) { in mxsfb_fb_create() 104 return drm_gem_fb_create(dev, file_priv, mode_cmd); in mxsfb_fb_create()
|
/linux-6.3-rc2/drivers/gpu/drm/amd/amdgpu/ |
A D | amdgpu_display.c | 85 const struct drm_mode_fb_cmd2 *mode_cmd, 1117 const struct drm_mode_fb_cmd2 *mode_cmd, in amdgpu_display_gem_fb_verify_and_init() argument 1123 drm_helper_mode_fill_fb_struct(dev, &rfb->base, mode_cmd); in amdgpu_display_gem_fb_verify_and_init() 1125 if (!drm_any_plane_has_format(dev, mode_cmd->pixel_format, in amdgpu_display_gem_fb_verify_and_init() 1126 mode_cmd->modifier[0])) { in amdgpu_display_gem_fb_verify_and_init() 1129 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in amdgpu_display_gem_fb_verify_and_init() 1153 const struct drm_mode_fb_cmd2 *mode_cmd, in amdgpu_display_framebuffer_init() argument 1164 if (mode_cmd->handles[i] != mode_cmd->handles[0]) { in amdgpu_display_framebuffer_init() 1166 i, mode_cmd->handles[0], mode_cmd->handles[i]); in amdgpu_display_framebuffer_init() 1209 const struct drm_mode_fb_cmd2 *mode_cmd) in amdgpu_display_user_framebuffer_create() argument [all …]
|