Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E8DBC7EE2F for ; Fri, 3 Mar 2023 15:00:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbjCCPAR (ORCPT ); Fri, 3 Mar 2023 10:00:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231259AbjCCPAM (ORCPT ); Fri, 3 Mar 2023 10:00:12 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CD715F6C0; Fri, 3 Mar 2023 07:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677855611; x=1709391611; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=aNNHDRDvXG9ASjCgwJ85IwtaQ6OKdjosypIMBKJPjJ8=; b=WRQ68Xo5ixpBVa1bdI5ojlznhfv+Go118DWeW8ngj5kxgxJ+18pWj+g/ T/4COXJSdBp/IWI4SghyXF4oYhQ77kwHjjVf2j9ndcSaCCf/3nqKDDPlw ikKcGqbkEbbmXHkB7B+KijBlkA9gv7AV5qr+Q7d5zna5McgBb+PkWyZAm OOktNwRmiiKnJ7K2vIHqDXQOMMIUqFUrkhfTbnv10D5cul0ljNTGCluAk QfUsm+jvnL/ACQcbAkmr4v7rlDyJ8BSSEdCwuLMfk5Hoss2seJX9j+KSQ XEacsXz0tJOC0B1eZV9WwVKKaSSnA9wV0MCBX0a2myYs31+Plr7x2500Y Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10638"; a="315458451" X-IronPort-AV: E=Sophos;i="5.98,230,1673942400"; d="scan'208";a="315458451" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2023 07:00:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10638"; a="818495316" X-IronPort-AV: E=Sophos;i="5.98,230,1673942400"; d="scan'208";a="818495316" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.70]) by fmsmga001.fm.intel.com with SMTP; 03 Mar 2023 07:00:03 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 03 Mar 2023 17:00:03 +0200 Date: Fri, 3 Mar 2023 17:00:03 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Rob Clark Cc: Tvrtko Ursulin , dri-devel@lists.freedesktop.org, Sumit Semwal , Rob Clark , Luben Tuikov , Matt Turner , Michel =?iso-8859-1?Q?D=E4nzer?= , "open list:DMA BUFFER SHARING FRAMEWORK" , Christian =?iso-8859-1?Q?K=F6nig?= , intel-gfx@lists.freedesktop.org, "moderated list:DMA BUFFER SHARING FRAMEWORK" , Pekka Paalanen , Rodrigo Vivi , Tvrtko Ursulin , open list , Alex Deucher , freedreno@lists.freedesktop.org, Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [PATCH v9 15/15] drm/i915: Add deadline based boost support Message-ID: References: <20230302235356.3148279-1-robdclark@gmail.com> <20230302235356.3148279-16-robdclark@gmail.com> <3bded9d7-9796-4a9b-7c11-aac994d4fdc6@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 03, 2023 at 06:48:43AM -0800, Rob Clark wrote: > On Fri, Mar 3, 2023 at 1:58 AM Tvrtko Ursulin > wrote: > > > > > > On 03/03/2023 03:21, Rodrigo Vivi wrote: > > > On Thu, Mar 02, 2023 at 03:53:37PM -0800, Rob Clark wrote: > > >> From: Rob Clark > > >> > > > > > > missing some wording here... > > > > > >> v2: rebase > > >> > > >> Signed-off-by: Rob Clark > > >> --- > > >> drivers/gpu/drm/i915/i915_request.c | 20 ++++++++++++++++++++ > > >> 1 file changed, 20 insertions(+) > > >> > > >> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c > > >> index 7503dcb9043b..44491e7e214c 100644 > > >> --- a/drivers/gpu/drm/i915/i915_request.c > > >> +++ b/drivers/gpu/drm/i915/i915_request.c > > >> @@ -97,6 +97,25 @@ static bool i915_fence_enable_signaling(struct dma_fence *fence) > > >> return i915_request_enable_breadcrumb(to_request(fence)); > > >> } > > >> > > >> +static void i915_fence_set_deadline(struct dma_fence *fence, ktime_t deadline) > > >> +{ > > >> + struct i915_request *rq = to_request(fence); > > >> + > > >> + if (i915_request_completed(rq)) > > >> + return; > > >> + > > >> + if (i915_request_started(rq)) > > >> + return; > > > > > > why do we skip the boost if already started? > > > don't we want to boost the freq anyway? > > > > I'd wager Rob is just copying the current i915 wait boost logic. > > Yup, and probably incorrectly.. Matt reported fewer boosts/sec > compared to your RFC, this could be the bug I don't think i915 calls drm_atomic_helper_wait_for_fences() so that could explain something. -- Ville Syrj?l? Intel