static void plane_config_fini(struct intel_display *display,
struct intel_initial_plane_config *plane_config)
{
+ if (plane_config->fb) {
+ struct drm_framebuffer *fb = &plane_config->fb->base;
+
+ /* We may only have the stub and not a full framebuffer */
+ if (drm_framebuffer_read_refcount(fb))
+ drm_framebuffer_put(fb);
+ else
+ kfree(fb);
+ }
+
display->parent->initial_plane->config_fini(plane_config);
}
static void i915_plane_config_fini(struct intel_initial_plane_config *plane_config)
{
- if (plane_config->fb) {
- struct drm_framebuffer *fb = &plane_config->fb->base;
-
- /* We may only have the stub and not a full framebuffer */
- if (drm_framebuffer_read_refcount(fb))
- drm_framebuffer_put(fb);
- else
- kfree(fb);
- }
-
if (plane_config->vma)
i915_vma_put(plane_config->vma);
}
static void xe_plane_config_fini(struct intel_initial_plane_config *plane_config)
{
- if (plane_config->fb) {
- struct drm_framebuffer *fb = &plane_config->fb->base;
-
- /* We may only have the stub and not a full framebuffer */
- if (drm_framebuffer_read_refcount(fb))
- drm_framebuffer_put(fb);
- else
- kfree(fb);
- }
}
const struct intel_display_initial_plane_interface xe_display_initial_plane_interface = {