From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 1/5] drm/i915: Bail out early on gen6_signal if no semaphores Date: Thu, 15 May 2014 21:38:57 +0300 Message-ID: <20140515183857.GJ27580@intel.com> References: <1400176691-5731-1-git-send-email-mika.kuoppala@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C73F6E83D for ; Thu, 15 May 2014 11:39:12 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1400176691-5731-1-git-send-email-mika.kuoppala@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Mika Kuoppala Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, May 15, 2014 at 08:58:07PM +0300, Mika Kuoppala wrote: > If we dont have semaphores enabled, we allocate 4 > dwords for signalling. But end up emitting more regardless. > = > Fix this by bailing out early if semaphores are not enabled. > = > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3D78274 > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3D78283 > Signed-off-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/intel_ringbuffer.c | 2 ++ > 1 file changed, 2 insertions(+) > = > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i9= 15/intel_ringbuffer.c > index 3974e82..93b4062 100644 > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c > @@ -684,6 +684,8 @@ static int gen6_signal(struct intel_ring_buffer *sign= aller, > #define MBOX_UPDATE_DWORDS 4 > if (i915_semaphore_is_enabled(dev)) > num_dwords +=3D ((I915_NUM_RINGS-1) * MBOX_UPDATE_DWORDS); > + else > + return intel_ring_begin(signaller, num_dwords); I guess that's the minimal band aid we can do. Or just add another i915_semaphore_is_enabled() check with return after the intel_ring_begin() we already have. Ben's gen8 semaphore series makes the .signal function pointer optional, so the check will be in the caller. But extracting just that minimal part from that patch would be more work. I don't see any real problem in going with this minimal fix for now, so: Reviewed-by: Ville Syrj=E4l=E4 > = > ret =3D intel_ring_begin(signaller, num_dwords); > if (ret) > -- = > 1.7.9.5 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC