mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
Merge tag 'amd-drm-fixes-5.18-2022-04-13' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-5.18-2022-04-13: amdgpu: - Fix for alpha properly in pre-multiplied mode - Fix VCN 3.1.2 firmware name - Suspend/resume fix - Add a gfxoff quirk for Mac vega20 board - DCN 3.1.6 spread spectrum fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220414025821.5811-1-alexander.deucher@amd.com
This commit is contained in:
commit
8e401ff538
@ -2323,18 +2323,23 @@ static int amdgpu_pmops_suspend(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
||||||
struct amdgpu_device *adev = drm_to_adev(drm_dev);
|
struct amdgpu_device *adev = drm_to_adev(drm_dev);
|
||||||
int r;
|
|
||||||
|
|
||||||
if (amdgpu_acpi_is_s0ix_active(adev))
|
if (amdgpu_acpi_is_s0ix_active(adev))
|
||||||
adev->in_s0ix = true;
|
adev->in_s0ix = true;
|
||||||
else
|
else
|
||||||
adev->in_s3 = true;
|
adev->in_s3 = true;
|
||||||
r = amdgpu_device_suspend(drm_dev, true);
|
return amdgpu_device_suspend(drm_dev, true);
|
||||||
if (r)
|
}
|
||||||
return r;
|
|
||||||
|
static int amdgpu_pmops_suspend_noirq(struct device *dev)
|
||||||
|
{
|
||||||
|
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
||||||
|
struct amdgpu_device *adev = drm_to_adev(drm_dev);
|
||||||
|
|
||||||
if (!adev->in_s0ix)
|
if (!adev->in_s0ix)
|
||||||
r = amdgpu_asic_reset(adev);
|
return amdgpu_asic_reset(adev);
|
||||||
return r;
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int amdgpu_pmops_resume(struct device *dev)
|
static int amdgpu_pmops_resume(struct device *dev)
|
||||||
@ -2575,6 +2580,7 @@ static const struct dev_pm_ops amdgpu_pm_ops = {
|
|||||||
.prepare = amdgpu_pmops_prepare,
|
.prepare = amdgpu_pmops_prepare,
|
||||||
.complete = amdgpu_pmops_complete,
|
.complete = amdgpu_pmops_complete,
|
||||||
.suspend = amdgpu_pmops_suspend,
|
.suspend = amdgpu_pmops_suspend,
|
||||||
|
.suspend_noirq = amdgpu_pmops_suspend_noirq,
|
||||||
.resume = amdgpu_pmops_resume,
|
.resume = amdgpu_pmops_resume,
|
||||||
.freeze = amdgpu_pmops_freeze,
|
.freeze = amdgpu_pmops_freeze,
|
||||||
.thaw = amdgpu_pmops_thaw,
|
.thaw = amdgpu_pmops_thaw,
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#define FIRMWARE_ALDEBARAN "amdgpu/aldebaran_vcn.bin"
|
#define FIRMWARE_ALDEBARAN "amdgpu/aldebaran_vcn.bin"
|
||||||
#define FIRMWARE_BEIGE_GOBY "amdgpu/beige_goby_vcn.bin"
|
#define FIRMWARE_BEIGE_GOBY "amdgpu/beige_goby_vcn.bin"
|
||||||
#define FIRMWARE_YELLOW_CARP "amdgpu/yellow_carp_vcn.bin"
|
#define FIRMWARE_YELLOW_CARP "amdgpu/yellow_carp_vcn.bin"
|
||||||
#define FIRMWARE_VCN_3_1_2 "amdgpu/vcn_3_1_2_vcn.bin"
|
#define FIRMWARE_VCN_3_1_2 "amdgpu/vcn_3_1_2.bin"
|
||||||
|
|
||||||
MODULE_FIRMWARE(FIRMWARE_RAVEN);
|
MODULE_FIRMWARE(FIRMWARE_RAVEN);
|
||||||
MODULE_FIRMWARE(FIRMWARE_PICASSO);
|
MODULE_FIRMWARE(FIRMWARE_PICASSO);
|
||||||
|
@ -1205,6 +1205,8 @@ static const struct amdgpu_gfxoff_quirk amdgpu_gfxoff_quirk_list[] = {
|
|||||||
{ 0x1002, 0x15dd, 0x103c, 0x83e7, 0xd3 },
|
{ 0x1002, 0x15dd, 0x103c, 0x83e7, 0xd3 },
|
||||||
/* GFXOFF is unstable on C6 parts with a VBIOS 113-RAVEN-114 */
|
/* GFXOFF is unstable on C6 parts with a VBIOS 113-RAVEN-114 */
|
||||||
{ 0x1002, 0x15dd, 0x1002, 0x15dd, 0xc6 },
|
{ 0x1002, 0x15dd, 0x1002, 0x15dd, 0xc6 },
|
||||||
|
/* Apple MacBook Pro (15-inch, 2019) Radeon Pro Vega 20 4 GB */
|
||||||
|
{ 0x1002, 0x69af, 0x106b, 0x019a, 0xc0 },
|
||||||
{ 0, 0, 0, 0, 0 },
|
{ 0, 0, 0, 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ void dce_clock_read_ss_info(struct clk_mgr_internal *clk_mgr_dce)
|
|||||||
clk_mgr_dce->dprefclk_ss_percentage =
|
clk_mgr_dce->dprefclk_ss_percentage =
|
||||||
info.spread_spectrum_percentage;
|
info.spread_spectrum_percentage;
|
||||||
}
|
}
|
||||||
if (clk_mgr_dce->base.ctx->dc->debug.ignore_dpref_ss)
|
if (clk_mgr_dce->base.ctx->dc->config.ignore_dpref_ss)
|
||||||
clk_mgr_dce->dprefclk_ss_percentage = 0;
|
clk_mgr_dce->dprefclk_ss_percentage = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -686,8 +686,8 @@ void dcn316_clk_mgr_construct(
|
|||||||
clk_mgr->base.base.dprefclk_khz = dcn316_smu_get_dpref_clk(&clk_mgr->base);
|
clk_mgr->base.base.dprefclk_khz = dcn316_smu_get_dpref_clk(&clk_mgr->base);
|
||||||
clk_mgr->base.dccg->ref_dtbclk_khz = clk_mgr->base.base.dprefclk_khz;
|
clk_mgr->base.dccg->ref_dtbclk_khz = clk_mgr->base.base.dprefclk_khz;
|
||||||
dce_clock_read_ss_info(&clk_mgr->base);
|
dce_clock_read_ss_info(&clk_mgr->base);
|
||||||
clk_mgr->base.dccg->ref_dtbclk_khz =
|
/*clk_mgr->base.dccg->ref_dtbclk_khz =
|
||||||
dce_adjust_dp_ref_freq_for_ss(&clk_mgr->base, clk_mgr->base.base.dprefclk_khz);
|
dce_adjust_dp_ref_freq_for_ss(&clk_mgr->base, clk_mgr->base.base.dprefclk_khz);*/
|
||||||
|
|
||||||
clk_mgr->base.base.bw_params = &dcn316_bw_params;
|
clk_mgr->base.base.bw_params = &dcn316_bw_params;
|
||||||
|
|
||||||
|
@ -340,6 +340,7 @@ struct dc_config {
|
|||||||
bool is_asymmetric_memory;
|
bool is_asymmetric_memory;
|
||||||
bool is_single_rank_dimm;
|
bool is_single_rank_dimm;
|
||||||
bool use_pipe_ctx_sync_logic;
|
bool use_pipe_ctx_sync_logic;
|
||||||
|
bool ignore_dpref_ss;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum visual_confirm {
|
enum visual_confirm {
|
||||||
@ -729,7 +730,6 @@ struct dc_debug_options {
|
|||||||
bool apply_vendor_specific_lttpr_wa;
|
bool apply_vendor_specific_lttpr_wa;
|
||||||
bool extended_blank_optimization;
|
bool extended_blank_optimization;
|
||||||
union aux_wake_wa_options aux_wake_wa;
|
union aux_wake_wa_options aux_wake_wa;
|
||||||
bool ignore_dpref_ss;
|
|
||||||
uint8_t psr_power_use_phy_fsm;
|
uint8_t psr_power_use_phy_fsm;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2522,14 +2522,18 @@ void dcn10_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)
|
|||||||
struct mpc *mpc = dc->res_pool->mpc;
|
struct mpc *mpc = dc->res_pool->mpc;
|
||||||
struct mpc_tree *mpc_tree_params = &(pipe_ctx->stream_res.opp->mpc_tree_params);
|
struct mpc_tree *mpc_tree_params = &(pipe_ctx->stream_res.opp->mpc_tree_params);
|
||||||
|
|
||||||
if (per_pixel_alpha)
|
|
||||||
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA;
|
|
||||||
else
|
|
||||||
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA;
|
|
||||||
|
|
||||||
blnd_cfg.overlap_only = false;
|
blnd_cfg.overlap_only = false;
|
||||||
blnd_cfg.global_gain = 0xff;
|
blnd_cfg.global_gain = 0xff;
|
||||||
|
|
||||||
|
if (per_pixel_alpha && pipe_ctx->plane_state->global_alpha) {
|
||||||
|
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA_COMBINED_GLOBAL_GAIN;
|
||||||
|
blnd_cfg.global_gain = pipe_ctx->plane_state->global_alpha_value;
|
||||||
|
} else if (per_pixel_alpha) {
|
||||||
|
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA;
|
||||||
|
} else {
|
||||||
|
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA;
|
||||||
|
}
|
||||||
|
|
||||||
if (pipe_ctx->plane_state->global_alpha)
|
if (pipe_ctx->plane_state->global_alpha)
|
||||||
blnd_cfg.global_alpha = pipe_ctx->plane_state->global_alpha_value;
|
blnd_cfg.global_alpha = pipe_ctx->plane_state->global_alpha_value;
|
||||||
else
|
else
|
||||||
|
@ -2344,14 +2344,18 @@ void dcn20_update_mpcc(struct dc *dc, struct pipe_ctx *pipe_ctx)
|
|||||||
struct mpc *mpc = dc->res_pool->mpc;
|
struct mpc *mpc = dc->res_pool->mpc;
|
||||||
struct mpc_tree *mpc_tree_params = &(pipe_ctx->stream_res.opp->mpc_tree_params);
|
struct mpc_tree *mpc_tree_params = &(pipe_ctx->stream_res.opp->mpc_tree_params);
|
||||||
|
|
||||||
if (per_pixel_alpha)
|
|
||||||
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA;
|
|
||||||
else
|
|
||||||
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA;
|
|
||||||
|
|
||||||
blnd_cfg.overlap_only = false;
|
blnd_cfg.overlap_only = false;
|
||||||
blnd_cfg.global_gain = 0xff;
|
blnd_cfg.global_gain = 0xff;
|
||||||
|
|
||||||
|
if (per_pixel_alpha && pipe_ctx->plane_state->global_alpha) {
|
||||||
|
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA_COMBINED_GLOBAL_GAIN;
|
||||||
|
blnd_cfg.global_gain = pipe_ctx->plane_state->global_alpha_value;
|
||||||
|
} else if (per_pixel_alpha) {
|
||||||
|
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA;
|
||||||
|
} else {
|
||||||
|
blnd_cfg.alpha_mode = MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA;
|
||||||
|
}
|
||||||
|
|
||||||
if (pipe_ctx->plane_state->global_alpha)
|
if (pipe_ctx->plane_state->global_alpha)
|
||||||
blnd_cfg.global_alpha = pipe_ctx->plane_state->global_alpha_value;
|
blnd_cfg.global_alpha = pipe_ctx->plane_state->global_alpha_value;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user