2010-11-16 18:58:00

by Tino Keitel

[permalink] [raw]
Subject: DVI/EDID broken with Intel i945 graphics and 2.6.37-rc2

Hi,

2.6.37-rc2 doesn't seem to detect the LCD connected via DVI on my Mac
mini Core2 Duo with i945 graphics:

[drm] initialized overlay support
No connectors reported connected with modes
[drm] Cannot find any crtc or sizes - going 1024x768

The text console is just black, and X uses a bogus resolution
(1152x864). The native resolution of the LCD is 1680x1050.

It works with 2.6.36.

Note that the Mac mini reports the EDID data via the analog GPIO port
IIRC (if that matters).

Regards,
Tino


Attachments:
(No filename) (497.00 B)
dmesg (40.19 kB)
Xorg.0.log (23.75 kB)
xrandr (405.00 B)
Download all attachments

2010-11-17 10:20:19

by Chris Wilson

[permalink] [raw]
Subject: Re: DVI/EDID broken with Intel i945 graphics and 2.6.37-rc2

On Tue, 16 Nov 2010 19:49:14 +0100, Tino Keitel <[email protected]> wrote:
> Hi,
>
> 2.6.37-rc2 doesn't seem to detect the LCD connected via DVI on my Mac
> mini Core2 Duo with i945 graphics:

Hmm, sounds like fallout from detection of the VGA connection on the shared
GPIO wire.

Does this help?

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo
index de158b7..ec32ceb 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1327,11 +1327,8 @@ intel_analog_is_connected(struct drm_device *dev)
if (!analog_connector)
return false;

- if (analog_connector->funcs->detect(analog_connector, false) ==
- connector_status_disconnected)
- return false;
-
- return true;
+ return analog_connector->funcs->detect(analog_connector, false) ==
+ connector_status_connected;
}

An alternative is to force detection, ie change the detect(analog, false)
to true.
-Chris

--
Chris Wilson, Intel Open Source Technology Centre

2010-11-17 12:02:45

by Tino Keitel

[permalink] [raw]
Subject: Re: DVI/EDID broken with Intel i945 graphics and 2.6.37-rc2

On Wed, Nov 17, 2010 at 10:20:09 +0000, Chris Wilson wrote:
> On Tue, 16 Nov 2010 19:49:14 +0100, Tino Keitel <[email protected]> wrote:
> > Hi,
> >
> > 2.6.37-rc2 doesn't seem to detect the LCD connected via DVI on my Mac
> > mini Core2 Duo with i945 graphics:
>
> Hmm, sounds like fallout from detection of the VGA connection on the shared
> GPIO wire.
>
> Does this help?

No. I still get this:

No connectors reported connected with modes
[drm] Cannot find any crtc or sizes - going 1024x768

Regards,
Tino

2010-11-17 20:01:36

by Tino Keitel

[permalink] [raw]
Subject: Re: DVI/EDID broken with Intel i945 graphics and 2.6.37-rc2

On Wed, Nov 17, 2010 at 10:20:09 +0000, Chris Wilson wrote:
> On Tue, 16 Nov 2010 19:49:14 +0100, Tino Keitel <[email protected]> wrote:
> > Hi,
> >
> > 2.6.37-rc2 doesn't seem to detect the LCD connected via DVI on my Mac
> > mini Core2 Duo with i945 graphics:
>
> Hmm, sounds like fallout from detection of the VGA connection on the shared
> GPIO wire.
>
> Does this help?

No. I still get this:

No connectors reported connected with modes
[drm] Cannot find any crtc or sizes - going 1024x768

Regards,
Tino

2010-11-19 07:54:11

by Tino Keitel

[permalink] [raw]
Subject: Re: DVI/EDID broken with Intel i945 graphics and 2.6.37-rc2

On Wed, Nov 17, 2010 at 10:20:09 +0000, Chris Wilson wrote:

[...]

> An alternative is to force detection, ie change the detect(analog, false)
> to true.

Hi,

this didn't help either.

Regards,
Tino

2010-11-19 21:42:31

by Chris Wilson

[permalink] [raw]
Subject: Re: DVI/EDID broken with Intel i945 graphics and 2.6.37-rc2

On Fri, 19 Nov 2010 08:54:27 +0100, Tino Keitel <[email protected]> wrote:
> On Wed, Nov 17, 2010 at 10:20:09 +0000, Chris Wilson wrote:
>
> [...]
>
> > An alternative is to force detection, ie change the detect(analog, false)
> > to true.
>
> Hi,
>
> this didn't help either.

If we didn't even hit the additional printks, then I am no longer even
sure what is going on here... Can you add drm.debug=0xe to your boot line
and attach the dmesg from boot?

Thanks,
-Chris

--
Chris Wilson, Intel Open Source Technology Centre

2010-11-21 16:34:08

by Maciej Rutecki

[permalink] [raw]
Subject: Re: DVI/EDID broken with Intel i945 graphics and 2.6.37-rc2

On wtorek, 16 listopada 2010 o 19:49:14 Tino Keitel wrote:
> Hi,
>
> 2.6.37-rc2 doesn't seem to detect the LCD connected via DVI on my Mac
> mini Core2 Duo with i945 graphics:
>
> [drm] initialized overlay support
> No connectors reported connected with modes
> [drm] Cannot find any crtc or sizes - going 1024x768
>
> The text console is just black, and X uses a bogus resolution
> (1152x864). The native resolution of the LCD is 1680x1050.
>
> It works with 2.6.36.
>

I created a Bugzilla entry at
https://bugzilla.kernel.org/show_bug.cgi?id=23462
for your bug report, please add your address to the CC list in there, thanks!


--
Maciej Rutecki
http://www.maciek.unixy.pl

2010-11-23 21:46:45

by Tino Keitel

[permalink] [raw]
Subject: Re: DVI/EDID broken with Intel i945 graphics and 2.6.37-rc2

On Fri, Nov 19, 2010 at 21:42:10 +0000, Chris Wilson wrote:
> On Fri, 19 Nov 2010 08:54:27 +0100, Tino Keitel <[email protected]> wrote:
> > On Wed, Nov 17, 2010 at 10:20:09 +0000, Chris Wilson wrote:
> >
> > [...]
> >
> > > An alternative is to force detection, ie change the detect(analog, false)
> > > to true.
> >
> > Hi,
> >
> > this didn't help either.
>
> If we didn't even hit the additional printks, then I am no longer even
> sure what is going on here... Can you add drm.debug=0xe to your boot line
> and attach the dmesg from boot?

Hi, dmesg with drm.debug=0xe is attached.

Regards,
Tino


Attachments:
(No filename) (610.00 B)
dmesg.xz (11.06 kB)
Download all attachments

2010-11-23 22:42:38

by Chris Wilson

[permalink] [raw]
Subject: [PATCH] drm/i915/sdvo: Always fallback to querying the shared DDC line

On a few devices, like the Mac Mini, the CRT DDC pins are shared between
the analog connector and the digital connector. In this scenario, use
the EDID to determine if a digital panel is connected to the digital
connector.

Signed-off-by: Chris Wilson <[email protected]>
---

Looking closer I can't see any rationale for checking whether or not the
analog device is attached since we check whether the display is digital
before accepting the EDID.

---
drivers/gpu/drm/i915/intel_sdvo.c | 45 +-----------------------------------
1 files changed, 2 insertions(+), 43 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 8431825..906696f 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1296,55 +1296,14 @@ intel_sdvo_get_edid(struct drm_connector *connector)
return drm_get_edid(connector, &sdvo->ddc);
}

-static struct drm_connector *
-intel_find_analog_connector(struct drm_device *dev)
-{
- struct drm_connector *connector;
- struct intel_sdvo *encoder;
-
- list_for_each_entry(encoder,
- &dev->mode_config.encoder_list,
- base.base.head) {
- if (encoder->base.type == INTEL_OUTPUT_ANALOG) {
- list_for_each_entry(connector,
- &dev->mode_config.connector_list,
- head) {
- if (&encoder->base ==
- intel_attached_encoder(connector))
- return connector;
- }
- }
- }
-
- return NULL;
-}
-
-static int
-intel_analog_is_connected(struct drm_device *dev)
-{
- struct drm_connector *analog_connector;
-
- analog_connector = intel_find_analog_connector(dev);
- if (!analog_connector)
- return false;
-
- if (analog_connector->funcs->detect(analog_connector, false) ==
- connector_status_disconnected)
- return false;
-
- return true;
-}
-
/* Mac mini hack -- use the same DDC as the analog connector */
static struct edid *
intel_sdvo_get_analog_edid(struct drm_connector *connector)
{
struct drm_i915_private *dev_priv = connector->dev->dev_private;

- if (!intel_analog_is_connected(connector->dev))
- return NULL;
-
- return drm_get_edid(connector, &dev_priv->gmbus[dev_priv->crt_ddc_pin].adapter);
+ return drm_get_edid(connector,
+ &dev_priv->gmbus[dev_priv->crt_ddc_pin].adapter);
}

enum drm_connector_status
--
1.7.2.3

2010-11-23 23:02:31

by Tino Keitel

[permalink] [raw]
Subject: Re: [PATCH] drm/i915/sdvo: Always fallback to querying the shared DDC line

On Tue, Nov 23, 2010 at 22:42:32 +0000, Chris Wilson wrote:
> On a few devices, like the Mac Mini, the CRT DDC pins are shared between
> the analog connector and the digital connector. In this scenario, use
> the EDID to determine if a digital panel is connected to the digital
> connector.
>
> Signed-off-by: Chris Wilson <[email protected]>
> ---
>
> Looking closer I can't see any rationale for checking whether or not the
> analog device is attached since we check whether the display is digital
> before accepting the EDID.

Hi,

works fine with 2.6.37-rc3.

Thanks and regards,
Tino