From patchwork Thu Jul 10 21:54:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 4528621 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E8D5FBEEAA for ; Thu, 10 Jul 2014 23:34:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A3A7201D5 for ; Thu, 10 Jul 2014 23:34:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6B823201B4 for ; Thu, 10 Jul 2014 23:34:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5FC216E7AD; Thu, 10 Jul 2014 16:33:25 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by gabe.freedesktop.org (Postfix) with ESMTP id C0A346E01B for ; Thu, 10 Jul 2014 14:57:00 -0700 (PDT) Received: by mail-wg0-f47.google.com with SMTP id y10so199757wgg.30 for ; Thu, 10 Jul 2014 14:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WOUmJpRJeROaT0Vaebh8B1ajytDXpbH3K+jMgvpTtxk=; b=rxWrE0JG6MkIRgN2qokmN22uzbhDK305pBt1R5gZRI8AcwCmfDSRbBU5vW1+yoRAeS 7lOQKa29XcFN+DG0XoWa8P0oyes5QAQ5QUZWsS/692u85kQoKBLN5DWzE4WruOXv7WfU 9/aRkVI/bfjpZcPBaQguO0/PMvJwYLRd6TJU1IZ7rU+F7dqhTt/ctg8T10dSYdbegr04 eWwjCUMW+GkaewsQku2+Xy40dqs5nJzKsgXZUMxOgYS31cKdrj+yOV4OTCNTiwBdKerr VFOdTpVsT9xW/Fn+iR//8L09Cpjo/MITmcryp/mo91v1ckUjl8FiMiIBTbZEVdi/O1Wf GaTw== X-Received: by 10.180.79.38 with SMTP id g6mr162691wix.61.1405029420058; Thu, 10 Jul 2014 14:57:00 -0700 (PDT) Received: from localhost.localdomain ([77.127.59.49]) by mx.google.com with ESMTPSA id pq9sm831097wjc.35.2014.07.10.14.56.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Jul 2014 14:56:59 -0700 (PDT) From: Oded Gabbay X-Google-Original-From: Oded Gabbay To: David Airlie , Alex Deucher , Jerome Glisse Subject: [PATCH 66/83] hsa/radeon: Fix number of pipes per ME Date: Fri, 11 Jul 2014 00:54:22 +0300 Message-Id: <1405029279-6894-38-git-send-email-oded.gabbay@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405029279-6894-1-git-send-email-oded.gabbay@amd.com> References: <1405029279-6894-1-git-send-email-oded.gabbay@amd.com> X-Mailman-Approved-At: Thu, 10 Jul 2014 16:33:12 -0700 Cc: Andrew Lewycky , Ben Goz , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Goz Signed-off-by: Ben Goz Signed-off-by: Oded Gabbay --- drivers/gpu/hsa/radeon/kfd_device_queue_manager.c | 2 +- drivers/gpu/hsa/radeon/kfd_device_queue_manager.h | 2 +- drivers/gpu/hsa/radeon/kfd_packet_manager.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/hsa/radeon/kfd_device_queue_manager.c b/drivers/gpu/hsa/radeon/kfd_device_queue_manager.c index 3e1def1..5ec8da7 100644 --- a/drivers/gpu/hsa/radeon/kfd_device_queue_manager.c +++ b/drivers/gpu/hsa/radeon/kfd_device_queue_manager.c @@ -55,7 +55,7 @@ static inline unsigned int get_first_pipe(struct device_queue_manager *dqm) static inline unsigned int get_pipes_num_cpsch(void) { - return PIPE_PER_ME_CP_SCHEDULING - 1; + return PIPE_PER_ME_CP_SCHEDULING; } static unsigned int get_sh_mem_bases_nybble_64(struct kfd_process *process, struct kfd_dev *dev) diff --git a/drivers/gpu/hsa/radeon/kfd_device_queue_manager.h b/drivers/gpu/hsa/radeon/kfd_device_queue_manager.h index 57dc636..037eaf8 100644 --- a/drivers/gpu/hsa/radeon/kfd_device_queue_manager.h +++ b/drivers/gpu/hsa/radeon/kfd_device_queue_manager.h @@ -31,7 +31,7 @@ #define QUEUE_PREEMPT_DEFAULT_TIMEOUT_MS (500) #define QUEUES_PER_PIPE (8) -#define PIPE_PER_ME_CP_SCHEDULING (4) +#define PIPE_PER_ME_CP_SCHEDULING (3) #define CIK_VMID_NUM (8) #define KFD_VMID_START_OFFSET (8) #define VMID_PER_DEVICE CIK_VMID_NUM diff --git a/drivers/gpu/hsa/radeon/kfd_packet_manager.c b/drivers/gpu/hsa/radeon/kfd_packet_manager.c index 3fc8c34..621a720 100644 --- a/drivers/gpu/hsa/radeon/kfd_packet_manager.c +++ b/drivers/gpu/hsa/radeon/kfd_packet_manager.c @@ -62,7 +62,7 @@ static void pm_calc_rlib_size(struct packet_manager *pm, unsigned int *rlib_size /* check if there is over subscription*/ *over_subscription = false; if ((process_count >= VMID_PER_DEVICE) || - queue_count >= PIPE_PER_ME_CP_SCHEDULING * QUEUES_PER_PIPE) { + queue_count > PIPE_PER_ME_CP_SCHEDULING * QUEUES_PER_PIPE) { *over_subscription = true; pr_debug("kfd: over subscribed runlist\n"); }