mirror of https://github.com/torvalds/linux.git
amd-drm-fixes-6.19-2026-02-05:
amdgpu: - MES 11 old firmware compatibility fix - ASPM fix - DC LUT fixes amdkfd: - Fix possible double deletion of validate list -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCaYTehQAKCRC93/aFa7yZ 2ARSAQCpHxss6hiHz0CgQOajbQUEPUwP33xSyZPcx+QivFJQfAD+MRwUiHaZR42g u4KGSxwsRFqmFq3v8lC+cafS5Jch/Qk= =W+V6 -----END PGP SIGNATURE----- Merge tag 'amd-drm-fixes-6.19-2026-02-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.19-2026-02-05: amdgpu: - MES 11 old firmware compatibility fix - ASPM fix - DC LUT fixes amdkfd: - Fix possible double deletion of validate list Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20260205182017.2409773-1-alexander.deucher@amd.com
This commit is contained in:
commit
7ef92d2ece
|
|
@ -1920,21 +1920,21 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu(
|
|||
|
||||
/* Make sure restore workers don't access the BO any more */
|
||||
mutex_lock(&process_info->lock);
|
||||
list_del(&mem->validate_list);
|
||||
if (!list_empty(&mem->validate_list))
|
||||
list_del_init(&mem->validate_list);
|
||||
mutex_unlock(&process_info->lock);
|
||||
|
||||
/* Cleanup user pages and MMU notifiers */
|
||||
if (amdgpu_ttm_tt_get_usermm(mem->bo->tbo.ttm)) {
|
||||
amdgpu_hmm_unregister(mem->bo);
|
||||
mutex_lock(&process_info->notifier_lock);
|
||||
amdgpu_hmm_range_free(mem->range);
|
||||
mutex_unlock(&process_info->notifier_lock);
|
||||
}
|
||||
|
||||
ret = reserve_bo_and_cond_vms(mem, NULL, BO_VM_ALL, &ctx);
|
||||
if (unlikely(ret))
|
||||
return ret;
|
||||
|
||||
/* Cleanup user pages and MMU notifiers */
|
||||
if (amdgpu_ttm_tt_get_usermm(mem->bo->tbo.ttm)) {
|
||||
amdgpu_hmm_unregister(mem->bo);
|
||||
amdgpu_hmm_range_free(mem->range);
|
||||
mem->range = NULL;
|
||||
}
|
||||
|
||||
amdgpu_amdkfd_remove_eviction_fence(mem->bo,
|
||||
process_info->eviction_fence);
|
||||
pr_debug("Release VA 0x%llx - 0x%llx\n", mem->va,
|
||||
|
|
|
|||
|
|
@ -2405,9 +2405,6 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (amdgpu_aspm == -1 && !pcie_aspm_enabled(pdev))
|
||||
amdgpu_aspm = 0;
|
||||
|
||||
if (amdgpu_virtual_display ||
|
||||
amdgpu_device_asic_has_dc_support(pdev, flags & AMD_ASIC_MASK))
|
||||
supports_atomic = true;
|
||||
|
|
|
|||
|
|
@ -1671,7 +1671,7 @@ static int mes_v11_0_hw_init(struct amdgpu_ip_block *ip_block)
|
|||
if (r)
|
||||
goto failure;
|
||||
|
||||
if ((adev->mes.sched_version & AMDGPU_MES_VERSION_MASK) >= 0x50) {
|
||||
if ((adev->mes.sched_version & AMDGPU_MES_VERSION_MASK) >= 0x52) {
|
||||
r = mes_v11_0_set_hw_resources_1(&adev->mes);
|
||||
if (r) {
|
||||
DRM_ERROR("failed mes_v11_0_set_hw_resources_1, r=%d\n", r);
|
||||
|
|
|
|||
|
|
@ -105,9 +105,12 @@ void cm_helper_program_gamcor_xfer_func(
|
|||
#define NUMBER_REGIONS 32
|
||||
#define NUMBER_SW_SEGMENTS 16
|
||||
|
||||
bool cm3_helper_translate_curve_to_hw_format(
|
||||
const struct dc_transfer_func *output_tf,
|
||||
struct pwl_params *lut_params, bool fixpoint)
|
||||
#define DC_LOGGER \
|
||||
ctx->logger
|
||||
|
||||
bool cm3_helper_translate_curve_to_hw_format(struct dc_context *ctx,
|
||||
const struct dc_transfer_func *output_tf,
|
||||
struct pwl_params *lut_params, bool fixpoint)
|
||||
{
|
||||
struct curve_points3 *corner_points;
|
||||
struct pwl_result_data *rgb_resulted;
|
||||
|
|
@ -163,6 +166,11 @@ bool cm3_helper_translate_curve_to_hw_format(
|
|||
hw_points += (1 << seg_distr[k]);
|
||||
}
|
||||
|
||||
// DCN3+ have 257 pts in lieu of no separate slope registers
|
||||
// Prior HW had 256 base+slope pairs
|
||||
// Shaper LUT (i.e. fixpoint == true) is still 256 bases and 256 deltas
|
||||
hw_points = fixpoint ? (hw_points - 1) : hw_points;
|
||||
|
||||
j = 0;
|
||||
for (k = 0; k < (region_end - region_start); k++) {
|
||||
increment = NUMBER_SW_SEGMENTS / (1 << seg_distr[k]);
|
||||
|
|
@ -223,8 +231,6 @@ bool cm3_helper_translate_curve_to_hw_format(
|
|||
corner_points[1].green.slope = dc_fixpt_zero;
|
||||
corner_points[1].blue.slope = dc_fixpt_zero;
|
||||
|
||||
// DCN3+ have 257 pts in lieu of no separate slope registers
|
||||
// Prior HW had 256 base+slope pairs
|
||||
lut_params->hw_points_num = hw_points + 1;
|
||||
|
||||
k = 0;
|
||||
|
|
@ -248,6 +254,10 @@ bool cm3_helper_translate_curve_to_hw_format(
|
|||
if (fixpoint == true) {
|
||||
i = 1;
|
||||
while (i != hw_points + 2) {
|
||||
uint32_t red_clamp;
|
||||
uint32_t green_clamp;
|
||||
uint32_t blue_clamp;
|
||||
|
||||
if (i >= hw_points) {
|
||||
if (dc_fixpt_lt(rgb_plus_1->red, rgb->red))
|
||||
rgb_plus_1->red = dc_fixpt_add(rgb->red,
|
||||
|
|
@ -260,9 +270,20 @@ bool cm3_helper_translate_curve_to_hw_format(
|
|||
rgb_minus_1->delta_blue);
|
||||
}
|
||||
|
||||
rgb->delta_red_reg = dc_fixpt_clamp_u0d10(rgb->delta_red);
|
||||
rgb->delta_green_reg = dc_fixpt_clamp_u0d10(rgb->delta_green);
|
||||
rgb->delta_blue_reg = dc_fixpt_clamp_u0d10(rgb->delta_blue);
|
||||
rgb->delta_red = dc_fixpt_sub(rgb_plus_1->red, rgb->red);
|
||||
rgb->delta_green = dc_fixpt_sub(rgb_plus_1->green, rgb->green);
|
||||
rgb->delta_blue = dc_fixpt_sub(rgb_plus_1->blue, rgb->blue);
|
||||
|
||||
red_clamp = dc_fixpt_clamp_u0d14(rgb->delta_red);
|
||||
green_clamp = dc_fixpt_clamp_u0d14(rgb->delta_green);
|
||||
blue_clamp = dc_fixpt_clamp_u0d14(rgb->delta_blue);
|
||||
|
||||
if (red_clamp >> 10 || green_clamp >> 10 || blue_clamp >> 10)
|
||||
DC_LOG_ERROR("Losing delta precision while programming shaper LUT.");
|
||||
|
||||
rgb->delta_red_reg = red_clamp & 0x3ff;
|
||||
rgb->delta_green_reg = green_clamp & 0x3ff;
|
||||
rgb->delta_blue_reg = blue_clamp & 0x3ff;
|
||||
rgb->red_reg = dc_fixpt_clamp_u0d14(rgb->red);
|
||||
rgb->green_reg = dc_fixpt_clamp_u0d14(rgb->green);
|
||||
rgb->blue_reg = dc_fixpt_clamp_u0d14(rgb->blue);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ void cm_helper_program_gamcor_xfer_func(
|
|||
const struct pwl_params *params,
|
||||
const struct dcn3_xfer_func_reg *reg);
|
||||
|
||||
bool cm3_helper_translate_curve_to_hw_format(
|
||||
bool cm3_helper_translate_curve_to_hw_format(struct dc_context *ctx,
|
||||
const struct dc_transfer_func *output_tf,
|
||||
struct pwl_params *lut_params, bool fixpoint);
|
||||
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ bool dcn30_set_blend_lut(
|
|||
if (plane_state->blend_tf.type == TF_TYPE_HWPWL)
|
||||
blend_lut = &plane_state->blend_tf.pwl;
|
||||
else if (plane_state->blend_tf.type == TF_TYPE_DISTRIBUTED_POINTS) {
|
||||
result = cm3_helper_translate_curve_to_hw_format(
|
||||
result = cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
|
||||
&plane_state->blend_tf, &dpp_base->regamma_params, false);
|
||||
if (!result)
|
||||
return result;
|
||||
|
|
@ -334,8 +334,9 @@ bool dcn30_set_input_transfer_func(struct dc *dc,
|
|||
if (plane_state->in_transfer_func.type == TF_TYPE_HWPWL)
|
||||
params = &plane_state->in_transfer_func.pwl;
|
||||
else if (plane_state->in_transfer_func.type == TF_TYPE_DISTRIBUTED_POINTS &&
|
||||
cm3_helper_translate_curve_to_hw_format(&plane_state->in_transfer_func,
|
||||
&dpp_base->degamma_params, false))
|
||||
cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
|
||||
&plane_state->in_transfer_func,
|
||||
&dpp_base->degamma_params, false))
|
||||
params = &dpp_base->degamma_params;
|
||||
|
||||
result = dpp_base->funcs->dpp_program_gamcor_lut(dpp_base, params);
|
||||
|
|
@ -406,7 +407,7 @@ bool dcn30_set_output_transfer_func(struct dc *dc,
|
|||
params = &stream->out_transfer_func.pwl;
|
||||
else if (pipe_ctx->stream->out_transfer_func.type ==
|
||||
TF_TYPE_DISTRIBUTED_POINTS &&
|
||||
cm3_helper_translate_curve_to_hw_format(
|
||||
cm3_helper_translate_curve_to_hw_format(stream->ctx,
|
||||
&stream->out_transfer_func,
|
||||
&mpc->blender_params, false))
|
||||
params = &mpc->blender_params;
|
||||
|
|
|
|||
|
|
@ -486,8 +486,9 @@ bool dcn32_set_mcm_luts(
|
|||
if (plane_state->blend_tf.type == TF_TYPE_HWPWL)
|
||||
lut_params = &plane_state->blend_tf.pwl;
|
||||
else if (plane_state->blend_tf.type == TF_TYPE_DISTRIBUTED_POINTS) {
|
||||
result = cm3_helper_translate_curve_to_hw_format(&plane_state->blend_tf,
|
||||
&dpp_base->regamma_params, false);
|
||||
result = cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
|
||||
&plane_state->blend_tf,
|
||||
&dpp_base->regamma_params, false);
|
||||
if (!result)
|
||||
return result;
|
||||
|
||||
|
|
@ -501,9 +502,9 @@ bool dcn32_set_mcm_luts(
|
|||
lut_params = &plane_state->in_shaper_func.pwl;
|
||||
else if (plane_state->in_shaper_func.type == TF_TYPE_DISTRIBUTED_POINTS) {
|
||||
// TODO: dpp_base replace
|
||||
ASSERT(false);
|
||||
cm3_helper_translate_curve_to_hw_format(&plane_state->in_shaper_func,
|
||||
&dpp_base->shaper_params, true);
|
||||
cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
|
||||
&plane_state->in_shaper_func,
|
||||
&dpp_base->shaper_params, true);
|
||||
lut_params = &dpp_base->shaper_params;
|
||||
}
|
||||
|
||||
|
|
@ -543,8 +544,9 @@ bool dcn32_set_input_transfer_func(struct dc *dc,
|
|||
if (plane_state->in_transfer_func.type == TF_TYPE_HWPWL)
|
||||
params = &plane_state->in_transfer_func.pwl;
|
||||
else if (plane_state->in_transfer_func.type == TF_TYPE_DISTRIBUTED_POINTS &&
|
||||
cm3_helper_translate_curve_to_hw_format(&plane_state->in_transfer_func,
|
||||
&dpp_base->degamma_params, false))
|
||||
cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
|
||||
&plane_state->in_transfer_func,
|
||||
&dpp_base->degamma_params, false))
|
||||
params = &dpp_base->degamma_params;
|
||||
|
||||
dpp_base->funcs->dpp_program_gamcor_lut(dpp_base, params);
|
||||
|
|
@ -575,7 +577,7 @@ bool dcn32_set_output_transfer_func(struct dc *dc,
|
|||
params = &stream->out_transfer_func.pwl;
|
||||
else if (pipe_ctx->stream->out_transfer_func.type ==
|
||||
TF_TYPE_DISTRIBUTED_POINTS &&
|
||||
cm3_helper_translate_curve_to_hw_format(
|
||||
cm3_helper_translate_curve_to_hw_format(stream->ctx,
|
||||
&stream->out_transfer_func,
|
||||
&mpc->blender_params, false))
|
||||
params = &mpc->blender_params;
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ void dcn401_populate_mcm_luts(struct dc *dc,
|
|||
if (mcm_luts.lut1d_func->type == TF_TYPE_HWPWL)
|
||||
m_lut_params.pwl = &mcm_luts.lut1d_func->pwl;
|
||||
else if (mcm_luts.lut1d_func->type == TF_TYPE_DISTRIBUTED_POINTS) {
|
||||
rval = cm3_helper_translate_curve_to_hw_format(
|
||||
rval = cm3_helper_translate_curve_to_hw_format(mpc->ctx,
|
||||
mcm_luts.lut1d_func,
|
||||
&dpp_base->regamma_params, false);
|
||||
m_lut_params.pwl = rval ? &dpp_base->regamma_params : NULL;
|
||||
|
|
@ -450,7 +450,7 @@ void dcn401_populate_mcm_luts(struct dc *dc,
|
|||
m_lut_params.pwl = &mcm_luts.shaper->pwl;
|
||||
else if (mcm_luts.shaper->type == TF_TYPE_DISTRIBUTED_POINTS) {
|
||||
ASSERT(false);
|
||||
rval = cm3_helper_translate_curve_to_hw_format(
|
||||
rval = cm3_helper_translate_curve_to_hw_format(mpc->ctx,
|
||||
mcm_luts.shaper,
|
||||
&dpp_base->regamma_params, true);
|
||||
m_lut_params.pwl = rval ? &dpp_base->regamma_params : NULL;
|
||||
|
|
@ -627,8 +627,9 @@ bool dcn401_set_mcm_luts(struct pipe_ctx *pipe_ctx,
|
|||
if (plane_state->blend_tf.type == TF_TYPE_HWPWL)
|
||||
lut_params = &plane_state->blend_tf.pwl;
|
||||
else if (plane_state->blend_tf.type == TF_TYPE_DISTRIBUTED_POINTS) {
|
||||
rval = cm3_helper_translate_curve_to_hw_format(&plane_state->blend_tf,
|
||||
&dpp_base->regamma_params, false);
|
||||
rval = cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
|
||||
&plane_state->blend_tf,
|
||||
&dpp_base->regamma_params, false);
|
||||
lut_params = rval ? &dpp_base->regamma_params : NULL;
|
||||
}
|
||||
result = mpc->funcs->program_1dlut(mpc, lut_params, mpcc_id);
|
||||
|
|
@ -639,8 +640,9 @@ bool dcn401_set_mcm_luts(struct pipe_ctx *pipe_ctx,
|
|||
lut_params = &plane_state->in_shaper_func.pwl;
|
||||
else if (plane_state->in_shaper_func.type == TF_TYPE_DISTRIBUTED_POINTS) {
|
||||
// TODO: dpp_base replace
|
||||
rval = cm3_helper_translate_curve_to_hw_format(&plane_state->in_shaper_func,
|
||||
&dpp_base->shaper_params, true);
|
||||
rval = cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
|
||||
&plane_state->in_shaper_func,
|
||||
&dpp_base->shaper_params, true);
|
||||
lut_params = rval ? &dpp_base->shaper_params : NULL;
|
||||
}
|
||||
result &= mpc->funcs->program_shaper(mpc, lut_params, mpcc_id);
|
||||
|
|
@ -674,7 +676,7 @@ bool dcn401_set_output_transfer_func(struct dc *dc,
|
|||
params = &stream->out_transfer_func.pwl;
|
||||
else if (pipe_ctx->stream->out_transfer_func.type ==
|
||||
TF_TYPE_DISTRIBUTED_POINTS &&
|
||||
cm3_helper_translate_curve_to_hw_format(
|
||||
cm3_helper_translate_curve_to_hw_format(stream->ctx,
|
||||
&stream->out_transfer_func,
|
||||
&mpc->blender_params, false))
|
||||
params = &mpc->blender_params;
|
||||
|
|
|
|||
Loading…
Reference in New Issue