From patchwork Thu Jul 10 21:54:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 4528841 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 565259F4BC for ; Thu, 10 Jul 2014 23:34:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6F8B9201D5 for ; Thu, 10 Jul 2014 23:34:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7FA97201F5 for ; Thu, 10 Jul 2014 23:34:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01A9F6E7D0; Thu, 10 Jul 2014 16:33:28 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f175.google.com (mail-we0-f175.google.com [74.125.82.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 080B66E01B for ; Thu, 10 Jul 2014 14:57:45 -0700 (PDT) Received: by mail-we0-f175.google.com with SMTP id k48so195812wev.6 for ; Thu, 10 Jul 2014 14:57:44 -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=jr1x+QyEEV/eQ3eCfPnc9kFgGvD37pK86ESnCnFje6I=; b=oQ3DjF4YOugu2fEfUjstdenBOEW5kNepvahAC52u1FOHK6dxfWVKwqZHc62pofALAq lyu2u47WCjhPKxrhuFlxljyvSSTQvvIBavR9lrywPVCBmFHB0+cKbSCH1Thf66ibv/Wf VVuZpQNvM64jeJmW5jxO0DuAyxByLeHrM/NjvvhMT2r1j63RueJ9GvCR1UYvNAe6RVMn runls/oU4SOFm3yx4CzsTOSg8uHZTsInUvPxuf3APyV4699XJQWcsBZuF29/zlxi0elG GGAb/UD2MH/UX62t8ZwXiyufmKLwny4TkpRlHni72rS0AQB0H/U30LiB0ZyXuqIOtDeX vMqw== X-Received: by 10.180.90.233 with SMTP id bz9mr360693wib.42.1405029463882; Thu, 10 Jul 2014 14:57:43 -0700 (PDT) Received: from localhost.localdomain ([77.127.59.49]) by mx.google.com with ESMTPSA id pq9sm831097wjc.35.2014.07.10.14.57.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Jul 2014 14:57:43 -0700 (PDT) From: Oded Gabbay X-Google-Original-From: Oded Gabbay To: David Airlie , Alex Deucher , Jerome Glisse Subject: [PATCH 82/83] drm/radeon: Remove lock functions from kfd2kgd interface Date: Fri, 11 Jul 2014 00:54:38 +0300 Message-Id: <1405029279-6894-54-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, =?UTF-8?q?Christian=20K=C3=B6nig?= 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/drm/radeon/radeon_kfd.c | 44 ------------------------------------- include/linux/radeon_kfd.h | 10 --------- 2 files changed, 54 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_kfd.c b/drivers/gpu/drm/radeon/radeon_kfd.c index 738c2b3..7e8e041 100644 --- a/drivers/gpu/drm/radeon/radeon_kfd.c +++ b/drivers/gpu/drm/radeon/radeon_kfd.c @@ -115,12 +115,6 @@ static void unkmap_mem(struct kgd_dev *kgd, struct kgd_mem *mem); static uint64_t get_vmem_size(struct kgd_dev *kgd); static uint64_t get_gpu_clock_counter(struct kgd_dev *kgd); -static void lock_srbm_gfx_cntl(struct kgd_dev *kgd); -static void unlock_srbm_gfx_cntl(struct kgd_dev *kgd); - -static void lock_grbm_gfx_idx(struct kgd_dev *kgd); -static void unlock_grbm_gfx_idx(struct kgd_dev *kgd); - static uint32_t get_max_engine_clock_in_mhz(struct kgd_dev *kgd); /* @@ -146,10 +140,6 @@ static const struct kfd2kgd_calls kfd2kgd = { .unkmap_mem = unkmap_mem, .get_vmem_size = get_vmem_size, .get_gpu_clock_counter = get_gpu_clock_counter, - .lock_srbm_gfx_cntl = lock_srbm_gfx_cntl, - .unlock_srbm_gfx_cntl = unlock_srbm_gfx_cntl, - .lock_grbm_gfx_idx = lock_grbm_gfx_idx, - .unlock_grbm_gfx_idx = unlock_grbm_gfx_idx, .get_max_engine_clock_in_mhz = get_max_engine_clock_in_mhz, .program_sh_mem_settings = kgd_program_sh_mem_settings, .set_pasid_vmid_mapping = kgd_set_pasid_vmid_mapping, @@ -200,8 +190,6 @@ void radeon_kfd_device_init(struct radeon_device *rdev) { if (rdev->kfd) { struct kgd2kfd_shared_resources gpu_resources = { - .mmio_registers = rdev->rmmio, - .compute_vmid_bitmap = 0xFF00, .first_compute_pipe = 1, @@ -363,38 +351,6 @@ static uint64_t get_vmem_size(struct kgd_dev *kgd) return rdev->mc.real_vram_size; } -static void lock_srbm_gfx_cntl(struct kgd_dev *kgd) -{ - struct radeon_device *rdev = (struct radeon_device *)kgd; - - mutex_lock(&rdev->srbm_mutex); -} - -static void unlock_srbm_gfx_cntl(struct kgd_dev *kgd) -{ - struct radeon_device *rdev = (struct radeon_device *)kgd; - - mutex_unlock(&rdev->srbm_mutex); -} - -static void lock_grbm_gfx_idx(struct kgd_dev *kgd) -{ - struct radeon_device *rdev = (struct radeon_device *)kgd; - - BUG_ON(kgd == NULL); - - mutex_lock(&rdev->grbm_idx_mutex); -} - -static void unlock_grbm_gfx_idx(struct kgd_dev *kgd) -{ - struct radeon_device *rdev = (struct radeon_device *)kgd; - - BUG_ON(kgd == NULL); - - mutex_unlock(&rdev->grbm_idx_mutex); -} - static uint64_t get_gpu_clock_counter(struct kgd_dev *kgd) { struct radeon_device *rdev = (struct radeon_device *)kgd; diff --git a/include/linux/radeon_kfd.h b/include/linux/radeon_kfd.h index aa021fb..2fffe32 100644 --- a/include/linux/radeon_kfd.h +++ b/include/linux/radeon_kfd.h @@ -45,8 +45,6 @@ enum kgd_memory_pool { }; struct kgd2kfd_shared_resources { - void __iomem *mmio_registers; /* Mapped pointer to GFX MMIO registers. */ - unsigned int compute_vmid_bitmap; /* Bit n == 1 means VMID n is available for KFD. */ unsigned int first_compute_pipe; /* Compute pipes are counted starting from MEC0/pipe0 as 0. */ @@ -86,14 +84,6 @@ struct kfd2kgd_calls { uint64_t (*get_vmem_size)(struct kgd_dev *kgd); uint64_t (*get_gpu_clock_counter)(struct kgd_dev *kgd); - /* SRBM_GFX_CNTL mutex */ - void (*lock_srbm_gfx_cntl)(struct kgd_dev *kgd); - void (*unlock_srbm_gfx_cntl)(struct kgd_dev *kgd); - - /* GRBM_GFX_INDEX mutex */ - void (*lock_grbm_gfx_idx)(struct kgd_dev *kgd); - void (*unlock_grbm_gfx_idx)(struct kgd_dev *kgd); - uint32_t (*get_max_engine_clock_in_mhz)(struct kgd_dev *kgd); /* Register access functions */