Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988Ab2FLLGZ (ORCPT ); Tue, 12 Jun 2012 07:06:25 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:60697 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750875Ab2FLLGY convert rfc822-to-8bit (ORCPT ); Tue, 12 Jun 2012 07:06:24 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 12 Jun 2012 13:06:24 +0200 Message-ID: Subject: Re: gma500: Cannot find any crtc or sizes - going 1024x768 From: Patrik Jakobsson To: Christian Gmeiner Cc: linux-kernel@vger.kernel.org, Alan Cox Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4903 Lines: 114 On Tue, Jun 12, 2012 at 10:59 AM, Christian Gmeiner wrote: > Got a little bit further: > > diff --git a/drivers/gpu/drm/gma500/mid_bios.c > b/drivers/gpu/drm/gma500/mid_bios.c > index b2a790b..9ee3122 100644 > --- a/drivers/gpu/drm/gma500/mid_bios.c > +++ b/drivers/gpu/drm/gma500/mid_bios.c > @@ -55,8 +55,12 @@ static void mid_get_fuse_settings(struct drm_device *dev) > ? ? ? ?pci_read_config_dword(pci_root, 0xD4, &fuse_value); > > ? ? ? ?/* FB_MIPI_DISABLE doesn't mean LVDS on with Medfield */ > +#if 0 > ? ? ? ?if (IS_MRST(dev)) > ? ? ? ? ? ? ? ?dev_priv->iLVDS_enable = fuse_value & FB_MIPI_DISABLE; > +#else > + ? ? ? dev_priv->iLVDS_enable = 1; > +#endif > > ? ? ? ?DRM_INFO("internal display is %s\n", > ? ? ? ? ? ? ? ? dev_priv->iLVDS_enable ? "LVDS display" : "MIPI display"); > diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c > b/drivers/gpu/drm/gma500/psb_intel_lvds.c > index c83f5b5..5b49522 100644 > --- a/drivers/gpu/drm/gma500/psb_intel_lvds.c > +++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c > @@ -530,11 +530,14 @@ static int psb_intel_lvds_get_modes(struct > drm_connector *connector) > ? ? ? ?struct psb_intel_lvds_priv *lvds_priv = psb_intel_encoder->dev_priv; > ? ? ? ?int ret = 0; > > + ? ? ? printk(KERN_INFO "test 1\n"); > +#if 0 > ? ? ? ?if (!IS_MRST(dev)) > ? ? ? ? ? ? ? ?ret = psb_intel_ddc_get_modes(connector, > &lvds_priv->i2c_bus->adapter); > > ? ? ? ?if (ret) > ? ? ? ? ? ? ? ?return ret; > +#endif > > ? ? ? ?/* Didn't get an EDID, so > ? ? ? ? * Set wide sync ranges so we get all modes > > > [ ? ?8.233858] [drm:drm_helper_probe_single_connector_modes], > [CONNECTOR:7:LVDS-1] > [ ? ?8.233869] test 1 > [ ? ?8.233967] [drm:drm_helper_probe_single_connector_modes], > [CONNECTOR:7:LVDS-1] probed modes : > [ ? ?8.233993] [drm:drm_mode_debug_printmodeline], Modeline > 10:"1024x600" 75 53990 1024 1072 1104 1184 600 603 604 608 0x48 0x0 > [ ? ?8.234038] [drm:drm_setup_crtcs], > [ ? ?8.234053] [drm:drm_enable_connectors], connector 7 enabled? yes > [ ? ?8.234066] [drm:drm_target_preferred], looking for cmdline mode on > connector 7 > [ ? ?8.234077] [drm:drm_target_preferred], looking for preferred mode > on connector 7 > [ ? ?8.234088] [drm:drm_target_preferred], found mode 1024x600 > [ ? ?8.234101] [drm:drm_setup_crtcs], picking CRTCs for 2048x2048 config > [ ? ?8.234116] [drm:drm_setup_crtcs], desired mode 1024x600 set on crtc 3 > [ ? ?8.242199] fbcon: psbfb (fb0) is primary device > [ ? ?8.244065] [drm:drm_crtc_helper_set_config], > [ ? ?8.244076] [drm:drm_crtc_helper_set_config], [CRTC:3] [FB:12] > #connectors=1 (x y) (0 0) > [ ? ?8.244099] [drm:drm_crtc_helper_set_config], crtc has no fb, full mode set > [ ? ?8.244106] [drm:drm_crtc_helper_set_config], modes are different, > full mode set > [ ? ?8.244120] [drm:drm_mode_debug_printmodeline], Modeline 0:"" 0 0 0 > 0 0 0 0 0 0 0 0x0 0x0 > [ ? ?8.244138] [drm:drm_mode_debug_printmodeline], Modeline > 11:"1024x600" 75 53990 1024 1072 1104 1184 600 603 604 608 0x48 0x0 > [ ? ?8.244145] [drm:drm_crtc_helper_set_config], encoder changed, full > mode switch > [ ? ?8.244151] [drm:drm_crtc_helper_set_config], crtc changed, full mode switch > [ ? ?8.244161] [drm:drm_crtc_helper_set_config], [CONNECTOR:7:LVDS-1] > to [CRTC:3] > [ ? ?8.244168] [drm:drm_crtc_helper_set_config], attempting to set > mode from userspace > [ ? ?8.244184] [drm:drm_mode_debug_printmodeline], Modeline > 11:"1024x600" 75 53990 1024 1072 1104 1184 600 603 604 608 0x48 0x0 > [ ? ?8.244195] Can't support LVDS on pipe A > [ ? ?8.244201] [drm:drm_crtc_helper_set_mode], Encoder fixup failed > [ ? ?8.244211] [drm:drm_crtc_helper_set_config] *ERROR* failed to set > mode on [CRTC:3] > [ ? ?8.244222] fbcon_init: detected unhandled fb_set_par error, error code -22 > [ ? ?8.262085] Console: switching to colour frame buffer device 128x37 > [ ? ?8.293680] fb0: psbfb frame buffer device > [ ? ?8.294817] drm: registered panic notifier > [ ? ?8.295173] [drm] Initialized gma500 1.0.0 2011-06-06 for > 0000:00:02.0 on minor 0 You're hitting a bug in the IS_MRST macro. You might actually have the fuse value but IS_MRST returns false for 0x4108. Try the following patch: diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h index 1bd115e..e8640ae 100644 --- a/drivers/gpu/drm/gma500/psb_drv.h +++ b/drivers/gpu/drm/gma500/psb_drv.h @@ -44,7 +44,7 @@ enum { }; #define IS_PSB(dev) (((dev)->pci_device & 0xfffe) == 0x8108) -#define IS_MRST(dev) (((dev)->pci_device & 0xfffc) == 0x4100) +#define IS_MRST(dev) (((dev)->pci_device & 0xfff0) == 0x4100) #define IS_MFLD(dev) (((dev)->pci_device & 0xfff8) == 0x0130) /* -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/