Re: [PATCH xserver 3/4] modesetting: Remove XF86_CRTC_VERSION checks

2015-10-30 Thread Emil Velikov
On 29 October 2015 at 13:58, Daniel Martin  wrote:
> From: Daniel Martin 
>
> The ifdef checks for XF86_CRTC_VERSION >= 3/5 are remnants from the
> out-of-tree driver. Within the tree, we can rely on:
> xf86Crtc.h:#define XF86_CRTC_VERSION 6
>
> Signed-off-by: Daniel Martin 
The first three are
Reviewed-by: Emil Velikov 

There are a couple more trivial defines in case you're interested -
MODESETTING_OUTPUT_SLAVE_SUPPORT and XF86_PDEV_SERVER_FD.

Plus a few messier/wip if 0's - create_pixmap_for_fbcon(),
reload_cursors(), CMAP_LOAD_EVEN_IF_OFFSCREEN (still a problem ?).

-Emil
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] vidmode: Drop the unused event code

2015-10-30 Thread Adam Jackson
On Thu, 2015-10-29 at 23:19 +, Emil Velikov wrote:

> Small question - some places in xserver have a if 0 guard (while
> others do ifdef DEBUG) for the DEBUG_P-like macros. Is that
> intentional - or it's mostly a matter of personal preference ?

I suspect more a matter of preference, but I don't think it's anything
that's been done with a consistent vision really. --enable-debug gives
you a fairly arbitrary set of additional printfs, it would be nice if
that were made more consistent and considered.

The DEBUG_P stuff in xf86vmode.c in particular is distasteful. A lot of
that kind of code in xserver I thnk is an artifact of the old xfree86
loader and associated difficulty in using gdb. I'd rather see debug
code that dumps interesting bits of internal state or applies
additional consistency checks, and not just a "got here" message that a
breakpoint would tell you just as well.

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 3/4] modesetting: Remove XF86_CRTC_VERSION checks

2015-10-30 Thread Alex Deucher
On Thu, Oct 29, 2015 at 9:58 AM, Daniel Martin
 wrote:
> From: Daniel Martin 
>
> The ifdef checks for XF86_CRTC_VERSION >= 3/5 are remnants from the
> out-of-tree driver. Within the tree, we can rely on:
> xf86Crtc.h:#define XF86_CRTC_VERSION 6
>
> Signed-off-by: Daniel Martin 

For 1-3:
Reviewed-by: Alex Deucher 

> ---
>  hw/xfree86/drivers/modesetting/drmmode_display.c | 7 +--
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
> b/hw/xfree86/drivers/modesetting/drmmode_display.c
> index 2684bae..4421578 100644
> --- a/hw/xfree86/drivers/modesetting/drmmode_display.c
> +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
> @@ -462,11 +462,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
> mode,
>  crtc->y = saved_y;
>  crtc->rotation = saved_rotation;
>  crtc->mode = saved_mode;
> -}
> -#if defined(XF86_CRTC_VERSION) && XF86_CRTC_VERSION >= 3
> -else
> +} else
>  crtc->active = TRUE;
> -#endif
>
>  free(output_ids);
>
> @@ -1789,9 +1786,7 @@ drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr 
> drmmode, int cpp)
>  drmmode_clones_init(pScrn, drmmode, mode_res);
>
>  drmModeFreeResources(mode_res);
> -#if XF86_CRTC_VERSION >= 5
>  xf86ProviderSetup(pScrn, NULL, "modesetting");
> -#endif
>
>  xf86InitialConfiguration(pScrn, TRUE);
>
> --
> 2.6.1
>
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 3/4] modesetting: Remove XF86_CRTC_VERSION checks

2015-10-30 Thread Adam Jackson
On Fri, 2015-10-30 at 13:17 +, Emil Velikov wrote:
> On 29 October 2015 at 13:58, Daniel Martin  wrote:
> > From: Daniel Martin 
> > 
> > The ifdef checks for XF86_CRTC_VERSION >= 3/5 are remnants from the
> > out-of-tree driver. Within the tree, we can rely on:
> > xf86Crtc.h:#define XF86_CRTC_VERSION 6
> > 
> > Signed-off-by: Daniel Martin 
> The first three are
> Reviewed-by: Emil Velikov 

Merged:

remote: I: patch #63163 updated using rev 
2674d424020bd71d4f99b8d8de8b0b21aa490d54.
remote: I: patch #63162 updated using rev 
45c83a266d18eb515313aa3f1a4d7ff6af53be5d.
remote: I: patch #63161 updated using rev 
7d1e4783853f9830344d101ceab087feb19995be.
remote: I: 3 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   2506665..7d1e478  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [RFC xserver 4/4] modesetting: Treat inactive outputs as disconnected during PreInit

2015-10-30 Thread Adam Jackson
On Thu, 2015-10-29 at 14:58 +0100, Daniel Martin wrote:

> @@ -868,6 +868,14 @@ drmmode_output_detect(xf86OutputPtr output)
>  switch (drmmode_output->mode_output->connection) {
>  case DRM_MODE_CONNECTED:
>  status = XF86OutputStatusConnected;
> +
> +/* During PreInit (!configured), we shouldn't try to setup an output
> + * where the kernel didn't assigned an encoder yet. Because, if we
> + * fail to set it up at this point to server will exit. Treat it as
> + * disconnected for the moment. */
> +if (!output->scrn->configured &&
> +!drmmode_output->mode_output->encoder_id)
> +status = XF86OutputStatusDisconnected;
>  break;
>  case DRM_MODE_DISCONNECTED:
>  status = XF86OutputStatusDisconnected;

I think to be screechingly correct this check should go above the
switch. Even for "connected" outputs in the HPD sense you'd still want
to ignore things without an encoder, and I think doing that check
before the switch means we'd inherit exactly the set of lit outputs
from before X startup, which would be nice.  Does your lid-closed
scenario still work correctly if you do that?

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

How to setup independent screens with the Intel driver?

2015-10-30 Thread Boszormenyi Zoltan
Hi,

I am using kernel 4.2.3, Xorg 1.16.4, Mesa 11.0.4 and the current 
xf86-video-intel GIT tip
(commit be3748802398a741208715233d36935378ceff58) on an
OpenEmbedded / Yocto derived distro.

This machine I have to configure and develop for is a POS machine with this 
Intel chip:

# lspci -s 00:02.0
00:02.0 VGA compatible controller: Intel Corporation Atom Processor 
D4xx/D5xx/N4xx/N5xx
Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])

Without a configuration file, I get clone mode with the two screens.
But I would like to setup two separate screens with :0.0 and :0.1
without Xinerama or unified framebuffer, in order to make fullscreen
X apps cover only one of the screens.

Below is the xorg.conf I am trying to use with the touchscreen configuration 
omitted.

-
Section "Monitor"
Identifier "Monitor-LVDS1"
EndSection

Section "Monitor"
Identifier "Monitor-VGA1"
#Option "RightOf"  "Monitor-LVDS1"
EndSection

Section "Device"
Identifier "Intel0"
Driver "intel"
BusID  "PCI:0:2:0"
Screen 0
Option  "AccelMethod"  "sna"
Option "Monitor-LVDS1" "LVDS1"
Option "TearFree" "on"
EndSection

Section "Device"
Identifier "Intel1"
Driver "intel"
BusID  "PCI:0:2:0"
Screen 1
Option  "AccelMethod"  "sna"
Option "Monitor-VGA1" "VGA1"
Option "TearFree" "on"
EndSection

Section "Screen"
Identifier  "SCREEN0"
Option  "AutoServerLayout" "on"
Device  "Intel0"
Monitor "Monitor-LVDS1"
SubSection "Display"
Viewport 0 0
Modes "1024x768"
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier  "SCREEN1"
Option  "AutoServerLayout" "on"
Device  "Intel1"
Monitor "Monitor-VGA1"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "ServerLayout"
Identifier  "LAYOUT"
Option  "AutoServerLayout" "on"
Screen 0 "SCREEN0"
Screen 1 "SCREEN1"
EndSection
-

However, Screen 0 gets VGA1 and Screen 1 gets LVDS1+VGA1 according to xrandr:

# DISPLAY=:0.0 xrandr
Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767
VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 510mm x 
287mm
   1024x768   75.1*+   70.1 60.0 
   1920x1080  60.0 +
   1280x1024  75.0 60.0 
   1280x960   60.0 
   1280x800   59.8 
   1152x864   75.0 
   1280x720   60.0 
   832x62474.6 
   800x60072.2 75.0 60.3 56.2 
   640x48075.0 72.8 66.7 60.0 
   720x40070.1 
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

# DISPLAY=:0.1 xrandr
Screen 1: minimum 8 x 8, current 2944 x 1080, maximum 32767 x 32767
LVDS1 connected (normal left inverted right x axis y axis)
   1024x768   60.0 +
   800x60060.3 56.2 
   640x48059.9 
   512x38460.0 
VGA1 connected 1920x1080+1024+0 (normal left inverted right x axis y axis) 
510mm x 287mm
   1920x1080  60.0*+
   1280x1024  75.0 60.0 
   1280x960   60.0 
   1280x800   59.8 
   1152x864   75.0 
   1280x720   60.0 
   1024x768   75.1 70.1 60.0 
   832x62474.6 
   800x60072.2 75.0 60.3 56.2 
   640x48075.0 72.8 66.7 60.0 
   720x40070.1 
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Attached is Xorg.0.log which says that the configuration should be correct:

[3110459.395] (==) ServerLayout "LAYOUT"
[3110459.395] (**) |-->Screen "SCREEN0" (0)
[3110459.395] (**) |   |-->Monitor "Monitor-LVDS1"
[3110459.396] (**) |   |-->Device "Intel0"
[3110459.396] (**) |-->Screen "SCREEN1" (1)
[3110459.396] (**) |   |-->Monitor "Monitor-VGA1"
[3110459.396] (**) |   |-->Device "Intel1"
[3110459.396] (**) |-->Input Device "TOUCHSCREEN"

What am I doing wrong? Do I need a newer 1.17.x Xorg server to get this right?

Thanks in advance,
Zoltán Böszörményi

[3110459.393] 
X.Org X Server 1.16.4
Release Date: 2014-12-20
[3110459.393] X Protocol Version 11, Revision 0
[3110459.393] Build Operating System: Linux 3.10.0-229.4.2.el7.x86_64 x86_64 
[3110459.393] Current Operating System: Linux localhost 4.2.3 #1 SMP Mon Oct 19 06:55:09 EDT 2015 x86_64
[3110459.394] Kernel command line: BOOT_IMAGE=/bzImage root=UUID=b2cccbac-2717-4fcb-ae65-15189e087778 ro quiet LANG=en.US.UTF-8
[3110459.394] Build Date: 26 October 2015  09:25:42AM
[3110459.394]  
[3110459.394] Current version of pixman: 0.32.6
[3110459.394] 	Before reporting problems, check http://wiki.x.org
	to make 

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Boszormenyi Zoltan
2015-10-30 17:36 keltezéssel, Chris Wilson írta:
> On Fri, Oct 30, 2015 at 04:58:49PM +0100, Boszormenyi Zoltan wrote:
>> Section "Device"
>> Identifier "Intel0"
>> Driver "intel"
>> BusID  "PCI:0:2:0"
>> Screen 0
>> Option  "AccelMethod"  "sna"
>> Option "Monitor-LVDS1" "LVDS1"
> Option "ZaphodHeads" "LVDS1"
>
>> Option "TearFree" "on"
>> EndSection
>>
>> Section "Device"
>> Identifier "Intel1"
>> Driver "intel"
>> BusID  "PCI:0:2:0"
>> Screen 1
>> Option  "AccelMethod"  "sna"
>> Option "Monitor-VGA1" "VGA1"
> Option "ZaphodHeads" "VGA1"
>
>> Option "TearFree" "on"
>> EndSection
> -Chris

I tried adding the ZaphodHeads option to the device sections before.
It didn't work. The driver throws an error:

[3114226.306] (II) intel(0): Using Kernel Mode Setting driver: i915, version 
1.6.0 20150522
[3114226.307] (II) intel(1): Using Kernel Mode Setting driver: i915, version 
1.6.0 20150522
[3114226.307] (--) intel(0): Integrated Graphics Chipset: Intel(R) Pineview G
[3114226.308] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3; using a maximum of 
2 threads
[3114226.308] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[3114226.308] (==) intel(0): RGB weight 888
[3114226.308] (==) intel(0): Default visual is TrueColor
[3114226.308] (**) intel(0): Option "AccelMethod" "sna"
[3114226.308] (**) intel(0): Option "ZaphodHeads" "LVDS1"
[3114226.308] (**) intel(0): Option "TearFree" "on"
[3114226.309] (EE) intel(0): LVDS1 is an invalid output for screen (pipe) 0
[3114226.309] (EE) intel(0): No outputs and no modes.
[3114226.310] (EE) intel(1): Failed to claim DRM device.
[3114226.310] (II) UnloadModule: "intel"
[3114226.310] (II) UnloadModule: "intel"
[3114226.310] (EE) Screen(s) found, but none have a usable configuration.
[3114226.310] (EE)
Fatal server error:
[3114226.310] (EE) no screens found(EE)
[3114226.310] (EE)
Please consult the The X.Org Foundation support
 at http://wiki.x.org
 for help.
[3114226.310] (EE) Please also check the log file at "/var/log/Xorg.0.log" for 
additional
information.
[3114226.310] (EE)
[3114226.320] (EE) Server terminated with error (1). Closing log file.

Attached is the modified xorg.conf file and the Xorg log.
Section "Monitor"
Identifier "Monitor-LVDS1"
EndSection

Section "Monitor"
Identifier "Monitor-VGA1"
#Option "RightOf"  "Monitor-LVDS1"
EndSection

Section "Device"
Identifier "Intel0"
Driver "intel"
BusID  "PCI:0:2:0"
Screen 0
Option  "AccelMethod"  "sna"
Option "Monitor-LVDS1" "LVDS1"
Option "ZaphodHeads" "LVDS1"
Option "TearFree" "on"
EndSection

Section "Device"
Identifier "Intel1"
Driver "intel"
BusID  "PCI:0:2:0"
Screen 1
Option  "AccelMethod"  "sna"
Option "Monitor-VGA1" "VGA1"
Option "ZaphodHeads" "VGA1"
Option "TearFree" "on"
EndSection

Section "Screen"
Identifier  "SCREEN0"
Option  "AutoServerLayout" "on"
Device  "Intel0"
Monitor "Monitor-LVDS1"
SubSection "Display"
Viewport 0 0
Modes "1024x768"
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier  "SCREEN1"
Option  "AutoServerLayout" "on"
Device  "Intel1"
Monitor "Monitor-VGA1"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "ServerLayout"
Identifier  "LAYOUT"
Option  "AutoServerLayout" "on"
Screen 0 "SCREEN0"
Screen 1 "SCREEN1"
EndSection
[3114472.281] 
X.Org X Server 1.16.4
Release Date: 2014-12-20
[3114472.281] X Protocol Version 11, Revision 0
[3114472.281] Build Operating System: Linux 3.10.0-229.4.2.el7.x86_64 x86_64 
[3114472.281] Current Operating System: Linux localhost 4.2.3 #1 SMP Mon Oct 19 
06:55:09 EDT 2015 x86_64
[3114472.281] Kernel command line: BOOT_IMAGE=/bzImage 
root=UUID=b2cccbac-2717-4fcb-ae65-15189e087778 ro quiet LANG=en.US.UTF-8
[3114472.281] Build Date: 26 October 2015  09:25:42AM
[3114472.281]  
[3114472.281] Current version of pixman: 0.32.6
[3114472.281]   Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[3114472.281] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[3114472.282] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Oct 30 12:44:43 
2015
[3114472.282] (==) Using config directory: "/etc/X11/xorg.conf.d"
[3114472.282] (==) Using system config directory "/usr/share/X11/xorg.conf.d"

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Chris Wilson
On Fri, Oct 30, 2015 at 04:58:49PM +0100, Boszormenyi Zoltan wrote:
> Hi,
> 
> I am using kernel 4.2.3, Xorg 1.16.4, Mesa 11.0.4 and the current 
> xf86-video-intel GIT tip
> (commit be3748802398a741208715233d36935378ceff58) on an
> OpenEmbedded / Yocto derived distro.
> 
> This machine I have to configure and develop for is a POS machine with this 
> Intel chip:
> 
> # lspci -s 00:02.0
> 00:02.0 VGA compatible controller: Intel Corporation Atom Processor 
> D4xx/D5xx/N4xx/N5xx
> Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
> 
> Without a configuration file, I get clone mode with the two screens.
> But I would like to setup two separate screens with :0.0 and :0.1
> without Xinerama or unified framebuffer, in order to make fullscreen
> X apps cover only one of the screens.
> 
> Below is the xorg.conf I am trying to use with the touchscreen configuration 
> omitted.
> 
> -
> Section "Monitor"
> Identifier "Monitor-LVDS1"
> EndSection
> 
> Section "Monitor"
> Identifier "Monitor-VGA1"
> #Option "RightOf"  "Monitor-LVDS1"
> EndSection
> 
> Section "Device"
> Identifier "Intel0"
> Driver "intel"
> BusID  "PCI:0:2:0"
> Screen 0
> Option  "AccelMethod"  "sna"
> Option "Monitor-LVDS1" "LVDS1"
Option "ZaphodHeads" "LVDS1"

> Option "TearFree" "on"
> EndSection
> 
> Section "Device"
> Identifier "Intel1"
> Driver "intel"
> BusID  "PCI:0:2:0"
> Screen 1
> Option  "AccelMethod"  "sna"
> Option "Monitor-VGA1" "VGA1"
Option "ZaphodHeads" "VGA1"

> Option "TearFree" "on"
> EndSection
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Chris Wilson
On Fri, Oct 30, 2015 at 08:00:46PM +0100, Boszormenyi Zoltan wrote:
> 2015-10-30 19:15 keltezéssel, Chris Wilson írta:
> > On Fri, Oct 30, 2015 at 06:17:50PM +0100, Boszormenyi Zoltan wrote:
> >> In my case with this particular POS machine, the intended primary display,
> >> the built-in LVDS with a touchscreen attached is apparently wired to pipe 
> >> 1.
> >>
> >> With this driver behaviour, I can't configure it to be kept as the default 
> >> :0.0 screen
> >> if an external display is plugged in. Can this behaviour be changed?
> > It would need another user parameter. There are several technical
> > limitations that make automatic assignment difficult. So try
> >
> > commit 94d271b239d358f71ae0bcfcc31422a569d73d41
> > Author: Chris Wilson 
> > Date:   Fri Oct 30 18:07:37 2015 +
> >
> > sna: Allow pipes to be manually assigned to ZaphodHead
> > -Chris
> 
> Thanks for your work, I just tested it. At startup, it seems to work:
> 1. it doesn't complain about invalid pipe
> 2. cursor appears on :0
> 3. application appears on :0
> 
> Then as soon as I touch the touchscreen, the cursor jumps to :1 and
> further cursor movements are on :1 from that point.

I'm baffled. xinput fun? cursors in the driver are allocated per-CRTC
and handled at a screen level. As far as I am aware, the driver only
has to position a cursor at a certain coordinate on the framebuffer (and
so has to translate that into a CRTC location).
 
> Attached is my current configuration, hopefully I got it right.

Looks fine to me.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Boszormenyi Zoltan
2015-10-30 17:46 keltezéssel, Boszormenyi Zoltan írta:
> 2015-10-30 17:36 keltezéssel, Chris Wilson írta:
>> On Fri, Oct 30, 2015 at 04:58:49PM +0100, Boszormenyi Zoltan wrote:
>>> Section "Device"
>>> Identifier "Intel0"
>>> Driver "intel"
>>> BusID  "PCI:0:2:0"
>>> Screen 0
>>> Option  "AccelMethod"  "sna"
>>> Option "Monitor-LVDS1" "LVDS1"
>> Option "ZaphodHeads" "LVDS1"
>>
>>> Option "TearFree" "on"
>>> EndSection
>>>
>>> Section "Device"
>>> Identifier "Intel1"
>>> Driver "intel"
>>> BusID  "PCI:0:2:0"
>>> Screen 1
>>> Option  "AccelMethod"  "sna"
>>> Option "Monitor-VGA1" "VGA1"
>> Option "ZaphodHeads" "VGA1"
>>
>>> Option "TearFree" "on"
>>> EndSection
>> -Chris
> I tried adding the ZaphodHeads option to the device sections before.
> It didn't work. The driver throws an error:
>
> [3114226.306] (II) intel(0): Using Kernel Mode Setting driver: i915, version 
> 1.6.0 20150522
> [3114226.307] (II) intel(1): Using Kernel Mode Setting driver: i915, version 
> 1.6.0 20150522
> [3114226.307] (--) intel(0): Integrated Graphics Chipset: Intel(R) Pineview G
> [3114226.308] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3; using a maximum 
> of 2 threads
> [3114226.308] (==) intel(0): Depth 24, (--) framebuffer bpp 32
> [3114226.308] (==) intel(0): RGB weight 888
> [3114226.308] (==) intel(0): Default visual is TrueColor
> [3114226.308] (**) intel(0): Option "AccelMethod" "sna"
> [3114226.308] (**) intel(0): Option "ZaphodHeads" "LVDS1"
> [3114226.308] (**) intel(0): Option "TearFree" "on"
> [3114226.309] (EE) intel(0): LVDS1 is an invalid output for screen (pipe) 0

It seems the device pipe and screen matching doesn't work properly.
The driver seems to be assuming that its pipe numbers always match
the same X screen numbers.

In the (semi-)working (mis-)configuration in my original post, LVDS1 is
attached to pipe 0 and VGA1 to pipe 1:

[3110459.475] (--) intel(1): Output LVDS1 using initial mode 1024x768 on pipe 1

and

[3110459.564] (II) intel(0): switch to mode 1024x768@75.0 on VGA1 using pipe 0, 
position
(0, 0), rotation normal, reflection none
[3110459.564] (II) intel(0): Setting screen physical size to 270 x 203
[3110459.591] (II) intel(1): switch to mode 1920x1080@60.0 on VGA1 using pipe 
1, position
(1024, 0), rotation normal, reflection none
[3110459.591] (II) intel(1): Setting screen physical size to 778 x 285

Best regards,
Zoltán Böszörményi

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Boszormenyi Zoltan
2015-10-30 18:17 keltezéssel, Boszormenyi Zoltan írta:
> 2015-10-30 18:03 keltezéssel, Chris Wilson írta:
>> On Fri, Oct 30, 2015 at 05:56:35PM +0100, Boszormenyi Zoltan wrote:
>>> 2015-10-30 17:46 keltezéssel, Boszormenyi Zoltan írta:
 2015-10-30 17:36 keltezéssel, Chris Wilson írta:
> On Fri, Oct 30, 2015 at 04:58:49PM +0100, Boszormenyi Zoltan wrote:
>> Section "Device"
>> Identifier "Intel0"
>> Driver "intel"
>> BusID  "PCI:0:2:0"
>> Screen 0
>> Option  "AccelMethod"  "sna"
>> Option "Monitor-LVDS1" "LVDS1"
> Option "ZaphodHeads" "LVDS1"
>
>> Option "TearFree" "on"
>> EndSection
>>
>> Section "Device"
>> Identifier "Intel1"
>> Driver "intel"
>> BusID  "PCI:0:2:0"
>> Screen 1
>> Option  "AccelMethod"  "sna"
>> Option "Monitor-VGA1" "VGA1"
> Option "ZaphodHeads" "VGA1"
>
>> Option "TearFree" "on"
>> EndSection
> -Chris
 I tried adding the ZaphodHeads option to the device sections before.
 It didn't work. The driver throws an error:

 [3114226.306] (II) intel(0): Using Kernel Mode Setting driver: i915, 
 version 1.6.0 20150522
 [3114226.307] (II) intel(1): Using Kernel Mode Setting driver: i915, 
 version 1.6.0 20150522
 [3114226.307] (--) intel(0): Integrated Graphics Chipset: Intel(R) 
 Pineview G
 [3114226.308] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3; using a 
 maximum of 2 threads
 [3114226.308] (==) intel(0): Depth 24, (--) framebuffer bpp 32
 [3114226.308] (==) intel(0): RGB weight 888
 [3114226.308] (==) intel(0): Default visual is TrueColor
 [3114226.308] (**) intel(0): Option "AccelMethod" "sna"
 [3114226.308] (**) intel(0): Option "ZaphodHeads" "LVDS1"
 [3114226.308] (**) intel(0): Option "TearFree" "on"
 [3114226.309] (EE) intel(0): LVDS1 is an invalid output for screen (pipe) 0
>>> It seems the device pipe and screen matching doesn't work properly.
>>> The driver seems to be assuming that its pipe numbers always match
>>> the same X screen numbers.
>> Assuming? That's how I documented it.
>> -Chris
> "man intel" on Fedora 22 doesn't says anything like that. Where is it 
> documented?
>
> In my case with this particular POS machine, the intended primary display,
> the built-in LVDS with a touchscreen attached is apparently wired to pipe 1.
>
> With this driver behaviour, I can't configure it to be kept as the default 
> :0.0 screen
> if an external display is plugged in. Can this behaviour be changed?

For the record, switching the screen numbers made the setup work.
Now the problem is that the cursor pointer is on the default screen (:0.0, VGA1)
and the touchscreen obviously controls the pointer on the default screen
and you cannot move the pointer to the secondary screen with the touchscreen.
This won't go with the POS software with further configuration.

Now, how can I convince Xorg to move the core pointer to screen 1?

