diff options
| author | Alex Deucher <alexdeucher@gmail.com> | 2009-11-30 01:40:24 -0500 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2009-12-01 20:37:15 -0500 |
| commit | 7dde8a19656ddec769b609e8b5662aa7243b8b6a (patch) | |
| tree | 50f21ca898a0443686e4ae142fa6c6da5bcef6d3 /drivers | |
| parent | 30256a3f6b646f6c6ab7276a97b40792faac5f1d (diff) | |
drm/radeon/kms/atom: pull misc mode info for lvds from bios tables
sync polarity, etc. This will likely fix LVDS problems
on some laptops.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 74bc8dfcb2a2..2dfb79defb50 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
| @@ -910,7 +910,7 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct | |||
| 910 | struct radeon_device *rdev = dev->dev_private; | 910 | struct radeon_device *rdev = dev->dev_private; |
| 911 | struct radeon_mode_info *mode_info = &rdev->mode_info; | 911 | struct radeon_mode_info *mode_info = &rdev->mode_info; |
| 912 | int index = GetIndexIntoMasterTable(DATA, LVDS_Info); | 912 | int index = GetIndexIntoMasterTable(DATA, LVDS_Info); |
| 913 | uint16_t data_offset; | 913 | uint16_t data_offset, misc; |
| 914 | union lvds_info *lvds_info; | 914 | union lvds_info *lvds_info; |
| 915 | uint8_t frev, crev; | 915 | uint8_t frev, crev; |
| 916 | struct radeon_encoder_atom_dig *lvds = NULL; | 916 | struct radeon_encoder_atom_dig *lvds = NULL; |
| @@ -949,6 +949,19 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct | |||
| 949 | lvds->panel_pwr_delay = | 949 | lvds->panel_pwr_delay = |
| 950 | le16_to_cpu(lvds_info->info.usOffDelayInMs); | 950 | le16_to_cpu(lvds_info->info.usOffDelayInMs); |
| 951 | lvds->lvds_misc = lvds_info->info.ucLVDS_Misc; | 951 | lvds->lvds_misc = lvds_info->info.ucLVDS_Misc; |
| 952 | |||
| 953 | misc = le16_to_cpu(lvds_info->info.sLCDTiming.susModeMiscInfo.usAccess); | ||
| 954 | if (misc & ATOM_VSYNC_POLARITY) | ||
| 955 | lvds->native_mode.flags |= DRM_MODE_FLAG_NVSYNC; | ||
| 956 | if (misc & ATOM_HSYNC_POLARITY) | ||
| 957 | lvds->native_mode.flags |= DRM_MODE_FLAG_NHSYNC; | ||
| 958 | if (misc & ATOM_COMPOSITESYNC) | ||
| 959 | lvds->native_mode.flags |= DRM_MODE_FLAG_CSYNC; | ||
| 960 | if (misc & ATOM_INTERLACE) | ||
| 961 | lvds->native_mode.flags |= DRM_MODE_FLAG_INTERLACE; | ||
| 962 | if (misc & ATOM_DOUBLE_CLOCK_MODE) | ||
| 963 | lvds->native_mode.flags |= DRM_MODE_FLAG_DBLSCAN; | ||
| 964 | |||
| 952 | /* set crtc values */ | 965 | /* set crtc values */ |
| 953 | drm_mode_set_crtcinfo(&lvds->native_mode, CRTC_INTERLACE_HALVE_V); | 966 | drm_mode_set_crtcinfo(&lvds->native_mode, CRTC_INTERLACE_HALVE_V); |
| 954 | 967 | ||
