AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/pm: Remove vbios bounds check from pp_entries_max()
@ 2026-07-04 10:11 John Olender
  2026-07-08 16:37 ` Alex Deucher
  0 siblings, 1 reply; 6+ messages in thread
From: John Olender @ 2026-07-04 10:11 UTC (permalink / raw)
  To: amd-gfx
  Cc: kenneth.feng, alexander.deucher, asad.kamal, lijo.lazar,
	hawking.zhang, kevinyang.wang, John Olender

The soft_pp_table is not contained within the vbios when using a
pp_table override since commit 3cfe433630508 ("drm/amd/pm: Use uploaded
size for legacy custom PPTable").

Fixes: e30b3e3ab51ad ("drm/amdgpu/pm: add pp_entries_max() helper")
Signed-off-by: John Olender <john.olender@gmail.com>
---
 drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h
index 7ebc1344023ff..19023a850e882 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h
@@ -833,14 +833,10 @@ static inline uint32_t pp_entries_max(const struct pp_hwmgr *hwmgr,
 				      const void *sub_table,
 				      size_t hdr_size, size_t rec_size)
 {
-	struct amdgpu_device *adev = (struct amdgpu_device *)hwmgr->adev;
-	const char *bios_end = (const char *)adev->bios + adev->bios_size;
 	const char *pp_end   = (const char *)hwmgr->soft_pp_table
 			       + hwmgr->soft_pp_table_size;
 	const char *entries  = (const char *)sub_table + hdr_size;
 
-	if (pp_end > bios_end)
-		return 0;
 	if (!rec_size || entries >= pp_end)
 		return 0;
 	return (uint32_t)((pp_end - entries) / rec_size);

base-commit: e3cc8c108f9a91728f9ff6e24cbf3b41c58b8f8b
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-09 13:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-04 10:11 [PATCH] drm/amd/pm: Remove vbios bounds check from pp_entries_max() John Olender
2026-07-08 16:37 ` Alex Deucher
2026-07-09  9:57   ` Kamal, Asad
2026-07-09 10:38     ` John Olender
2026-07-09 12:19       ` Kamal, Asad
2026-07-09 13:38         ` John Olender

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox