Home
last modified time | relevance | path

Searched refs:mode_cmd (Results 1 – 25 of 45) sorted by relevance

12

/drivers/gpu/drm/
Ddrm_gem_framebuffer_helper.c70 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 !drm_any_plane_has_format(dev, mode_cmd->pixel_format, in drm_gem_fb_init_with_funcs()
170 mode_cmd->modifier[0])) { in drm_gem_fb_init_with_funcs()
172 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in drm_gem_fb_init_with_funcs()
177 unsigned int width = mode_cmd->width / (i ? info->hsub : 1); in drm_gem_fb_init_with_funcs()
178 unsigned int height = mode_cmd->height / (i ? info->vsub : 1); in drm_gem_fb_init_with_funcs()
181 objs[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in drm_gem_fb_init_with_funcs()
[all …]
Ddrm_modeset_helper.c82 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()
/drivers/gpu/drm/msm/
Dmsm_fb.c33 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 …]
/drivers/gpu/drm/exynos/
Dexynos_drm_fb.c59 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()
Dexynos_drm_fbdev.c95 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()
117 exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1); in exynos_drm_fbdev_create()
/drivers/gpu/drm/renesas/shmobile/
Dshmob_drm_kms.c98 const struct drm_mode_fb_cmd2 *mode_cmd) in shmob_drm_fb_create() argument
102 format = shmob_drm_format_info(mode_cmd->pixel_format); in shmob_drm_fb_create()
105 &mode_cmd->pixel_format); in shmob_drm_fb_create()
109 if (mode_cmd->pitches[0] & 7 || mode_cmd->pitches[0] >= 65536) { in shmob_drm_fb_create()
111 mode_cmd->pitches[0]); in shmob_drm_fb_create()
118 if (mode_cmd->pitches[1] != mode_cmd->pitches[0] * chroma_cpp) { in shmob_drm_fb_create()
125 return drm_gem_fb_create(dev, file_priv, mode_cmd); in shmob_drm_fb_create()
/drivers/gpu/drm/omapdrm/
Domap_fb.c337 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 …]
Domap_fbdev.c137 struct drm_mode_fb_cmd2 mode_cmd = {0}; in omap_fbdev_create() local
149 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in omap_fbdev_create()
152 mode_cmd.width = sizes->surface_width; in omap_fbdev_create()
153 mode_cmd.height = sizes->surface_height; in omap_fbdev_create()
155 mode_cmd.pitches[0] = in omap_fbdev_create()
156 DIV_ROUND_UP(mode_cmd.width * sizes->surface_bpp, 8); in omap_fbdev_create()
161 mode_cmd.pitches[0] = PAGE_ALIGN(mode_cmd.pitches[0]); in omap_fbdev_create()
166 .bytes = PAGE_ALIGN(mode_cmd.pitches[0] * mode_cmd.height), in omap_fbdev_create()
176 fb = omap_framebuffer_init(dev, &mode_cmd, &bo); in omap_fbdev_create()
Domap_fb.h23 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);
/drivers/gpu/drm/radeon/
Dradeon_fbdev.c56 struct drm_mode_fb_cmd2 *mode_cmd, in radeon_fbdev_create_pinned_object() argument
67 int height = mode_cmd->height; in radeon_fbdev_create_pinned_object()
70 info = drm_get_format_info(rdev->ddev, mode_cmd); in radeon_fbdev_create_pinned_object()
74 mode_cmd->pitches[0] = radeon_align_pitch(rdev, mode_cmd->width, cpp, in radeon_fbdev_create_pinned_object()
78 height = ALIGN(mode_cmd->height, 8); in radeon_fbdev_create_pinned_object()
79 size = mode_cmd->pitches[0] * height; in radeon_fbdev_create_pinned_object()
109 mode_cmd->pitches[0]); in radeon_fbdev_create_pinned_object()
209 struct drm_mode_fb_cmd2 mode_cmd = { }; in radeon_fbdev_fb_helper_fb_probe() local
217 mode_cmd.width = sizes->surface_width; in radeon_fbdev_fb_helper_fb_probe()
218 mode_cmd.height = sizes->surface_height; in radeon_fbdev_fb_helper_fb_probe()
[all …]
/drivers/gpu/drm/nouveau/
Dnouveau_display.c295 const struct drm_mode_fb_cmd2 *mode_cmd, in nouveau_framebuffer_new() argument
311 (mode_cmd->pixel_format == DRM_FORMAT_YUYV || in nouveau_framebuffer_new()
312 mode_cmd->pixel_format == DRM_FORMAT_UYVY || in nouveau_framebuffer_new()
313 mode_cmd->pixel_format == DRM_FORMAT_NV12 || in nouveau_framebuffer_new()
314 mode_cmd->pixel_format == DRM_FORMAT_NV21) && in nouveau_framebuffer_new()
315 (mode_cmd->pitches[0] & 0x3f || /* align 64 */ in nouveau_framebuffer_new()
316 mode_cmd->pitches[0] >= 0x10000 || /* at most 64k pitch */ in nouveau_framebuffer_new()
317 (mode_cmd->pitches[1] && /* pitches for planes must match */ in nouveau_framebuffer_new()
318 mode_cmd->pitches[0] != mode_cmd->pitches[1]))) { in nouveau_framebuffer_new()
320 &mode_cmd->pixel_format, in nouveau_framebuffer_new()
[all …]
/drivers/gpu/drm/arm/display/komeda/
Dkomeda_framebuffer.c41 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 …]
/drivers/gpu/drm/arm/
Dmalidp_drv.c279 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_verify_afbc_framebuffer_caps() argument
281 if (malidp_format_mod_supported(dev, mode_cmd->pixel_format, in malidp_verify_afbc_framebuffer_caps()
282 mode_cmd->modifier[0]) == false) in malidp_verify_afbc_framebuffer_caps()
285 if (mode_cmd->offsets[0] != 0) { in malidp_verify_afbc_framebuffer_caps()
290 switch (mode_cmd->modifier[0] & AFBC_SIZE_MASK) { in malidp_verify_afbc_framebuffer_caps()
292 if ((mode_cmd->width % 16) || (mode_cmd->height % 16)) { in malidp_verify_afbc_framebuffer_caps()
308 const struct drm_mode_fb_cmd2 *mode_cmd) in malidp_verify_afbc_framebuffer_size() argument
317 switch (mode_cmd->modifier[0] & AFBC_SIZE_MASK) { in malidp_verify_afbc_framebuffer_size()
327 info = drm_get_format_info(dev, mode_cmd); in malidp_verify_afbc_framebuffer_size()
329 n_superblocks = (mode_cmd->width / afbc_superblock_width) * in malidp_verify_afbc_framebuffer_size()
[all …]
/drivers/gpu/drm/rockchip/
Drockchip_drm_fb.c33 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()
/drivers/gpu/drm/gma500/
Dframebuffer.c32 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_init() argument
42 info = drm_get_format_info(dev, mode_cmd); in psb_framebuffer_init()
46 if (mode_cmd->pitches[0] & 63) in psb_framebuffer_init()
49 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in psb_framebuffer_init()
71 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_create() argument
81 ret = psb_framebuffer_init(dev, fb, mode_cmd, obj); in psb_framebuffer_create()
Dfbdev.c158 struct drm_mode_fb_cmd2 mode_cmd = { }; in psb_fbdev_fb_probe() local
189 mode_cmd.width = sizes->surface_width; in psb_fbdev_fb_probe()
190 mode_cmd.height = sizes->surface_height; in psb_fbdev_fb_probe()
191 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * DIV_ROUND_UP(bpp, 8), 64); in psb_fbdev_fb_probe()
192 mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth); in psb_fbdev_fb_probe()
194 size = mode_cmd.pitches[0] * mode_cmd.height; in psb_fbdev_fb_probe()
203 fb = psb_framebuffer_create(dev, &mode_cmd, obj); in psb_fbdev_fb_probe()
/drivers/gpu/drm/i915/display/
Dintel_plane_initial.c168 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in intel_alloc_initial_plane_obj() local
189 mode_cmd.pixel_format = fb->format->format; in intel_alloc_initial_plane_obj()
190 mode_cmd.width = fb->width; in intel_alloc_initial_plane_obj()
191 mode_cmd.height = fb->height; in intel_alloc_initial_plane_obj()
192 mode_cmd.pitches[0] = fb->pitches[0]; in intel_alloc_initial_plane_obj()
193 mode_cmd.modifier[0] = fb->modifier; in intel_alloc_initial_plane_obj()
194 mode_cmd.flags = DRM_MODE_FB_MODIFIERS; in intel_alloc_initial_plane_obj()
197 vma->obj, &mode_cmd)) { in intel_alloc_initial_plane_obj()
Dintel_fb.c1934 struct drm_mode_fb_cmd2 *mode_cmd) in intel_framebuffer_init() argument
1952 if (mode_cmd->flags & DRM_MODE_FB_MODIFIERS) { in intel_framebuffer_init()
1958 tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { in intel_framebuffer_init()
1965 mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED; in intel_framebuffer_init()
1974 mode_cmd->pixel_format, in intel_framebuffer_init()
1975 mode_cmd->modifier[0])) { in intel_framebuffer_init()
1978 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in intel_framebuffer_init()
1987 tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { in intel_framebuffer_init()
1993 max_stride = intel_fb_max_stride(dev_priv, mode_cmd->pixel_format, in intel_framebuffer_init()
1994 mode_cmd->modifier[0]); in intel_framebuffer_init()
[all …]
Dintel_fbdev.c156 struct drm_mode_fb_cmd2 mode_cmd = {}; in intelfb_alloc() local
164 mode_cmd.width = sizes->surface_width; in intelfb_alloc()
165 mode_cmd.height = sizes->surface_height; in intelfb_alloc()
167 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * in intelfb_alloc()
169 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in intelfb_alloc()
172 size = mode_cmd.pitches[0] * mode_cmd.height; in intelfb_alloc()
199 fb = intel_framebuffer_create(obj, &mode_cmd); in intelfb_alloc()
/drivers/gpu/drm/vmwgfx/
Dvmwgfx_kms.c1287 *mode_cmd, in vmw_kms_new_framebuffer_surface()
1305 mode_cmd->pixel_format, in vmw_kms_new_framebuffer_surface()
1306 mode_cmd->modifier[0])) { in vmw_kms_new_framebuffer_surface()
1309 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in vmw_kms_new_framebuffer_surface()
1319 surface->metadata.base_size.width < mode_cmd->width || in vmw_kms_new_framebuffer_surface()
1320 surface->metadata.base_size.height < mode_cmd->height || in vmw_kms_new_framebuffer_surface()
1327 switch (mode_cmd->pixel_format) { in vmw_kms_new_framebuffer_surface()
1342 &mode_cmd->pixel_format); in vmw_kms_new_framebuffer_surface()
1361 drm_helper_mode_fill_fb_struct(dev, &vfbs->base.base, mode_cmd); in vmw_kms_new_framebuffer_surface()
1363 vfbs->base.user_handle = mode_cmd->handles[0]; in vmw_kms_new_framebuffer_surface()
[all …]
/drivers/gpu/drm/renesas/rcar-du/
Drcar_du_kms.c429 const struct drm_mode_fb_cmd2 *mode_cmd) in rcar_du_fb_create() argument
438 format = rcar_du_format_info(mode_cmd->pixel_format); in rcar_du_fb_create()
441 &mode_cmd->pixel_format); in rcar_du_fb_create()
469 if (mode_cmd->pitches[0] & (align - 1) || in rcar_du_fb_create()
470 mode_cmd->pitches[0] > max_pitch) { in rcar_du_fb_create()
472 mode_cmd->pitches[0]); in rcar_du_fb_create()
481 chroma_pitch = mode_cmd->pitches[0] / format->hsub; in rcar_du_fb_create()
486 if (mode_cmd->pitches[i] != chroma_pitch) { in rcar_du_fb_create()
493 return drm_gem_fb_create(dev, file_priv, mode_cmd); in rcar_du_fb_create()
/drivers/gpu/drm/virtio/
Dvirtgpu_display.c69 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
305 obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]); in virtio_gpu_user_framebuffer_create()
315 ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj); in virtio_gpu_user_framebuffer_create()
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_display.c87 const struct drm_mode_fb_cmd2 *mode_cmd,
1137 const struct drm_mode_fb_cmd2 *mode_cmd, in amdgpu_display_gem_fb_verify_and_init() argument
1143 drm_helper_mode_fill_fb_struct(dev, &rfb->base, mode_cmd); in amdgpu_display_gem_fb_verify_and_init()
1145 if (!drm_any_plane_has_format(dev, mode_cmd->pixel_format, in amdgpu_display_gem_fb_verify_and_init()
1146 mode_cmd->modifier[0])) { in amdgpu_display_gem_fb_verify_and_init()
1149 &mode_cmd->pixel_format, mode_cmd->modifier[0]); in amdgpu_display_gem_fb_verify_and_init()
1155 ret = amdgpu_display_framebuffer_init(dev, rfb, mode_cmd, obj); in amdgpu_display_gem_fb_verify_and_init()
1177 const struct drm_mode_fb_cmd2 *mode_cmd, in amdgpu_display_framebuffer_init() argument
1188 if (mode_cmd->handles[i] != mode_cmd->handles[0]) { in amdgpu_display_framebuffer_init()
1190 i, mode_cmd->handles[0], mode_cmd->handles[i]); in amdgpu_display_framebuffer_init()
[all …]
/drivers/gpu/drm/mxsfb/
Dmxsfb_drv.c91 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()
/drivers/gpu/drm/vc4/
Dvc4_kms.c459 const struct drm_mode_fb_cmd2 *mode_cmd) in vc4_fb_create() argument
470 if (!(mode_cmd->flags & DRM_MODE_FB_MODIFIERS)) { in vc4_fb_create()
475 mode_cmd->handles[0]); in vc4_fb_create()
478 mode_cmd->handles[0]); in vc4_fb_create()
483 mode_cmd_local = *mode_cmd; in vc4_fb_create()
494 mode_cmd = &mode_cmd_local; in vc4_fb_create()
497 return drm_gem_fb_create(dev, file_priv, mode_cmd); in vc4_fb_create()

12