Merge v5.0-rc7 into drm-next
Backmerging for nouveau and imx that needed some fixes for next pulls. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -699,22 +699,36 @@ static void s3_handle_mst(struct drm_device *dev, bool suspend)
|
||||
{
|
||||
struct amdgpu_dm_connector *aconnector;
|
||||
struct drm_connector *connector;
|
||||
struct drm_dp_mst_topology_mgr *mgr;
|
||||
int ret;
|
||||
bool need_hotplug = false;
|
||||
|
||||
drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
|
||||
|
||||
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
|
||||
aconnector = to_amdgpu_dm_connector(connector);
|
||||
if (aconnector->dc_link->type == dc_connection_mst_branch &&
|
||||
!aconnector->mst_port) {
|
||||
list_for_each_entry(connector, &dev->mode_config.connector_list,
|
||||
head) {
|
||||
aconnector = to_amdgpu_dm_connector(connector);
|
||||
if (aconnector->dc_link->type != dc_connection_mst_branch ||
|
||||
aconnector->mst_port)
|
||||
continue;
|
||||
|
||||
if (suspend)
|
||||
drm_dp_mst_topology_mgr_suspend(&aconnector->mst_mgr);
|
||||
else
|
||||
drm_dp_mst_topology_mgr_resume(&aconnector->mst_mgr);
|
||||
}
|
||||
mgr = &aconnector->mst_mgr;
|
||||
|
||||
if (suspend) {
|
||||
drm_dp_mst_topology_mgr_suspend(mgr);
|
||||
} else {
|
||||
ret = drm_dp_mst_topology_mgr_resume(mgr);
|
||||
if (ret < 0) {
|
||||
drm_dp_mst_topology_mgr_set_mst(mgr, false);
|
||||
need_hotplug = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
drm_modeset_unlock(&dev->mode_config.connection_mutex);
|
||||
|
||||
if (need_hotplug)
|
||||
drm_kms_helper_hotplug_event(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -898,7 +912,6 @@ static int dm_resume(void *handle)
|
||||
struct drm_plane_state *new_plane_state;
|
||||
struct dm_plane_state *dm_new_plane_state;
|
||||
enum dc_connection_type new_connection_type = dc_connection_none;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
/* power on hardware */
|
||||
@@ -971,13 +984,13 @@ static int dm_resume(void *handle)
|
||||
}
|
||||
}
|
||||
|
||||
ret = drm_atomic_helper_resume(ddev, dm->cached_state);
|
||||
drm_atomic_helper_resume(ddev, dm->cached_state);
|
||||
|
||||
dm->cached_state = NULL;
|
||||
|
||||
amdgpu_dm_irq_resume_late(adev);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4148,7 +4161,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
|
||||
}
|
||||
|
||||
if (connector_type == DRM_MODE_CONNECTOR_HDMIA ||
|
||||
connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
|
||||
connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
|
||||
connector_type == DRM_MODE_CONNECTOR_eDP) {
|
||||
drm_connector_attach_vrr_capable_property(
|
||||
&aconnector->base);
|
||||
}
|
||||
|
@@ -671,6 +671,25 @@ static ssize_t dp_phy_test_pattern_debugfs_write(struct file *f, const char __us
|
||||
return bytes_from_user;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the min and max vrr vfreq through the connector's debugfs file.
|
||||
* Example usage: cat /sys/kernel/debug/dri/0/DP-1/vrr_range
|
||||
*/
|
||||
static int vrr_range_show(struct seq_file *m, void *data)
|
||||
{
|
||||
struct drm_connector *connector = m->private;
|
||||
struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
|
||||
|
||||
if (connector->status != connector_status_connected)
|
||||
return -ENODEV;
|
||||
|
||||
seq_printf(m, "Min: %u\n", (unsigned int)aconnector->min_vfreq);
|
||||
seq_printf(m, "Max: %u\n", (unsigned int)aconnector->max_vfreq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
DEFINE_SHOW_ATTRIBUTE(vrr_range);
|
||||
|
||||
static const struct file_operations dp_link_settings_debugfs_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.read = dp_link_settings_read,
|
||||
@@ -697,7 +716,8 @@ static const struct {
|
||||
} dp_debugfs_entries[] = {
|
||||
{"link_settings", &dp_link_settings_debugfs_fops},
|
||||
{"phy_settings", &dp_phy_settings_debugfs_fop},
|
||||
{"test_pattern", &dp_phy_test_pattern_fops}
|
||||
{"test_pattern", &dp_phy_test_pattern_fops},
|
||||
{"vrr_range", &vrr_range_fops}
|
||||
};
|
||||
|
||||
int connector_debugfs_init(struct amdgpu_dm_connector *connector)
|
||||
|
@@ -627,7 +627,15 @@ static void dce11_pplib_apply_display_requirements(
|
||||
dc,
|
||||
context->bw.dce.sclk_khz);
|
||||
|
||||
pp_display_cfg->min_dcfclock_khz = pp_display_cfg->min_engine_clock_khz;
|
||||
/*
|
||||
* As workaround for >4x4K lightup set dcfclock to min_engine_clock value.
|
||||
* This is not required for less than 5 displays,
|
||||
* thus don't request decfclk in dc to avoid impact
|
||||
* on power saving.
|
||||
*
|
||||
*/
|
||||
pp_display_cfg->min_dcfclock_khz = (context->stream_count > 4)?
|
||||
pp_display_cfg->min_engine_clock_khz : 0;
|
||||
|
||||
pp_display_cfg->min_engine_clock_deep_sleep_khz
|
||||
= context->bw.dce.sclk_deep_sleep_khz;
|
||||
|
Fai riferimento in un nuovo problema
Block a user