Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit edaf690

Browse files
committedJan 24, 2019
Merge branch 'drm-fixes-5.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
- Overclock fix for vega10 - Hybrid gfx laptop fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190123231004.3111-1-alexander.deucher@amd.com
2 parents dc15159 + 6d87dc9 commit edaf690

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed
 

‎drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ static const struct amdgpu_px_quirk amdgpu_px_quirk_list[] = {
576576
{ 0x1002, 0x6900, 0x1028, 0x0812, AMDGPU_PX_QUIRK_FORCE_ATPX },
577577
{ 0x1002, 0x6900, 0x1028, 0x0813, AMDGPU_PX_QUIRK_FORCE_ATPX },
578578
{ 0x1002, 0x6900, 0x1025, 0x125A, AMDGPU_PX_QUIRK_FORCE_ATPX },
579+
{ 0x1002, 0x6900, 0x17AA, 0x3806, AMDGPU_PX_QUIRK_FORCE_ATPX },
579580
{ 0, 0, 0, 0, 0 },
580581
};
581582

‎drivers/gpu/drm/amd/powerplay/hwmgr/vega10_processpptables.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "vega10_pptable.h"
3333

3434
#define NUM_DSPCLK_LEVELS 8
35+
#define VEGA10_ENGINECLOCK_HARDMAX 198000
3536

3637
static void set_hw_cap(struct pp_hwmgr *hwmgr, bool enable,
3738
enum phm_platform_caps cap)
@@ -258,7 +259,26 @@ static int init_over_drive_limits(
258259
struct pp_hwmgr *hwmgr,
259260
const ATOM_Vega10_POWERPLAYTABLE *powerplay_table)
260261
{
261-
hwmgr->platform_descriptor.overdriveLimit.engineClock =
262+
const ATOM_Vega10_GFXCLK_Dependency_Table *gfxclk_dep_table =
263+
(const ATOM_Vega10_GFXCLK_Dependency_Table *)
264+
(((unsigned long) powerplay_table) +
265+
le16_to_cpu(powerplay_table->usGfxclkDependencyTableOffset));
266+
bool is_acg_enabled = false;
267+
ATOM_Vega10_GFXCLK_Dependency_Record_V2 *patom_record_v2;
268+
269+
if (gfxclk_dep_table->ucRevId == 1) {
270+
patom_record_v2 =
271+
(ATOM_Vega10_GFXCLK_Dependency_Record_V2 *)gfxclk_dep_table->entries;
272+
is_acg_enabled =
273+
(bool)patom_record_v2[gfxclk_dep_table->ucNumEntries-1].ucACGEnable;
274+
}
275+
276+
if (powerplay_table->ulMaxODEngineClock > VEGA10_ENGINECLOCK_HARDMAX &&
277+
!is_acg_enabled)
278+
hwmgr->platform_descriptor.overdriveLimit.engineClock =
279+
VEGA10_ENGINECLOCK_HARDMAX;
280+
else
281+
hwmgr->platform_descriptor.overdriveLimit.engineClock =
262282
le32_to_cpu(powerplay_table->ulMaxODEngineClock);
263283
hwmgr->platform_descriptor.overdriveLimit.memoryClock =
264284
le32_to_cpu(powerplay_table->ulMaxODMemoryClock);

0 commit comments

Comments
 (0)
Failed to load comments.