2009/6/24 Rafał Miłecki <[email protected]>: > Khem, hi, my first patch here and my first touching kernel code ever. > > I try to make my RV620 work in console using radeon KMS. Using > Jerome's WIP code and my own hacks I discovered this quite general bug > in treating encoders. > > Before patch: > Jun 23 15:15:49 linux-aodr kernel: i2c-adapter i2c-1: unable to read EDID > block. > Jun 23 15:15:49 linux-aodr kernel: radeon 0000:01:00.0: VGA-1: no EDID data > Jun 23 15:15:49 linux-aodr kernel: i2c-adapter i2c-2: unable to read EDID > block. > Jun 23 15:15:49 linux-aodr kernel: radeon 0000:01:00.0: LVDS-1: no EDID data > Jun 23 15:15:49 linux-aodr kernel: i2c-adapter i2c-3: unable to read EDID > block. > Jun 23 15:15:49 linux-aodr kernel: radeon 0000:01:00.0: HDMI Type B-1: > no EDID data > Jun 23 15:15:49 linux-aodr kernel: i2c-adapter i2c-2: unable to read EDID > block. > Jun 23 15:15:49 linux-aodr kernel: radeon 0000:01:00.0: LVDS-1: no EDID data > Jun 23 15:15:49 linux-aodr kernel: [drm:drm_helper_initial_config] > *ERROR* connectors have no modes, using standard modes > Jun 23 15:15:49 linux-aodr kernel: > [drm_mode:drm_mode_debug_printmodeline], Modeline 11:"800x600" 60315 > 40000 800 840 968 1056 600 601 605 628 0x10 0x5 > Jun 23 15:15:49 linux-aodr kernel: > [drm_mode:drm_mode_debug_printmodeline], Modeline 12:"800x600" 60315 > 40000 800 840 968 1056 600 601 605 628 0x10 0x5 > Jun 23 15:15:49 linux-aodr kernel: > [drm_mode:drm_mode_debug_printmodeline], Modeline 13:"800x600" 60315 > 40000 800 840 968 1056 600 601 605 628 0x10 0x5 > Jun 23 15:15:49 linux-aodr kernel: [drm] fb mappable at 0xFFFFC90011800000 > Jun 23 15:15:49 linux-aodr kernel: [drm] vram apper at 0xC0000000 > Jun 23 15:15:49 linux-aodr kernel: [drm] size 1996800 > Jun 23 15:15:49 linux-aodr kernel: [drm] fb depth is 24 > Jun 23 15:15:49 linux-aodr kernel: [drm] pitch is 3328 > Jun 23 15:15:49 linux-aodr kernel: Console: switching to colour frame > buffer device 100x37 > > Witch patch applied: > Jun 23 15:25:20 linux-aodr kernel: i2c-adapter i2c-1: unable to read EDID > block. > Jun 23 15:25:20 linux-aodr kernel: radeon 0000:01:00.0: VGA-1: no EDID data > Jun 23 15:25:20 linux-aodr kernel: i2c-adapter i2c-2: unable to read EDID > block. > Jun 23 15:25:20 linux-aodr kernel: radeon 0000:01:00.0: LVDS-1: no EDID data > Jun 23 15:25:20 linux-aodr kernel: i2c-adapter i2c-3: unable to read EDID > block. > Jun 23 15:25:20 linux-aodr kernel: radeon 0000:01:00.0: HDMI Type B-1: > no EDID data > Jun 23 15:25:20 linux-aodr kernel: i2c-adapter i2c-2: unable to read EDID > block. > Jun 23 15:25:20 linux-aodr kernel: radeon 0000:01:00.0: LVDS-1: no EDID data > Jun 23 15:25:20 linux-aodr kernel: > [drm_mode:drm_mode_debug_printmodeline], Modeline 11:"1600x900" 59954 > 88540 1600 1614 1626 1630 900 902 904 906 0x48 0x0 > Jun 23 15:25:20 linux-aodr kernel: [drm] fb mappable at 0xFFFFC90011E00000 > Jun 23 15:25:20 linux-aodr kernel: [drm] vram apper at 0xC0000000 > Jun 23 15:25:20 linux-aodr kernel: [drm] size 5760000 > Jun 23 15:25:20 linux-aodr kernel: [drm] fb depth is 24 > Jun 23 15:25:20 linux-aodr kernel: [drm] pitch is 6400 > Jun 23 15:25:20 linux-aodr kernel: Console: switching to colour frame > buffer device 200x56 > Jun 23 15:25:20 linux-aodr kernel: > [drm_mode:drm_mode_debug_printmodeline], Modeline 0:"" 0 0 0 0 0 0 0 0 > 0 0 0x0 0x0 > Jun 23 15:25:20 linux-aodr kernel: > [drm_mode:drm_mode_debug_printmodeline], Modeline 13:"1600x900" 59954 > 88540 1600 1614 1626 1630 900 902 904 906 0x48 0x0 > Jun 23 15:25:20 linux-aodr kernel: > [drm_mode:drm_mode_debug_printmodeline], Modeline 13:"1600x900" 59954 > 88540 1600 1614 1626 1630 900 902 904 906 0x48 0x0 > > So this just makes radeon drm call radeon_atombios_get_lvds_info to > get mode for PANEL. > > I'm not sure how would you like to apply this and if this actually is > important for 2.6.31. As we support up to R5xx only here, can we hit > this bug actually? Can hardware below R6xx use > ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA?
Only DCE 3.0/3.1 cards have ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA, so you'll only see this on rv620/rv635/rv780/rv770 hw. The proper fix is attached. We'll need to get lvds info for other encoder types as well since newer cards only have uniphy blocks. http://www.botchco.com/alex/xorg/0001-r6xx-r7xx-get-lvds-info-for-the-encoders-for-laptop.patch Alex
From 604b24fe44c6212bb6af5cbd443ceaa0f84c7804 Mon Sep 17 00:00:00 2001 From: Alex Deucher <[email protected]> Date: Sun, 28 Jun 2009 20:58:50 -0400 Subject: [PATCH] r6xx/r7xx: get lvds info for the encoders for laptop panels MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Noticed by Rafał Miłecki on dri-devel. On r6xx/r7xx hardware, laptop panels can be driven by KLDSCP_LVTMA or UNIPHY. Signed-off-by: Alex Deucher <[email protected]> --- drivers/gpu/drm/radeon/radeon_encoders.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c index 1af7e27..c4aa9cf 100644 --- a/drivers/gpu/drm/radeon/radeon_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_encoders.c @@ -1704,8 +1704,14 @@ radeon_add_atom_encoder(struct drm_device *dev, uint32_t encoder_id, uint32_t su case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: - drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_TMDS); - radeon_encoder->enc_priv = radeon_atombios_set_dig_info(radeon_encoder); + if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { + radeon_encoder->rmx_type = RMX_FULL; + drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_LVDS); + radeon_encoder->enc_priv = radeon_atombios_get_lvds_info(radeon_encoder); + } else { + drm_encoder_init(dev, encoder, &radeon_atom_enc_funcs, DRM_MODE_ENCODER_TMDS); + radeon_encoder->enc_priv = radeon_atombios_set_dig_info(radeon_encoder); + } drm_encoder_helper_add(encoder, &radeon_atom_dig_helper_funcs); break; } -- 1.5.6.3
------------------------------------------------------------------------------
-- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
