From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix cursor handling when runtime suspended Date: Thu, 24 Jul 2014 00:41:11 +0200 Message-ID: <20140723224111.GI15237@phenom.ffwll.local> References: <1406151060-23853-1-git-send-email-przanoni@gmail.com> <20140723223525.GH15237@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20140723223525.GH15237@phenom.ffwll.local> Sender: stable-owner@vger.kernel.org To: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni , stable@vger.kernel.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 24, 2014 at 12:35:25AM +0200, Daniel Vetter wrote: > On Wed, Jul 23, 2014 at 06:30:59PM -0300, Paulo Zanoni wrote: > > From: Paulo Zanoni > > > > If we're runtime suspended and try to use the cursor interfaces, we > > will get a lot of WARNs saying we did the wrong thing. > > > > For intel_crtc_update_cursor(), all we need to do is return if the > > CRTC is not active, since writing the registers won't really have any > > effect if the screen is not visible, and we will write the registers > > later when enabling the screen. > > > > For intel_crtc_cursor_set_obj(), we just get the proper power domain > > reference, since this function does a lot of stuff. > > > > Testcase: igt/pm_rpm/cursor > > Testcase: igt/pm_rpm/cursor-dpms > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81645 > > Cc: stable@vger.kernel.org > > Signed-off-by: Paulo Zanoni > > --- > > drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++++--- > > 1 file changed, 12 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > > index d1e9570..c8f36b0 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -8151,6 +8151,9 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc, > > if (base == 0 && intel_crtc->cursor_base == 0) > > return; > > > > + if (!intel_crtc->active) > > + return; > > Don't we need the same trick in intel_crtc_cursor_set_obj? This gets > called if the cursor object changes (instead of just moving it around). Rechecked and realized the only I915_WRITE in there is for gen2. I guess we don't care ;-) -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch