diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-09-13 18:33:16 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-15 20:27:53 -0400 |
commit | 855f5f1d882a34e4e9dd27b299737cd3508a5624 (patch) | |
tree | 39ed846c62927a1e6482644b6a1cf0a1d0bb61f0 | |
parent | 1cd8b21aa22c4fe8835abe614da5fa989c66dca9 (diff) |
drm/radeon: fix panel scaling with eDP and LVDS bridges
We were using the wrong set_properly callback so we always
ended up with Full scaling even if something else (Center or
Full aspect) was selected.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_connectors.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index f7c8c6e0e9fc..79159b5da05b 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -1504,6 +1504,24 @@ static const struct drm_connector_funcs radeon_dp_connector_funcs = { | |||
1504 | .force = radeon_dvi_force, | 1504 | .force = radeon_dvi_force, |
1505 | }; | 1505 | }; |
1506 | 1506 | ||
1507 | static const struct drm_connector_funcs radeon_edp_connector_funcs = { | ||
1508 | .dpms = drm_helper_connector_dpms, | ||
1509 | .detect = radeon_dp_detect, | ||
1510 | .fill_modes = drm_helper_probe_single_connector_modes, | ||
1511 | .set_property = radeon_lvds_set_property, | ||
1512 | .destroy = radeon_dp_connector_destroy, | ||
1513 | .force = radeon_dvi_force, | ||
1514 | }; | ||
1515 | |||
1516 | static const struct drm_connector_funcs radeon_lvds_bridge_connector_funcs = { | ||
1517 | .dpms = drm_helper_connector_dpms, | ||
1518 | .detect = radeon_dp_detect, | ||
1519 | .fill_modes = drm_helper_probe_single_connector_modes, | ||
1520 | .set_property = radeon_lvds_set_property, | ||
1521 | .destroy = radeon_dp_connector_destroy, | ||
1522 | .force = radeon_dvi_force, | ||
1523 | }; | ||
1524 | |||
1507 | void | 1525 | void |
1508 | radeon_add_atom_connector(struct drm_device *dev, | 1526 | radeon_add_atom_connector(struct drm_device *dev, |
1509 | uint32_t connector_id, | 1527 | uint32_t connector_id, |
@@ -1595,8 +1613,6 @@ radeon_add_atom_connector(struct drm_device *dev, | |||
1595 | goto failed; | 1613 | goto failed; |
1596 | radeon_dig_connector->igp_lane_info = igp_lane_info; | 1614 | radeon_dig_connector->igp_lane_info = igp_lane_info; |
1597 | radeon_connector->con_priv = radeon_dig_connector; | 1615 | radeon_connector->con_priv = radeon_dig_connector; |
1598 | drm_connector_init(dev, &radeon_connector->base, &radeon_dp_connector_funcs, connector_type); | ||
1599 | drm_connector_helper_add(&radeon_connector->base, &radeon_dp_connector_helper_funcs); | ||
1600 | if (i2c_bus->valid) { | 1616 | if (i2c_bus->valid) { |
1601 | /* add DP i2c bus */ | 1617 | /* add DP i2c bus */ |
1602 | if (connector_type == DRM_MODE_CONNECTOR_eDP) | 1618 | if (connector_type == DRM_MODE_CONNECTOR_eDP) |
@@ -1613,6 +1629,10 @@ radeon_add_atom_connector(struct drm_device *dev, | |||
1613 | case DRM_MODE_CONNECTOR_VGA: | 1629 | case DRM_MODE_CONNECTOR_VGA: |
1614 | case DRM_MODE_CONNECTOR_DVIA: | 1630 | case DRM_MODE_CONNECTOR_DVIA: |
1615 | default: | 1631 | default: |
1632 | drm_connector_init(dev, &radeon_connector->base, | ||
1633 | &radeon_dp_connector_funcs, connector_type); | ||
1634 | drm_connector_helper_add(&radeon_connector->base, | ||
1635 | &radeon_dp_connector_helper_funcs); | ||
1616 | connector->interlace_allowed = true; | 1636 | connector->interlace_allowed = true; |
1617 | connector->doublescan_allowed = true; | 1637 | connector->doublescan_allowed = true; |
1618 | radeon_connector->dac_load_detect = true; | 1638 | radeon_connector->dac_load_detect = true; |
@@ -1625,6 +1645,10 @@ radeon_add_atom_connector(struct drm_device *dev, | |||
1625 | case DRM_MODE_CONNECTOR_HDMIA: | 1645 | case DRM_MODE_CONNECTOR_HDMIA: |
1626 | case DRM_MODE_CONNECTOR_HDMIB: | 1646 | case DRM_MODE_CONNECTOR_HDMIB: |
1627 | case DRM_MODE_CONNECTOR_DisplayPort: | 1647 | case DRM_MODE_CONNECTOR_DisplayPort: |
1648 | drm_connector_init(dev, &radeon_connector->base, | ||
1649 | &radeon_dp_connector_funcs, connector_type); | ||
1650 | drm_connector_helper_add(&radeon_connector->base, | ||
1651 | &radeon_dp_connector_helper_funcs); | ||
1628 | drm_object_attach_property(&radeon_connector->base.base, | 1652 | drm_object_attach_property(&radeon_connector->base.base, |
1629 | rdev->mode_info.underscan_property, | 1653 | rdev->mode_info.underscan_property, |
1630 | UNDERSCAN_OFF); | 1654 | UNDERSCAN_OFF); |
@@ -1652,6 +1676,10 @@ radeon_add_atom_connector(struct drm_device *dev, | |||
1652 | break; | 1676 | break; |
1653 | case DRM_MODE_CONNECTOR_LVDS: | 1677 | case DRM_MODE_CONNECTOR_LVDS: |
1654 | case DRM_MODE_CONNECTOR_eDP: | 1678 | case DRM_MODE_CONNECTOR_eDP: |
1679 | drm_connector_init(dev, &radeon_connector->base, | ||
1680 | &radeon_lvds_bridge_connector_funcs, connector_type); | ||
1681 | drm_connector_helper_add(&radeon_connector->base, | ||
1682 | &radeon_dp_connector_helper_funcs); | ||
1655 | drm_object_attach_property(&radeon_connector->base.base, | 1683 | drm_object_attach_property(&radeon_connector->base.base, |
1656 | dev->mode_config.scaling_mode_property, | 1684 | dev->mode_config.scaling_mode_property, |
1657 | DRM_MODE_SCALE_FULLSCREEN); | 1685 | DRM_MODE_SCALE_FULLSCREEN); |
@@ -1830,7 +1858,7 @@ radeon_add_atom_connector(struct drm_device *dev, | |||
1830 | goto failed; | 1858 | goto failed; |
1831 | radeon_dig_connector->igp_lane_info = igp_lane_info; | 1859 | radeon_dig_connector->igp_lane_info = igp_lane_info; |
1832 | radeon_connector->con_priv = radeon_dig_connector; | 1860 | radeon_connector->con_priv = radeon_dig_connector; |
1833 | drm_connector_init(dev, &radeon_connector->base, &radeon_dp_connector_funcs, connector_type); | 1861 | drm_connector_init(dev, &radeon_connector->base, &radeon_edp_connector_funcs, connector_type); |
1834 | drm_connector_helper_add(&radeon_connector->base, &radeon_dp_connector_helper_funcs); | 1862 | drm_connector_helper_add(&radeon_connector->base, &radeon_dp_connector_helper_funcs); |
1835 | if (i2c_bus->valid) { | 1863 | if (i2c_bus->valid) { |
1836 | /* add DP i2c bus */ | 1864 | /* add DP i2c bus */ |