diff options
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_connectors.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 8da06e17ff27..20161567dbff 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
| @@ -208,6 +208,18 @@ static struct drm_display_mode *radeon_fp_native_mode(struct drm_encoder *encode | |||
| 208 | drm_mode_set_name(mode); | 208 | drm_mode_set_name(mode); |
| 209 | 209 | ||
| 210 | DRM_DEBUG("Adding native panel mode %s\n", mode->name); | 210 | DRM_DEBUG("Adding native panel mode %s\n", mode->name); |
| 211 | } else if (native_mode->hdisplay != 0 && | ||
| 212 | native_mode->vdisplay != 0) { | ||
| 213 | /* mac laptops without an edid */ | ||
| 214 | /* Note that this is not necessarily the exact panel mode, | ||
| 215 | * but an approximation based on the cvt formula. For these | ||
| 216 | * systems we should ideally read the mode info out of the | ||
| 217 | * registers or add a mode table, but this works and is much | ||
| 218 | * simpler. | ||
| 219 | */ | ||
| 220 | mode = drm_cvt_mode(dev, native_mode->hdisplay, native_mode->vdisplay, 60, true, false, false); | ||
| 221 | mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER; | ||
| 222 | DRM_DEBUG("Adding cvt approximation of native panel mode %s\n", mode->name); | ||
| 211 | } | 223 | } |
| 212 | return mode; | 224 | return mode; |
| 213 | } | 225 | } |
