mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 07:24:39 +08:00
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm: change drm set mode messages as DRM_DEBUG drm: fix crtc no modes printf + typo drm/radeon/kms: only evict to GTT if CP is ready drm/radeon/kms: Fix crash getting TV info with no BIOS. drm/radeon/kms/rv100: reject modes > 135 Mhz on DVI (v2) drm/radeon/kms/r6xx+: make irq handler less verbose drm/radeon/kms: fix up LVDS handling on macs (v2)
This commit is contained in:
commit
004b350632
@ -702,7 +702,7 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
|
||||
if (encoder->crtc != crtc)
|
||||
continue;
|
||||
|
||||
DRM_INFO("%s: set mode %s %x\n", drm_get_encoder_name(encoder),
|
||||
DRM_DEBUG("%s: set mode %s %x\n", drm_get_encoder_name(encoder),
|
||||
mode->name, mode->base.id);
|
||||
encoder_funcs = encoder->helper_private;
|
||||
encoder_funcs->mode_set(encoder, mode, adjusted_mode);
|
||||
@ -1032,7 +1032,8 @@ bool drm_helper_initial_config(struct drm_device *dev)
|
||||
/*
|
||||
* we shouldn't end up with no modes here.
|
||||
*/
|
||||
printk(KERN_INFO "No connectors reported conncted with modes\n");
|
||||
if (count == 0)
|
||||
printk(KERN_INFO "No connectors reported connected with modes\n");
|
||||
|
||||
drm_setup_crtcs(dev);
|
||||
|
||||
|
@ -2729,7 +2729,7 @@ restart_ih:
|
||||
}
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -2749,7 +2749,7 @@ restart_ih:
|
||||
}
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -2798,7 +2798,7 @@ restart_ih:
|
||||
}
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -2812,7 +2812,7 @@ restart_ih:
|
||||
DRM_DEBUG("IH: CP EOP\n");
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
DRM_DEBUG("Unhandled interrupt: %d %d\n", src_id, src_data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -687,6 +687,9 @@ radeon_combios_get_tv_info(struct radeon_device *rdev)
|
||||
uint16_t tv_info;
|
||||
enum radeon_tv_std tv_std = TV_STD_NTSC;
|
||||
|
||||
if (rdev->bios == NULL)
|
||||
return tv_std;
|
||||
|
||||
tv_info = combios_get_table_offset(dev, COMBIOS_TV_INFO_TABLE);
|
||||
if (tv_info) {
|
||||
if (RBIOS8(tv_info + 6) == 'T') {
|
||||
|
@ -900,10 +900,18 @@ static void radeon_dvi_force(struct drm_connector *connector)
|
||||
static int radeon_dvi_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
|
||||
|
||||
/* XXX check mode bandwidth */
|
||||
|
||||
/* clocks over 135 MHz have heat issues with DVI on RV100 */
|
||||
if (radeon_connector->use_digital &&
|
||||
(rdev->family == CHIP_RV100) &&
|
||||
(mode->clock > 135000))
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
if (radeon_connector->use_digital && (mode->clock > 165000)) {
|
||||
if ((radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_I) ||
|
||||
(radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D) ||
|
||||
|
@ -46,6 +46,7 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode)
|
||||
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
||||
uint32_t lvds_gen_cntl, lvds_pll_cntl, pixclks_cntl, disp_pwr_man;
|
||||
int panel_pwr_delay = 2000;
|
||||
bool is_mac = false;
|
||||
DRM_DEBUG("\n");
|
||||
|
||||
if (radeon_encoder->enc_priv) {
|
||||
@ -58,6 +59,15 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode)
|
||||
}
|
||||
}
|
||||
|
||||
/* macs (and possibly some x86 oem systems?) wire up LVDS strangely
|
||||
* Taken from radeonfb.
|
||||
*/
|
||||
if ((rdev->mode_info.connector_table == CT_IBOOK) ||
|
||||
(rdev->mode_info.connector_table == CT_POWERBOOK_EXTERNAL) ||
|
||||
(rdev->mode_info.connector_table == CT_POWERBOOK_INTERNAL) ||
|
||||
(rdev->mode_info.connector_table == CT_POWERBOOK_VGA))
|
||||
is_mac = true;
|
||||
|
||||
switch (mode) {
|
||||
case DRM_MODE_DPMS_ON:
|
||||
disp_pwr_man = RREG32(RADEON_DISP_PWR_MAN);
|
||||
@ -74,6 +84,8 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode)
|
||||
|
||||
lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL);
|
||||
lvds_gen_cntl |= (RADEON_LVDS_ON | RADEON_LVDS_EN | RADEON_LVDS_DIGON | RADEON_LVDS_BLON);
|
||||
if (is_mac)
|
||||
lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN;
|
||||
lvds_gen_cntl &= ~(RADEON_LVDS_DISPLAY_DIS);
|
||||
udelay(panel_pwr_delay * 1000);
|
||||
WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
|
||||
@ -85,7 +97,14 @@ static void radeon_legacy_lvds_dpms(struct drm_encoder *encoder, int mode)
|
||||
WREG32_PLL_P(RADEON_PIXCLKS_CNTL, 0, ~RADEON_PIXCLK_LVDS_ALWAYS_ONb);
|
||||
lvds_gen_cntl = RREG32(RADEON_LVDS_GEN_CNTL);
|
||||
lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS;
|
||||
if (is_mac) {
|
||||
lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_EN;
|
||||
WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
|
||||
lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_EN);
|
||||
} else {
|
||||
WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
|
||||
lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_BLON | RADEON_LVDS_EN | RADEON_LVDS_DIGON);
|
||||
}
|
||||
udelay(panel_pwr_delay * 1000);
|
||||
WREG32(RADEON_LVDS_GEN_CNTL, lvds_gen_cntl);
|
||||
WREG32_PLL(RADEON_PIXCLKS_CNTL, pixclks_cntl);
|
||||
|
@ -215,6 +215,9 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo,
|
||||
rbo = container_of(bo, struct radeon_bo, tbo);
|
||||
switch (bo->mem.mem_type) {
|
||||
case TTM_PL_VRAM:
|
||||
if (rbo->rdev->cp.ready == false)
|
||||
radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_CPU);
|
||||
else
|
||||
radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_GTT);
|
||||
break;
|
||||
case TTM_PL_TT:
|
||||
|
Loading…
Reference in New Issue
Block a user