Merge branch 'drm-fixes-5.0' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
A bit bigger than normal for this week due to fixes for some long standing display issues that are bound for stable. These changes would be going to stable anyway, so I figured it was better via 5.0 than 5.1. - Several display fixes - Fix PX systems due to core changes in runtime pm - Disable bulk moves. They are fixed in 5.1, but fix is too invasive for 5.0 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexdeucher@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190220225715.3240-1-alexander.deucher@amd.com
This commit is contained in:
commit
019276ed65
@ -212,6 +212,7 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
|
||||
}
|
||||
|
||||
if (amdgpu_device_is_px(dev)) {
|
||||
dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP);
|
||||
pm_runtime_use_autosuspend(dev->dev);
|
||||
pm_runtime_set_autosuspend_delay(dev->dev, 5000);
|
||||
pm_runtime_set_active(dev->dev);
|
||||
|
@ -638,12 +638,14 @@ void amdgpu_vm_move_to_lru_tail(struct amdgpu_device *adev,
|
||||
struct ttm_bo_global *glob = adev->mman.bdev.glob;
|
||||
struct amdgpu_vm_bo_base *bo_base;
|
||||
|
||||
#if 0
|
||||
if (vm->bulk_moveable) {
|
||||
spin_lock(&glob->lru_lock);
|
||||
ttm_bo_bulk_move_lru_tail(&vm->lru_bulk_move);
|
||||
spin_unlock(&glob->lru_lock);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(&vm->lru_bulk_move, 0, sizeof(vm->lru_bulk_move));
|
||||
|
||||
|
@ -128,7 +128,7 @@ static const struct soc15_reg_golden golden_settings_sdma0_4_2_init[] = {
|
||||
|
||||
static const struct soc15_reg_golden golden_settings_sdma0_4_2[] =
|
||||
{
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA0, 0, mmSDMA0_CHICKEN_BITS, 0xfe931f07, 0x02831d07),
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA0, 0, mmSDMA0_CHICKEN_BITS, 0xfe931f07, 0x02831f07),
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA0, 0, mmSDMA0_CLK_CTRL, 0xffffffff, 0x3f000100),
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA0, 0, mmSDMA0_GB_ADDR_CONFIG, 0x0000773f, 0x00004002),
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA0, 0, mmSDMA0_GB_ADDR_CONFIG_READ, 0x0000773f, 0x00004002),
|
||||
@ -158,7 +158,7 @@ static const struct soc15_reg_golden golden_settings_sdma0_4_2[] =
|
||||
};
|
||||
|
||||
static const struct soc15_reg_golden golden_settings_sdma1_4_2[] = {
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA1, 0, mmSDMA1_CHICKEN_BITS, 0xfe931f07, 0x02831d07),
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA1, 0, mmSDMA1_CHICKEN_BITS, 0xfe931f07, 0x02831f07),
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA1, 0, mmSDMA1_CLK_CTRL, 0xffffffff, 0x3f000100),
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA1, 0, mmSDMA1_GB_ADDR_CONFIG, 0x0000773f, 0x00004002),
|
||||
SOC15_REG_GOLDEN_VALUE(SDMA1, 0, mmSDMA1_GB_ADDR_CONFIG_READ, 0x0000773f, 0x00004002),
|
||||
|
@ -786,12 +786,13 @@ static int dm_suspend(void *handle)
|
||||
struct amdgpu_display_manager *dm = &adev->dm;
|
||||
int ret = 0;
|
||||
|
||||
WARN_ON(adev->dm.cached_state);
|
||||
adev->dm.cached_state = drm_atomic_helper_suspend(adev->ddev);
|
||||
|
||||
s3_handle_mst(adev->ddev, true);
|
||||
|
||||
amdgpu_dm_irq_suspend(adev);
|
||||
|
||||
WARN_ON(adev->dm.cached_state);
|
||||
adev->dm.cached_state = drm_atomic_helper_suspend(adev->ddev);
|
||||
|
||||
dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D3);
|
||||
|
||||
|
@ -662,6 +662,11 @@ static void dce11_update_clocks(struct clk_mgr *clk_mgr,
|
||||
{
|
||||
struct dce_clk_mgr *clk_mgr_dce = TO_DCE_CLK_MGR(clk_mgr);
|
||||
struct dm_pp_power_level_change_request level_change_req;
|
||||
int patched_disp_clk = context->bw.dce.dispclk_khz;
|
||||
|
||||
/*TODO: W/A for dal3 linux, investigate why this works */
|
||||
if (!clk_mgr_dce->dfs_bypass_active)
|
||||
patched_disp_clk = patched_disp_clk * 115 / 100;
|
||||
|
||||
level_change_req.power_level = dce_get_required_clocks_state(clk_mgr, context);
|
||||
/* get max clock state from PPLIB */
|
||||
@ -671,9 +676,9 @@ static void dce11_update_clocks(struct clk_mgr *clk_mgr,
|
||||
clk_mgr_dce->cur_min_clks_state = level_change_req.power_level;
|
||||
}
|
||||
|
||||
if (should_set_clock(safe_to_lower, context->bw.dce.dispclk_khz, clk_mgr->clks.dispclk_khz)) {
|
||||
context->bw.dce.dispclk_khz = dce_set_clock(clk_mgr, context->bw.dce.dispclk_khz);
|
||||
clk_mgr->clks.dispclk_khz = context->bw.dce.dispclk_khz;
|
||||
if (should_set_clock(safe_to_lower, patched_disp_clk, clk_mgr->clks.dispclk_khz)) {
|
||||
context->bw.dce.dispclk_khz = dce_set_clock(clk_mgr, patched_disp_clk);
|
||||
clk_mgr->clks.dispclk_khz = patched_disp_clk;
|
||||
}
|
||||
dce11_pplib_apply_display_requirements(clk_mgr->ctx->dc, context);
|
||||
}
|
||||
|
@ -37,6 +37,10 @@ void dce100_prepare_bandwidth(
|
||||
struct dc *dc,
|
||||
struct dc_state *context);
|
||||
|
||||
void dce100_optimize_bandwidth(
|
||||
struct dc *dc,
|
||||
struct dc_state *context);
|
||||
|
||||
bool dce100_enable_display_power_gating(struct dc *dc, uint8_t controller_id,
|
||||
struct dc_bios *dcb,
|
||||
enum pipe_gating_control power_gating);
|
||||
|
@ -77,6 +77,6 @@ void dce80_hw_sequencer_construct(struct dc *dc)
|
||||
dc->hwss.enable_display_power_gating = dce100_enable_display_power_gating;
|
||||
dc->hwss.pipe_control_lock = dce_pipe_control_lock;
|
||||
dc->hwss.prepare_bandwidth = dce100_prepare_bandwidth;
|
||||
dc->hwss.optimize_bandwidth = dce100_prepare_bandwidth;
|
||||
dc->hwss.optimize_bandwidth = dce100_optimize_bandwidth;
|
||||
}
|
||||
|
||||
|
@ -790,9 +790,22 @@ bool dce80_validate_bandwidth(
|
||||
struct dc *dc,
|
||||
struct dc_state *context)
|
||||
{
|
||||
/* TODO implement when needed but for now hardcode max value*/
|
||||
context->bw.dce.dispclk_khz = 681000;
|
||||
context->bw.dce.yclk_khz = 250000 * MEMORY_TYPE_MULTIPLIER_CZ;
|
||||
int i;
|
||||
bool at_least_one_pipe = false;
|
||||
|
||||
for (i = 0; i < dc->res_pool->pipe_count; i++) {
|
||||
if (context->res_ctx.pipe_ctx[i].stream)
|
||||
at_least_one_pipe = true;
|
||||
}
|
||||
|
||||
if (at_least_one_pipe) {
|
||||
/* TODO implement when needed but for now hardcode max value*/
|
||||
context->bw.dce.dispclk_khz = 681000;
|
||||
context->bw.dce.yclk_khz = 250000 * MEMORY_TYPE_MULTIPLIER_CZ;
|
||||
} else {
|
||||
context->bw.dce.dispclk_khz = 0;
|
||||
context->bw.dce.yclk_khz = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2658,8 +2658,8 @@ static void dcn10_set_cursor_position(struct pipe_ctx *pipe_ctx)
|
||||
.mirror = pipe_ctx->plane_state->horizontal_mirror
|
||||
};
|
||||
|
||||
pos_cpy.x -= pipe_ctx->plane_state->dst_rect.x;
|
||||
pos_cpy.y -= pipe_ctx->plane_state->dst_rect.y;
|
||||
pos_cpy.x_hotspot += pipe_ctx->plane_state->dst_rect.x;
|
||||
pos_cpy.y_hotspot += pipe_ctx->plane_state->dst_rect.y;
|
||||
|
||||
if (pipe_ctx->plane_state->address.type
|
||||
== PLN_ADDR_TYPE_VIDEO_PROGRESSIVE)
|
||||
|
@ -172,6 +172,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
|
||||
}
|
||||
|
||||
if (radeon_is_px(dev)) {
|
||||
dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NEVER_SKIP);
|
||||
pm_runtime_use_autosuspend(dev->dev);
|
||||
pm_runtime_set_autosuspend_delay(dev->dev, 5000);
|
||||
pm_runtime_set_active(dev->dev);
|
||||
|
Loading…
Reference in New Issue
Block a user