From nobody Fri Nov 29 08:48:03 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D32944C96 for ; Mon, 23 Sep 2024 01:25:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054708; cv=none; b=mtaFxmuD9HxMRWOazt5YQIYzLjqU4dTRg0lAtUE3PDeBOFBpovxqt24muw8mwUPsHHp6hfcfshnOyhBSSHj5GEIMz5mLTg3rVU6WzhOZKQfTgq7G50rz/vCHfCpCt2fPw4FZEOpzWT1oVJcJFCPmEJ+QgUr+xt/GWqRlOtQifO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054708; c=relaxed/simple; bh=vx67FaFFHL0J8P5QVA3Fl7RJIX1MzoaS07CJZQ9msTw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Fli2WphhUgzq/4CLAOkWLDiZguTVto3NUYXffO3BRhP2OlZtLyTGT+xSzrMSKh7FiPlq3qvWVtfWc6O1EctoFSmLYcomC3ve/mqnt7ooY+qTEEVZZ+qPojueu2onlLWyiogWPdi41j8102SVyrPnUiTw8yCdS87pzTJYcweToLI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=XNREdPqP; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="XNREdPqP" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=RbW0B7/5rNugvdLyZ+nrDMXy1OSjf8esLFsIFlk4SaA=; b=XNREdPqPg3t611FP eWZ4S4Pe0jSM6ci+g1uS1gwecjVTVII66a/IZVPjTYYWGRvxJwU9PpzJF349zO73zQ0K66uGnV0nQ jAlE7m+wXPpuf6X44guwJL5Zl8+Tg5N4g/Efm7402eQTd+3DPBl0XFsAn99uLgek4iiNR3myyyhUX 2vm/UAaoTvlzDOeHLfpBBs/5izYWNvVEvSFoVd+Z1uwitX06DYysq9dIXXJiDsjQA7jGfgajzEPfZ fPl1EyWT+1IM9UaXpDUhKJ97eECtZWef/0nZZSvKNJpPWByqRzHmWuuj05HvEJxod85nF7cTqAGvy sVhtfh4WQdXosiaW9A==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1ssXou-006k2k-27; Mon, 23 Sep 2024 01:24:56 +0000 From: linux@treblig.org To: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com Cc: airlied@gmail.com, simona@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 1/5] drm/amdgpu: Remove unused amdgpu_device_ip_is_idle Date: Mon, 23 Sep 2024 02:24:42 +0100 Message-ID: <20240923012446.4965-2-linux@treblig.org> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923012446.4965-1-linux@treblig.org> References: <20240923012446.4965-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" amdgpu_device_ip_is_idle is unused. It was renamed from 'amdgpu_is_idle' which was originally added in commit 5dbbb60ba61e ("drm/amdgpu: add IP helpers for wait_for_idle and is_i= dle") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ---------------------- 2 files changed, 26 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdg= pu/amdgpu.h index dcd59040c449..c654668e2a56 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -365,8 +365,6 @@ void amdgpu_device_ip_get_clockgating_state(struct amdg= pu_device *adev, u64 *flags); int amdgpu_device_ip_wait_for_idle(struct amdgpu_device *adev, enum amd_ip_block_type block_type); -bool amdgpu_device_ip_is_idle(struct amdgpu_device *adev, - enum amd_ip_block_type block_type); =20 #define AMDGPU_MAX_IP_NUM 16 =20 diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/a= md/amdgpu/amdgpu_device.c index f4628412dac4..dc4679e53463 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2169,30 +2169,6 @@ int amdgpu_device_ip_wait_for_idle(struct amdgpu_dev= ice *adev, =20 } =20 -/** - * amdgpu_device_ip_is_idle - is the hardware IP idle - * - * @adev: amdgpu_device pointer - * @block_type: Type of hardware IP (SMU, GFX, UVD, etc.) - * - * Check if the hardware IP is idle or not. - * Returns true if it the IP is idle, false if not. - */ -bool amdgpu_device_ip_is_idle(struct amdgpu_device *adev, - enum amd_ip_block_type block_type) -{ - int i; - - for (i =3D 0; i < adev->num_ip_blocks; i++) { - if (!adev->ip_blocks[i].status.valid) - continue; - if (adev->ip_blocks[i].version->type =3D=3D block_type) - return adev->ip_blocks[i].version->funcs->is_idle((void *)adev); - } - return true; - -} - /** * amdgpu_device_ip_get_ip_block - get a hw IP pointer * --=20 2.46.1 From nobody Fri Nov 29 08:48:03 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6393624 for ; Mon, 23 Sep 2024 01:25:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054706; cv=none; b=jvrWFEKbNHunQPiFZHoVc8UD/xSRjOb28OCtPMIdqbaQ5Lon3pu/lOxap3qwQCc0an2PTcR/kUembtiLMHx1vQCk7zUxSPOi3p5Pd31SS8r0Qhephrg4VPX+T/TkFgr3N0yxyUMr+1f3DKJxpMJ5wRaqU+WAX3tDFyCik9Lu2d0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054706; c=relaxed/simple; bh=gLxFg5mVO63UvR8Prnu5hVDQWxuuFpMZ5gtHevV+ROE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KWmeyFBj0Y4Nx5kPXTlJkPvkrAFs8v86O8ilZ5YzjnkCvnuEcnq6Xn52RKy5BtuiS6z9IZsb2wsewYVkux35PPtXGNdiJzgRWHaixocI6OPOM++Y5teA7qYHQ4rJirU7p3ACihv6+ZQzjBayCWstx7CmnrtU5QwPKDhJLP/UpCk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=QBr7ddZj; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="QBr7ddZj" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=0V2AdfgE23jS7hBIUEzp4BsZ0ty7sP1XLQloMvwgZOc=; b=QBr7ddZjimhR3pK5 /Amz5CPf/6CBLQ38h+GLfjAr9adVboARmO9+K5OohmdlGKiNXEudlawNVqqDNDCHbmdHxViRSVyNJ 8IJ82MDD6/djEl+Nlt2CDrhR9nsamtqVxyduqLsf9B4i0F7wPq8oU3RGWpYtoxinOxUcg6P8kXov1 Wxv4AT64FKRXXqsd31RMMWZ33rOFmFY/n51FffBgzT6/ykTsaTpIKi6vgtOb6OKlcM+ofFk7BFuG1 UMC/PtK+ckoH31Q0dI5FIwzcYNLya6gtw3fQoXQy7/Yf42aKDrqnmRasrrEPgQ4YFdvMvtXa7Ksct Ot5pA3rQ3VmFmub4YQ==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1ssXow-006k2k-2p; Mon, 23 Sep 2024 01:24:58 +0000 From: linux@treblig.org To: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com Cc: airlied@gmail.com, simona@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 2/5] drm/amdgpu: Remove unused amdgpu_atpx functions Date: Mon, 23 Sep 2024 02:24:43 +0100 Message-ID: <20240923012446.4965-3-linux@treblig.org> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923012446.4965-1-linux@treblig.org> References: <20240923012446.4965-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" amdgpu_atpx_dgpu_req_power_for_displays has been unused since commit bdb1ccb080da ("drm/amdgpu: remove ATPX_DGPU_REQ_POWER_FOR_DISPLAYS check when hotplug-in") amdgpu_atpx_get_dhandle has been unused since commit f9b7f3703ff9 ("drm/amdgpu/acpi: make ATPX/ATCS structures global (v2)") Remove them. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 -------- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 12 ------------ 2 files changed, 20 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdg= pu/amdgpu.h index c654668e2a56..f360296fc9da 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1452,23 +1452,15 @@ void amdgpu_register_atpx_handler(void); void amdgpu_unregister_atpx_handler(void); bool amdgpu_has_atpx_dgpu_power_cntl(void); bool amdgpu_is_atpx_hybrid(void); -bool amdgpu_atpx_dgpu_req_power_for_displays(void); bool amdgpu_has_atpx(void); #else static inline void amdgpu_register_atpx_handler(void) {} static inline void amdgpu_unregister_atpx_handler(void) {} static inline bool amdgpu_has_atpx_dgpu_power_cntl(void) { return false; } static inline bool amdgpu_is_atpx_hybrid(void) { return false; } -static inline bool amdgpu_atpx_dgpu_req_power_for_displays(void) { return = false; } static inline bool amdgpu_has_atpx(void) { return false; } #endif =20 -#if defined(CONFIG_VGA_SWITCHEROO) && defined(CONFIG_ACPI) -void *amdgpu_atpx_get_dhandle(void); -#else -static inline void *amdgpu_atpx_get_dhandle(void) { return NULL; } -#endif - /* * KMS */ diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu= /drm/amd/amdgpu/amdgpu_atpx_handler.c index 375f02002579..3893e6fc2f03 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c @@ -89,18 +89,6 @@ bool amdgpu_is_atpx_hybrid(void) return amdgpu_atpx_priv.atpx.is_hybrid; } =20 -bool amdgpu_atpx_dgpu_req_power_for_displays(void) -{ - return amdgpu_atpx_priv.atpx.dgpu_req_power_for_displays; -} - -#if defined(CONFIG_ACPI) -void *amdgpu_atpx_get_dhandle(void) -{ - return amdgpu_atpx_priv.dhandle; -} -#endif - /** * amdgpu_atpx_call - call an ATPX method * --=20 2.46.1 From nobody Fri Nov 29 08:48:03 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A63B7635 for ; Mon, 23 Sep 2024 01:25:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054706; cv=none; b=NKrHwN7LMSK0iCdtu9nJ9q2+02s3ysW376h149OenYljmNc701olQX87V2ww2A58DMs1swuFQseGJY+kyzsKm5ckfvPeEj45jEDBAEivTRS/9fAR0ugiu73hfcy6DOzvuehLXEH1dkTDv2GpoYiV+N8USs6ENlMyfCXxX5wlMB8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054706; c=relaxed/simple; bh=LB5rWp/18DUdrsxMn0BG3uhy90Wlc4jDkfAMDs09Srs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cIlZ4jHPHaRy4k4/2PDiUwUuMkF4A5JVTQalpO7n3MTxicsZpOwnwa85MO8YPnPqoaxwEiLcPF/YBJ8tRMFEaG0l1UwzCQ1pVyfWK4V/ktf71DGkmHVvk+52mMy8r0fmxVUZypTjaUa6K9XSIfkl1mQEK5UhmD3FiqT9IeiXJFw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=HQvEo2ER; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="HQvEo2ER" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=55Nb5AnSiTpPJhse4SS8idw+5d/f+IiBGFBN3Nv8730=; b=HQvEo2ER4bfHmAEy 09EZG1516ULKSO4q2DZ1yqxtraHnmIqob7x18XJqHT8laCaba1d5XBG7n/iSBTZaP8UAoFVADESqJ 7Qs/qDxjbdYd7smmr9m4gsTAGdLqvAffYWbNgCTgWDdNhTXKBfRew7K1H6km+MXtbrzkRdeQfc4BD TXKJalG/+2jrKVBNPtiPqJyOkEdr6ojLG7FrksQy1imdtL7OJmPJQWn8kpMWe2sP2LZAWJwdLqB03 T4j3SZHecJ9tZMBfDc8q/XdMeUpSdzeY4E/EExKEswF1zpHBKkdKsn1M3dYy50E103asO+nxsWb9c lk4Ei4M5jNb2miULMw==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1ssXoy-006k2k-02; Mon, 23 Sep 2024 01:25:00 +0000 From: linux@treblig.org To: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com Cc: airlied@gmail.com, simona@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 3/5] drm/amdgpu: Remove unused amdgpu_gmc_vram_cpu_pa Date: Mon, 23 Sep 2024 02:24:44 +0100 Message-ID: <20240923012446.4965-4-linux@treblig.org> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923012446.4965-1-linux@treblig.org> References: <20240923012446.4965-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" amdgpu_gmc_vram_cpu_pa has been unused since commit 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up AMD= own's.") Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 12 ------------ drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 - 2 files changed, 13 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_gmc.c index 17a19d49d30a..58b5c436ad15 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c @@ -1065,18 +1065,6 @@ uint64_t amdgpu_gmc_vram_pa(struct amdgpu_device *ad= ev, struct amdgpu_bo *bo) return amdgpu_gmc_vram_mc2pa(adev, amdgpu_bo_gpu_offset(bo)); } =20 -/** - * amdgpu_gmc_vram_cpu_pa - calculate vram buffer object's physical address - * from CPU's view - * - * @adev: amdgpu_device pointer - * @bo: amdgpu buffer object - */ -uint64_t amdgpu_gmc_vram_cpu_pa(struct amdgpu_device *adev, struct amdgpu_= bo *bo) -{ - return amdgpu_bo_gpu_offset(bo) - adev->gmc.vram_start + adev->gmc.aper_b= ase; -} - int amdgpu_gmc_vram_checking(struct amdgpu_device *adev) { struct amdgpu_bo *vram_bo =3D NULL; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/= amdgpu/amdgpu_gmc.h index 4d951a1baefa..e0bed91dd5a0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h @@ -447,7 +447,6 @@ void amdgpu_gmc_get_vbios_allocations(struct amdgpu_dev= ice *adev); void amdgpu_gmc_init_pdb0(struct amdgpu_device *adev); uint64_t amdgpu_gmc_vram_mc2pa(struct amdgpu_device *adev, uint64_t mc_add= r); uint64_t amdgpu_gmc_vram_pa(struct amdgpu_device *adev, struct amdgpu_bo *= bo); -uint64_t amdgpu_gmc_vram_cpu_pa(struct amdgpu_device *adev, struct amdgpu_= bo *bo); int amdgpu_gmc_vram_checking(struct amdgpu_device *adev); int amdgpu_gmc_sysfs_init(struct amdgpu_device *adev); void amdgpu_gmc_sysfs_fini(struct amdgpu_device *adev); --=20 2.46.1 From nobody Fri Nov 29 08:48:03 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4A6A1103 for ; Mon, 23 Sep 2024 01:25:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054706; cv=none; b=mTQSPWjuPZCyHy52OiiJpPGB7kahiyyLppSMVQD/QxgVdCoMQzZ8UAYggtrl4HnrGgfvRxH/5RTKP2NbYPgxcFInEtNFT2Wj9FZxpLkI6odPmu/Jzv6S9z39uH55P/YNBo0P9WUoQlW+ts8LW+4YlBINjX3zjjZCBuwlM6n1678= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054706; c=relaxed/simple; bh=DFGtUPCPI3+q1O+VosHFzBUDacm67Kdl0BZaDsz92Jg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E28IsxRHcXr1MaoOiOOo+5litVWuxPrE5RVm2cAI26GEp5uecWyJUFHmD3g65aBsQzSdJxW7RSKMWw7JFqKIzZTf7eDN+XYBKYpiHM+yVZkxm8tVGwnPwhqEHU9XTf92zaeqjtI43fzrK9siXerAqyJlu2WWP/YdgO/2yMXt/J8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=qkgRhM5d; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="qkgRhM5d" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=Rz0QSDeykvTiESrk8g5g5XNM5hvpuDENvkUjExEkk/Q=; b=qkgRhM5dLdt/tp3U X23UPp0rehugemRAc/OZ29/NXSmwNO4rgMZ4P9AgJ/0HeUka/fDv+hK2e6XGIPQOH1UY9uAD5pjwz ASCMH6+zsUCEYxSdJ93f7Jb5VNmtCPU8PdK6p5OfwdhqKN2qXJwTByCtBq9hmHO7GsLtH+nC74yGu TQ2sZdMYn+vnEXkMc/aNV5HzHX7Iz4L1RmUkGyy4JQp+lZW/od1G8VZLJPl+fxDrJ22N4JdJd62H3 P+IyaoZy7Otf4TaONUsot1WWluKMGCzVs9+cDIlhz8wmSmC8QrAIdQXx2WGSCU7YEeX65LeWaS1Ld pVYufPdpxGAXEuvu5Q==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1ssXoy-006k2k-2f; Mon, 23 Sep 2024 01:25:00 +0000 From: linux@treblig.org To: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com Cc: airlied@gmail.com, simona@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 4/5] drm/amdgpu: Remove unused amdgpu_gfx_bit_to_me_queue Date: Mon, 23 Sep 2024 02:24:45 +0100 Message-ID: <20240923012446.4965-5-linux@treblig.org> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923012446.4965-1-linux@treblig.org> References: <20240923012446.4965-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" amdgpu_gfx_bit_to_me_queue has been unused since it was added in commit 7470bfcf2014 ("drm/amdgpu: add helper function for gfx queue/bitmap transition") Remove it. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 10 ---------- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_gfx.c index 83e54697f0ee..0fbb7c7b736d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -87,16 +87,6 @@ int amdgpu_gfx_me_queue_to_bit(struct amdgpu_device *ade= v, return bit; } =20 -void amdgpu_gfx_bit_to_me_queue(struct amdgpu_device *adev, int bit, - int *me, int *pipe, int *queue) -{ - *queue =3D bit % adev->gfx.me.num_queue_per_pipe; - *pipe =3D (bit / adev->gfx.me.num_queue_per_pipe) - % adev->gfx.me.num_pipe_per_me; - *me =3D (bit / adev->gfx.me.num_queue_per_pipe) - / adev->gfx.me.num_pipe_per_me; -} - bool amdgpu_gfx_is_me_queue_enabled(struct amdgpu_device *adev, int me, int pipe, int queue) { diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/= amdgpu/amdgpu_gfx.h index 5644e10a86a9..f710178a21bc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h @@ -540,8 +540,6 @@ bool amdgpu_gfx_is_high_priority_graphics_queue(struct = amdgpu_device *adev, struct amdgpu_ring *ring); int amdgpu_gfx_me_queue_to_bit(struct amdgpu_device *adev, int me, int pipe, int queue); -void amdgpu_gfx_bit_to_me_queue(struct amdgpu_device *adev, int bit, - int *me, int *pipe, int *queue); bool amdgpu_gfx_is_me_queue_enabled(struct amdgpu_device *adev, int me, int pipe, int queue); void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable); --=20 2.46.1 From nobody Fri Nov 29 08:48:03 2024 Received: from mx.treblig.org (mx.treblig.org [46.235.229.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5540D2F24 for ; Mon, 23 Sep 2024 01:25:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.229.95 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054708; cv=none; b=dLdl7E2kx4NsW9wrDpq1hMAt9+guLXAjP/MKsN+jqHFI9KUi8yj70/P+iSinP+ML0g35uuMKjIBcC6+Qwsx7xjmAtNVw6ySdYCQGqZC8TyzgYbQcOwUNiBaVzOfU69YAFSXPqNKdomgOejOcm+sTz8oBeU0iB/um15urjd/54GE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727054708; c=relaxed/simple; bh=Fvtu4ZkdFuQWVZdn5JXLgUl8Jc7OA3Gk3vZhH2QQ9zo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sRCT6xa5EObnaxq9n36jRITLBG/+Or4R80i0vVyDjr4zb1Wgazzy/PFHOPDACJl1f6mBeTESPomuYfbn5zwXGGk+2Cc2zlPsy5x9dPaoF2BmMUuO37yt59GT2DTEIszDwrpYd27+32ZUUEg4iOrxHNUqvZqVbbLGASzvz1vnVAg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org; spf=pass smtp.mailfrom=treblig.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b=Y59K7PX4; arc=none smtp.client-ip=46.235.229.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=treblig.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=treblig.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=treblig.org header.i=@treblig.org header.b="Y59K7PX4" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=treblig.org ; s=bytemarkmx; h=MIME-Version:Message-ID:Date:Subject:From:Content-Type:From :Subject; bh=Kc9zefA0QswG8gCmJgyLW5CUDw57gg8nkHoO6NYXt7k=; b=Y59K7PX4yi5wXvuT d3Jt+iWNwUU/7nb1YkuN5P/ehVQgu8Aq5K3qnsr35Cbbls12+bG3Jb9UuFL1H+fmUJEZsHHKtX2ta Q7iakA5ZMCgYtcwdVK1UEPRLR/gQx/n7H4NCSsBdeEZXlX36M/Dh5YGUUKzpIhRIQT8/k1wxy7hdO uSl7o1HURYQxH6x9n7sye5Kd6otF6STv+TknDHBGXo4uymjz51HU29R0aoxpmVpLjhdl8GbHUCcrj gebo5MBfHQQSYaS5IYgldpcJiMiqsn32lNNVAVBs1lpmiVPaFD+HKAPE7+sxkDF9rU3BpkpHqhHSy ZvO2diVG4x6KFsFoTg==; Received: from localhost ([127.0.0.1] helo=dalek.home.treblig.org) by mx.treblig.org with esmtp (Exim 4.96) (envelope-from ) id 1ssXoz-006k2k-2F; Mon, 23 Sep 2024 01:25:01 +0000 From: linux@treblig.org To: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com Cc: airlied@gmail.com, simona@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, "Dr. David Alan Gilbert" Subject: [PATCH 5/5] drm/amdgpu: Remove unused amdgpu_i2c functions Date: Mon, 23 Sep 2024 02:24:46 +0100 Message-ID: <20240923012446.4965-6-linux@treblig.org> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240923012446.4965-1-linux@treblig.org> References: <20240923012446.4965-1-linux@treblig.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" amdgpu_i2c_add and amdgpu_i2c_init were added in 2015's commit d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") but never used. Remove them. Signed-off-by: Dr. David Alan Gilbert --- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 25 ------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h | 4 ---- 2 files changed, 29 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/= amdgpu/amdgpu_i2c.c index 00d6211e0fbf..f0765ccde668 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c @@ -225,15 +225,6 @@ void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c) kfree(i2c); } =20 -/* Add the default buses */ -void amdgpu_i2c_init(struct amdgpu_device *adev) -{ - if (amdgpu_hw_i2c) - DRM_INFO("hw_i2c forced on, you may experience display detection problem= s!\n"); - - amdgpu_atombios_i2c_init(adev); -} - /* remove all the buses */ void amdgpu_i2c_fini(struct amdgpu_device *adev) { @@ -247,22 +238,6 @@ void amdgpu_i2c_fini(struct amdgpu_device *adev) } } =20 -/* Add additional buses */ -void amdgpu_i2c_add(struct amdgpu_device *adev, - const struct amdgpu_i2c_bus_rec *rec, - const char *name) -{ - struct drm_device *dev =3D adev_to_drm(adev); - int i; - - for (i =3D 0; i < AMDGPU_MAX_I2C_BUS; i++) { - if (!adev->i2c_bus[i]) { - adev->i2c_bus[i] =3D amdgpu_i2c_create(dev, rec, name); - return; - } - } -} - /* looks up bus based on id */ struct amdgpu_i2c_chan * amdgpu_i2c_lookup(struct amdgpu_device *adev, diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h b/drivers/gpu/drm/amd/= amdgpu/amdgpu_i2c.h index 63c2ff7499e1..21e3d1dad0a1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.h @@ -28,11 +28,7 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_dev= ice *dev, const struct amdgpu_i2c_bus_rec *rec, const char *name); void amdgpu_i2c_destroy(struct amdgpu_i2c_chan *i2c); -void amdgpu_i2c_init(struct amdgpu_device *adev); void amdgpu_i2c_fini(struct amdgpu_device *adev); -void amdgpu_i2c_add(struct amdgpu_device *adev, - const struct amdgpu_i2c_bus_rec *rec, - const char *name); struct amdgpu_i2c_chan * amdgpu_i2c_lookup(struct amdgpu_device *adev, const struct amdgpu_i2c_bus_rec *i2c_bus); --=20 2.46.1