Bug 73850

Summary: [gm45] allow cloning one display together with an extended desktop across two displays
Product: DRI Reporter: Julius Schwartzenberg <julius.schwartzenberg>
Component: DRM/IntelAssignee: Ville Syrjala <ville.syrjala>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: enhancement    
Priority: lowest CC: intel-gfx-bugs
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Patch to allow cloning with HDMI none

Description Julius Schwartzenberg 2014-01-20 22:19:35 UTC
My system has three outputs: LVDS1, VGA1 and HDMI1

Normally I have LVDS1 and VGA1 active at the same time. Now I would like to clone HDMI1 with either LVDS1 or VGA1. When I run either,
xrandr --output HDMI1 --same-as LVDS1
or,
xrandr --output HDMI1 --same-as VGA1

nothing happens however.
The command is completely ignored and nothing is output over HDMI1.

I would expect the command to clone the part of the extended desktop on either LVDS1 or VGA1 to HDMI1.

I'm running Ubuntu 12.04 with kernel version 3.11.0, X.Org version 1.11.4 and X.Org driver version 2.99.905-git201401200348~ubuntu12.04.1 with a G45 chip.
Comment 1 Chris Wilson 2014-01-21 10:58:57 UTC
All the outputs are marked unclonable, and realistically it is highly unlikely you could get any of those 3 outputs with compatible clock timing to allow for cloning.
Comment 2 Jani Nikula 2014-01-21 11:57:01 UTC
(In reply to comment #1)
> All the outputs are marked unclonable, and realistically it is highly
> unlikely you could get any of those 3 outputs with compatible clock timing
> to allow for cloning.

Closing, not a bug.
Comment 3 Jani Nikula 2014-01-21 12:13:20 UTC
So Ville wants to open this particular can of worms. Ville, you'll tuck 'em back in too!
Comment 4 Ville Syrjala 2014-01-21 12:26:55 UTC
Created attachment 92514 [details] [review]
Patch to allow cloning with HDMI

Based on a quick test w/ a g4x machine here, cloning between HDMI and VGA is fine. So this patch makes that possible.
Comment 5 Jani Nikula 2014-01-21 12:37:55 UTC
(In reply to comment #4)
> Created attachment 92514 [details] [review] [review]
> Patch to allow cloning with HDMI

Before you post the patch to intel-gfx, please add some comment to:

+	intel_encoder->cloneable = !HAS_PCH_SPLIT(dev);
Comment 6 Julius Schwartzenberg 2014-01-22 20:10:07 UTC
I just tried testing this patch, but I cannot seem to get it to work.

Am I using the wrong command with xrandr to clone the screen? Which command set could I use to test this?
Comment 7 Julius Schwartzenberg 2014-01-22 22:09:33 UTC
Never mind! I just got it to work. I had to copy from one screen to another, so both could use the same one. Thank you very much!!
Comment 8 Julius Schwartzenberg 2014-01-24 19:45:41 UTC
I enabled cloning for my LVDS1 output as well (in the source) and this works correctly in combination with VGA.

When I try to clone LVDS1 with HDMI1, it appears that the HDMI1 output loses signal as soon as I switch on LVDS1. When I turn LVDS1 off, the signal to HDMI1 returns again.

Could there be a reason which would make cloning between HDMI1 and LVDS1 impossible or could this work with another trick? The resolutions which my LVDS1 screen and HDMI1 output support are much closer to each other than the screen I have on VGA1, so if it would be possible to clone HDMI1 and LVDS1 it would be the most useful to me.
Comment 9 Ville Syrjala 2014-02-04 20:45:13 UTC
(In reply to comment #8)
> I enabled cloning for my LVDS1 output as well (in the source) and this works
> correctly in combination with VGA.
> 
> When I try to clone LVDS1 with HDMI1, it appears that the HDMI1 output loses
> signal as soon as I switch on LVDS1. When I turn LVDS1 off, the signal to
> HDMI1 returns again.
> 
> Could there be a reason which would make cloning between HDMI1 and LVDS1
> impossible or could this work with another trick? The resolutions which my
> LVDS1 screen and HDMI1 output support are much closer to each other than the
> screen I have on VGA1, so if it would be possible to clone HDMI1 and LVDS1
> it would be the most useful to me.

The spec for gen4 hardware is a bit confused whether LVDS+HDMI should work. It says that the following note applies to the LVDS+HDMI combination:
"No internal LVDS and sDVO or DP on same pipe"
So the note that's supposed to apply to HDMI doesn't mentiond HDMI :)
I think this was just an oversight and the LVDS+HDMI combination is in fact not supported. The fact that it is listed as unsupported in the spec for more recent hardware supports this conclusion as well.

So I think what we can do is enable cloning for LVDS+VGA and HDMI+VGA.

The HDMI+HDMI case is a bit more complicated since we run into problems with the infoframes. But on g4x hardware we anyway have that problem already even if we don't clone between the HDMI outputs. So I think we won't lose anything by allowing that too on g4x. Whether we should allow it for more recent hardware is an open question.

I'll try to come up with a sane patch for this soon.
Comment 10 Jani Nikula 2014-08-14 13:38:57 UTC
Presumed fixed by
commit 301ea74a57851c19e1438ceeaffab663f402f79f
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Mon Mar 3 16:15:30 2014 +0200

    drm/i915: Allow HDMI+VGA cloning

Please reopen if the problem persists with recent kernels.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.