Best regards,
Zoltán Böszörményi

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Chris Wilson
On Fri, Oct 30, 2015 at 05:56:35PM +0100, Boszormenyi Zoltan wrote:
> 2015-10-30 17:46 keltezéssel, Boszormenyi Zoltan írta:
> > 2015-10-30 17:36 keltezéssel, Chris Wilson írta:
> >> On Fri, Oct 30, 2015 at 04:58:49PM +0100, Boszormenyi Zoltan wrote:
> >>> Section "Device"
> >>> Identifier "Intel0"
> >>> Driver "intel"
> >>> BusID  "PCI:0:2:0"
> >>> Screen 0
> >>> Option  "AccelMethod"  "sna"
> >>> Option "Monitor-LVDS1" "LVDS1"
> >> Option "ZaphodHeads" "LVDS1"
> >>
> >>> Option "TearFree" "on"
> >>> EndSection
> >>>
> >>> Section "Device"
> >>> Identifier "Intel1"
> >>> Driver "intel"
> >>> BusID  "PCI:0:2:0"
> >>> Screen 1
> >>> Option  "AccelMethod"  "sna"
> >>> Option "Monitor-VGA1" "VGA1"
> >> Option "ZaphodHeads" "VGA1"
> >>
> >>> Option "TearFree" "on"
> >>> EndSection
> >> -Chris
> > I tried adding the ZaphodHeads option to the device sections before.
> > It didn't work. The driver throws an error:
> >
> > [3114226.306] (II) intel(0): Using Kernel Mode Setting driver: i915, 
> > version 1.6.0 20150522
> > [3114226.307] (II) intel(1): Using Kernel Mode Setting driver: i915, 
> > version 1.6.0 20150522
> > [3114226.307] (--) intel(0): Integrated Graphics Chipset: Intel(R) Pineview 
> > G
> > [3114226.308] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3; using a 
> > maximum of 2 threads
> > [3114226.308] (==) intel(0): Depth 24, (--) framebuffer bpp 32
> > [3114226.308] (==) intel(0): RGB weight 888
> > [3114226.308] (==) intel(0): Default visual is TrueColor
> > [3114226.308] (**) intel(0): Option "AccelMethod" "sna"
> > [3114226.308] (**) intel(0): Option "ZaphodHeads" "LVDS1"
> > [3114226.308] (**) intel(0): Option "TearFree" "on"
> > [3114226.309] (EE) intel(0): LVDS1 is an invalid output for screen (pipe) 0
> 
> It seems the device pipe and screen matching doesn't work properly.
> The driver seems to be assuming that its pipe numbers always match
> the same X screen numbers.

Assuming? That's how I documented it.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Chris Wilson
On Fri, Oct 30, 2015 at 05:46:51PM +0100, Boszormenyi Zoltan wrote:
> 2015-10-30 17:36 keltezéssel, Chris Wilson írta:
> > On Fri, Oct 30, 2015 at 04:58:49PM +0100, Boszormenyi Zoltan wrote:
> >> Section "Device"
> >> Identifier "Intel0"
> >> Driver "intel"
> >> BusID  "PCI:0:2:0"
> >> Screen 0
> >> Option  "AccelMethod"  "sna"
> >> Option "Monitor-LVDS1" "LVDS1"
> > Option "ZaphodHeads" "LVDS1"
> >
> >> Option "TearFree" "on"
> >> EndSection
> >>
> >> Section "Device"
> >> Identifier "Intel1"
> >> Driver "intel"
> >> BusID  "PCI:0:2:0"
> >> Screen 1
> >> Option  "AccelMethod"  "sna"
> >> Option "Monitor-VGA1" "VGA1"
> > Option "ZaphodHeads" "VGA1"
> >
> >> Option "TearFree" "on"
> >> EndSection
> > -Chris
> 
> I tried adding the ZaphodHeads option to the device sections before.
> It didn't work. The driver throws an error:

Swap around Screen 0 and Screen 1, i.e. use VGA in Screen 0 and LVDS1 in
Screen 0.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Boszormenyi Zoltan
2015-10-30 18:03 keltezéssel, Chris Wilson írta:
> On Fri, Oct 30, 2015 at 05:56:35PM +0100, Boszormenyi Zoltan wrote:
>> 2015-10-30 17:46 keltezéssel, Boszormenyi Zoltan írta:
>>> 2015-10-30 17:36 keltezéssel, Chris Wilson írta:
 On Fri, Oct 30, 2015 at 04:58:49PM +0100, Boszormenyi Zoltan wrote:
> Section "Device"
> Identifier "Intel0"
> Driver "intel"
> BusID  "PCI:0:2:0"
> Screen 0
> Option  "AccelMethod"  "sna"
> Option "Monitor-LVDS1" "LVDS1"
 Option "ZaphodHeads" "LVDS1"

> Option "TearFree" "on"
> EndSection
>
> Section "Device"
> Identifier "Intel1"
> Driver "intel"
> BusID  "PCI:0:2:0"
> Screen 1
> Option  "AccelMethod"  "sna"
> Option "Monitor-VGA1" "VGA1"
 Option "ZaphodHeads" "VGA1"

> Option "TearFree" "on"
> EndSection
 -Chris
>>> I tried adding the ZaphodHeads option to the device sections before.
>>> It didn't work. The driver throws an error:
>>>
>>> [3114226.306] (II) intel(0): Using Kernel Mode Setting driver: i915, 
>>> version 1.6.0 20150522
>>> [3114226.307] (II) intel(1): Using Kernel Mode Setting driver: i915, 
>>> version 1.6.0 20150522
>>> [3114226.307] (--) intel(0): Integrated Graphics Chipset: Intel(R) Pineview 
>>> G
>>> [3114226.308] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3; using a 
>>> maximum of 2 threads
>>> [3114226.308] (==) intel(0): Depth 24, (--) framebuffer bpp 32
>>> [3114226.308] (==) intel(0): RGB weight 888
>>> [3114226.308] (==) intel(0): Default visual is TrueColor
>>> [3114226.308] (**) intel(0): Option "AccelMethod" "sna"
>>> [3114226.308] (**) intel(0): Option "ZaphodHeads" "LVDS1"
>>> [3114226.308] (**) intel(0): Option "TearFree" "on"
>>> [3114226.309] (EE) intel(0): LVDS1 is an invalid output for screen (pipe) 0
>> It seems the device pipe and screen matching doesn't work properly.
>> The driver seems to be assuming that its pipe numbers always match
>> the same X screen numbers.
> Assuming? That's how I documented it.
> -Chris

"man intel" on Fedora 22 doesn't says anything like that. Where is it 
documented?

In my case with this particular POS machine, the intended primary display,
the built-in LVDS with a touchscreen attached is apparently wired to pipe 1.

With this driver behaviour, I can't configure it to be kept as the default :0.0 
screen
if an external display is plugged in. Can this behaviour be changed?

Best regards,
Zoltán Böszörményi


___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Problems with acceleration configuration on Intel HD Graphics 5500.

2015-10-30 Thread Łukasz Maśko
Hello.

I've just purchased a Dell E7250 laptop equipped with Intel HD Graphics 5500 
(i5-5300U). Today I've been fighting with Xorg configuration. I'm running PLD 
distribution (not important here) with kernel 4.2.4, xserver 1.17.4 and XOrg 
Intel driver 2.99.917. 

The problem is, that if I enable SNA acceleration, my laptop hangs very 
quickly after I start X - even if I use only twm as a window manager. I 
wouldn't even mention runnig KDE for it hangs extremally quickly.

Switching to UXA helps just a bit. Now twm-driven desktop works, but KDE has 
problems and I'm able to use it only if I turn off desktop effects.

I have added such line in my XOrg configuration:

Option "NoAccel" "true"

in the card section. As a result I can find such message in XOrg log:

(II) intel(0): SNA initialized with disabled backend

I understand, that now I'm probably using software rendering, but at least my 
desktop seems to be stable (although I can see some strange artefacts, but it 
is less annoying than hanging environment).

Till now I've been using Dell D430 with i945MG internal card and it works 
very well, although not that fast.

Now it's time for my question: is there a known way to make such 
configuration work stable WITH hardware acceleration? SNA or UXA - not 
important, but I want to have it working. It seems to be a waste to have such 
powerful hardware and not be able to use it :-/ Maybe there are some tweaking 
options needed? Or shall I try some older driver versions? 

Thanks for any help.
-- 
Łukasz Maśko_o)
Lukasz.Masko(at)ipipan.waw.pl   /\\
Registered Linux User #61028   _\_V
Ubuntu: staroafrykańskie słowo oznaczające "Nie umiem zainstalować Debiana"

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Boszormenyi Zoltan
2015-10-30 19:15 keltezéssel, Chris Wilson írta:
> On Fri, Oct 30, 2015 at 06:17:50PM +0100, Boszormenyi Zoltan wrote:
>> In my case with this particular POS machine, the intended primary display,
>> the built-in LVDS with a touchscreen attached is apparently wired to pipe 1.
>>
>> With this driver behaviour, I can't configure it to be kept as the default 
>> :0.0 screen
>> if an external display is plugged in. Can this behaviour be changed?
> It would need another user parameter. There are several technical
> limitations that make automatic assignment difficult. So try
>
> commit 94d271b239d358f71ae0bcfcc31422a569d73d41
> Author: Chris Wilson 
> Date:   Fri Oct 30 18:07:37 2015 +
>
> sna: Allow pipes to be manually assigned to ZaphodHead
> -Chris

Thanks for your work, I just tested it. At startup, it seems to work:
1. it doesn't complain about invalid pipe
2. cursor appears on :0
3. application appears on :0

Then as soon as I touch the touchscreen, the cursor jumps to :1 and
further cursor movements are on :1 from that point.

Attached is my current configuration, hopefully I got it right.

Best regards,
Zoltán Böszörményi

Section "Monitor"
Identifier "Monitor-LVDS1"
EndSection

Section "Monitor"
Identifier "Monitor-VGA1"
#Option "RightOf"  "Monitor-LVDS1"
EndSection

Section "Device"
Identifier "Intel0"
Driver "intel"
BusID  "PCI:0:2:0"
Screen 0
Option  "AccelMethod"  "sna"
Option "Monitor-LVDS1" "LVDS1"
Option "ZaphodHeads" "1:LVDS1"
Option "TearFree" "on"
EndSection

Section "Device"
Identifier "Intel1"
Driver "intel"
BusID  "PCI:0:2:0"
Screen 1
Option  "AccelMethod"  "sna"
Option "Monitor-VGA1" "VGA1"
Option "ZaphodHeads" "0:VGA1"
Option "TearFree" "on"
EndSection

