Skip to contentSkip to conversation

Interlace modes with r600 KMS

DISCUSSION Marius Gröger 2 participants 14 messages Sep 7, 2010 – Sep 10, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi All,

I'm not able to use interlace modes (r600 KMS from d-r-t, HDMI output, Xorg stack on xorg-edgers, Ubuntu lucid). All interlace modes which are defined in EDID seem to be pruned and don't appear in xrandr. Manually adding a mode using xrandr does work, and the TV set detects the mode, but the image shows horizontal lines. No crash though.

Interlace modes did use to work fine in the past, but I don't know when they ceased to function.

What is the status of interlace modes on this kind of setup? What more tests or logs would be helpful to analyze the problem? What are other people's experiences with this?

Thanks
Marius

#1 lore raw

2010/9/7 Marius Gröger <[email protected]>:

Quoted 8 lines

Hi All,

I'm not able to use interlace modes (r600 KMS from d-r-t, HDMI output, Xorg stack on xorg-edgers, Ubuntu lucid). All interlace modes which are defined in EDID seem to be pruned and don't appear in xrandr. Manually adding a mode using xrandr does work, and the TV set detects the mode, but the image shows horizontal lines. No crash though.

Quoted 6 lines

Interlace modes did use to work fine in the past, but I don't know when they ceased to function.

What is the status of interlace modes on this kind of setup? What more tests or logs would be helpful to analyze the problem? What are other people's experiences with this?

This isn't a driver bug as far as I can tell. At some point the Xserver started purging interlaced modes. See this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=29591

Alex

#2 lore raw

Am 07.09.2010 16:52, wrote Alex Deucher:

Quoted 12 lines

2010/9/7 Marius Gröger<[email protected]>:

Quoted 11 lines

Hi All,

I'm not able to use interlace modes (r600 KMS from d-r-t, HDMI output, Xorg stack on xorg-edgers, Ubuntu lucid). All interlace modes which are defined in EDID seem to be pruned and don't appear in xrandr. Manually adding a mode using xrandr does work, and the TV set detects the mode, but the image shows horizontal lines. No crash though.

Interlace modes did use to work fine in the past, but I don't know when they ceased to function.

Quoted 7 lines
Quoted 3 lines

What is the status of interlace modes on this kind of setup? What more tests or logs would be helpful to analyze the problem? What are other people's experiences with this?

This isn't a driver bug as far as I can tell. At some point the Xserver started purging interlaced modes. See this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=29591

Thanks for the pointer. I did look into the xserver sources a bit and while I'm far from understanding exactly what's going on, it seems like the server is relying on output->interlaceAllowed and output->doubleScanAllowed. Aren't these bools in the domain of the display driver (granted, this wouldn't be the radeon module but the xf86-video-ati driver)?

Also, as I wrote, the purging seems to be half-done, since I am able to manually add an interlaced mode. But since that mode doesn't work properly - does the radeon module support interlaced modes? Is there a non-X way to verify this?

Regards
Marius

#3 lore raw

2010/9/7 Marius Gröger <[email protected]>:

Quoted 29 lines

Am 07.09.2010 16:52, wrote Alex Deucher:

Quoted 19 lines

2010/9/7 Marius Gröger<[email protected]>:

Quoted 17 lines

Hi All,

I'm not able to use interlace modes (r600 KMS from d-r-t, HDMI output, Xorg
stack on xorg-edgers, Ubuntu lucid). All interlace modes which are defined
in EDID seem to be pruned and don't appear in xrandr. Manually adding a mode
using xrandr does work, and the TV set detects the mode, but the image shows
horizontal lines. No crash though.

Interlace modes did use to work fine in the past, but I don't know when they
ceased to function.

Quoted 8 lines
Quoted 4 lines

What is the status of interlace modes on this kind of setup? What more tests
or logs would be helpful to analyze the problem? What are other people's experiences with this?

This isn't a driver bug as far as I can tell.  At some point the Xserver started purging interlaced modes.  See this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=29591

Quoted 6 lines

Thanks for the pointer. I did look into the xserver sources a bit and while I'm far from understanding exactly what's going on, it seems like the server is relying on output->interlaceAllowed and output->doubleScanAllowed. Aren't these bools in the domain of the display driver (granted, this wouldn't be the radeon module but the xf86-video-ati driver)?

I guess so. Interlace used to work without those parameters set; I guess the xserver behavior changed in the meantime. I've gone ahead and set them in the driver.

Quoted 4 lines

Also, as I wrote, the purging seems to be half-done, since I am able to manually add an interlaced mode. But since that mode doesn't work properly - does the radeon module support interlaced modes? Is there a non-X way to verify this?

It did in the past, however, at the moment, I don't have a interlaced capable monitor to test. Can you try again with xf86-video-ati from git master?

Alex

#4 lore raw

Am 07.09.2010 17:53, wrote Alex Deucher:

Quoted 3 lines

It did in the past, however, at the moment, I don't have a interlaced capable monitor to test. Can you try again with xf86-video-ati from git master?

I'll try, thanks.

Marius

#5 lore raw
In reply to Alex Deucher

Am 07.09.2010 17:53, schrieb Alex Deucher:

Quoted 3 lines

It did in the past, however, at the moment, I don't have a interlaced capable monitor to test. Can you try again with xf86-video-ati from git master?

No change, at all, unfortunately. The interlace modes, while listed in Xorg.conf, are not visible in xrandr. Manually adding an interlaced mode with xrandr results in a broken screen display.

Any other thoughts?

Regards
Marius

#6 lore raw

2010/9/7 Marius Gröger <[email protected]>:

Quoted 6 lines

