From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 6/5] drm/i915: move more code to __i915_drm_thaw Date: Fri, 13 Sep 2013 11:40:35 +0200 Message-ID: <20130913094035.GG5459@phenom.ffwll.local> References: <20130912171054.GC12961@nuc-i3427.alporthouse.com> <1379020003-1595-1-git-send-email-przanoni@gmail.com> <20130912214439.GB30165@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 61234E614A for ; Fri, 13 Sep 2013 02:40:22 -0700 (PDT) Received: by mail-ee0-f46.google.com with SMTP id c13so450123eek.5 for ; Fri, 13 Sep 2013 02:40:21 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130912214439.GB30165@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson , Paulo Zanoni , intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Thu, Sep 12, 2013 at 10:44:39PM +0100, Chris Wilson wrote: > On Thu, Sep 12, 2013 at 06:06:43PM -0300, Paulo Zanoni wrote: > > From: Paulo Zanoni > > > > Both callers had code to sanitize the uncore and restore the GTT > > mappings just before calling __i915_drm_thaw, so Chris suggested I > > should unify the code. > > > > Signed-off-by: Paulo Zanoni > > Slightly more tricky to prove would be that neither i915_restore_state() > nor intel_opregion_setup depends upon the GTT (when modesetting is > enabled) and so coalesce the check+lock into the main MODESET block. > I think it's okay, there is a general ordering issue where we may point > a few registers at the GTT before it is set, but I don't think they are > used until afterwards. However, it is uncertain enough that I wouldn't > reorder the code without the set of init flags Daniel keeps muttering on > about to assert that we don't use partially restored state. > > If Jesse wants to shave off a couple of microseconds from the resume > time by doing so, he is more than welcome. :) > > Reviewed-by: Chris Wilson Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch