mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
amd-drm-fixes-6.16-2025-06-05:
amdgpu: - IP discovery fix - Cleaner shader fix for GC 10.1.x - OD fix - UserQ fixes - Non-OLED panel fix - Misc display fixes - Brightness fixes amdkfd: - Enable CONFIG_HSA_AMD on RISCV -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCaEJKygAKCRC93/aFa7yZ 2NywAPwNSYqRsi3maaUP9p8nQ9gAXn2SJddBGqhQNuUxY1S8hAEApUi3EmJztJvF dEaJ10E8zk1Tt81ma5xrxaAn4GkBxgM= =ZUeq -----END PGP SIGNATURE----- Merge tag 'amd-drm-fixes-6.16-2025-06-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.16-2025-06-05: amdgpu: - IP discovery fix - Cleaner shader fix for GC 10.1.x - OD fix - UserQ fixes - Non-OLED panel fix - Misc display fixes - Brightness fixes amdkfd: - Enable CONFIG_HSA_AMD on RISCV Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://lore.kernel.org/r/20250606015932.835829-1-alexander.deucher@amd.com
This commit is contained in:
commit
a9062ece98
|
|
@ -270,9 +270,10 @@ static int amdgpu_discovery_read_binary_from_sysmem(struct amdgpu_device *adev,
|
|||
static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
|
||||
uint8_t *binary)
|
||||
{
|
||||
bool sz_valid = true;
|
||||
uint64_t vram_size;
|
||||
u32 msg;
|
||||
int i, ret = 0;
|
||||
u32 msg;
|
||||
|
||||
if (!amdgpu_sriov_vf(adev)) {
|
||||
/* It can take up to a second for IFWI init to complete on some dGPUs,
|
||||
|
|
@ -291,9 +292,13 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
|
|||
}
|
||||
}
|
||||
|
||||
vram_size = (uint64_t)RREG32(mmRCC_CONFIG_MEMSIZE) << 20;
|
||||
vram_size = RREG32(mmRCC_CONFIG_MEMSIZE);
|
||||
if (!vram_size || vram_size == U32_MAX)
|
||||
sz_valid = false;
|
||||
else
|
||||
vram_size <<= 20;
|
||||
|
||||
if (vram_size) {
|
||||
if (sz_valid) {
|
||||
uint64_t pos = vram_size - DISCOVERY_TMR_OFFSET;
|
||||
amdgpu_device_vram_access(adev, pos, (uint32_t *)binary,
|
||||
adev->mman.discovery_tmr_size, false);
|
||||
|
|
@ -301,6 +306,11 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
|
|||
ret = amdgpu_discovery_read_binary_from_sysmem(adev, binary);
|
||||
}
|
||||
|
||||
if (ret)
|
||||
dev_err(adev->dev,
|
||||
"failed to read discovery info from memory, vram size read: %llx",
|
||||
vram_size);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ amdgpu_gem_add_input_fence(struct drm_file *filp,
|
|||
return 0;
|
||||
|
||||
syncobj_handles = memdup_user(u64_to_user_ptr(syncobj_handles_array),
|
||||
sizeof(uint32_t) * num_syncobj_handles);
|
||||
size_mul(sizeof(uint32_t), num_syncobj_handles));
|
||||
if (IS_ERR(syncobj_handles))
|
||||
return PTR_ERR(syncobj_handles);
|
||||
|
||||
|
|
|
|||
|
|
@ -2228,6 +2228,9 @@ void amdgpu_gfx_profile_ring_begin_use(struct amdgpu_ring *ring)
|
|||
enum PP_SMC_POWER_PROFILE profile;
|
||||
int r;
|
||||
|
||||
if (amdgpu_dpm_is_overdrive_enabled(adev))
|
||||
return;
|
||||
|
||||
if (adev->gfx.num_gfx_rings)
|
||||
profile = PP_SMC_POWER_PROFILE_FULLSCREEN3D;
|
||||
else
|
||||
|
|
@ -2258,6 +2261,11 @@ void amdgpu_gfx_profile_ring_begin_use(struct amdgpu_ring *ring)
|
|||
|
||||
void amdgpu_gfx_profile_ring_end_use(struct amdgpu_ring *ring)
|
||||
{
|
||||
struct amdgpu_device *adev = ring->adev;
|
||||
|
||||
if (amdgpu_dpm_is_overdrive_enabled(adev))
|
||||
return;
|
||||
|
||||
atomic_dec(&ring->adev->gfx.total_submission_cnt);
|
||||
|
||||
schedule_delayed_work(&ring->adev->gfx.idle_work, GFX_PROFILE_IDLE_TIMEOUT);
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
|
|||
|
||||
num_syncobj_handles = args->num_syncobj_handles;
|
||||
syncobj_handles = memdup_user(u64_to_user_ptr(args->syncobj_handles),
|
||||
sizeof(u32) * num_syncobj_handles);
|
||||
size_mul(sizeof(u32), num_syncobj_handles));
|
||||
if (IS_ERR(syncobj_handles))
|
||||
return PTR_ERR(syncobj_handles);
|
||||
|
||||
|
|
@ -612,13 +612,13 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
|
|||
|
||||
num_read_bo_handles = wait_info->num_bo_read_handles;
|
||||
bo_handles_read = memdup_user(u64_to_user_ptr(wait_info->bo_read_handles),
|
||||
sizeof(u32) * num_read_bo_handles);
|
||||
size_mul(sizeof(u32), num_read_bo_handles));
|
||||
if (IS_ERR(bo_handles_read))
|
||||
return PTR_ERR(bo_handles_read);
|
||||
|
||||
num_write_bo_handles = wait_info->num_bo_write_handles;
|
||||
bo_handles_write = memdup_user(u64_to_user_ptr(wait_info->bo_write_handles),
|
||||
sizeof(u32) * num_write_bo_handles);
|
||||
size_mul(sizeof(u32), num_write_bo_handles));
|
||||
if (IS_ERR(bo_handles_write)) {
|
||||
r = PTR_ERR(bo_handles_write);
|
||||
goto free_bo_handles_read;
|
||||
|
|
@ -626,7 +626,7 @@ int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
|
|||
|
||||
num_syncobj = wait_info->num_syncobj_handles;
|
||||
syncobj_handles = memdup_user(u64_to_user_ptr(wait_info->syncobj_handles),
|
||||
sizeof(u32) * num_syncobj);
|
||||
size_mul(sizeof(u32), num_syncobj));
|
||||
if (IS_ERR(syncobj_handles)) {
|
||||
r = PTR_ERR(syncobj_handles);
|
||||
goto free_bo_handles_write;
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ static const u32 gfx_10_1_10_cleaner_shader_hex[] = {
|
|||
0xd70f6a01, 0x000202ff,
|
||||
0x00000400, 0x80828102,
|
||||
0xbf84fff7, 0xbefc03ff,
|
||||
0x00000068, 0xbe803080,
|
||||
0xbe813080, 0xbe823080,
|
||||
0xbe833080, 0x80fc847c,
|
||||
0x00000068, 0xbe803000,
|
||||
0xbe813000, 0xbe823000,
|
||||
0xbe833000, 0x80fc847c,
|
||||
0xbf84fffa, 0xbeea0480,
|
||||
0xbeec0480, 0xbeee0480,
|
||||
0xbef00480, 0xbef20480,
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ shader main
|
|||
type(CS)
|
||||
wave_size(32)
|
||||
// Note: original source code from SQ team
|
||||
|
||||
//
|
||||
// Create 32 waves in a threadgroup (CS waves)
|
||||
// Each allocates 64 VGPRs
|
||||
|
|
@ -71,8 +70,8 @@ label_0005:
|
|||
s_sub_u32 s2, s2, 8
|
||||
s_cbranch_scc0 label_0005
|
||||
//
|
||||
s_mov_b32 s2, 0x80000000 // Bit31 is first_wave
|
||||
s_and_b32 s2, s2, s0 // sgpr0 has tg_size (first_wave) term as in ucode only COMPUTE_PGM_RSRC2.tg_size_en is set
|
||||
s_mov_b32 s2, 0x80000000 // Bit31 is first_wave
|
||||
s_and_b32 s2, s2, s1 // sgpr0 has tg_size (first_wave) term as in ucode only COMPUTE_PGM_RSRC2.tg_size_en is set
|
||||
s_cbranch_scc0 label_0023 // Clean LDS if its first wave of ThreadGroup/WorkGroup
|
||||
// CLEAR LDS
|
||||
//
|
||||
|
|
@ -99,10 +98,10 @@ label_001F:
|
|||
label_0023:
|
||||
s_mov_b32 m0, 0x00000068 // Loop 108/4=27 times (loop unrolled for performance)
|
||||
label_sgpr_loop:
|
||||
s_movreld_b32 s0, 0
|
||||
s_movreld_b32 s1, 0
|
||||
s_movreld_b32 s2, 0
|
||||
s_movreld_b32 s3, 0
|
||||
s_movreld_b32 s0, s0
|
||||
s_movreld_b32 s1, s0
|
||||
s_movreld_b32 s2, s0
|
||||
s_movreld_b32 s3, s0
|
||||
s_sub_u32 m0, m0, 4
|
||||
s_cbranch_scc0 label_sgpr_loop
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#include "gc/gc_12_0_0_offset.h"
|
||||
#include "gc/gc_12_0_0_sh_mask.h"
|
||||
#include "soc24_enum.h"
|
||||
#include "ivsrcid/gfx/irqsrcs_gfx_11_0_0.h"
|
||||
#include "ivsrcid/gfx/irqsrcs_gfx_12_0_0.h"
|
||||
|
||||
#include "soc15.h"
|
||||
#include "clearstate_gfx12.h"
|
||||
|
|
@ -1453,28 +1453,28 @@ static int gfx_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
|
|||
|
||||
/* EOP Event */
|
||||
r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GRBM_CP,
|
||||
GFX_11_0_0__SRCID__CP_EOP_INTERRUPT,
|
||||
GFX_12_0_0__SRCID__CP_EOP_INTERRUPT,
|
||||
&adev->gfx.eop_irq);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
/* Bad opcode Event */
|
||||
r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GRBM_CP,
|
||||
GFX_11_0_0__SRCID__CP_BAD_OPCODE_ERROR,
|
||||
GFX_12_0_0__SRCID__CP_BAD_OPCODE_ERROR,
|
||||
&adev->gfx.bad_op_irq);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
/* Privileged reg */
|
||||
r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GRBM_CP,
|
||||
GFX_11_0_0__SRCID__CP_PRIV_REG_FAULT,
|
||||
GFX_12_0_0__SRCID__CP_PRIV_REG_FAULT,
|
||||
&adev->gfx.priv_reg_irq);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
/* Privileged inst */
|
||||
r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GRBM_CP,
|
||||
GFX_11_0_0__SRCID__CP_PRIV_INSTR_FAULT,
|
||||
GFX_12_0_0__SRCID__CP_PRIV_INSTR_FAULT,
|
||||
&adev->gfx.priv_inst_irq);
|
||||
if (r)
|
||||
return r;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "gc/gc_12_0_0_offset.h"
|
||||
#include "gc/gc_12_0_0_sh_mask.h"
|
||||
#include "hdp/hdp_6_0_0_offset.h"
|
||||
#include "ivsrcid/gfx/irqsrcs_gfx_11_0_0.h"
|
||||
#include "ivsrcid/gfx/irqsrcs_gfx_12_0_0.h"
|
||||
|
||||
#include "soc15_common.h"
|
||||
#include "soc15.h"
|
||||
|
|
@ -43,6 +43,7 @@
|
|||
#include "sdma_v7_0.h"
|
||||
#include "v12_structs.h"
|
||||
#include "mes_userqueue.h"
|
||||
#include "amdgpu_userq_fence.h"
|
||||
|
||||
MODULE_FIRMWARE("amdgpu/sdma_7_0_0.bin");
|
||||
MODULE_FIRMWARE("amdgpu/sdma_7_0_1.bin");
|
||||
|
|
@ -910,6 +911,9 @@ static int sdma_v7_0_mqd_init(struct amdgpu_device *adev, void *mqd,
|
|||
m->sdmax_rlcx_csa_addr_lo = lower_32_bits(prop->csa_addr);
|
||||
m->sdmax_rlcx_csa_addr_hi = upper_32_bits(prop->csa_addr);
|
||||
|
||||
m->sdmax_rlcx_mcu_dbg0 = lower_32_bits(prop->fence_address);
|
||||
m->sdmax_rlcx_mcu_dbg1 = upper_32_bits(prop->fence_address);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1296,11 +1300,18 @@ static int sdma_v7_0_sw_init(struct amdgpu_ip_block *ip_block)
|
|||
|
||||
/* SDMA trap event */
|
||||
r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GFX,
|
||||
GFX_11_0_0__SRCID__SDMA_TRAP,
|
||||
GFX_12_0_0__SRCID__SDMA_TRAP,
|
||||
&adev->sdma.trap_irq);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
/* SDMA user fence event */
|
||||
r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GFX,
|
||||
GFX_12_0_0__SRCID__SDMA_FENCE,
|
||||
&adev->sdma.fence_irq);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
for (i = 0; i < adev->sdma.num_instances; i++) {
|
||||
ring = &adev->sdma.instance[i].ring;
|
||||
ring->ring_obj = NULL;
|
||||
|
|
@ -1526,25 +1537,9 @@ static int sdma_v7_0_process_trap_irq(struct amdgpu_device *adev,
|
|||
struct amdgpu_iv_entry *entry)
|
||||
{
|
||||
int instances, queue;
|
||||
uint32_t mes_queue_id = entry->src_data[0];
|
||||
|
||||
DRM_DEBUG("IH: SDMA trap\n");
|
||||
|
||||
if (adev->enable_mes && (mes_queue_id & AMDGPU_FENCE_MES_QUEUE_FLAG)) {
|
||||
struct amdgpu_mes_queue *queue;
|
||||
|
||||
mes_queue_id &= AMDGPU_FENCE_MES_QUEUE_ID_MASK;
|
||||
|
||||
spin_lock(&adev->mes.queue_id_lock);
|
||||
queue = idr_find(&adev->mes.queue_id_idr, mes_queue_id);
|
||||
if (queue) {
|
||||
DRM_DEBUG("process smda queue id = %d\n", mes_queue_id);
|
||||
amdgpu_fence_process(queue->ring);
|
||||
}
|
||||
spin_unlock(&adev->mes.queue_id_lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
queue = entry->ring_id & 0xf;
|
||||
instances = (entry->ring_id & 0xf0) >> 4;
|
||||
if (instances > 1) {
|
||||
|
|
@ -1566,6 +1561,29 @@ static int sdma_v7_0_process_trap_irq(struct amdgpu_device *adev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int sdma_v7_0_process_fence_irq(struct amdgpu_device *adev,
|
||||
struct amdgpu_irq_src *source,
|
||||
struct amdgpu_iv_entry *entry)
|
||||
{
|
||||
u32 doorbell_offset = entry->src_data[0];
|
||||
|
||||
if (adev->enable_mes && doorbell_offset) {
|
||||
struct amdgpu_userq_fence_driver *fence_drv = NULL;
|
||||
struct xarray *xa = &adev->userq_xa;
|
||||
unsigned long flags;
|
||||
|
||||
doorbell_offset >>= SDMA0_QUEUE0_DOORBELL_OFFSET__OFFSET__SHIFT;
|
||||
|
||||
xa_lock_irqsave(xa, flags);
|
||||
fence_drv = xa_load(xa, doorbell_offset);
|
||||
if (fence_drv)
|
||||
amdgpu_userq_fence_driver_process(fence_drv);
|
||||
xa_unlock_irqrestore(xa, flags);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sdma_v7_0_process_illegal_inst_irq(struct amdgpu_device *adev,
|
||||
struct amdgpu_irq_src *source,
|
||||
struct amdgpu_iv_entry *entry)
|
||||
|
|
@ -1703,6 +1721,10 @@ static const struct amdgpu_irq_src_funcs sdma_v7_0_trap_irq_funcs = {
|
|||
.process = sdma_v7_0_process_trap_irq,
|
||||
};
|
||||
|
||||
static const struct amdgpu_irq_src_funcs sdma_v7_0_fence_irq_funcs = {
|
||||
.process = sdma_v7_0_process_fence_irq,
|
||||
};
|
||||
|
||||
static const struct amdgpu_irq_src_funcs sdma_v7_0_illegal_inst_irq_funcs = {
|
||||
.process = sdma_v7_0_process_illegal_inst_irq,
|
||||
};
|
||||
|
|
@ -1712,6 +1734,7 @@ static void sdma_v7_0_set_irq_funcs(struct amdgpu_device *adev)
|
|||
adev->sdma.trap_irq.num_types = AMDGPU_SDMA_IRQ_INSTANCE0 +
|
||||
adev->sdma.num_instances;
|
||||
adev->sdma.trap_irq.funcs = &sdma_v7_0_trap_irq_funcs;
|
||||
adev->sdma.fence_irq.funcs = &sdma_v7_0_fence_irq_funcs;
|
||||
adev->sdma.illegal_inst_irq.funcs = &sdma_v7_0_illegal_inst_irq_funcs;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
config HSA_AMD
|
||||
bool "HSA kernel driver for AMD GPU devices"
|
||||
depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
|
||||
depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64 || (RISCV && 64BIT))
|
||||
select HMM_MIRROR
|
||||
select MMU_NOTIFIER
|
||||
select DRM_AMDGPU_USERPTR
|
||||
|
|
|
|||
|
|
@ -4910,6 +4910,7 @@ amdgpu_dm_register_backlight_device(struct amdgpu_dm_connector *aconnector)
|
|||
struct backlight_properties props = { 0 };
|
||||
struct amdgpu_dm_backlight_caps caps = { 0 };
|
||||
char bl_name[16];
|
||||
int min, max;
|
||||
|
||||
if (aconnector->bl_idx == -1)
|
||||
return;
|
||||
|
|
@ -4922,11 +4923,15 @@ amdgpu_dm_register_backlight_device(struct amdgpu_dm_connector *aconnector)
|
|||
}
|
||||
|
||||
amdgpu_acpi_get_backlight_caps(&caps);
|
||||
if (caps.caps_valid) {
|
||||
if (caps.caps_valid && get_brightness_range(&caps, &min, &max)) {
|
||||
if (power_supply_is_system_supplied() > 0)
|
||||
props.brightness = caps.ac_level;
|
||||
props.brightness = (max - min) * DIV_ROUND_CLOSEST(caps.ac_level, 100);
|
||||
else
|
||||
props.brightness = caps.dc_level;
|
||||
props.brightness = (max - min) * DIV_ROUND_CLOSEST(caps.dc_level, 100);
|
||||
/* min is zero, so max needs to be adjusted */
|
||||
props.max_brightness = max - min;
|
||||
drm_dbg(drm, "Backlight caps: min: %d, max: %d, ac %d, dc %d\n", min, max,
|
||||
caps.ac_level, caps.dc_level);
|
||||
} else
|
||||
props.brightness = AMDGPU_MAX_BL_LEVEL;
|
||||
|
||||
|
|
|
|||
|
|
@ -952,8 +952,8 @@ void dce110_edp_backlight_control(
|
|||
struct dc_context *ctx = link->ctx;
|
||||
struct bp_transmitter_control cntl = { 0 };
|
||||
uint8_t pwrseq_instance = 0;
|
||||
unsigned int pre_T11_delay = OLED_PRE_T11_DELAY;
|
||||
unsigned int post_T7_delay = OLED_POST_T7_DELAY;
|
||||
unsigned int pre_T11_delay = (link->dpcd_sink_ext_caps.bits.oled ? OLED_PRE_T11_DELAY : 0);
|
||||
unsigned int post_T7_delay = (link->dpcd_sink_ext_caps.bits.oled ? OLED_POST_T7_DELAY : 0);
|
||||
|
||||
if (dal_graphics_object_id_get_connector_id(link->link_enc->connector)
|
||||
!= CONNECTOR_ID_EDP) {
|
||||
|
|
@ -1069,7 +1069,8 @@ void dce110_edp_backlight_control(
|
|||
if (!enable) {
|
||||
/*follow oem panel config's requirement*/
|
||||
pre_T11_delay += link->panel_config.pps.extra_pre_t11_ms;
|
||||
msleep(pre_T11_delay);
|
||||
if (pre_T11_delay)
|
||||
msleep(pre_T11_delay);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1220,6 +1221,9 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)
|
|||
struct dc_link *link = stream->link;
|
||||
struct dce_hwseq *hws = link->dc->hwseq;
|
||||
|
||||
if (hws && hws->wa_state.skip_blank_stream)
|
||||
return;
|
||||
|
||||
if (link->local_sink && link->local_sink->sink_signal == SIGNAL_TYPE_EDP) {
|
||||
if (!link->skip_implict_edp_power_control)
|
||||
hws->funcs.edp_backlight_control(link, false);
|
||||
|
|
|
|||
|
|
@ -526,9 +526,15 @@ static void dcn31_reset_back_end_for_pipe(
|
|||
|
||||
link = pipe_ctx->stream->link;
|
||||
|
||||
if (dc->hwseq)
|
||||
dc->hwseq->wa_state.skip_blank_stream = false;
|
||||
|
||||
if ((!pipe_ctx->stream->dpms_off || link->link_status.link_active) &&
|
||||
(link->connector_signal == SIGNAL_TYPE_EDP))
|
||||
(link->connector_signal == SIGNAL_TYPE_EDP)) {
|
||||
dc->hwss.blank_stream(pipe_ctx);
|
||||
if (dc->hwseq)
|
||||
dc->hwseq->wa_state.skip_blank_stream = true;
|
||||
}
|
||||
|
||||
pipe_ctx->stream_res.tg->funcs->set_dsc_config(
|
||||
pipe_ctx->stream_res.tg,
|
||||
|
|
@ -570,7 +576,8 @@ static void dcn31_reset_back_end_for_pipe(
|
|||
pipe_ctx->stream_res.audio = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (dc->hwseq)
|
||||
dc->hwseq->wa_state.skip_blank_stream = false;
|
||||
pipe_ctx->stream = NULL;
|
||||
DC_LOG_DEBUG("Reset back end for pipe %d, tg:%d\n",
|
||||
pipe_ctx->pipe_idx, pipe_ctx->stream_res.tg->inst);
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ struct hwseq_wa_state {
|
|||
bool DEGVIDCN10_253_applied;
|
||||
bool disallow_self_refresh_during_multi_plane_transition_applied;
|
||||
unsigned int disallow_self_refresh_during_multi_plane_transition_applied_on_frame;
|
||||
bool skip_blank_stream;
|
||||
};
|
||||
|
||||
struct pipe_ctx;
|
||||
|
|
|
|||
|
|
@ -2023,7 +2023,7 @@ static bool retrieve_link_cap(struct dc_link *link)
|
|||
/* Read DP tunneling information. */
|
||||
status = dpcd_get_tunneling_device_data(link);
|
||||
if (status != DC_OK)
|
||||
dm_error("%s: Read DP tunneling device data failed.\n", __func__);
|
||||
DC_LOG_DP2("%s: Read DP tunneling device data failed.\n", __func__);
|
||||
|
||||
retrieve_cable_id(link);
|
||||
dpcd_write_cable_id_to_dprx(link);
|
||||
|
|
|
|||
74
drivers/gpu/drm/amd/include/ivsrcid/gfx/irqsrcs_gfx_12_0_0.h
Normal file
74
drivers/gpu/drm/amd/include/ivsrcid/gfx/irqsrcs_gfx_12_0_0.h
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/* SPDX-License-Identifier: MIT */
|
||||
/*
|
||||
* Copyright 2024 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
#ifndef __IRQSRCS_GFX_12_0_0_H__
|
||||
#define __IRQSRCS_GFX_12_0_0_H__
|
||||
|
||||
#define GFX_12_0_0__SRCID__UTCL2_FAULT 0 // UTCL2 has encountered a fault or retry scenario
|
||||
#define GFX_12_0_0__SRCID__UTCL2_DATA_POISONING 1 // UTCL2 for data poisoning
|
||||
#define GFX_12_0_0__SRCID__MEM_ACCES_MON 10 // 0x0A EA memory access monitor interrupt
|
||||
#define GFX_12_0_0__SRCID__SDMA_ATOMIC_RTN_DONE 48 // 0x30 SDMA atomic*_rtn ops complete
|
||||
#define GFX_12_0_0__SRCID__SDMA_TRAP 49 // 0x31 Trap
|
||||
#define GFX_12_0_0__SRCID__SDMA_SRBMWRITE 50 // 0x32 SRBM write Protection
|
||||
#define GFX_12_0_0__SRCID__SDMA_CTXEMPTY 51 // 0x33 Context Empty
|
||||
#define GFX_12_0_0__SRCID__SDMA_PREEMPT 52 // 0x34 SDMA New Run List
|
||||
#define GFX_12_0_0__SRCID__SDMA_IB_PREEMPT 53 // 0x35 sdma mid - command buffer preempt interrupt
|
||||
#define GFX_12_0_0__SRCID__SDMA_DOORBELL_INVALID 54 // 0x36 Doorbell BE invalid
|
||||
#define GFX_12_0_0__SRCID__SDMA_QUEUE_HANG 55 // 0x37 Queue hang or Command timeout
|
||||
#define GFX_12_0_0__SRCID__SDMA_ATOMIC_TIMEOUT 56 // 0x38 SDMA atomic CMPSWAP loop timeout
|
||||
#define GFX_12_0_0__SRCID__SDMA_POLL_TIMEOUT 57 // 0x39 SRBM read poll timeout
|
||||
#define GFX_12_0_0__SRCID__SDMA_PAGE_TIMEOUT 58 // 0x3A Page retry timeout after UTCL2 return nack = 1
|
||||
#define GFX_12_0_0__SRCID__SDMA_PAGE_NULL 59 // 0x3B Page Null from UTCL2 when nack = 2
|
||||
#define GFX_12_0_0__SRCID__SDMA_PAGE_FAULT 60 // 0x3C Page Fault Error from UTCL2 when nack = 3
|
||||
#define GFX_12_0_0__SRCID__SDMA_VM_HOLE 61 // 0x3D MC or SEM address in VM hole
|
||||
#define GFX_12_0_0__SRCID__SDMA_ECC 62 // 0x3E ECC Error
|
||||
#define GFX_12_0_0__SRCID__SDMA_FROZEN 63 // 0x3F SDMA Frozen
|
||||
#define GFX_12_0_0__SRCID__SDMA_SRAM_ECC 64 // 0x40 SRAM ECC Error
|
||||
#define GFX_12_0_0__SRCID__SDMA_SEM_INCOMPLETE_TIMEOUT 65 // 0x41 GPF(Sem incomplete timeout)
|
||||
#define GFX_12_0_0__SRCID__SDMA_SEM_WAIT_FAIL_TIMEOUT 66 // 0x42 Semaphore wait fail timeout
|
||||
#define GFX_12_0_0__SRCID__SDMA_FENCE 70 // 0x46 User fence
|
||||
#define GFX_12_0_0__SRCID__RLC_GC_FED_INTERRUPT 128 // 0x80 FED Interrupt (for data poisoning)
|
||||
#define GFX_12_0_0__SRCID__CP_GENERIC_INT 177 // 0xB1 CP_GENERIC int
|
||||
#define GFX_12_0_0__SRCID__CP_PM4_PKT_RSVD_BIT_ERROR 180 // 0xB4 PM4 Pkt Rsvd Bits Error
|
||||
#define GFX_12_0_0__SRCID__CP_EOP_INTERRUPT 181 // 0xB5 End-of-Pipe Interrupt
|
||||
#define GFX_12_0_0__SRCID__CP_BAD_OPCODE_ERROR 183 // 0xB7 Bad Opcode Error
|
||||
#define GFX_12_0_0__SRCID__CP_PRIV_REG_FAULT 184 // 0xB8 Privileged Register Fault
|
||||
#define GFX_12_0_0__SRCID__CP_PRIV_INSTR_FAULT 185 // 0xB9 Privileged Instr Fault
|
||||
#define GFX_12_0_0__SRCID__CP_WAIT_MEM_SEM_FAULT 186 // 0xBA Wait Memory Semaphore Fault (Sync Object Fault)
|
||||
#define GFX_12_0_0__SRCID__CP_CTX_EMPTY_INTERRUPT 187 // 0xBB Context Empty Interrupt
|
||||
#define GFX_12_0_0__SRCID__CP_CTX_BUSY_INTERRUPT 188 // 0xBC Context Busy Interrupt
|
||||
#define GFX_12_0_0__SRCID__CP_ME_WAIT_REG_MEM_POLL_TIMEOUT 192 // 0xC0 CP.ME Wait_Reg_Mem Poll Timeout
|
||||
#define GFX_12_0_0__SRCID__CP_SIG_INCOMPLETE 193 // 0xC1 "Surface Probe Fault Signal Incomplete"
|
||||
#define GFX_12_0_0__SRCID__CP_PREEMPT_ACK 194 // 0xC2 Preemption Ack-wledge
|
||||
#define GFX_12_0_0__SRCID__CP_GPF 195 // 0xC3 General Protection Fault (GPF)
|
||||
#define GFX_12_0_0__SRCID__CP_GDS_ALLOC_ERROR 196 // 0xC4 GDS Alloc Error
|
||||
#define GFX_12_0_0__SRCID__CP_ECC_ERROR 197 // 0xC5 ECC Error
|
||||
#define GFX_12_0_0__SRCID__CP_COMPUTE_QUERY_STATUS 199 // 0xC7 Compute query status
|
||||
#define GFX_12_0_0__SRCID__CP_VM_DOORBELL 200 // 0xC8 Unattached VM Doorbell Received
|
||||
#define GFX_12_0_0__SRCID__CP_FUE_ERROR 201 // 0xC9 ECC FUE Error
|
||||
#define GFX_12_0_0__SRCID__RLC_STRM_PERF_MONITOR_INTERRUPT 202 // 0xCA Streaming Perf Monitor Interrupt
|
||||
#define GFX_12_0_0__SRCID__GRBM_RD_TIMEOUT_ERROR 232 // 0xE8 CRead timeout error
|
||||
#define GFX_12_0_0__SRCID__GRBM_REG_GUI_IDLE 233 // 0xE9 Register GUI Idle
|
||||
#define GFX_12_0_0__SRCID__SQ_INTERRUPT_ID 239 // 0xEF SQ Interrupt (ttrace wrap, errors)
|
||||
|
||||
#endif
|
||||
|
|
@ -1697,6 +1697,28 @@ int amdgpu_dpm_is_overdrive_supported(struct amdgpu_device *adev)
|
|||
}
|
||||
}
|
||||
|
||||
int amdgpu_dpm_is_overdrive_enabled(struct amdgpu_device *adev)
|
||||
{
|
||||
if (is_support_sw_smu(adev)) {
|
||||
struct smu_context *smu = adev->powerplay.pp_handle;
|
||||
|
||||
return smu->od_enabled;
|
||||
} else {
|
||||
struct pp_hwmgr *hwmgr;
|
||||
|
||||
/*
|
||||
* dpm on some legacy asics don't carry od_enabled member
|
||||
* as its pp_handle is casted directly from adev.
|
||||
*/
|
||||
if (amdgpu_dpm_is_legacy_dpm(adev))
|
||||
return false;
|
||||
|
||||
hwmgr = (struct pp_hwmgr *)adev->powerplay.pp_handle;
|
||||
|
||||
return hwmgr->od_enabled;
|
||||
}
|
||||
}
|
||||
|
||||
int amdgpu_dpm_set_pp_table(struct amdgpu_device *adev,
|
||||
const char *buf,
|
||||
size_t size)
|
||||
|
|
|
|||
|
|
@ -563,6 +563,7 @@ int amdgpu_dpm_get_smu_prv_buf_details(struct amdgpu_device *adev,
|
|||
void **addr,
|
||||
size_t *size);
|
||||
int amdgpu_dpm_is_overdrive_supported(struct amdgpu_device *adev);
|
||||
int amdgpu_dpm_is_overdrive_enabled(struct amdgpu_device *adev);
|
||||
int amdgpu_dpm_set_pp_table(struct amdgpu_device *adev,
|
||||
const char *buf,
|
||||
size_t size);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user