Home
last modified time | relevance | path

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

123

/linux/drivers/gpu/drm/
H A 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 …]
H A 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()
/linux/drivers/gpu/drm/msm/
H A 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 &mode_cmd->pixel_format); in msm_framebuffer_init()
184 format = mdp_get_format(kms, mode_cmd->pixel_format, in msm_framebuffer_init()
[all …]
/linux/drivers/gpu/drm/i915/display/
H A Dintel_fb_bo.c21 struct drm_mode_fb_cmd2 *mode_cmd) in intel_fb_bo_framebuffer_init() argument
31 if (mode_cmd->flags & DRM_MODE_FB_MODIFIERS) { in intel_fb_bo_framebuffer_init()
37 tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { in intel_fb_bo_framebuffer_init()
44 mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED; in intel_fb_bo_framebuffer_init()
57 tiling != intel_fb_modifier_to_tiling(mode_cmd->modifier[0])) { in intel_fb_bo_framebuffer_init()
67 if (tiling != I915_TILING_NONE && mode_cmd->pitches[0] != stride) { in intel_fb_bo_framebuffer_init()
70 mode_cmd->pitches[0], stride); in intel_fb_bo_framebuffer_init()
80 const struct drm_mode_fb_cmd2 *mode_cmd) in intel_fb_bo_lookup_valid_bo() argument
84 obj = i915_gem_object_lookup(filp, mode_cmd->handles[0]); in intel_fb_bo_lookup_valid_bo()
H A Dintel_fbdev_fb.c20 struct drm_mode_fb_cmd2 mode_cmd = {}; in intel_fbdev_fb_alloc() local
28 mode_cmd.width = sizes->surface_width; in intel_fbdev_fb_alloc()
29 mode_cmd.height = sizes->surface_height; in intel_fbdev_fb_alloc()
31 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * in intel_fbdev_fb_alloc()
33 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in intel_fbdev_fb_alloc()
36 size = mode_cmd.pitches[0] * mode_cmd.height; in intel_fbdev_fb_alloc()
63 fb = intel_framebuffer_create(obj, &mode_cmd); in intel_fbdev_fb_alloc()
H A Dintel_plane_initial.c276 struct drm_mode_fb_cmd2 mode_cmd = {}; in intel_alloc_initial_plane_obj() local
297 mode_cmd.pixel_format = fb->format->format; in intel_alloc_initial_plane_obj()
298 mode_cmd.width = fb->width; in intel_alloc_initial_plane_obj()
299 mode_cmd.height = fb->height; in intel_alloc_initial_plane_obj()
300 mode_cmd.pitches[0] = fb->pitches[0]; in intel_alloc_initial_plane_obj()
301 mode_cmd.modifier[0] = fb->modifier; in intel_alloc_initial_plane_obj()
302 mode_cmd.flags = DRM_MODE_FB_MODIFIERS; in intel_alloc_initial_plane_obj()
305 vma->obj, &mode_cmd)) { in intel_alloc_initial_plane_obj()
/linux/drivers/gpu/drm/exynos/
H A 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()
H A 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()
/linux/drivers/gpu/drm/xe/display/
H A Dintel_fbdev_fb.c22 struct drm_mode_fb_cmd2 mode_cmd = {}; in intel_fbdev_fb_alloc() local
30 mode_cmd.width = sizes->surface_width; in intel_fbdev_fb_alloc()
31 mode_cmd.height = sizes->surface_height; in intel_fbdev_fb_alloc()
33 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * in intel_fbdev_fb_alloc()
35 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in intel_fbdev_fb_alloc()
38 size = mode_cmd.pitches[0] * mode_cmd.height; in intel_fbdev_fb_alloc()
67 fb = intel_framebuffer_create(obj, &mode_cmd); in intel_fbdev_fb_alloc()
H A Dxe_plane_initial.c144 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in intel_alloc_initial_plane_obj() local
161 mode_cmd.pixel_format = fb->format->format; in intel_alloc_initial_plane_obj()
162 mode_cmd.width = fb->width; in intel_alloc_initial_plane_obj()
163 mode_cmd.height = fb->height; in intel_alloc_initial_plane_obj()
164 mode_cmd.pitches[0] = fb->pitches[0]; in intel_alloc_initial_plane_obj()
165 mode_cmd.modifier[0] = fb->modifier; in intel_alloc_initial_plane_obj()
166 mode_cmd.flags = DRM_MODE_FB_MODIFIERS; in intel_alloc_initial_plane_obj()
173 bo, &mode_cmd)) { in intel_alloc_initial_plane_obj()
H A Dintel_fb_bo.c27 struct drm_mode_fb_cmd2 *mode_cmd) in intel_fb_bo_framebuffer_init() argument
36 if (XE_IOCTL_DBG(xe, intel_fb_needs_64k_phys(mode_cmd->modifier[0]) && in intel_fb_bo_framebuffer_init()
70 const struct drm_mode_fb_cmd2 *mode_cmd) in intel_fb_bo_lookup_valid_bo() argument
73 struct drm_gem_object *gem = drm_gem_object_lookup(filp, mode_cmd->handles[0]); in intel_fb_bo_lookup_valid_bo()
H A Dintel_fb_bo.h18 struct drm_mode_fb_cmd2 *mode_cmd);
22 const struct drm_mode_fb_cmd2 *mode_cmd);
/linux/drivers/gpu/drm/omapdrm/
H A Domap_fb.c338 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd) in omap_framebuffer_create() argument
341 mode_cmd); in omap_framebuffer_create()
348 bos[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in omap_framebuffer_create()
355 fb = omap_framebuffer_init(dev, mode_cmd, bos); in omap_framebuffer_create()
369 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos) in omap_framebuffer_init() argument
374 unsigned int pitch = mode_cmd->pitches[0]; in omap_framebuffer_init()
378 dev, mode_cmd, mode_cmd->width, mode_cmd->height, in omap_framebuffer_init()
379 (char *)&mode_cmd->pixel_format); in omap_framebuffer_init()
381 format = drm_get_format_info(dev, mode_cmd); in omap_framebuffer_init()
384 if (formats[i] == mode_cmd->pixel_format) in omap_framebuffer_init()
[all …]
H A 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()
/linux/drivers/gpu/drm/radeon/
H A 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_to_drm(rdev), 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 …]
/linux/drivers/gpu/drm/renesas/shmobile/
H A Dshmob_drm_kms.c120 const struct drm_mode_fb_cmd2 *mode_cmd) in shmob_drm_fb_create() argument
124 format = shmob_drm_format_info(mode_cmd->pixel_format); in shmob_drm_fb_create()
127 &mode_cmd->pixel_format); in shmob_drm_fb_create()
131 if (mode_cmd->pitches[0] & 7 || mode_cmd->pitches[0] >= 65536) { in shmob_drm_fb_create()
133 mode_cmd->pitches[0]); in shmob_drm_fb_create()
140 if (mode_cmd->pitches[1] != mode_cmd->pitches[0] * chroma_cpp) { in shmob_drm_fb_create()
147 return drm_gem_fb_create(dev, file_priv, mode_cmd); in shmob_drm_fb_create()
/linux/drivers/gpu/drm/nouveau/
H A 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 …]
/linux/include/drm/
H A Ddrm_gem_framebuffer_helper.h27 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/drivers/gpu/drm/arm/display/komeda/
H A 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 …]
/linux/drivers/gpu/drm/rockchip/
H A 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()
/linux/drivers/gpu/drm/arm/
H A 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 …]
/linux/drivers/gpu/drm/gma500/
H A 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()
H A 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()
/linux/drivers/gpu/drm/virtio/
H A 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()
296 const struct drm_mode_fb_cmd2 *mode_cmd) in virtio_gpu_user_framebuffer_create() argument
302 if (mode_cmd->pixel_format != DRM_FORMAT_HOST_XRGB8888 && in virtio_gpu_user_framebuffer_create()
303 mode_cmd->pixel_format != DRM_FORMAT_HOST_ARGB8888) in virtio_gpu_user_framebuffer_create()
307 obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[0]); in virtio_gpu_user_framebuffer_create()
317 ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj); in virtio_gpu_user_framebuffer_create()
/linux/drivers/gpu/drm/renesas/rz-du/
H A Drzg2l_du_kms.c88 const struct drm_mode_fb_cmd2 *mode_cmd) in rzg2l_du_fb_create() argument
93 format = rzg2l_du_format_info(mode_cmd->pixel_format); in rzg2l_du_fb_create()
96 &mode_cmd->pixel_format); in rzg2l_du_fb_create()
105 if (mode_cmd->pitches[0] > max_pitch) { in rzg2l_du_fb_create()
107 mode_cmd->pitches[0]); in rzg2l_du_fb_create()
111 return drm_gem_fb_create(dev, file_priv, mode_cmd); in rzg2l_du_fb_create()

123