From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f48.google.com ([209.85.220.48]:33724 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933520AbbJHOpK (ORCPT ); Thu, 8 Oct 2015 10:45:10 -0400 Received: by pacex6 with SMTP id ex6so57106096pac.0 for ; Thu, 08 Oct 2015 07:45:10 -0700 (PDT) Subject: Re: [PATCH] drm/i915: Pin the ifbdev for the info->system_base GGTT mmapping To: Chris Wilson , Wayne Boyer , intel-gfx@lists.freedesktop.org, "Goel, Akash" , Daniel Vetter , stable@vger.kernel.org References: <20151006082524.GQ3383@phenom.ffwll.local> <1444242857-10349-1-git-send-email-wayne.boyer@intel.com> <20151008090737.GJ27939@nuc-i3427.alporthouse.com> From: Jesse Barnes Message-ID: <5616819C.2050003@virtuousgeek.org> Date: Thu, 8 Oct 2015 07:45:48 -0700 MIME-Version: 1.0 In-Reply-To: <20151008090737.GJ27939@nuc-i3427.alporthouse.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 10/08/2015 02:07 AM, Chris Wilson wrote: > On Wed, Oct 07, 2015 at 11:34:17AM -0700, Wayne Boyer wrote: >> From: Chris Wilson >> >> 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: rebased on latest nightly (Wayne) >> >> Signed-off-by: Chris Wilson >> Cc: "Goel, Akash" >> Cc: Daniel Vetter >> Cc: Jesse Barnes >> Cc: stable@vger.kernel.org >> Reviewed-by: Deepak S >> Signed-off-by: Wayne Boyer >> --- >> drivers/gpu/drm/i915/intel_fbdev.c | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c >> index 6532912..c6aa4f9 100644 >> --- a/drivers/gpu/drm/i915/intel_fbdev.c >> +++ b/drivers/gpu/drm/i915/intel_fbdev.c >> @@ -215,6 +215,16 @@ static int intelfb_create(struct drm_fb_helper *helper, >> obj = intel_fb->obj; >> size = obj->base.size; >> >> + /* The fb constructor will have already pinned us (or inherited a >> + * GGTT region from the BIOS) suitable for a scanout, so >> + * this should just be a no-op and increment the pin count for the >> + * fbdev mmapping. It does have a useful side-effect of validating >> + * the pin for fbdev's use via a GGTT mmapping. >> + */ >> + ret = i915_gem_object_ggtt_pin(obj, NULL, 0, PIN_MAPPABLE); > > This should be i915_gem_obj_ggtt_pin(obj, 0, PIN_MAPPABLE); > At which point I just rage quit. LOL GEM naming strikes again! Jesse