From patchwork Wed Oct 17 16:28:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10645849 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F81C15E2 for ; Wed, 17 Oct 2018 16:28:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CA2928421 for ; Wed, 17 Oct 2018 16:28:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60A6728492; Wed, 17 Oct 2018 16:28:25 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DDD02843B for ; Wed, 17 Oct 2018 16:28:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727037AbeJRAYv (ORCPT ); Wed, 17 Oct 2018 20:24:51 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:49198 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727095AbeJRAYv (ORCPT ); Wed, 17 Oct 2018 20:24:51 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A6D6D612F6; Wed, 17 Oct 2018 16:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539793703; bh=dQ17jVW4pAiaXjTzoSooTMZi+Jd4K+mpDMYGUnzujuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rg/nEMnQXXTto4DbhVFUYZZ8xUANuMFJSNrVl57KyicRhsRp0yrngTMflGERJyWvA vsOjC1jpq1pz0//1pA2XmAYq2RG7rpGqCN0lF8GlGsqqZhNGbT2RbukCrItlt+npYO emssJh8VkgUAxWmCXuTcku2dwDkd7cQQZ0noSK1E= Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1723760A34; Wed, 17 Oct 2018 16:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539793703; bh=dQ17jVW4pAiaXjTzoSooTMZi+Jd4K+mpDMYGUnzujuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rg/nEMnQXXTto4DbhVFUYZZ8xUANuMFJSNrVl57KyicRhsRp0yrngTMflGERJyWvA vsOjC1jpq1pz0//1pA2XmAYq2RG7rpGqCN0lF8GlGsqqZhNGbT2RbukCrItlt+npYO emssJh8VkgUAxWmCXuTcku2dwDkd7cQQZ0noSK1E= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1723760A34 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org From: Jordan Crouse To: freedreno@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 02/11] drm/msm/gpu: Allocate the correct size for the GPU memptrs Date: Wed, 17 Oct 2018 10:28:09 -0600 Message-Id: <20181017162818.8498-3-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181017162818.8498-1-jcrouse@codeaurora.org> References: <20181017162818.8498-1-jcrouse@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allocate the correct buffer size for the GPU memptrs. The incorrect size hasn't affected us thus far since the incorrect size was larger than the intended size and we're still stuck on page sized granularity anyway but technically correct is the best kind of correct. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 2b7c8946adba..192da89787dc 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -920,7 +920,8 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev, goto fail; } - memptrs = msm_gem_kernel_new(drm, sizeof(*gpu->memptrs_bo), + memptrs = msm_gem_kernel_new(drm, + sizeof(struct msm_rbmemptrs) * nr_rings, MSM_BO_UNCACHED, gpu->aspace, &gpu->memptrs_bo, &memptrs_iova);