From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AE74C33CB2 for ; Fri, 31 Jan 2020 12:03:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 47C8320707 for ; Fri, 31 Jan 2020 12:03:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47C8320707 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DF336FB1D; Fri, 31 Jan 2020 12:03:34 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3C5536FB1D for ; Fri, 31 Jan 2020 12:03:33 +0000 (UTC) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2020 04:03:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,385,1574150400"; d="scan'208";a="224431536" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga008.fm.intel.com with SMTP; 31 Jan 2020 04:03:30 -0800 Received: by stinkbox (sSMTP sendmail emulation); Fri, 31 Jan 2020 14:03:29 +0200 Date: Fri, 31 Jan 2020 14:03:29 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Animesh Manna Message-ID: <20200131120329.GO13686@intel.com> References: <20200131114258.22306-1-animesh.manna@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200131114258.22306-1-animesh.manna@intel.com> X-Patchwork-Hint: comment User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [Intel-gfx] [PATCH] drm/i915/dsb: Enable lmem for dsb X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org, Matthew Auld Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, Jan 31, 2020 at 05:12:58PM +0530, Animesh Manna wrote: > If lmem is supported DSB should use local memeory instead > of system memory. Using local memory surely bring performance > improvement as local memory is close to gpu. Also want to avoid > multiple gpu using system memory. > = > Used LMEM api to create gem object needed for DSB command buffer. The whole point of the dsb is to avoid doing mmio.a Now you're replacing the nice dma with mmio again. Granted lmem is probably wc so maybe not as slow as direct mmio register access, and also we can do this ahead of time so not as time critical as direct mmio during the the vblank. > = > v1: Initial patch. > = > Cc: Jani Nikula > Cc: Matthew Auld > Cc: Ramalingam C > Signed-off-by: Animesh Manna > --- > drivers/gpu/drm/i915/display/intel_dsb.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > = > diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i= 915/display/intel_dsb.c > index 9dd18144a664..d67b6a764ba0 100644 > --- a/drivers/gpu/drm/i915/display/intel_dsb.c > +++ b/drivers/gpu/drm/i915/display/intel_dsb.c > @@ -6,6 +6,7 @@ > = > #include "i915_drv.h" > #include "intel_display_types.h" > +#include "gem/i915_gem_lmem.h" > = > #define DSB_BUF_SIZE (2 * PAGE_SIZE) > = > @@ -113,7 +114,11 @@ intel_dsb_get(struct intel_crtc *crtc) > = > wakeref =3D intel_runtime_pm_get(&i915->runtime_pm); > = > - obj =3D i915_gem_object_create_internal(i915, DSB_BUF_SIZE); > + if (HAS_LMEM(i915)) > + obj =3D i915_gem_object_create_lmem(i915, DSB_BUF_SIZE, 0); > + else > + obj =3D i915_gem_object_create_internal(i915, DSB_BUF_SIZE); > + > if (IS_ERR(obj)) { > DRM_ERROR("Gem object creation failed\n"); > goto out; > -- = > 2.24.0 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx