/Linux-v4.19/drivers/gpu/drm/ |
D | drm_gem_framebuffer_helper.c | 62 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_alloc() argument 73 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in drm_gem_fb_alloc() 148 const struct drm_mode_fb_cmd2 *mode_cmd, in drm_gem_fb_create_with_funcs() argument 156 info = drm_get_format_info(dev, mode_cmd); in drm_gem_fb_create_with_funcs() 161 unsigned int width = mode_cmd->width / (i ? info->hsub : 1); in drm_gem_fb_create_with_funcs() 162 unsigned int height = mode_cmd->height / (i ? info->vsub : 1); in drm_gem_fb_create_with_funcs() 165 objs[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in drm_gem_fb_create_with_funcs() 172 min_size = (height - 1) * mode_cmd->pitches[i] in drm_gem_fb_create_with_funcs() 174 + mode_cmd->offsets[i]; in drm_gem_fb_create_with_funcs() 183 fb = drm_gem_fb_alloc(dev, mode_cmd, objs, i, funcs); in drm_gem_fb_create_with_funcs() [all …]
|
D | drm_modeset_helper.c | 79 const struct drm_mode_fb_cmd2 *mode_cmd) in drm_helper_mode_fill_fb_struct() argument 84 fb->format = drm_get_format_info(dev, mode_cmd); in drm_helper_mode_fill_fb_struct() 85 fb->width = mode_cmd->width; in drm_helper_mode_fill_fb_struct() 86 fb->height = mode_cmd->height; in drm_helper_mode_fill_fb_struct() 88 fb->pitches[i] = mode_cmd->pitches[i]; in drm_helper_mode_fill_fb_struct() 89 fb->offsets[i] = mode_cmd->offsets[i]; in drm_helper_mode_fill_fb_struct() 91 fb->modifier = mode_cmd->modifier[0]; in drm_helper_mode_fill_fb_struct() 92 fb->flags = mode_cmd->flags; in drm_helper_mode_fill_fb_struct()
|
/Linux-v4.19/drivers/gpu/drm/msm/ |
D | msm_fb.c | 33 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos); 107 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd) in msm_framebuffer_create() argument 111 int ret, i, n = drm_format_num_planes(mode_cmd->pixel_format); in msm_framebuffer_create() 114 bos[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in msm_framebuffer_create() 121 fb = msm_framebuffer_init(dev, mode_cmd, bos); in msm_framebuffer_create() 136 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos) in msm_framebuffer_init() argument 147 dev, mode_cmd, mode_cmd->width, mode_cmd->height, in msm_framebuffer_init() 148 (char *)&mode_cmd->pixel_format); in msm_framebuffer_init() 150 n = drm_format_num_planes(mode_cmd->pixel_format); in msm_framebuffer_init() 151 hsub = drm_format_horz_chroma_subsampling(mode_cmd->pixel_format); in msm_framebuffer_init() [all …]
|
/Linux-v4.19/drivers/gpu/drm/rockchip/ |
D | rockchip_drm_fb.c | 45 rockchip_fb_alloc(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd, in rockchip_fb_alloc() argument 56 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in rockchip_fb_alloc() 75 const struct drm_mode_fb_cmd2 *mode_cmd) in rockchip_user_fb_create() argument 86 hsub = drm_format_horz_chroma_subsampling(mode_cmd->pixel_format); in rockchip_user_fb_create() 87 vsub = drm_format_vert_chroma_subsampling(mode_cmd->pixel_format); in rockchip_user_fb_create() 88 num_planes = min(drm_format_num_planes(mode_cmd->pixel_format), in rockchip_user_fb_create() 92 unsigned int width = mode_cmd->width / (i ? hsub : 1); in rockchip_user_fb_create() 93 unsigned int height = mode_cmd->height / (i ? vsub : 1); in rockchip_user_fb_create() 96 obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[i]); in rockchip_user_fb_create() 104 min_size = (height - 1) * mode_cmd->pitches[i] + in rockchip_user_fb_create() [all …]
|
D | rockchip_drm_fbdev.c | 51 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in rockchip_drm_fbdev_create() local 63 mode_cmd.width = sizes->surface_width; in rockchip_drm_fbdev_create() 64 mode_cmd.height = sizes->surface_height; in rockchip_drm_fbdev_create() 65 mode_cmd.pitches[0] = sizes->surface_width * bytes_per_pixel; in rockchip_drm_fbdev_create() 66 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in rockchip_drm_fbdev_create() 69 size = mode_cmd.pitches[0] * mode_cmd.height; in rockchip_drm_fbdev_create() 84 helper->fb = rockchip_drm_framebuffer_init(dev, &mode_cmd, in rockchip_drm_fbdev_create()
|
/Linux-v4.19/drivers/gpu/drm/qxl/ |
D | qxl_fb.c | 117 const struct drm_mode_fb_cmd2 *mode_cmd, in qxlfb_create_pinned_object() argument 125 int height = mode_cmd->height; in qxlfb_create_pinned_object() 127 size = mode_cmd->pitches[0] * height; in qxlfb_create_pinned_object() 144 qbo->surf.width = mode_cmd->width; in qxlfb_create_pinned_object() 145 qbo->surf.height = mode_cmd->height; in qxlfb_create_pinned_object() 146 qbo->surf.stride = mode_cmd->pitches[0]; in qxlfb_create_pinned_object() 221 struct drm_mode_fb_cmd2 mode_cmd; in qxlfb_create() local 230 mode_cmd.width = sizes->surface_width; in qxlfb_create() 231 mode_cmd.height = sizes->surface_height; in qxlfb_create() 233 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((bpp + 1) / 8), 64); in qxlfb_create() [all …]
|
/Linux-v4.19/drivers/gpu/drm/shmobile/ |
D | shmob_drm_kms.c | 97 const struct drm_mode_fb_cmd2 *mode_cmd) in shmob_drm_fb_create() argument 101 format = shmob_drm_format_info(mode_cmd->pixel_format); in shmob_drm_fb_create() 104 mode_cmd->pixel_format); in shmob_drm_fb_create() 108 if (mode_cmd->pitches[0] & 7 || mode_cmd->pitches[0] >= 65536) { in shmob_drm_fb_create() 110 mode_cmd->pitches[0]); in shmob_drm_fb_create() 117 if (mode_cmd->pitches[1] != mode_cmd->pitches[0] * chroma_cpp) { in shmob_drm_fb_create() 124 return drm_gem_fb_create(dev, file_priv, mode_cmd); in shmob_drm_fb_create()
|
/Linux-v4.19/drivers/gpu/drm/exynos/ |
D | exynos_drm_fb.c | 63 const struct drm_mode_fb_cmd2 *mode_cmd, in exynos_drm_framebuffer_init() argument 83 drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd); in exynos_drm_framebuffer_init() 100 const struct drm_mode_fb_cmd2 *mode_cmd) in exynos_user_fb_create() argument 102 const struct drm_format_info *info = drm_get_format_info(dev, mode_cmd); in exynos_user_fb_create() 109 unsigned int height = (i == 0) ? mode_cmd->height : in exynos_user_fb_create() 110 DIV_ROUND_UP(mode_cmd->height, info->vsub); in exynos_user_fb_create() 111 unsigned long size = height * mode_cmd->pitches[i] + in exynos_user_fb_create() 112 mode_cmd->offsets[i]; in exynos_user_fb_create() 115 mode_cmd->handles[i]); in exynos_user_fb_create() 129 fb = exynos_drm_framebuffer_init(dev, mode_cmd, exynos_gem, i); in exynos_user_fb_create()
|
D | exynos_drm_fbdev.c | 123 struct drm_mode_fb_cmd2 mode_cmd = { 0 }; in exynos_drm_fbdev_create() local 131 mode_cmd.width = sizes->surface_width; in exynos_drm_fbdev_create() 132 mode_cmd.height = sizes->surface_height; in exynos_drm_fbdev_create() 133 mode_cmd.pitches[0] = sizes->surface_width * (sizes->surface_bpp >> 3); in exynos_drm_fbdev_create() 134 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in exynos_drm_fbdev_create() 137 size = mode_cmd.pitches[0] * mode_cmd.height; in exynos_drm_fbdev_create() 157 exynos_drm_framebuffer_init(dev, &mode_cmd, &exynos_gem, 1); in exynos_drm_fbdev_create()
|
/Linux-v4.19/drivers/gpu/drm/bochs/ |
D | bochs_fbdev.c | 33 const struct drm_mode_fb_cmd2 *mode_cmd, in bochsfb_create_object() argument 41 size = mode_cmd->pitches[0] * mode_cmd->height; in bochsfb_create_object() 57 struct drm_mode_fb_cmd2 mode_cmd; in bochsfb_create() local 65 mode_cmd.width = sizes->surface_width; in bochsfb_create() 66 mode_cmd.height = sizes->surface_height; in bochsfb_create() 67 mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7) / 8); in bochsfb_create() 68 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in bochsfb_create() 70 size = mode_cmd.pitches[0] * mode_cmd.height; in bochsfb_create() 73 ret = bochsfb_create_object(bochs, &mode_cmd, &gobj); in bochsfb_create() 109 ret = bochs_framebuffer_init(bochs->dev, &bochs->fb.gfb, &mode_cmd, gobj); in bochsfb_create()
|
D | bochs_mm.c | 478 const struct drm_mode_fb_cmd2 *mode_cmd, in bochs_framebuffer_init() argument 483 drm_helper_mode_fill_fb_struct(dev, &gfb->base, mode_cmd); in bochs_framebuffer_init() 496 const struct drm_mode_fb_cmd2 *mode_cmd) in bochs_user_framebuffer_create() argument 503 mode_cmd->width, mode_cmd->height, in bochs_user_framebuffer_create() 504 (mode_cmd->pixel_format) & 0xff, in bochs_user_framebuffer_create() 505 (mode_cmd->pixel_format >> 8) & 0xff, in bochs_user_framebuffer_create() 506 (mode_cmd->pixel_format >> 16) & 0xff, in bochs_user_framebuffer_create() 507 (mode_cmd->pixel_format >> 24) & 0xff); in bochs_user_framebuffer_create() 509 if (mode_cmd->pixel_format != DRM_FORMAT_XRGB8888) in bochs_user_framebuffer_create() 512 obj = drm_gem_object_lookup(filp, mode_cmd->handles[0]); in bochs_user_framebuffer_create() [all …]
|
/Linux-v4.19/drivers/gpu/drm/cirrus/ |
D | cirrus_fbdev.c | 136 const struct drm_mode_fb_cmd2 *mode_cmd, in cirrusfb_create_object() argument 146 bpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0) * 8; in cirrusfb_create_object() 148 if (!cirrus_check_framebuffer(cdev, mode_cmd->width, mode_cmd->height, in cirrusfb_create_object() 149 bpp, mode_cmd->pitches[0])) in cirrusfb_create_object() 152 size = mode_cmd->pitches[0] * mode_cmd->height; in cirrusfb_create_object() 169 struct drm_mode_fb_cmd2 mode_cmd; in cirrusfb_create() local 175 mode_cmd.width = sizes->surface_width; in cirrusfb_create() 176 mode_cmd.height = sizes->surface_height; in cirrusfb_create() 177 mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7) / 8); in cirrusfb_create() 178 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in cirrusfb_create() [all …]
|
D | cirrus_main.c | 24 const struct drm_mode_fb_cmd2 *mode_cmd, in cirrus_framebuffer_init() argument 29 drm_helper_mode_fill_fb_struct(dev, gfb, mode_cmd); in cirrus_framebuffer_init() 42 const struct drm_mode_fb_cmd2 *mode_cmd) in cirrus_user_framebuffer_create() argument 50 bpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0) * 8; in cirrus_user_framebuffer_create() 52 if (!cirrus_check_framebuffer(cdev, mode_cmd->width, mode_cmd->height, in cirrus_user_framebuffer_create() 53 bpp, mode_cmd->pitches[0])) in cirrus_user_framebuffer_create() 56 obj = drm_gem_object_lookup(filp, mode_cmd->handles[0]); in cirrus_user_framebuffer_create() 66 ret = cirrus_framebuffer_init(dev, fb, mode_cmd, obj); in cirrus_user_framebuffer_create()
|
/Linux-v4.19/drivers/gpu/drm/hisilicon/hibmc/ |
D | hibmc_drm_fbdev.c | 27 const struct drm_mode_fb_cmd2 *mode_cmd, in hibmcfb_create_object() argument 35 size = mode_cmd->pitches[0] * mode_cmd->height; in hibmcfb_create_object() 63 struct drm_mode_fb_cmd2 mode_cmd; in hibmc_drm_fb_create() local 78 mode_cmd.width = sizes->surface_width; in hibmc_drm_fb_create() 79 mode_cmd.height = sizes->surface_height; in hibmc_drm_fb_create() 80 mode_cmd.pitches[0] = mode_cmd.width * bytes_per_pixel; in hibmc_drm_fb_create() 81 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in hibmc_drm_fb_create() 84 size = PAGE_ALIGN(mode_cmd.pitches[0] * mode_cmd.height); in hibmc_drm_fb_create() 86 ret = hibmcfb_create_object(priv, &mode_cmd, &gobj); in hibmc_drm_fb_create() 122 hi_fbdev->fb = hibmc_framebuffer_init(priv->dev, &mode_cmd, gobj); in hibmc_drm_fb_create()
|
D | hibmc_ttm.c | 489 const struct drm_mode_fb_cmd2 *mode_cmd, in hibmc_framebuffer_init() argument 501 drm_helper_mode_fill_fb_struct(dev, &hibmc_fb->fb, mode_cmd); in hibmc_framebuffer_init() 516 const struct drm_mode_fb_cmd2 *mode_cmd) in hibmc_user_framebuffer_create() argument 522 mode_cmd->width, mode_cmd->height, in hibmc_user_framebuffer_create() 523 (mode_cmd->pixel_format) & 0xff, in hibmc_user_framebuffer_create() 524 (mode_cmd->pixel_format >> 8) & 0xff, in hibmc_user_framebuffer_create() 525 (mode_cmd->pixel_format >> 16) & 0xff, in hibmc_user_framebuffer_create() 526 (mode_cmd->pixel_format >> 24) & 0xff); in hibmc_user_framebuffer_create() 528 obj = drm_gem_object_lookup(filp, mode_cmd->handles[0]); in hibmc_user_framebuffer_create() 532 hibmc_fb = hibmc_framebuffer_init(dev, mode_cmd, obj); in hibmc_user_framebuffer_create()
|
/Linux-v4.19/drivers/gpu/drm/omapdrm/ |
D | omap_fb.c | 299 struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd) in omap_framebuffer_create() argument 301 unsigned int num_planes = drm_format_num_planes(mode_cmd->pixel_format); in omap_framebuffer_create() 307 bos[i] = drm_gem_object_lookup(file, mode_cmd->handles[i]); in omap_framebuffer_create() 314 fb = omap_framebuffer_init(dev, mode_cmd, bos); in omap_framebuffer_create() 328 const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos) in omap_framebuffer_init() argument 333 unsigned int pitch = mode_cmd->pitches[0]; in omap_framebuffer_init() 337 dev, mode_cmd, mode_cmd->width, mode_cmd->height, in omap_framebuffer_init() 338 (char *)&mode_cmd->pixel_format); in omap_framebuffer_init() 340 format = drm_format_info(mode_cmd->pixel_format); in omap_framebuffer_init() 343 if (formats[i] == mode_cmd->pixel_format) in omap_framebuffer_init() [all …]
|
D | omap_fbdev.c | 109 struct drm_mode_fb_cmd2 mode_cmd = {0}; in omap_fbdev_create() local 120 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in omap_fbdev_create() 123 mode_cmd.width = sizes->surface_width; in omap_fbdev_create() 124 mode_cmd.height = sizes->surface_height; in omap_fbdev_create() 126 mode_cmd.pitches[0] = in omap_fbdev_create() 127 DIV_ROUND_UP(mode_cmd.width * sizes->surface_bpp, 8); in omap_fbdev_create() 132 mode_cmd.pitches[0] = PAGE_ALIGN(mode_cmd.pitches[0]); in omap_fbdev_create() 137 .bytes = PAGE_ALIGN(mode_cmd.pitches[0] * mode_cmd.height), in omap_fbdev_create() 147 fb = omap_framebuffer_init(dev, &mode_cmd, &fbdev->bo); in omap_fbdev_create()
|
/Linux-v4.19/drivers/staging/vboxvideo/ |
D | vbox_fb.c | 70 struct DRM_MODE_FB_CMD *mode_cmd, in vboxfb_create_object() argument 76 u32 pitch = mode_cmd->pitches[0]; in vboxfb_create_object() 79 size = pitch * mode_cmd->height; in vboxfb_create_object() 95 struct DRM_MODE_FB_CMD mode_cmd; in vboxfb_create() local 103 mode_cmd.width = sizes->surface_width; in vboxfb_create() 104 mode_cmd.height = sizes->surface_height; in vboxfb_create() 105 pitch = mode_cmd.width * ((sizes->surface_bpp + 7) / 8); in vboxfb_create() 106 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in vboxfb_create() 108 mode_cmd.pitches[0] = pitch; in vboxfb_create() 110 size = pitch * mode_cmd.height; in vboxfb_create() [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_fb.c | 122 struct drm_mode_fb_cmd2 *mode_cmd, in amdgpufb_create_pinned_object() argument 132 int height = mode_cmd->height; in amdgpufb_create_pinned_object() 135 cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0); in amdgpufb_create_pinned_object() 138 mode_cmd->pitches[0] = amdgpu_align_pitch(adev, mode_cmd->width, cpp, in amdgpufb_create_pinned_object() 142 height = ALIGN(mode_cmd->height, 8); in amdgpufb_create_pinned_object() 143 size = mode_cmd->pitches[0] * height; in amdgpufb_create_pinned_object() 205 struct drm_mode_fb_cmd2 mode_cmd; in amdgpufb_create() local 211 mode_cmd.width = sizes->surface_width; in amdgpufb_create() 212 mode_cmd.height = sizes->surface_height; in amdgpufb_create() 217 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in amdgpufb_create() [all …]
|
/Linux-v4.19/drivers/gpu/drm/mgag200/ |
D | mgag200_fb.c | 139 const struct drm_mode_fb_cmd2 *mode_cmd, in mgag200fb_create_object() argument 147 size = mode_cmd->pitches[0] * mode_cmd->height; in mgag200fb_create_object() 162 struct drm_mode_fb_cmd2 mode_cmd; in mgag200fb_create() local 171 mode_cmd.width = sizes->surface_width; in mgag200fb_create() 172 mode_cmd.height = sizes->surface_height; in mgag200fb_create() 173 mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7) / 8); in mgag200fb_create() 175 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in mgag200fb_create() 177 size = mode_cmd.pitches[0] * mode_cmd.height; in mgag200fb_create() 179 ret = mgag200fb_create_object(mfbdev, &mode_cmd, &gobj); in mgag200fb_create() 199 ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj); in mgag200fb_create()
|
/Linux-v4.19/drivers/gpu/drm/ast/ |
D | ast_fb.c | 165 const struct drm_mode_fb_cmd2 *mode_cmd, in astfb_create_object() argument 173 size = mode_cmd->pitches[0] * mode_cmd->height; in astfb_create_object() 188 struct drm_mode_fb_cmd2 mode_cmd; in astfb_create() local 195 mode_cmd.width = sizes->surface_width; in astfb_create() 196 mode_cmd.height = sizes->surface_height; in astfb_create() 197 mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7)/8); in astfb_create() 199 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in astfb_create() 202 size = mode_cmd.pitches[0] * mode_cmd.height; in astfb_create() 204 ret = astfb_create_object(afbdev, &mode_cmd, &gobj); in astfb_create() 222 ret = ast_framebuffer_init(dev, &afbdev->afb, &mode_cmd, gobj); in astfb_create()
|
/Linux-v4.19/drivers/gpu/drm/radeon/ |
D | radeon_fb.c | 125 struct drm_mode_fb_cmd2 *mode_cmd, in radeonfb_create_pinned_object() argument 135 int height = mode_cmd->height; in radeonfb_create_pinned_object() 138 cpp = drm_format_plane_cpp(mode_cmd->pixel_format, 0); in radeonfb_create_pinned_object() 141 mode_cmd->pitches[0] = radeon_align_pitch(rdev, mode_cmd->width, cpp, in radeonfb_create_pinned_object() 145 height = ALIGN(mode_cmd->height, 8); in radeonfb_create_pinned_object() 146 size = mode_cmd->pitches[0] * height; in radeonfb_create_pinned_object() 175 mode_cmd->pitches[0]); in radeonfb_create_pinned_object() 216 struct drm_mode_fb_cmd2 mode_cmd; in radeonfb_create() local 222 mode_cmd.width = sizes->surface_width; in radeonfb_create() 223 mode_cmd.height = sizes->surface_height; in radeonfb_create() [all …]
|
/Linux-v4.19/drivers/gpu/drm/udl/ |
D | udl_fb.c | 342 const struct drm_mode_fb_cmd2 *mode_cmd, in udl_framebuffer_init() argument 348 drm_helper_mode_fill_fb_struct(dev, &ufb->base, mode_cmd); in udl_framebuffer_init() 362 struct drm_mode_fb_cmd2 mode_cmd; in udlfb_create() local 370 mode_cmd.width = sizes->surface_width; in udlfb_create() 371 mode_cmd.height = sizes->surface_height; in udlfb_create() 372 mode_cmd.pitches[0] = mode_cmd.width * ((sizes->surface_bpp + 7) / 8); in udlfb_create() 374 mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, in udlfb_create() 377 size = mode_cmd.pitches[0] * mode_cmd.height; in udlfb_create() 397 ret = udl_framebuffer_init(dev, &ufbdev->ufb, &mode_cmd, obj); in udlfb_create() 506 const struct drm_mode_fb_cmd2 *mode_cmd) in udl_fb_user_fb_create() argument [all …]
|
/Linux-v4.19/drivers/gpu/drm/gma500/ |
D | framebuffer.c | 225 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_init() argument 235 info = drm_format_info(mode_cmd->pixel_format); in psb_framebuffer_init() 239 if (mode_cmd->pitches[0] & 63) in psb_framebuffer_init() 242 drm_helper_mode_fill_fb_struct(dev, &fb->base, mode_cmd); in psb_framebuffer_init() 266 const struct drm_mode_fb_cmd2 *mode_cmd, in psb_framebuffer_create() argument 276 ret = psb_framebuffer_init(dev, fb, mode_cmd, gt); in psb_framebuffer_create() 323 struct drm_mode_fb_cmd2 mode_cmd; in psbfb_create() local 331 mode_cmd.width = sizes->surface_width; in psbfb_create() 332 mode_cmd.height = sizes->surface_height; in psbfb_create() 346 mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((bpp + 7) / 8), 4096 >> pitch_lines); in psbfb_create() [all …]
|
/Linux-v4.19/drivers/gpu/drm/virtio/ |
D | virtgpu_fb.c | 228 struct drm_mode_fb_cmd2 mode_cmd = {}; in virtio_gpufb_create() local 233 mode_cmd.width = sizes->surface_width; in virtio_gpufb_create() 234 mode_cmd.height = sizes->surface_height; in virtio_gpufb_create() 235 mode_cmd.pitches[0] = mode_cmd.width * 4; in virtio_gpufb_create() 236 mode_cmd.pixel_format = drm_mode_legacy_fb_format(32, 24); in virtio_gpufb_create() 238 format = virtio_gpu_translate_format(mode_cmd.pixel_format); in virtio_gpufb_create() 242 size = mode_cmd.pitches[0] * mode_cmd.height; in virtio_gpufb_create() 249 mode_cmd.width, mode_cmd.height); in virtio_gpufb_create() 271 &mode_cmd, &obj->gem_base); in virtio_gpufb_create()
|