Lines Matching +full:mipi +full:- +full:to +full:- +full:edp
4 * Permission to use, copy, modify, distribute, and sell this software and its
9 * publicity pertaining to distribution of the software without specific,
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
44 * Frame buffers are abstract memory objects that provide a source of pixels to
45 * scanout to a CRTC. Applications explicitly request the creation of frame
47 * handle that can be passed to the KMS CRTC control, plane configuration and
52 * (or a list of memory handles for multi-planar formats) through the
55 * free to use their own backing storage object handles, e.g. vmwgfx directly
56 * exposes special TTM handles to userspace and so expects TTM handles in the
60 * using drm_framebuffer_init() - after calling that function userspace can use
62 * drm_helper_mode_fill_fb_struct() can be used to pre-fill the required
67 * them again with drm_framebuffer_put(). For driver-private framebuffers for
72 * recommended, and it's better to have a normal free-standing &struct
82 fb_width = fb->width << 16; in drm_framebuffer_check_src_coords()
83 fb_height = fb->height << 16; in drm_framebuffer_check_src_coords()
87 src_x > fb_width - src_w || in drm_framebuffer_check_src_coords()
89 src_y > fb_height - src_h) { in drm_framebuffer_check_src_coords()
90 drm_dbg_kms(fb->dev, "Invalid source coordinates " in drm_framebuffer_check_src_coords()
96 fb->width, fb->height); in drm_framebuffer_check_src_coords()
97 return -ENOSPC; in drm_framebuffer_check_src_coords()
104 * drm_mode_addfb - add an FB to the graphics configuration
106 * @or: pointer to request structure
109 * Add a new FB to the specified CRTC, given a user request. This is the
112 * Called by the user via ioctl, or by an in-kernel client.
124 return -EOPNOTSUPP; in drm_mode_addfb()
126 r.pixel_format = drm_driver_legacy_fb_format(dev, or->bpp, or->depth); in drm_mode_addfb()
128 drm_dbg_kms(dev, "bad {bpp:%d, depth:%d}\n", or->bpp, or->depth); in drm_mode_addfb()
129 return -EINVAL; in drm_mode_addfb()
132 /* convert to new format and call new ioctl */ in drm_mode_addfb()
133 r.fb_id = or->fb_id; in drm_mode_addfb()
134 r.width = or->width; in drm_mode_addfb()
135 r.height = or->height; in drm_mode_addfb()
136 r.pitches[0] = or->pitch; in drm_mode_addfb()
137 r.handles[0] = or->handle; in drm_mode_addfb()
143 or->fb_id = r.fb_id; in drm_mode_addfb()
161 if (!__drm_format_info(r->pixel_format)) { in framebuffer_check()
163 &r->pixel_format); in framebuffer_check()
164 return -EINVAL; in framebuffer_check()
167 if (r->width == 0) { in framebuffer_check()
168 drm_dbg_kms(dev, "bad framebuffer width %u\n", r->width); in framebuffer_check()
169 return -EINVAL; in framebuffer_check()
172 if (r->height == 0) { in framebuffer_check()
173 drm_dbg_kms(dev, "bad framebuffer height %u\n", r->height); in framebuffer_check()
174 return -EINVAL; in framebuffer_check()
180 for (i = 0; i < info->num_planes; i++) { in framebuffer_check()
181 unsigned int width = drm_format_info_plane_width(info, r->width, i); in framebuffer_check()
182 unsigned int height = drm_format_info_plane_height(info, r->height, i); in framebuffer_check()
183 unsigned int block_size = info->char_per_block[i]; in framebuffer_check()
186 if (!block_size && (r->modifier[i] == DRM_FORMAT_MOD_LINEAR)) { in framebuffer_check()
187 drm_dbg_kms(dev, "Format requires non-linear modifier for plane %d\n", i); in framebuffer_check()
188 return -EINVAL; in framebuffer_check()
191 if (!r->handles[i]) { in framebuffer_check()
193 return -EINVAL; in framebuffer_check()
197 return -ERANGE; in framebuffer_check()
199 if ((uint64_t) height * r->pitches[i] + r->offsets[i] > UINT_MAX) in framebuffer_check()
200 return -ERANGE; in framebuffer_check()
202 if (block_size && r->pitches[i] < min_pitch) { in framebuffer_check()
203 drm_dbg_kms(dev, "bad pitch %u for plane %d\n", r->pitches[i], i); in framebuffer_check()
204 return -EINVAL; in framebuffer_check()
207 if (r->modifier[i] && !(r->flags & DRM_MODE_FB_MODIFIERS)) { in framebuffer_check()
209 r->modifier[i], i); in framebuffer_check()
210 return -EINVAL; in framebuffer_check()
213 if (r->flags & DRM_MODE_FB_MODIFIERS && in framebuffer_check()
214 r->modifier[i] != r->modifier[0]) { in framebuffer_check()
216 r->modifier[i], i); in framebuffer_check()
217 return -EINVAL; in framebuffer_check()
221 switch (r->modifier[i]) { in framebuffer_check()
226 if (r->pixel_format != DRM_FORMAT_NV12 || in framebuffer_check()
228 r->pitches[i] % 128) { in framebuffer_check()
230 return -EINVAL; in framebuffer_check()
239 for (i = info->num_planes; i < 4; i++) { in framebuffer_check()
240 if (r->modifier[i]) { in framebuffer_check()
241 drm_dbg_kms(dev, "non-zero modifier for unused plane %d\n", i); in framebuffer_check()
242 return -EINVAL; in framebuffer_check()
245 /* Pre-FB_MODIFIERS userspace didn't clear the structs properly. */ in framebuffer_check()
246 if (!(r->flags & DRM_MODE_FB_MODIFIERS)) in framebuffer_check()
249 if (r->handles[i]) { in framebuffer_check()
251 return -EINVAL; in framebuffer_check()
254 if (r->pitches[i]) { in framebuffer_check()
255 drm_dbg_kms(dev, "non-zero pitch for unused plane %d\n", i); in framebuffer_check()
256 return -EINVAL; in framebuffer_check()
259 if (r->offsets[i]) { in framebuffer_check()
260 drm_dbg_kms(dev, "non-zero offset for unused plane %d\n", i); in framebuffer_check()
261 return -EINVAL; in framebuffer_check()
273 struct drm_mode_config *config = &dev->mode_config; in drm_internal_framebuffer_create()
277 if (r->flags & ~(DRM_MODE_FB_INTERLACED | DRM_MODE_FB_MODIFIERS)) { in drm_internal_framebuffer_create()
278 drm_dbg_kms(dev, "bad framebuffer flags 0x%08x\n", r->flags); in drm_internal_framebuffer_create()
279 return ERR_PTR(-EINVAL); in drm_internal_framebuffer_create()
282 if ((config->min_width > r->width) || (r->width > config->max_width)) { in drm_internal_framebuffer_create()
284 r->width, config->min_width, config->max_width); in drm_internal_framebuffer_create()
285 return ERR_PTR(-EINVAL); in drm_internal_framebuffer_create()
287 if ((config->min_height > r->height) || (r->height > config->max_height)) { in drm_internal_framebuffer_create()
289 r->height, config->min_height, config->max_height); in drm_internal_framebuffer_create()
290 return ERR_PTR(-EINVAL); in drm_internal_framebuffer_create()
293 if (r->flags & DRM_MODE_FB_MODIFIERS && in drm_internal_framebuffer_create()
294 dev->mode_config.fb_modifiers_not_supported) { in drm_internal_framebuffer_create()
296 return ERR_PTR(-EINVAL); in drm_internal_framebuffer_create()
303 fb = dev->mode_config.funcs->fb_create(dev, file_priv, r); in drm_internal_framebuffer_create()
314 * drm_mode_addfb2 - add an FB to the graphics configuration
319 * Add a new FB to the specified CRTC, given a user request with format. This is
320 * the 2nd version of the addfb ioctl, which supports multi-planar framebuffers
335 return -EOPNOTSUPP; in drm_mode_addfb2()
341 drm_dbg_kms(dev, "[FB:%d]\n", fb->base.id); in drm_mode_addfb2()
342 r->fb_id = fb->base.id; in drm_mode_addfb2()
344 /* Transfer ownership to the filp for reaping on close */ in drm_mode_addfb2()
345 mutex_lock(&file_priv->fbs_lock); in drm_mode_addfb2()
346 list_add(&fb->filp_head, &file_priv->fbs); in drm_mode_addfb2()
347 mutex_unlock(&file_priv->fbs_lock); in drm_mode_addfb2()
356 if (!dev->mode_config.quirk_addfb_prefer_host_byte_order) { in drm_mode_addfb2_ioctl()
359 * quirk_addfb_prefer_host_byte_order quirk to make in drm_mode_addfb2_ioctl()
366 * then. So block it to make userspace fallback to in drm_mode_addfb2_ioctl()
370 return -EOPNOTSUPP; in drm_mode_addfb2_ioctl()
385 while (!list_empty(&arg->fbs)) { in drm_mode_rmfb_work_fn()
387 list_first_entry(&arg->fbs, typeof(*fb), filp_head); in drm_mode_rmfb_work_fn()
389 drm_dbg_kms(fb->dev, in drm_mode_rmfb_work_fn()
390 "Removing [FB:%d] from all active usage due to RMFB ioctl\n", in drm_mode_rmfb_work_fn()
391 fb->base.id); in drm_mode_rmfb_work_fn()
392 list_del_init(&fb->filp_head); in drm_mode_rmfb_work_fn()
403 mutex_lock(&file_priv->fbs_lock); in drm_mode_closefb()
404 list_for_each_entry(fbl, &file_priv->fbs, filp_head) in drm_mode_closefb()
409 mutex_unlock(&file_priv->fbs_lock); in drm_mode_closefb()
410 return -ENOENT; in drm_mode_closefb()
413 list_del_init(&fb->filp_head); in drm_mode_closefb()
414 mutex_unlock(&file_priv->fbs_lock); in drm_mode_closefb()
423 * drm_mode_rmfb - remove an FB from the configuration
425 * @fb_id: id of framebuffer to remove
430 * Called by the user via ioctl, or by an in-kernel client.
442 return -EOPNOTSUPP; in drm_mode_rmfb()
446 return -ENOENT; in drm_mode_rmfb()
455 * drm_framebuffer_remove may fail with -EINTR on pending signals, in drm_mode_rmfb()
456 * so run this in a separate stack as there's no way to correctly in drm_mode_rmfb()
464 drm_WARN_ON(dev, !list_empty(&fb->filp_head)); in drm_mode_rmfb()
465 list_add_tail(&fb->filp_head, &arg.fbs); in drm_mode_rmfb()
492 return -EOPNOTSUPP; in drm_mode_closefb_ioctl()
494 if (r->pad) in drm_mode_closefb_ioctl()
495 return -EINVAL; in drm_mode_closefb_ioctl()
497 fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id); in drm_mode_closefb_ioctl()
499 return -ENOENT; in drm_mode_closefb_ioctl()
507 * drm_mode_getfb - get FB info
527 return -EOPNOTSUPP; in drm_mode_getfb()
529 fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id); in drm_mode_getfb()
531 return -ENOENT; in drm_mode_getfb()
533 /* Multi-planar framebuffers need getfb2. */ in drm_mode_getfb()
534 if (fb->format->num_planes > 1) { in drm_mode_getfb()
535 ret = -EINVAL; in drm_mode_getfb()
539 if (!fb->funcs->create_handle) { in drm_mode_getfb()
540 ret = -ENODEV; in drm_mode_getfb()
544 r->height = fb->height; in drm_mode_getfb()
545 r->width = fb->width; in drm_mode_getfb()
546 r->depth = fb->format->depth; in drm_mode_getfb()
547 r->bpp = drm_format_info_bpp(fb->format, 0); in drm_mode_getfb()
548 r->pitch = fb->pitches[0]; in drm_mode_getfb()
551 * buffer-handle to non-master processes! For in drm_mode_getfb()
552 * backwards-compatibility reasons, we cannot make GET_FB() privileged, in drm_mode_getfb()
553 * so just return an invalid handle for non-masters. in drm_mode_getfb()
556 r->handle = 0; in drm_mode_getfb()
561 ret = fb->funcs->create_handle(fb, file_priv, &r->handle); in drm_mode_getfb()
569 * drm_mode_getfb2_ioctl - get extended FB info
590 return -EINVAL; in drm_mode_getfb2_ioctl()
592 fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id); in drm_mode_getfb2_ioctl()
594 return -ENOENT; in drm_mode_getfb2_ioctl()
596 /* For multi-plane framebuffers, we require the driver to place the in drm_mode_getfb2_ioctl()
597 * GEM objects directly in the drm_framebuffer. For single-plane in drm_mode_getfb2_ioctl()
598 * framebuffers, we can fall back to create_handle. in drm_mode_getfb2_ioctl()
600 if (!fb->obj[0] && in drm_mode_getfb2_ioctl()
601 (fb->format->num_planes > 1 || !fb->funcs->create_handle)) { in drm_mode_getfb2_ioctl()
602 ret = -ENODEV; in drm_mode_getfb2_ioctl()
606 r->height = fb->height; in drm_mode_getfb2_ioctl()
607 r->width = fb->width; in drm_mode_getfb2_ioctl()
608 r->pixel_format = fb->format->format; in drm_mode_getfb2_ioctl()
610 r->flags = 0; in drm_mode_getfb2_ioctl()
611 if (!dev->mode_config.fb_modifiers_not_supported) in drm_mode_getfb2_ioctl()
612 r->flags |= DRM_MODE_FB_MODIFIERS; in drm_mode_getfb2_ioctl()
614 for (i = 0; i < ARRAY_SIZE(r->handles); i++) { in drm_mode_getfb2_ioctl()
615 r->handles[i] = 0; in drm_mode_getfb2_ioctl()
616 r->pitches[i] = 0; in drm_mode_getfb2_ioctl()
617 r->offsets[i] = 0; in drm_mode_getfb2_ioctl()
618 r->modifier[i] = 0; in drm_mode_getfb2_ioctl()
621 for (i = 0; i < fb->format->num_planes; i++) { in drm_mode_getfb2_ioctl()
622 r->pitches[i] = fb->pitches[i]; in drm_mode_getfb2_ioctl()
623 r->offsets[i] = fb->offsets[i]; in drm_mode_getfb2_ioctl()
624 if (!dev->mode_config.fb_modifiers_not_supported) in drm_mode_getfb2_ioctl()
625 r->modifier[i] = fb->modifier; in drm_mode_getfb2_ioctl()
629 * buffer-handle to non master/root processes! To match GET_FB() in drm_mode_getfb2_ioctl()
638 for (i = 0; i < fb->format->num_planes; i++) { in drm_mode_getfb2_ioctl()
645 if (fb->obj[i] == fb->obj[j]) { in drm_mode_getfb2_ioctl()
646 r->handles[i] = r->handles[j]; in drm_mode_getfb2_ioctl()
651 if (r->handles[i]) in drm_mode_getfb2_ioctl()
654 if (fb->obj[i]) { in drm_mode_getfb2_ioctl()
655 ret = drm_gem_handle_create(file_priv, fb->obj[i], in drm_mode_getfb2_ioctl()
656 &r->handles[i]); in drm_mode_getfb2_ioctl()
659 ret = fb->funcs->create_handle(fb, file_priv, in drm_mode_getfb2_ioctl()
660 &r->handles[i]); in drm_mode_getfb2_ioctl()
669 /* Delete any previously-created handles on failure. */ in drm_mode_getfb2_ioctl()
670 for (i = 0; i < ARRAY_SIZE(r->handles); i++) { in drm_mode_getfb2_ioctl()
673 if (r->handles[i]) in drm_mode_getfb2_ioctl()
674 drm_gem_handle_delete(file_priv, r->handles[i]); in drm_mode_getfb2_ioctl()
676 /* Zero out any handles identical to the one we just in drm_mode_getfb2_ioctl()
679 for (j = i + 1; j < ARRAY_SIZE(r->handles); j++) { in drm_mode_getfb2_ioctl()
680 if (r->handles[j] == r->handles[i]) in drm_mode_getfb2_ioctl()
681 r->handles[j] = 0; in drm_mode_getfb2_ioctl()
691 * drm_mode_dirtyfb_ioctl - flush frontbuffer rendering on an FB
698 * this ioctl to flush out the changes on manual-update display outputs, e.g.
699 * usb display-link, mipi manual update panels or edp panel self refresh modes.
701 * Modesetting drivers which always update the frontbuffer do not need to
721 return -EOPNOTSUPP; in drm_mode_dirtyfb_ioctl()
723 fb = drm_framebuffer_lookup(dev, file_priv, r->fb_id); in drm_mode_dirtyfb_ioctl()
725 return -ENOENT; in drm_mode_dirtyfb_ioctl()
727 num_clips = r->num_clips; in drm_mode_dirtyfb_ioctl()
728 clips_ptr = (struct drm_clip_rect __user *)(unsigned long)r->clips_ptr; in drm_mode_dirtyfb_ioctl()
731 ret = -EINVAL; in drm_mode_dirtyfb_ioctl()
735 flags = DRM_MODE_FB_DIRTY_FLAGS & r->flags; in drm_mode_dirtyfb_ioctl()
739 ret = -EINVAL; in drm_mode_dirtyfb_ioctl()
745 ret = -EINVAL; in drm_mode_dirtyfb_ioctl()
750 ret = -ENOMEM; in drm_mode_dirtyfb_ioctl()
757 ret = -EFAULT; in drm_mode_dirtyfb_ioctl()
762 if (fb->funcs->dirty) { in drm_mode_dirtyfb_ioctl()
763 ret = fb->funcs->dirty(fb, file_priv, flags, r->color, in drm_mode_dirtyfb_ioctl()
766 ret = -ENOSYS; in drm_mode_dirtyfb_ioctl()
778 * drm_fb_release - remove and free the FBs on this file
797 * list any more, so no need to grab fpriv->fbs_lock. And we need to in drm_fb_release()
801 * Note that a real deadlock between fpriv->fbs_lock and the modeset in drm_fb_release()
805 list_for_each_entry_safe(fb, tfb, &priv->fbs, filp_head) { in drm_fb_release()
807 list_move_tail(&fb->filp_head, &arg.fbs); in drm_fb_release()
809 list_del_init(&fb->filp_head); in drm_fb_release()
811 /* This drops the fpriv->fbs reference. */ in drm_fb_release()
829 struct drm_device *dev = fb->dev; in drm_framebuffer_free()
831 drm_WARN_ON(dev, !list_empty(&fb->filp_head)); in drm_framebuffer_free()
837 drm_mode_object_unregister(dev, &fb->base); in drm_framebuffer_free()
839 fb->funcs->destroy(fb); in drm_framebuffer_free()
843 * drm_framebuffer_init - initialize a framebuffer
845 * @fb: framebuffer to be initialized
849 * functions & device file and adds it to the master fd list.
853 * by other users. Which means by this point the fb _must_ be fully set up -
865 if (WARN_ON_ONCE(fb->dev != dev || !fb->format)) in drm_framebuffer_init()
866 return -EINVAL; in drm_framebuffer_init()
868 INIT_LIST_HEAD(&fb->filp_head); in drm_framebuffer_init()
870 fb->funcs = funcs; in drm_framebuffer_init()
871 strcpy(fb->comm, current->comm); in drm_framebuffer_init()
873 ret = __drm_mode_object_add(dev, &fb->base, DRM_MODE_OBJECT_FB, in drm_framebuffer_init()
878 mutex_lock(&dev->mode_config.fb_lock); in drm_framebuffer_init()
879 dev->mode_config.num_fb++; in drm_framebuffer_init()
880 list_add(&fb->head, &dev->mode_config.fb_list); in drm_framebuffer_init()
881 mutex_unlock(&dev->mode_config.fb_lock); in drm_framebuffer_init()
883 drm_mode_object_register(dev, &fb->base); in drm_framebuffer_init()
890 * drm_framebuffer_lookup - look up a drm framebuffer and grab a reference
892 * @file_priv: drm file to check for lease against.
895 * If successful, this grabs an additional reference to the framebuffer -
896 * callers need to make sure to eventually unreference the returned framebuffer
914 * drm_framebuffer_unregister_private - unregister a private fb from the lookup idr
915 * @fb: fb to unregister
917 * Drivers need to call this when cleaning up driver-private framebuffers, e.g.
919 * i.e. the object may not be destroyed through this call (since it'll lead to a
922 * NOTE: This function is deprecated. For driver-private framebuffers it is not
923 * recommended to embed a framebuffer struct info fbdev struct, instead, a
925 * when the framebuffer is to be cleaned up.
934 dev = fb->dev; in drm_framebuffer_unregister_private()
937 drm_mode_object_unregister(dev, &fb->base); in drm_framebuffer_unregister_private()
942 * drm_framebuffer_cleanup - remove a framebuffer object
943 * @fb: framebuffer to remove
945 * Cleanup framebuffer. This function is intended to be used from the drivers
946 * &drm_framebuffer_funcs.destroy callback. It can also be used to clean up
949 * Note that this function does not remove the fb from active usage - if it is
951 * the id and get back -EINVAL. Obviously no concern at driver unload time.
953 * Also, the framebuffer will not be removed from the lookup idr - for
954 * user-created framebuffers this will happen in the rmfb ioctl. For
955 * driver-private objects (e.g. for fbdev) drivers need to explicitly call
960 struct drm_device *dev = fb->dev; in drm_framebuffer_cleanup()
962 mutex_lock(&dev->mode_config.fb_lock); in drm_framebuffer_cleanup()
963 list_del(&fb->head); in drm_framebuffer_cleanup()
964 dev->mode_config.num_fb--; in drm_framebuffer_cleanup()
965 mutex_unlock(&dev->mode_config.fb_lock); in drm_framebuffer_cleanup()
972 struct drm_device *dev = fb->dev; in atomic_remove_fb()
986 ret = -ENOMEM; in atomic_remove_fb()
989 state->acquire_ctx = &ctx; in atomic_remove_fb()
1000 if (plane->state->fb != fb) in atomic_remove_fb()
1005 plane->base.id, plane->name, fb->base.id); in atomic_remove_fb()
1013 if (disable_crtcs && plane_state->crtc->primary == plane) { in atomic_remove_fb()
1018 plane_state->crtc->base.id, in atomic_remove_fb()
1019 plane_state->crtc->name, fb->base.id); in atomic_remove_fb()
1021 crtc_state = drm_atomic_get_existing_crtc_state(state, plane_state->crtc); in atomic_remove_fb()
1023 ret = drm_atomic_add_affected_connectors(state, plane_state->crtc); in atomic_remove_fb()
1027 crtc_state->active = false; in atomic_remove_fb()
1053 if (ret == -EDEADLK) { in atomic_remove_fb()
1065 if (ret == -EINVAL && !disable_crtcs) { in atomic_remove_fb()
1075 struct drm_device *dev = fb->dev; in legacy_remove_fb()
1082 if (crtc->primary->fb == fb) { in legacy_remove_fb()
1085 crtc->base.id, crtc->name, fb->base.id); in legacy_remove_fb()
1089 DRM_ERROR("failed to reset crtc %p when fb was deleted\n", crtc); in legacy_remove_fb()
1094 if (plane->fb == fb) { in legacy_remove_fb()
1097 plane->base.id, plane->name, fb->base.id); in legacy_remove_fb()
1105 * drm_framebuffer_remove - remove and unreference a framebuffer object
1106 * @fb: framebuffer to remove
1109 * using @fb, removes it, setting it to NULL. Then drops the reference to the
1110 * passed-in framebuffer. Might take the modeset locks.
1113 * last reference to the framebuffer. It is also guaranteed to not take the
1123 dev = fb->dev; in drm_framebuffer_remove()
1125 drm_WARN_ON(dev, !list_empty(&fb->filp_head)); in drm_framebuffer_remove()
1130 * longer need, try to optimize this away. in drm_framebuffer_remove()
1137 * Note that userspace could try to race with use and instate a new in drm_framebuffer_remove()
1139 * in-use fb with fb-id == 0. Userspace is allowed to shoot its own foot in drm_framebuffer_remove()
1160 drm_printf_indent(p, indent, "allocated by = %s\n", fb->comm); in drm_framebuffer_print_info()
1163 drm_printf_indent(p, indent, "format=%p4cc\n", &fb->format->format); in drm_framebuffer_print_info()
1164 drm_printf_indent(p, indent, "modifier=0x%llx\n", fb->modifier); in drm_framebuffer_print_info()
1165 drm_printf_indent(p, indent, "size=%ux%u\n", fb->width, fb->height); in drm_framebuffer_print_info()
1168 for (i = 0; i < fb->format->num_planes; i++) { in drm_framebuffer_print_info()
1170 drm_format_info_plane_width(fb->format, fb->width, i), in drm_framebuffer_print_info()
1171 drm_format_info_plane_height(fb->format, fb->height, i)); in drm_framebuffer_print_info()
1172 drm_printf_indent(p, indent + 1, "pitch[%u]=%u\n", i, fb->pitches[i]); in drm_framebuffer_print_info()
1173 drm_printf_indent(p, indent + 1, "offset[%u]=%u\n", i, fb->offsets[i]); in drm_framebuffer_print_info()
1175 fb->obj[i] ? "" : "(null)"); in drm_framebuffer_print_info()
1176 if (fb->obj[i]) in drm_framebuffer_print_info()
1177 drm_gem_print_info(p, indent + 2, fb->obj[i]); in drm_framebuffer_print_info()
1184 struct drm_debugfs_entry *entry = m->private; in drm_framebuffer_info()
1185 struct drm_device *dev = entry->dev; in drm_framebuffer_info()
1189 mutex_lock(&dev->mode_config.fb_lock); in drm_framebuffer_info()
1191 drm_printf(&p, "framebuffer[%u]:\n", fb->base.id); in drm_framebuffer_info()
1194 mutex_unlock(&dev->mode_config.fb_lock); in drm_framebuffer_info()