From patchwork Fri Jan 31 11:42:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manna, Animesh" X-Patchwork-Id: 11359767 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6261139A for ; Fri, 31 Jan 2020 11:53:50 +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 BD96C20707 for ; Fri, 31 Jan 2020 11:53:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD96C20707 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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 5A4396FB1B; Fri, 31 Jan 2020 11:53:50 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id B5D696FB1B for ; Fri, 31 Jan 2020 11:53:48 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2020 03:53:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,385,1574150400"; d="scan'208";a="230233376" Received: from amanna.iind.intel.com ([10.223.74.53]) by orsmga003.jf.intel.com with ESMTP; 31 Jan 2020 03:53:46 -0800 From: Animesh Manna To: intel-gfx@lists.freedesktop.org Date: Fri, 31 Jan 2020 17:12:58 +0530 Message-Id: <20200131114258.22306-1-animesh.manna@intel.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [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: Matthew Auld Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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. 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/i915/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 = intel_runtime_pm_get(&i915->runtime_pm); - obj = i915_gem_object_create_internal(i915, DSB_BUF_SIZE); + if (HAS_LMEM(i915)) + obj = i915_gem_object_create_lmem(i915, DSB_BUF_SIZE, 0); + else + obj = i915_gem_object_create_internal(i915, DSB_BUF_SIZE); + if (IS_ERR(obj)) { DRM_ERROR("Gem object creation failed\n"); goto out;