Section "Screen"
Identifier  "SCREEN0"
Option  "AutoServerLayout" "on"
Device  "Intel0"
Monitor "Monitor-LVDS1"
SubSection "Display"
Viewport 0 0
Modes "1024x768"
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier  "SCREEN1"
Option  "AutoServerLayout" "on"
Device  "Intel1"
Monitor "Monitor-VGA1"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "ServerLayout"
Identifier  "LAYOUT"
Option  "AutoServerLayout" "on"
Screen 0 "SCREEN0"
Screen 1 "SCREEN1"
EndSection
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Chris Wilson
On Fri, Oct 30, 2015 at 06:17:50PM +0100, Boszormenyi Zoltan wrote:
> 2015-10-30 18:03 keltezéssel, Chris Wilson írta:
> > On Fri, Oct 30, 2015 at 05:56:35PM +0100, Boszormenyi Zoltan wrote:
> >> 2015-10-30 17:46 keltezéssel, Boszormenyi Zoltan írta:
> >>> 2015-10-30 17:36 keltezéssel, Chris Wilson írta:
>  On Fri, Oct 30, 2015 at 04:58:49PM +0100, Boszormenyi Zoltan wrote:
> > Section "Device"
> > Identifier "Intel0"
> > Driver "intel"
> > BusID  "PCI:0:2:0"
> > Screen 0
> > Option  "AccelMethod"  "sna"
> > Option "Monitor-LVDS1" "LVDS1"
>  Option "ZaphodHeads" "LVDS1"
> 
> > Option "TearFree" "on"
> > EndSection
> >
> > Section "Device"
> > Identifier "Intel1"
> > Driver "intel"
> > BusID  "PCI:0:2:0"
> > Screen 1
> > Option  "AccelMethod"  "sna"
> > Option "Monitor-VGA1" "VGA1"
>  Option "ZaphodHeads" "VGA1"
> 
> > Option "TearFree" "on"
> > EndSection
>  -Chris
> >>> I tried adding the ZaphodHeads option to the device sections before.
> >>> It didn't work. The driver throws an error:
> >>>
> >>> [3114226.306] (II) intel(0): Using Kernel Mode Setting driver: i915, 
> >>> version 1.6.0 20150522
> >>> [3114226.307] (II) intel(1): Using Kernel Mode Setting driver: i915, 
> >>> version 1.6.0 20150522
> >>> [3114226.307] (--) intel(0): Integrated Graphics Chipset: Intel(R) 
> >>> Pineview G
> >>> [3114226.308] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3; using a 
> >>> maximum of 2 threads
> >>> [3114226.308] (==) intel(0): Depth 24, (--) framebuffer bpp 32
> >>> [3114226.308] (==) intel(0): RGB weight 888
> >>> [3114226.308] (==) intel(0): Default visual is TrueColor
> >>> [3114226.308] (**) intel(0): Option "AccelMethod" "sna"
> >>> [3114226.308] (**) intel(0): Option "ZaphodHeads" "LVDS1"
> >>> [3114226.308] (**) intel(0): Option "TearFree" "on"
> >>> [3114226.309] (EE) intel(0): LVDS1 is an invalid output for screen (pipe) > >>> 0
> >> It seems the device pipe and screen matching doesn't work properly.
> >> The driver seems to be assuming that its pipe numbers always match
> >> the same X screen numbers.
> > Assuming? That's how I documented it.
> > -Chris
> 
> "man intel" on Fedora 22 doesn't says anything like that. Where is it 
> documented?

Apparently in my imagination. I could have sworn that I wrote about the
relationship between the Screen number and the CRTC it was assigned and
how you needed to look at the xrandr output to work out possible
arrangements. Probably lost in some bugzilla.
 
> In my case with this particular POS machine, the intended primary display,
> the built-in LVDS with a touchscreen attached is apparently wired to pipe 1.
> 
> With this driver behaviour, I can't configure it to be kept as the default 
> :0.0 screen
> if an external display is plugged in. Can this behaviour be changed?

It would need another user parameter. There are several technical
limitations that make automatic assignment difficult. So try

commit 94d271b239d358f71ae0bcfcc31422a569d73d41
Author: Chris Wilson 
Date:   Fri Oct 30 18:07:37 2015 +

sna: Allow pipes to be manually assigned to ZaphodHead
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Re: How to setup independent screens with the Intel driver?

2015-10-30 Thread Boszormenyi Zoltan
2015-10-30 20:08 keltezéssel, Chris Wilson írta:
> On Fri, Oct 30, 2015 at 08:00:46PM +0100, Boszormenyi Zoltan wrote:
>> 2015-10-30 19:15 keltezéssel, Chris Wilson írta:
>>> On Fri, Oct 30, 2015 at 06:17:50PM +0100, Boszormenyi Zoltan wrote:
 In my case with this particular POS machine, the intended primary display,
 the built-in LVDS with a touchscreen attached is apparently wired to pipe 
 1.

 With this driver behaviour, I can't configure it to be kept as the default 
 :0.0 screen
 if an external display is plugged in. Can this behaviour be changed?
>>> It would need another user parameter. There are several technical
>>> limitations that make automatic assignment difficult. So try
>>>
>>> commit 94d271b239d358f71ae0bcfcc31422a569d73d41
>>> Author: Chris Wilson 
>>> Date:   Fri Oct 30 18:07:37 2015 +
>>>
>>> sna: Allow pipes to be manually assigned to ZaphodHead
>>> -Chris
>> Thanks for your work, I just tested it. At startup, it seems to work:
>> 1. it doesn't complain about invalid pipe
>> 2. cursor appears on :0
>> 3. application appears on :0
>>
>> Then as soon as I touch the touchscreen, the cursor jumps to :1 and
>> further cursor movements are on :1 from that point.
> I'm baffled. xinput fun? cursors in the driver are allocated per-CRTC
> and handled at a screen level. As far as I am aware, the driver only
> has to position a cursor at a certain coordinate on the framebuffer (and
> so has to translate that into a CRTC location).

BTW, this is the touchscreen driver in question:
https://github.com/SICOM/xf86-input-eeti-egalax

It doesn't have anything directly screen related, I used xf86-input-void
as the driver skeleton.

>  
>> Attached is my current configuration, hopefully I got it right.
> Looks fine to me.
> -Chris
>

___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s