mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 02:36:45 +07:00
drm/i915/fbdev: Call intel_unpin_fb_obj() on release
When releasing the intel_fbdev, we should unpin the framebuffer that we pinned during construction. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1461833819-3991-1-git-send-email-chris@chris-wilson.co.uk
This commit is contained in:
parent
fe3db79b0b
commit
fb4b8ce139
@ -2310,7 +2310,7 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void intel_unpin_fb_obj(struct drm_framebuffer *fb, unsigned int rotation)
|
void intel_unpin_fb_obj(struct drm_framebuffer *fb, unsigned int rotation)
|
||||||
{
|
{
|
||||||
struct drm_i915_gem_object *obj = intel_fb_obj(fb);
|
struct drm_i915_gem_object *obj = intel_fb_obj(fb);
|
||||||
struct i915_ggtt_view view;
|
struct i915_ggtt_view view;
|
||||||
|
@ -1163,6 +1163,7 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
|
|||||||
struct drm_modeset_acquire_ctx *ctx);
|
struct drm_modeset_acquire_ctx *ctx);
|
||||||
int intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
|
int intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
|
||||||
unsigned int rotation);
|
unsigned int rotation);
|
||||||
|
void intel_unpin_fb_obj(struct drm_framebuffer *fb, unsigned int rotation);
|
||||||
struct drm_framebuffer *
|
struct drm_framebuffer *
|
||||||
__intel_framebuffer_create(struct drm_device *dev,
|
__intel_framebuffer_create(struct drm_device *dev,
|
||||||
struct drm_mode_fb_cmd2 *mode_cmd,
|
struct drm_mode_fb_cmd2 *mode_cmd,
|
||||||
|
@ -287,7 +287,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
|
|||||||
out_destroy_fbi:
|
out_destroy_fbi:
|
||||||
drm_fb_helper_release_fbi(helper);
|
drm_fb_helper_release_fbi(helper);
|
||||||
out_unpin:
|
out_unpin:
|
||||||
i915_gem_object_ggtt_unpin(obj);
|
intel_unpin_fb_obj(&ifbdev->fb->base, BIT(DRM_ROTATE_0));
|
||||||
out_unlock:
|
out_unlock:
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
return ret;
|
return ret;
|
||||||
@ -551,6 +551,11 @@ static void intel_fbdev_destroy(struct drm_device *dev,
|
|||||||
|
|
||||||
if (ifbdev->fb) {
|
if (ifbdev->fb) {
|
||||||
drm_framebuffer_unregister_private(&ifbdev->fb->base);
|
drm_framebuffer_unregister_private(&ifbdev->fb->base);
|
||||||
|
|
||||||
|
mutex_lock(&dev->struct_mutex);
|
||||||
|
intel_unpin_fb_obj(&ifbdev->fb->base, BIT(DRM_ROTATE_0));
|
||||||
|
mutex_unlock(&dev->struct_mutex);
|
||||||
|
|
||||||
drm_framebuffer_remove(&ifbdev->fb->base);
|
drm_framebuffer_remove(&ifbdev->fb->base);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user