From patchwork Thu Nov 16 21:36:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Vesely X-Patchwork-Id: 10062129 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 990E760230 for ; Thu, 16 Nov 2017 21:36:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AFB72AC08 for ; Thu, 16 Nov 2017 21:36:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DB882AC0B; Thu, 16 Nov 2017 21:36:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 100242AC08 for ; Thu, 16 Nov 2017 21:36:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 347DD6E94A; Thu, 16 Nov 2017 21:36:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id E1A3B6E953 for ; Thu, 16 Nov 2017 21:36:46 +0000 (UTC) Received: by mail-qt0-x243.google.com with SMTP id r39so1195607qtr.13 for ; Thu, 16 Nov 2017 13:36:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarletmail-rutgers-edu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:subject:date:message-id; bh=nMhOxTtH52bCj293TfUjl4A0+o6mM75pfSx3ZYAr1Uk=; b=FWzaDAlNOly0mSwUy4dKSNYIdfo8xNlbODTy2vz6AwuGqDfIujNpCvlrggpNslM98o gA5s6XsnaypB5lN1bW/zocr9NE5Oylob9W6oh6+og+TrW2CxEjCJJeV1q971MDEHQwOy 5ZTmmiJ8MfhTBkxhtunFrQLEwbQ4+9/BlspR1aV5978eqN2B98faB/cok+4k+47mGhFU xnPCt5UkJymAfINKuff27KZbtE48vWpE8Y3SxNrKRnk4PiReOpls1O92/P/Q9JQUGnXJ +bxwUtJkOmeeBnoj0wkgVl1fwwcjvKidBImMbNzSWspPPSSP2d+vk9jdAPsS0L8r0hH2 G7mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id; bh=nMhOxTtH52bCj293TfUjl4A0+o6mM75pfSx3ZYAr1Uk=; b=DYkCuOX4aOSUPbDwTDet69FaS8lUNkpEQtZznmj2pMlllmDNaTm+lRdOVVco9zqfJf sfzoo1SMA9i9ssboxucQZtAr651ngZrdcw6Ti3LaT3LUfR/YFpQaWEs7iHh5hMKYGtPR r9ASz//PKwKzPb/sl+UHY3k0X1uRr47XyaFd+1rpmqOZZPJxNCQssqkP/0ZkqfQZii71 o8Dy9PGWEwJvV6TVxp8/dsRnCNQYmyJDyPzjkQy0A9a8EyA1TeInyH8YSNeN0q7sNHJz 1a0cW/2CJzz78ehr3woT6PHDFgGetRfqx9UWI9dbNKAsAhOWiWpyIpMTKobqgEnQUFVD E1yw== X-Gm-Message-State: AJaThX6U8B30tjRMbC3VI5Tw0qi+HdhcZWlafIov0tY/eyQlshVeNDUN lXVMdP0bEFF54163iseTPh9e2g== X-Google-Smtp-Source: AGs4zMbZL9dPsmtYchyxqpWX3Q8NmYRBX32nZD4R5DEjTPGRk3Qtylf9m73lY5uZU9286k2+F9sChw== X-Received: by 10.237.46.101 with SMTP id j92mr4983899qtd.168.1510868205928; Thu, 16 Nov 2017 13:36:45 -0800 (PST) Received: from adriatix.rutgers.edu (pool-128-6-37-254.nat.rutgers.edu. [128.6.37.254]) by smtp.gmail.com with ESMTPSA id y58sm1545491qtb.9.2017.11.16.13.36.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Nov 2017 13:36:40 -0800 (PST) From: Jan Vesely To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 1/1] drm/amdkfd: Do not ignore requested queue size during allocation Date: Thu, 16 Nov 2017 16:36:31 -0500 Message-Id: <20171116213631.3987-1-jan.vesely@rutgers.edu> X-Mailer: git-send-email 2.13.6 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Jan Vesely --- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_vi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_vi.c b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_vi.c index f1d48281e322..b3bee39661ab 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_vi.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue_vi.c @@ -37,15 +37,16 @@ static bool initialize_vi(struct kernel_queue *kq, struct kfd_dev *dev, enum kfd_queue_type type, unsigned int queue_size) { int retval; + unsigned int size = ALIGN(queue_size, PAGE_SIZE); - retval = kfd_gtt_sa_allocate(dev, PAGE_SIZE, &kq->eop_mem); + retval = kfd_gtt_sa_allocate(dev, size, &kq->eop_mem); if (retval != 0) return false; kq->eop_gpu_addr = kq->eop_mem->gpu_addr; kq->eop_kernel_addr = kq->eop_mem->cpu_ptr; - memset(kq->eop_kernel_addr, 0, PAGE_SIZE); + memset(kq->eop_kernel_addr, 0, size); return true; }