Loading drivers/gpu/drm/drm_crtc.c +1 −1 Original line number Diff line number Diff line Loading @@ -612,7 +612,7 @@ void drm_framebuffer_remove(struct drm_framebuffer *fb) * in-use fb with fb-id == 0. Userspace is allowed to shoot its own foot * in this manner. */ if (atomic_read(&fb->refcount.refcount) > 1) { if (drm_framebuffer_read_refcount(fb) > 1) { drm_modeset_lock_all(dev); /* remove from any CRTC */ drm_for_each_crtc(crtc, dev) { Loading drivers/gpu/drm/i915/i915_debugfs.c +2 −2 Original line number Diff line number Diff line Loading @@ -1917,7 +1917,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) fbdev_fb->base.depth, fbdev_fb->base.bits_per_pixel, fbdev_fb->base.modifier[0], atomic_read(&fbdev_fb->base.refcount.refcount)); drm_framebuffer_read_refcount(&fbdev_fb->base)); describe_obj(m, fbdev_fb->obj); seq_putc(m, '\n'); } Loading @@ -1935,7 +1935,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) fb->base.depth, fb->base.bits_per_pixel, fb->base.modifier[0], atomic_read(&fb->base.refcount.refcount)); drm_framebuffer_read_refcount(&fb->base)); describe_obj(m, fb->obj); seq_putc(m, '\n'); } Loading drivers/gpu/drm/msm/msm_fb.c +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m) seq_printf(m, "fb: %dx%d@%4.4s (%2d, ID:%d)\n", fb->width, fb->height, (char *)&fb->pixel_format, fb->refcount.refcount.counter, fb->base.id); drm_framebuffer_read_refcount(fb), fb->base.id); for (i = 0; i < n; i++) { seq_printf(m, " %d: offset=%d pitch=%d, obj: ", Loading drivers/gpu/drm/tegra/drm.c +1 −1 Original line number Diff line number Diff line Loading @@ -878,7 +878,7 @@ static int tegra_debugfs_framebuffers(struct seq_file *s, void *data) seq_printf(s, "%3d: user size: %d x %d, depth %d, %d bpp, refcount %d\n", fb->base.id, fb->width, fb->height, fb->depth, fb->bits_per_pixel, atomic_read(&fb->refcount.refcount)); drm_framebuffer_read_refcount(fb)); } mutex_unlock(&drm->mode_config.fb_lock); Loading include/drm/drm_crtc.h +11 −0 Original line number Diff line number Diff line Loading @@ -2605,6 +2605,17 @@ static inline uint32_t drm_color_lut_extract(uint32_t user_input, return clamp_val(val, 0, max); } /** * drm_framebuffer_read_refcount - read the framebuffer reference count. * @fb: framebuffer * * This functions returns the framebuffer's reference count. */ static inline uint32_t drm_framebuffer_read_refcount(struct drm_framebuffer *fb) { return atomic_read(&fb->refcount.refcount); } /* Plane list iterator for legacy (overlay only) planes. */ #define drm_for_each_legacy_plane(plane, dev) \ list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) \ Loading Loading
drivers/gpu/drm/drm_crtc.c +1 −1 Original line number Diff line number Diff line Loading @@ -612,7 +612,7 @@ void drm_framebuffer_remove(struct drm_framebuffer *fb) * in-use fb with fb-id == 0. Userspace is allowed to shoot its own foot * in this manner. */ if (atomic_read(&fb->refcount.refcount) > 1) { if (drm_framebuffer_read_refcount(fb) > 1) { drm_modeset_lock_all(dev); /* remove from any CRTC */ drm_for_each_crtc(crtc, dev) { Loading
drivers/gpu/drm/i915/i915_debugfs.c +2 −2 Original line number Diff line number Diff line Loading @@ -1917,7 +1917,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) fbdev_fb->base.depth, fbdev_fb->base.bits_per_pixel, fbdev_fb->base.modifier[0], atomic_read(&fbdev_fb->base.refcount.refcount)); drm_framebuffer_read_refcount(&fbdev_fb->base)); describe_obj(m, fbdev_fb->obj); seq_putc(m, '\n'); } Loading @@ -1935,7 +1935,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) fb->base.depth, fb->base.bits_per_pixel, fb->base.modifier[0], atomic_read(&fb->base.refcount.refcount)); drm_framebuffer_read_refcount(&fb->base)); describe_obj(m, fb->obj); seq_putc(m, '\n'); } Loading
drivers/gpu/drm/msm/msm_fb.c +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m) seq_printf(m, "fb: %dx%d@%4.4s (%2d, ID:%d)\n", fb->width, fb->height, (char *)&fb->pixel_format, fb->refcount.refcount.counter, fb->base.id); drm_framebuffer_read_refcount(fb), fb->base.id); for (i = 0; i < n; i++) { seq_printf(m, " %d: offset=%d pitch=%d, obj: ", Loading
drivers/gpu/drm/tegra/drm.c +1 −1 Original line number Diff line number Diff line Loading @@ -878,7 +878,7 @@ static int tegra_debugfs_framebuffers(struct seq_file *s, void *data) seq_printf(s, "%3d: user size: %d x %d, depth %d, %d bpp, refcount %d\n", fb->base.id, fb->width, fb->height, fb->depth, fb->bits_per_pixel, atomic_read(&fb->refcount.refcount)); drm_framebuffer_read_refcount(fb)); } mutex_unlock(&drm->mode_config.fb_lock); Loading
include/drm/drm_crtc.h +11 −0 Original line number Diff line number Diff line Loading @@ -2605,6 +2605,17 @@ static inline uint32_t drm_color_lut_extract(uint32_t user_input, return clamp_val(val, 0, max); } /** * drm_framebuffer_read_refcount - read the framebuffer reference count. * @fb: framebuffer * * This functions returns the framebuffer's reference count. */ static inline uint32_t drm_framebuffer_read_refcount(struct drm_framebuffer *fb) { return atomic_read(&fb->refcount.refcount); } /* Plane list iterator for legacy (overlay only) planes. */ #define drm_for_each_legacy_plane(plane, dev) \ list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) \ Loading