Am 07.09.2010 17:53, schrieb Alex Deucher:

Quoted 4 lines

It did in the past, however, at the moment, I don't have a interlaced capable monitor to test.  Can you try again with xf86-video-ati from git master?

Quoted 6 lines

No change, at all, unfortunately. The interlace modes, while listed in Xorg.conf, are not visible in xrandr. Manually adding an interlaced mode with xrandr results in a broken screen display.

Any other thoughts?

Does this patch help?

(quoted diff) +0 -0

b/drivers/gpu/drm/radeon/radeon_encoders.c
index 2c293e8..f821247 100644

drivers/gpu/drm/radeon/radeon_encoders.c +0 -0
@@ -288,8 +288,8 @@ static bool radeon_atom_mode_fixup(struct

drm_encoder *encoder,

        drm_mode_set_crtcinfo(adjusted_mode, 0);

        /* hw bug */

- if ((mode->flags & DRM_MODE_FLAG_INTERLACE)
- && (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2)))
+ if ((adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
+ && (adjusted_mode->crtc_vsync_start <
(adjusted_mode->crtc_vdisplay + 2)))

                adjusted_mode->crtc_vsync_start =

adjusted_mode->crtc_vdisplay + 2;

        /* get the native mode for LVDS */

If not, does it work ok with ums (boot with radeon.modeset=0)? If so, we'll need to compare the modesetting paths between ums and kms and see what got broken with kms.

Alex

Quoted 4 lines

Regards
Marius

#7 lore raw

Am 07.09.2010 21:00, schrieb Alex Deucher:

Quoted 1 line

Does this patch help?

No change...

Quoted 3 lines

If not, does it work ok with ums (boot with radeon.modeset=0)? If so, we'll need to compare the modesetting paths between ums and kms and see what got broken with kms.

Without KMS the interlaced modes are listed in xrandr right away, and they are working!

Marius

#8 lore raw

2010/9/7 Marius Gröger <[email protected]>:

Quoted 4 lines

Am 07.09.2010 21:00, schrieb Alex Deucher:

Quoted 2 lines

Does this patch help?

Quoted 9 lines

No change...

Quoted 3 lines

If not, does it work ok with ums (boot with radeon.modeset=0)?  If so, we'll need to compare the modesetting paths between ums and kms and see what got broken with kms.

Without KMS the interlaced modes are listed in xrandr right away, and they are working!

What card do you have? Can you dump the registers with both kms and ums with an interlaced mode set and send them to me? Use avivotool (as root) available here:
http://cgit.freedesktop.org/~airlied/radeontool/

with interlaced mode set in kms:
./avivotool regs all > broken.dump
with interlaced mode set in ums:
./avivotool regs all > working.dump

Thanks,

Alex

Quoted 2 lines

Marius

#9 lore raw

Am 08.09.2010 00:00, wrote Alex Deucher:

Quoted 2 lines

What card do you have? Can you dump the registers with both kms and ums with an interlaced mode set and send them to me? Use avivotool

I have a GA-MA78GM-UD2H mainboard with an onboard RS780 chipset.

I sent the requested dumps in a PM.

While typing this I realize that I don't use a pristine d-r-t. I did fiddle with the HDMI underscan settings a bit to make my 1280x720p mode fit better. That fiddling went so far that I broke the original ratio a little bit. Just to let you know.

Thanks
Marius

#10 lore raw

2010/9/8 Marius Gröger <[email protected]>:

Quoted 5 lines

Am 08.09.2010 00:00, wrote Alex Deucher:

Quoted 3 lines

What card do you have?  Can you dump the registers with both kms and ums with an interlaced mode set and send them to me?  Use avivotool

Quoted 8 lines

I have a GA-MA78GM-UD2H mainboard with an onboard RS780 chipset.

I sent the requested dumps in a PM.

While typing this I realize that I don't use a pristine d-r-t. I did fiddle with the HDMI underscan settings a bit to make my 1280x720p mode fit better. That fiddling went so far that I broke the original ratio a little bit. Just to let you know.

Does disabling underscan fix interlaced?

Alex

Quoted 8 lines

Thanks
Marius
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw

Am 09.09.2010 17:03, schrieb Alex Deucher:

Quoted 1 line

Does disabling underscan fix interlaced?

I just pulled the latest d-r-t and at least I can confirm that the problem is present without any of my tinkerings :-) I still need to check with underscan disabled. There is no cmdline option for this yet, is there? What's the quickest way to disable underscan, replace UNDERSCAN_AUTO with UNDERSCAN_OFF?

Regards
Marius

#12 lore raw

2010/9/9 Marius Gröger <[email protected]>:

Quoted 9 lines

Am 09.09.2010 17:03, schrieb Alex Deucher:

Quoted 2 lines

Does disabling underscan fix interlaced?

I just pulled the latest d-r-t and at least I can confirm that the problem is present without any of my tinkerings :-) I still need to check with underscan disabled. There is no cmdline option for this yet, is there? What's the quickest way to disable underscan, replace UNDERSCAN_AUTO with UNDERSCAN_OFF?

ether change the default like that or just use xrandr:

xrandr --output <output> --set underscan off

Alex

Quoted 5 lines

Regards
Marius

#13 lore raw
In reply to Alex Deucher

On Thu, 9 Sep 2010 11:03:54 -0400
wrote Alex Deucher <[email protected]>:

Quoted 1 line

Does disabling underscan fix interlaced?

Yes, without underscan I can switch to my manually defined interlace mode and it looks ok.

However, the EDID reported interlace modes are still pruned by the Xserver, so there still seems to be a subtle difference between KMS and UMS.

Thanks
Marius