Merge tag 'drm-next-2025-08-01' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Just a bunch of amdgpu and xe fixes. amdgpu: - DSC divide by 0 fix - clang fix - DC debugfs fix - Userq fixes - Avoid extra evict-restore with KFD - Backlight fix - Documentation fix - RAS fix - Add new kicker handling - DSC fix for DCN 3.1.4 - PSR fix - Atomic fix - DC reset fixes - DCN 3.0.1 fix - MMHUB client mapping fix xe: - Fix BMG probe on unsupported mailbox command - Fix OA static checker warning about null gt - Fix a NULL vs IS_ERR() bug in xe_i2c_register_adapter - Fix missing unwind goto in GuC/HuC - Don't register I2C devices if VF - Clear whole GuC g2h_fence during initialization - Avoid call kfree for drmm_kzalloc - Fix pci_dev reference leak on configfs - SRIOV: Disable CSC support on VF * tag 'drm-next-2025-08-01' of https://gitlab.freedesktop.org/drm/kernel: (24 commits) drm/xe/vf: Disable CSC support on VF drm/amdgpu: update mmhub 4.1.0 client id mappings drm/amd/display: Allow DCN301 to clear update flags drm/amd/display: Pass up errors for reset GPU that fails to init HW drm/amd/display: Only finalize atomic_obj if it was initialized drm/amd/display: Avoid configuring PSR granularity if PSR-SU not supported drm/amd/display: Disable dsc_power_gate for dcn314 by default drm/amdgpu: add kicker fws loading for gfx12/smu14/psp14 drm/amd/amdgpu: fix missing lock for cper.ring->rptr/wptr access drm/amd/display: Fix misuse of /** to /* in 'dce_i2c_hw.c' drm/amd/display: fix initial backlight brightness calculation drm/amdgpu: Avoid extra evict-restore process. drm/amdgpu: track whether a queue is a kernel queue in amdgpu_mqd_prop drm/amdgpu: check if hubbub is NULL in debugfs/amdgpu_dm_capabilities drm/amdgpu: Initialize data to NULL in imu_v12_0_program_rlc_ram() drm/amd/display: Fix divide by zero when calculating min ODM factor drm/xe/configfs: Fix pci_dev reference leak drm/xe/hw_engine_group: Avoid call kfree() for drmm_kzalloc() drm/xe/guc: Clear whole g2h_fence during initialization drm/xe/vf: Don't register I2C devices if VF ...
This commit is contained in:
@@ -883,6 +883,7 @@ struct amdgpu_mqd_prop {
|
||||
uint64_t csa_addr;
|
||||
uint64_t fence_address;
|
||||
bool tmz_queue;
|
||||
bool kernel_queue;
|
||||
};
|
||||
|
||||
struct amdgpu_mqd {
|
||||
|
||||
@@ -459,7 +459,7 @@ calc:
|
||||
|
||||
void amdgpu_cper_ring_write(struct amdgpu_ring *ring, void *src, int count)
|
||||
{
|
||||
u64 pos, wptr_old, rptr = *ring->rptr_cpu_addr & ring->ptr_mask;
|
||||
u64 pos, wptr_old, rptr;
|
||||
int rec_cnt_dw = count >> 2;
|
||||
u32 chunk, ent_sz;
|
||||
u8 *s = (u8 *)src;
|
||||
@@ -472,9 +472,11 @@ void amdgpu_cper_ring_write(struct amdgpu_ring *ring, void *src, int count)
|
||||
return;
|
||||
}
|
||||
|
||||
wptr_old = ring->wptr;
|
||||
|
||||
mutex_lock(&ring->adev->cper.ring_lock);
|
||||
|
||||
wptr_old = ring->wptr;
|
||||
rptr = *ring->rptr_cpu_addr & ring->ptr_mask;
|
||||
|
||||
while (count) {
|
||||
ent_sz = amdgpu_cper_ring_get_ent_sz(ring, ring->wptr);
|
||||
chunk = umin(ent_sz, count);
|
||||
|
||||
@@ -719,6 +719,7 @@ static void amdgpu_ring_to_mqd_prop(struct amdgpu_ring *ring,
|
||||
prop->eop_gpu_addr = ring->eop_gpu_addr;
|
||||
prop->use_doorbell = ring->use_doorbell;
|
||||
prop->doorbell_index = ring->doorbell_index;
|
||||
prop->kernel_queue = true;
|
||||
|
||||
/* map_queues packet doesn't need activate the queue,
|
||||
* so only kiq need set this field.
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
static const struct kicker_device kicker_device_list[] = {
|
||||
{0x744B, 0x00},
|
||||
{0x7551, 0xC8}
|
||||
};
|
||||
|
||||
static void amdgpu_ucode_print_common_hdr(const struct common_firmware_header *hdr)
|
||||
|
||||
@@ -2414,13 +2414,11 @@ void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
|
||||
*/
|
||||
long amdgpu_vm_wait_idle(struct amdgpu_vm *vm, long timeout)
|
||||
{
|
||||
timeout = dma_resv_wait_timeout(vm->root.bo->tbo.base.resv,
|
||||
DMA_RESV_USAGE_BOOKKEEP,
|
||||
true, timeout);
|
||||
timeout = drm_sched_entity_flush(&vm->immediate, timeout);
|
||||
if (timeout <= 0)
|
||||
return timeout;
|
||||
|
||||
return dma_fence_wait_timeout(vm->last_unlocked, true, timeout);
|
||||
return drm_sched_entity_flush(&vm->delayed, timeout);
|
||||
}
|
||||
|
||||
static void amdgpu_vm_destroy_task_info(struct kref *kref)
|
||||
|
||||
@@ -79,6 +79,7 @@ MODULE_FIRMWARE("amdgpu/gc_12_0_1_pfp.bin");
|
||||
MODULE_FIRMWARE("amdgpu/gc_12_0_1_me.bin");
|
||||
MODULE_FIRMWARE("amdgpu/gc_12_0_1_mec.bin");
|
||||
MODULE_FIRMWARE("amdgpu/gc_12_0_1_rlc.bin");
|
||||
MODULE_FIRMWARE("amdgpu/gc_12_0_1_rlc_kicker.bin");
|
||||
MODULE_FIRMWARE("amdgpu/gc_12_0_1_toc.bin");
|
||||
|
||||
static const struct amdgpu_hwip_reg_entry gc_reg_list_12_0[] = {
|
||||
@@ -586,7 +587,7 @@ out:
|
||||
|
||||
static int gfx_v12_0_init_microcode(struct amdgpu_device *adev)
|
||||
{
|
||||
char ucode_prefix[15];
|
||||
char ucode_prefix[30];
|
||||
int err;
|
||||
const struct rlc_firmware_header_v2_0 *rlc_hdr;
|
||||
uint16_t version_major;
|
||||
@@ -613,9 +614,14 @@ static int gfx_v12_0_init_microcode(struct amdgpu_device *adev)
|
||||
amdgpu_gfx_cp_init_microcode(adev, AMDGPU_UCODE_ID_CP_RS64_ME_P0_STACK);
|
||||
|
||||
if (!amdgpu_sriov_vf(adev)) {
|
||||
err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
|
||||
AMDGPU_UCODE_REQUIRED,
|
||||
"amdgpu/%s_rlc.bin", ucode_prefix);
|
||||
if (amdgpu_is_kicker_fw(adev))
|
||||
err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
|
||||
AMDGPU_UCODE_REQUIRED,
|
||||
"amdgpu/%s_rlc_kicker.bin", ucode_prefix);
|
||||
else
|
||||
err = amdgpu_ucode_request(adev, &adev->gfx.rlc_fw,
|
||||
AMDGPU_UCODE_REQUIRED,
|
||||
"amdgpu/%s_rlc.bin", ucode_prefix);
|
||||
if (err)
|
||||
goto out;
|
||||
rlc_hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data;
|
||||
|
||||
@@ -34,12 +34,13 @@
|
||||
|
||||
MODULE_FIRMWARE("amdgpu/gc_12_0_0_imu.bin");
|
||||
MODULE_FIRMWARE("amdgpu/gc_12_0_1_imu.bin");
|
||||
MODULE_FIRMWARE("amdgpu/gc_12_0_1_imu_kicker.bin");
|
||||
|
||||
#define TRANSFER_RAM_MASK 0x001c0000
|
||||
|
||||
static int imu_v12_0_init_microcode(struct amdgpu_device *adev)
|
||||
{
|
||||
char ucode_prefix[15];
|
||||
char ucode_prefix[30];
|
||||
int err;
|
||||
const struct imu_firmware_header_v1_0 *imu_hdr;
|
||||
struct amdgpu_firmware_info *info = NULL;
|
||||
@@ -47,8 +48,12 @@ static int imu_v12_0_init_microcode(struct amdgpu_device *adev)
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix, sizeof(ucode_prefix));
|
||||
err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
|
||||
"amdgpu/%s_imu.bin", ucode_prefix);
|
||||
if (amdgpu_is_kicker_fw(adev))
|
||||
err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
|
||||
"amdgpu/%s_imu_kicker.bin", ucode_prefix);
|
||||
else
|
||||
err = amdgpu_ucode_request(adev, &adev->gfx.imu_fw, AMDGPU_UCODE_REQUIRED,
|
||||
"amdgpu/%s_imu.bin", ucode_prefix);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
@@ -362,7 +367,7 @@ static void program_imu_rlc_ram(struct amdgpu_device *adev,
|
||||
static void imu_v12_0_program_rlc_ram(struct amdgpu_device *adev)
|
||||
{
|
||||
u32 reg_data, size = 0;
|
||||
const u32 *data;
|
||||
const u32 *data = NULL;
|
||||
int r = -EINVAL;
|
||||
|
||||
WREG32_SOC15(GC, 0, regGFX_IMU_RLC_RAM_INDEX, 0x2);
|
||||
|
||||
@@ -37,39 +37,31 @@
|
||||
static const char *mmhub_client_ids_v4_1_0[][2] = {
|
||||
[0][0] = "VMC",
|
||||
[4][0] = "DCEDMC",
|
||||
[5][0] = "DCEVGA",
|
||||
[6][0] = "MP0",
|
||||
[7][0] = "MP1",
|
||||
[8][0] = "MPIO",
|
||||
[16][0] = "HDP",
|
||||
[17][0] = "LSDMA",
|
||||
[18][0] = "JPEG",
|
||||
[19][0] = "VCNU0",
|
||||
[21][0] = "VSCH",
|
||||
[22][0] = "VCNU1",
|
||||
[23][0] = "VCN1",
|
||||
[32+20][0] = "VCN0",
|
||||
[2][1] = "DBGUNBIO",
|
||||
[16][0] = "LSDMA",
|
||||
[17][0] = "JPEG",
|
||||
[19][0] = "VCNU",
|
||||
[22][0] = "VSCH",
|
||||
[23][0] = "HDP",
|
||||
[32+23][0] = "VCNRD",
|
||||
[3][1] = "DCEDWB",
|
||||
[4][1] = "DCEDMC",
|
||||
[5][1] = "DCEVGA",
|
||||
[6][1] = "MP0",
|
||||
[7][1] = "MP1",
|
||||
[8][1] = "MPIO",
|
||||
[10][1] = "DBGU0",
|
||||
[11][1] = "DBGU1",
|
||||
[12][1] = "DBGU2",
|
||||
[13][1] = "DBGU3",
|
||||
[12][1] = "DBGUNBIO",
|
||||
[14][1] = "XDP",
|
||||
[15][1] = "OSSSYS",
|
||||
[16][1] = "HDP",
|
||||
[17][1] = "LSDMA",
|
||||
[18][1] = "JPEG",
|
||||
[19][1] = "VCNU0",
|
||||
[20][1] = "VCN0",
|
||||
[21][1] = "VSCH",
|
||||
[22][1] = "VCNU1",
|
||||
[23][1] = "VCN1",
|
||||
[16][1] = "LSDMA",
|
||||
[17][1] = "JPEG",
|
||||
[18][1] = "VCNWR",
|
||||
[19][1] = "VCNU",
|
||||
[22][1] = "VSCH",
|
||||
[23][1] = "HDP",
|
||||
};
|
||||
|
||||
static uint32_t mmhub_v4_1_0_get_invalidate_req(unsigned int vmid,
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_2_sos.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_2_ta.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_3_sos.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_3_sos_kicker.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_3_ta.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_3_ta_kicker.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_5_toc.bin");
|
||||
MODULE_FIRMWARE("amdgpu/psp_14_0_5_ta.bin");
|
||||
|
||||
|
||||
@@ -3398,8 +3398,10 @@ static int dm_resume(struct amdgpu_ip_block *ip_block)
|
||||
link_enc_cfg_copy(adev->dm.dc->current_state, dc_state);
|
||||
|
||||
r = dm_dmub_hw_init(adev);
|
||||
if (r)
|
||||
if (r) {
|
||||
drm_err(adev_to_drm(adev), "DMUB interface failed to initialize: status=%d\n", r);
|
||||
return r;
|
||||
}
|
||||
|
||||
dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D0);
|
||||
dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0);
|
||||
@@ -4983,9 +4985,9 @@ amdgpu_dm_register_backlight_device(struct amdgpu_dm_connector *aconnector)
|
||||
caps = &dm->backlight_caps[aconnector->bl_idx];
|
||||
if (get_brightness_range(caps, &min, &max)) {
|
||||
if (power_supply_is_system_supplied() > 0)
|
||||
props.brightness = (max - min) * DIV_ROUND_CLOSEST(caps->ac_level, 100);
|
||||
props.brightness = DIV_ROUND_CLOSEST((max - min) * caps->ac_level, 100);
|
||||
else
|
||||
props.brightness = (max - min) * DIV_ROUND_CLOSEST(caps->dc_level, 100);
|
||||
props.brightness = DIV_ROUND_CLOSEST((max - min) * 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,
|
||||
@@ -5410,7 +5412,8 @@ fail:
|
||||
|
||||
static void amdgpu_dm_destroy_drm_device(struct amdgpu_display_manager *dm)
|
||||
{
|
||||
drm_atomic_private_obj_fini(&dm->atomic_obj);
|
||||
if (dm->atomic_obj.state)
|
||||
drm_atomic_private_obj_fini(&dm->atomic_obj);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -3988,7 +3988,7 @@ static int capabilities_show(struct seq_file *m, void *unused)
|
||||
|
||||
struct hubbub *hubbub = dc->res_pool->hubbub;
|
||||
|
||||
if (hubbub->funcs->get_mall_en)
|
||||
if (hubbub && hubbub->funcs->get_mall_en)
|
||||
hubbub->funcs->get_mall_en(hubbub, &mall_in_use);
|
||||
|
||||
if (dc->cap_funcs.get_subvp_en)
|
||||
|
||||
@@ -119,8 +119,10 @@ bool amdgpu_dm_link_setup_psr(struct dc_stream_state *stream)
|
||||
psr_config.allow_multi_disp_optimizations =
|
||||
(amdgpu_dc_feature_mask & DC_PSR_ALLOW_MULTI_DISP_OPT);
|
||||
|
||||
if (!psr_su_set_dsc_slice_height(dc, link, stream, &psr_config))
|
||||
return false;
|
||||
if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1) {
|
||||
if (!psr_su_set_dsc_slice_height(dc, link, stream, &psr_config))
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = dc_link_setup_psr(link, stream, &psr_config, &psr_context);
|
||||
|
||||
|
||||
@@ -5443,7 +5443,8 @@ bool dc_update_planes_and_stream(struct dc *dc,
|
||||
else
|
||||
ret = update_planes_and_stream_v2(dc, srf_updates,
|
||||
surface_count, stream, stream_update);
|
||||
if (ret && dc->ctx->dce_version >= DCN_VERSION_3_2)
|
||||
if (ret && (dc->ctx->dce_version >= DCN_VERSION_3_2 ||
|
||||
dc->ctx->dce_version == DCN_VERSION_3_01))
|
||||
clear_update_flags(srf_updates, surface_count, stream);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -377,10 +377,16 @@ static bool setup_engine(
|
||||
}
|
||||
|
||||
/**
|
||||
* cntl_stuck_hw_workaround - Workaround for I2C engine stuck state
|
||||
* @dce_i2c_hw: Pointer to dce_i2c_hw structure
|
||||
*
|
||||
* If we boot without an HDMI display, the I2C engine does not get initialized
|
||||
* correctly. One of its symptoms is that SW_USE_I2C does not get cleared after
|
||||
* acquire, so that after setting SW_DONE_USING_I2C on release, the engine gets
|
||||
* acquire. After setting SW_DONE_USING_I2C on release, the engine gets
|
||||
* immediately reacquired by SW, preventing DMUB from using it.
|
||||
*
|
||||
* This function checks the I2C arbitration status and applies a release
|
||||
* workaround if necessary.
|
||||
*/
|
||||
static void cntl_stuck_hw_workaround(struct dce_i2c_hw *dce_i2c_hw)
|
||||
{
|
||||
|
||||
@@ -152,7 +152,7 @@ uint32_t dc_bandwidth_in_kbps_from_timing(
|
||||
}
|
||||
|
||||
/* Forward Declerations */
|
||||
static unsigned int get_min_slice_count_for_odm(
|
||||
static unsigned int get_min_dsc_slice_count_for_odm(
|
||||
const struct display_stream_compressor *dsc,
|
||||
const struct dsc_enc_caps *dsc_enc_caps,
|
||||
const struct dc_crtc_timing *timing);
|
||||
@@ -466,7 +466,7 @@ bool dc_dsc_compute_bandwidth_range(
|
||||
struct dc_dsc_bw_range *range)
|
||||
{
|
||||
bool is_dsc_possible = false;
|
||||
unsigned int min_slice_count;
|
||||
unsigned int min_dsc_slice_count;
|
||||
struct dsc_enc_caps dsc_enc_caps;
|
||||
struct dsc_enc_caps dsc_common_caps;
|
||||
struct dc_dsc_config config = {0};
|
||||
@@ -478,14 +478,14 @@ bool dc_dsc_compute_bandwidth_range(
|
||||
|
||||
get_dsc_enc_caps(dsc, &dsc_enc_caps, timing->pix_clk_100hz);
|
||||
|
||||
min_slice_count = get_min_slice_count_for_odm(dsc, &dsc_enc_caps, timing);
|
||||
min_dsc_slice_count = get_min_dsc_slice_count_for_odm(dsc, &dsc_enc_caps, timing);
|
||||
|
||||
is_dsc_possible = intersect_dsc_caps(dsc_sink_caps, &dsc_enc_caps,
|
||||
timing->pixel_encoding, &dsc_common_caps);
|
||||
|
||||
if (is_dsc_possible)
|
||||
is_dsc_possible = setup_dsc_config(dsc_sink_caps, &dsc_enc_caps, 0, timing,
|
||||
&options, link_encoding, min_slice_count, &config);
|
||||
&options, link_encoding, min_dsc_slice_count, &config);
|
||||
|
||||
if (is_dsc_possible)
|
||||
is_dsc_possible = decide_dsc_bandwidth_range(min_bpp_x16, max_bpp_x16,
|
||||
@@ -593,14 +593,12 @@ static void build_dsc_enc_caps(
|
||||
|
||||
struct dc *dc;
|
||||
|
||||
memset(&single_dsc_enc_caps, 0, sizeof(struct dsc_enc_caps));
|
||||
|
||||
if (!dsc || !dsc->ctx || !dsc->ctx->dc || !dsc->funcs->dsc_get_single_enc_caps)
|
||||
return;
|
||||
|
||||
dc = dsc->ctx->dc;
|
||||
|
||||
if (!dc->clk_mgr || !dc->clk_mgr->funcs->get_max_clock_khz || !dc->res_pool)
|
||||
if (!dc->clk_mgr || !dc->clk_mgr->funcs->get_max_clock_khz || !dc->res_pool || dc->debug.disable_dsc)
|
||||
return;
|
||||
|
||||
/* get max DSCCLK from clk_mgr */
|
||||
@@ -634,7 +632,7 @@ static inline uint32_t dsc_div_by_10_round_up(uint32_t value)
|
||||
return (value + 9) / 10;
|
||||
}
|
||||
|
||||
static unsigned int get_min_slice_count_for_odm(
|
||||
static unsigned int get_min_dsc_slice_count_for_odm(
|
||||
const struct display_stream_compressor *dsc,
|
||||
const struct dsc_enc_caps *dsc_enc_caps,
|
||||
const struct dc_crtc_timing *timing)
|
||||
@@ -651,6 +649,10 @@ static unsigned int get_min_slice_count_for_odm(
|
||||
}
|
||||
}
|
||||
|
||||
/* validate parameters */
|
||||
if (max_dispclk_khz == 0 || dsc_enc_caps->max_slice_width == 0)
|
||||
return 1;
|
||||
|
||||
/* consider minimum odm slices required due to
|
||||
* 1) display pipe throughput (dispclk)
|
||||
* 2) max image width per slice
|
||||
@@ -669,13 +671,12 @@ static void get_dsc_enc_caps(
|
||||
{
|
||||
memset(dsc_enc_caps, 0, sizeof(struct dsc_enc_caps));
|
||||
|
||||
if (!dsc)
|
||||
if (!dsc || !dsc->ctx || !dsc->ctx->dc || dsc->ctx->dc->debug.disable_dsc)
|
||||
return;
|
||||
|
||||
/* check if reported cap global or only for a single DCN DSC enc */
|
||||
if (dsc->funcs->dsc_get_enc_caps) {
|
||||
if (!dsc->ctx->dc->debug.disable_dsc)
|
||||
dsc->funcs->dsc_get_enc_caps(dsc_enc_caps, pixel_clock_100Hz);
|
||||
dsc->funcs->dsc_get_enc_caps(dsc_enc_caps, pixel_clock_100Hz);
|
||||
} else {
|
||||
build_dsc_enc_caps(dsc, dsc_enc_caps);
|
||||
}
|
||||
@@ -1295,10 +1296,10 @@ bool dc_dsc_compute_config(
|
||||
{
|
||||
bool is_dsc_possible = false;
|
||||
struct dsc_enc_caps dsc_enc_caps;
|
||||
unsigned int min_slice_count;
|
||||
unsigned int min_dsc_slice_count;
|
||||
get_dsc_enc_caps(dsc, &dsc_enc_caps, timing->pix_clk_100hz);
|
||||
|
||||
min_slice_count = get_min_slice_count_for_odm(dsc, &dsc_enc_caps, timing);
|
||||
min_dsc_slice_count = get_min_dsc_slice_count_for_odm(dsc, &dsc_enc_caps, timing);
|
||||
|
||||
is_dsc_possible = setup_dsc_config(dsc_sink_caps,
|
||||
&dsc_enc_caps,
|
||||
@@ -1306,7 +1307,7 @@ bool dc_dsc_compute_config(
|
||||
timing,
|
||||
options,
|
||||
link_encoding,
|
||||
min_slice_count,
|
||||
min_dsc_slice_count,
|
||||
dsc_cfg);
|
||||
return is_dsc_possible;
|
||||
}
|
||||
|
||||
@@ -926,6 +926,7 @@ static const struct dc_debug_options debug_defaults_drv = {
|
||||
.seamless_boot_odm_combine = true,
|
||||
.enable_legacy_fast_update = true,
|
||||
.using_dml2 = false,
|
||||
.disable_dsc_power_gate = true,
|
||||
};
|
||||
|
||||
static const struct dc_panel_config panel_config_defaults = {
|
||||
|
||||
@@ -62,13 +62,14 @@ const int decoded_link_width[8] = {0, 1, 2, 4, 8, 12, 16, 32};
|
||||
|
||||
MODULE_FIRMWARE("amdgpu/smu_14_0_2.bin");
|
||||
MODULE_FIRMWARE("amdgpu/smu_14_0_3.bin");
|
||||
MODULE_FIRMWARE("amdgpu/smu_14_0_3_kicker.bin");
|
||||
|
||||
#define ENABLE_IMU_ARG_GFXOFF_ENABLE 1
|
||||
|
||||
int smu_v14_0_init_microcode(struct smu_context *smu)
|
||||
{
|
||||
struct amdgpu_device *adev = smu->adev;
|
||||
char ucode_prefix[15];
|
||||
char ucode_prefix[30];
|
||||
int err = 0;
|
||||
const struct smc_firmware_header_v1_0 *hdr;
|
||||
const struct common_firmware_header *header;
|
||||
@@ -79,8 +80,12 @@ int smu_v14_0_init_microcode(struct smu_context *smu)
|
||||
return 0;
|
||||
|
||||
amdgpu_ucode_ip_version_decode(adev, MP1_HWIP, ucode_prefix, sizeof(ucode_prefix));
|
||||
err = amdgpu_ucode_request(adev, &adev->pm.fw, AMDGPU_UCODE_REQUIRED,
|
||||
"amdgpu/%s.bin", ucode_prefix);
|
||||
if (amdgpu_is_kicker_fw(adev))
|
||||
err = amdgpu_ucode_request(adev, &adev->pm.fw, AMDGPU_UCODE_REQUIRED,
|
||||
"amdgpu/%s_kicker.bin", ucode_prefix);
|
||||
else
|
||||
err = amdgpu_ucode_request(adev, &adev->pm.fw, AMDGPU_UCODE_REQUIRED,
|
||||
"amdgpu/%s.bin", ucode_prefix);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -267,7 +267,8 @@ static struct config_group *xe_config_make_device_group(struct config_group *gro
|
||||
|
||||
pdev = pci_get_domain_bus_and_slot(domain, bus, PCI_DEVFN(slot, function));
|
||||
if (!pdev)
|
||||
return ERR_PTR(-EINVAL);
|
||||
return ERR_PTR(-ENODEV);
|
||||
pci_dev_put(pdev);
|
||||
|
||||
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
|
||||
if (!dev)
|
||||
|
||||
@@ -681,6 +681,7 @@ static void sriov_update_device_info(struct xe_device *xe)
|
||||
/* disable features that are not available/applicable to VFs */
|
||||
if (IS_SRIOV_VF(xe)) {
|
||||
xe->info.probe_display = 0;
|
||||
xe->info.has_heci_cscfi = 0;
|
||||
xe->info.has_heci_gscfi = 0;
|
||||
xe->info.skip_guc_pc = 1;
|
||||
xe->info.skip_pcode = 1;
|
||||
|
||||
@@ -160,8 +160,13 @@ static int late_bind_create_files(struct device *dev)
|
||||
|
||||
ret = xe_pcode_read(root, PCODE_MBOX(PCODE_LATE_BINDING, GET_CAPABILITY_STATUS, 0),
|
||||
&cap, NULL);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
if (ret == -ENXIO) {
|
||||
drm_dbg(&xe->drm, "Late binding not supported by firmware\n");
|
||||
ret = 0;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (REG_FIELD_GET(V1_FAN_SUPPORTED, cap)) {
|
||||
ret = sysfs_create_file(&dev->kobj, &dev_attr_lb_fan_control_version.attr);
|
||||
|
||||
@@ -95,12 +95,8 @@ struct g2h_fence {
|
||||
|
||||
static void g2h_fence_init(struct g2h_fence *g2h_fence, u32 *response_buffer)
|
||||
{
|
||||
memset(g2h_fence, 0, sizeof(*g2h_fence));
|
||||
g2h_fence->response_buffer = response_buffer;
|
||||
g2h_fence->response_data = 0;
|
||||
g2h_fence->response_len = 0;
|
||||
g2h_fence->fail = false;
|
||||
g2h_fence->retry = false;
|
||||
g2h_fence->done = false;
|
||||
g2h_fence->seqno = ~0x0;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,25 +75,18 @@ int xe_hw_engine_setup_groups(struct xe_gt *gt)
|
||||
enum xe_hw_engine_id id;
|
||||
struct xe_hw_engine_group *group_rcs_ccs, *group_bcs, *group_vcs_vecs;
|
||||
struct xe_device *xe = gt_to_xe(gt);
|
||||
int err;
|
||||
|
||||
group_rcs_ccs = hw_engine_group_alloc(xe);
|
||||
if (IS_ERR(group_rcs_ccs)) {
|
||||
err = PTR_ERR(group_rcs_ccs);
|
||||
goto err_group_rcs_ccs;
|
||||
}
|
||||
if (IS_ERR(group_rcs_ccs))
|
||||
return PTR_ERR(group_rcs_ccs);
|
||||
|
||||
group_bcs = hw_engine_group_alloc(xe);
|
||||
if (IS_ERR(group_bcs)) {
|
||||
err = PTR_ERR(group_bcs);
|
||||
goto err_group_bcs;
|
||||
}
|
||||
if (IS_ERR(group_bcs))
|
||||
return PTR_ERR(group_bcs);
|
||||
|
||||
group_vcs_vecs = hw_engine_group_alloc(xe);
|
||||
if (IS_ERR(group_vcs_vecs)) {
|
||||
err = PTR_ERR(group_vcs_vecs);
|
||||
goto err_group_vcs_vecs;
|
||||
}
|
||||
if (IS_ERR(group_vcs_vecs))
|
||||
return PTR_ERR(group_vcs_vecs);
|
||||
|
||||
for_each_hw_engine(hwe, gt, id) {
|
||||
switch (hwe->class) {
|
||||
@@ -116,15 +109,6 @@ int xe_hw_engine_setup_groups(struct xe_gt *gt)
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_group_vcs_vecs:
|
||||
kfree(group_vcs_vecs);
|
||||
err_group_bcs:
|
||||
kfree(group_bcs);
|
||||
err_group_rcs_ccs:
|
||||
kfree(group_rcs_ccs);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -96,8 +96,8 @@ static int xe_i2c_register_adapter(struct xe_i2c *i2c)
|
||||
int ret;
|
||||
|
||||
fwnode = fwnode_create_software_node(xe_i2c_adapter_properties, NULL);
|
||||
if (!fwnode)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(fwnode))
|
||||
return PTR_ERR(fwnode);
|
||||
|
||||
/*
|
||||
* Not using platform_device_register_full() here because we don't have
|
||||
@@ -283,6 +283,9 @@ int xe_i2c_probe(struct xe_device *xe)
|
||||
if (xe->info.platform != XE_BATTLEMAGE)
|
||||
return 0;
|
||||
|
||||
if (IS_SRIOV_VF(xe))
|
||||
return 0;
|
||||
|
||||
xe_i2c_read_endpoint(xe_root_tile_mmio(xe), &ep);
|
||||
if (ep.cookie != XE_I2C_EP_COOKIE_DEVICE)
|
||||
return 0;
|
||||
|
||||
@@ -1941,7 +1941,7 @@ static int xe_oa_assign_hwe(struct xe_oa *oa, struct xe_oa_open_param *param)
|
||||
|
||||
/* If not provided, OA unit defaults to OA unit 0 as per uapi */
|
||||
if (!param->oa_unit)
|
||||
param->oa_unit = &xe_device_get_gt(oa->xe, 0)->oa.oa_unit[0];
|
||||
param->oa_unit = &xe_root_mmio_gt(oa->xe)->oa.oa_unit[0];
|
||||
|
||||
/* When we have an exec_q, get hwe from the exec_q */
|
||||
if (param->exec_q) {
|
||||
|
||||
@@ -164,7 +164,7 @@ static int vf_uc_load_hw(struct xe_uc *uc)
|
||||
|
||||
err = xe_guc_opt_in_features_enable(&uc->guc);
|
||||
if (err)
|
||||
return err;
|
||||
goto err_out;
|
||||
|
||||
err = xe_gt_record_default_lrcs(uc_to_gt(uc));
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user