Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 434832 Details for
Bug 583522
sys-kernel/gentoo-sources-4.4.6 Oops in the i915 driver
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
1.patch
drm-i915-Pin-the-ifbdev-for-the-info-system_base-GGTT-mmapping.patch (text/plain), 3.54 KB, created by
Pacho Ramos
on 2016-05-21 11:18:36 UTC
(
hide
)
Description:
1.patch
Filename:
MIME Type:
Creator:
Pacho Ramos
Created:
2016-05-21 11:18:36 UTC
Size:
3.54 KB
patch
obsolete
>From: Chris Wilson <chris@chris-wilson.co.uk> >Date: Fri Dec 4 16:05:26 2015 +0000 >Subject: drm/i915: Pin the ifbdev for the info->system_base GGTT mmapping >Patch-mainline: v4.5-rc1 >Git-commit: 0c82312f3f15538f4e6ceda2a82caee8fbac4501 > >References: boo#962866, boo#966179 > >A long time ago (before 3.14) we relied on a permanent pinning of the >ifbdev to lock the fb in place inside the GGTT. However, the >introduction of stealing the BIOS framebuffer and reusing its address in >the GGTT for the fbdev has muddied waters and we use an inherited fb. >However, the inherited fb is only pinned whilst it is active and we no >longer have an explicit pin for the info->system_base mmapping used by >the fbdev. The result is that after some aperture pressure the fbdev may >be evicted, but we continue to write the fbcon into the same GGTT >address - overwriting anything else that may be put into that offset. >The effect is most pronounced across suspend/resume as >intel_fbdev_set_suspend() does a full clear over the whole scanout. > >v2: Only unpin the intel_fb is we allocate it. If we inherit the fb from >the BIOS, we do not own the pinned vma (except for the reference we add >in this patch for our access via info->screen_base). > >v3: Finish balancing the vma pinning for the normal !preallocated case. > >v4: Try to simplify the pinning even further. >v5: Leak the VMA (cleaned up by object-free) to avoid complicated error paths. > >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >Cc: "Goel, Akash" <akash.goel@intel.com> >Cc: Daniel Vetter <daniel.vetter@ffwll.ch> >Cc: Jesse Barnes <jbarnes@virtuousgeek.org> >Cc: Lukas Wunner <lukas@wunner.de> >Cc: drm-intel-fixes@lists.freedesktop.org >Link: http://patchwork.freedesktop.org/patch/msgid/1449245126-26158-1-git-send-email-chris@chris-wilson.co.uk >Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> >Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> >Signed-off-by: Egbert Eich <eich@suse.com> >--- > drivers/gpu/drm/i915/intel_fbdev.c | 20 +++++++++++++------- > 1 file changed, 13 insertions(+), 7 deletions(-) >--- a/drivers/gpu/drm/i915/intel_fbdev.c >+++ b/drivers/gpu/drm/i915/intel_fbdev.c >@@ -163,13 +163,6 @@ static int intelfb_alloc(struct drm_fb_h > goto out; > } > >- /* Flush everything out, we'll be doing GTT only from now on */ >- ret = intel_pin_and_fence_fb_obj(NULL, fb, NULL, NULL, NULL); >- if (ret) { >- DRM_ERROR("failed to pin obj: %d\n", ret); >- goto out; >- } >- > mutex_unlock(&dev->struct_mutex); > > ifbdev->fb = to_intel_framebuffer(fb); >@@ -225,6 +218,14 @@ static int intelfb_create(struct drm_fb_ > > mutex_lock(&dev->struct_mutex); > >+ /* Pin the GGTT vma for our access via info->screen_base. >+ * This also validates that any existing fb inherited from the >+ * BIOS is suitable for own access. >+ */ >+ ret = intel_pin_and_fence_fb_obj(NULL, &ifbdev->fb->base, NULL, NULL, NULL); >+ if (ret) >+ goto out_unlock; >+ > info = drm_fb_helper_alloc_fbi(helper); > if (IS_ERR(info)) { > ret = PTR_ERR(info); >@@ -286,6 +287,7 @@ out_destroy_fbi: > out_unpin: > i915_gem_object_ggtt_unpin(obj); > drm_gem_object_unreference(&obj->base); >+out_unlock: > mutex_unlock(&dev->struct_mutex); > return ret; > } >@@ -523,6 +525,10 @@ static const struct drm_fb_helper_funcs > static void intel_fbdev_destroy(struct drm_device *dev, > struct intel_fbdev *ifbdev) > { >+ /* We rely on the object-free to release the VMA pinning for >+ * the info->screen_base mmaping. Leaking the VMA is simpler than >+ * trying to rectify all the possible error paths leading here. >+ */ > > drm_fb_helper_unregister_fbi(&ifbdev->helper); > drm_fb_helper_release_fbi(&ifbdev->helper);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 583522
: 434832