Re: gma500: Cannot find any crtc or sizes - going 1024x768

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Tue, Jun 12, 2012 at 10:59 AM, Christian Gmeiner
<christian.gmeiner@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[Other Archives]     [Linux Kernel Newbies]     [Linux Driver Development]     [Fedora Kernel]     [Linux Kernel Testers]     [Linux SH]     [Linux Omap]     [Linux Kbuild]     [Linux Tape]     [Linux Input]     [Linux Kernel Janitors]     [Linux Kernel Packagers]     [Linux Doc]     [Linux Man Pages]     [Linux API]     [Linux Memory Management]     [Linux Modules]     [Linux Standards]     [Kernel Announce]     [Netdev]     [Git]     [Linux PCI]     Linux CAN Development     [Linux I2C]     [Linux RDMA]     [Linux NUMA]     [Netfilter]     [Netfilter Devel]     [SELinux]     [Bugtraq]     [FIO]     [Linux Perf Users]     [Linux Serial]     [Linux PPP]     [Linux ISDN]     [Linux Next]     [Kernel Stable Commits]     [Linux Tip Commits]     [Kernel MM Commits]     [Linux Security Module]     [AutoFS]     [Filesystem Development]     [Ext3 Filesystem]     [Linux bcache]     [Ext4 Filesystem]     [Linux BTRFS]     [Linux CEPH Filesystem]     [Linux XFS]     [XFS]     [Linux NFS]     [Linux CIFS]     [Ecryptfs]     [Linux NILFS]     [Linux Cachefs]     [Reiser FS]     [Initramfs]     [Linux FB Devel]     [Linux OpenGL]     [DRI Devel]     [Fastboot]     [Linux RT Users]     [Linux RT Stable]     [eCos]     [Corosync]     [Linux Clusters]     [LVS Devel]     [Hot Plug]     [Linux Virtualization]     [KVM]     [KVM PPC]     [KVM ia64]     [Linux Containers]     [Linux Hexagon]     [Linux Cgroups]     [Util Linux]     [Wireless]     [Linux Bluetooth]     [Bluez Devel]     [Ethernet Bridging]     [Embedded Linux]     [Barebox]     [Linux MMC]     [Linux IIO]     [Sparse]     [Smatch]     [Linux Arch]     [x86 Platform Driver]     [Linux ACPI]     [Linux IBM ACPI]     [LM Sensors]     [CPU Freq]     [Linux Power Management]     [Linmodems]     [Linux DCCP]     [Linux SCTP]     [ALSA Devel]     [Linux USB]     [Linux PA RISC]     [Linux Samsung SOC]     [MIPS Linux]     [IBM S/390 Linux]     [ARM Linux]     [ARM Kernel]     [ARM MSM]     [Tegra Devel]     [Sparc Linux]     [Linux Security]     [Linux Sound]     [Linux Media]     [Video 4 Linux]     [Linux IRDA Users]     [Linux for the blind]     [Linux RAID]     [Linux ATA RAID]     [Device Mapper]     [Linux SCSI]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Linux IDE]     [Linux SMP]     [Linux AXP]     [Linux Alpha]     [Linux M68K]     [Linux ia64]     [Linux 8086]     [Linux x86_64]     [Linux Config]     [Linux Apps]     [Linux MSDOS]     [Linux X.25]     [Linux Crypto]     [DM Crypt]     [Linux Trace Users]     [Linux Btrace]     [Linux Watchdog]     [Utrace Devel]     [Linux C Programming]     [Linux Assembly]     [Dash]     [DWARVES]     [Hail Devel]     [Linux Kernel Debugger]     [Linux gcc]     [Gcc Help]     [X.Org]     [Wine]

Add to Google Powered by Linux

[Older Kernel Discussion]     [Yosemite National Park Forum]     [Large Format Photos]     [Gimp]     [Yosemite Photos]     [Stuff]