Lines Matching refs:mode_cmd
77 struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_cma_object **obj, in drm_fb_cma_alloc() argument
88 drm_helper_mode_fill_fb_struct(&fb_cma->fb, mode_cmd); in drm_fb_cma_alloc()
110 struct drm_file *file_priv, struct drm_mode_fb_cmd2 *mode_cmd) in drm_fb_cma_create() argument
120 hsub = drm_format_horz_chroma_subsampling(mode_cmd->pixel_format); in drm_fb_cma_create()
121 vsub = drm_format_vert_chroma_subsampling(mode_cmd->pixel_format); in drm_fb_cma_create()
123 for (i = 0; i < drm_format_num_planes(mode_cmd->pixel_format); i++) { in drm_fb_cma_create()
124 unsigned int width = mode_cmd->width / (i ? hsub : 1); in drm_fb_cma_create()
125 unsigned int height = mode_cmd->height / (i ? vsub : 1); in drm_fb_cma_create()
128 obj = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[i]); in drm_fb_cma_create()
135 min_size = (height - 1) * mode_cmd->pitches[i] in drm_fb_cma_create()
136 + width * drm_format_plane_cpp(mode_cmd->pixel_format, i) in drm_fb_cma_create()
137 + mode_cmd->offsets[i]; in drm_fb_cma_create()
147 fb_cma = drm_fb_cma_alloc(dev, mode_cmd, objs, i); in drm_fb_cma_create()
252 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in drm_fbdev_cma_create() local
268 mode_cmd.width = sizes->surface_width; in drm_fbdev_cma_create()
269 mode_cmd.height = sizes->surface_height; in drm_fbdev_cma_create()
270 mode_cmd.pitches[0] = sizes->surface_width * bytes_per_pixel; in drm_fbdev_cma_create()
271 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in drm_fbdev_cma_create()
274 size = mode_cmd.pitches[0] * mode_cmd.height; in drm_fbdev_cma_create()
286 fbdev_cma->fb = drm_fb_cma_alloc(dev, &mode_cmd, &obj, 1); in drm_fbdev_cma_create()