> Date: Wed, 27 Apr 2022 18:30:52 +1000
> From: Jonathan Gray <[email protected]>
> 
> On Wed, Apr 27, 2022 at 03:14:50PM +1000, Jonathan Gray wrote:
> > On Wed, Apr 27, 2022 at 12:53:37PM +1000, Jonathan Gray wrote:
> > > On Tue, Apr 26, 2022 at 12:51:10PM +0100, james palmer wrote:
> > > > That fixes things, thanks :)
> > > > 
> > > > Maybe the default should be to not use glamour if hardware cannot be 
> > > > scanned. Then again, not many people will be using hardware this old so 
> > > > it might not be worth it.
> > > > 
> > > > - James
> > > 
> > > When pci can not be scanned the wscons display type is used to
> > > decide if modesetting is used.
> > > 
> > > Using startx on x40 (i855 with gen 2 graphics) modesetting does not use
> > > glamor due to the advertised opengl version.
> > > 
> > > [   340.854] (II) modeset(0): glamor: Ignoring GL < 2.1, falling back to 
> > > GLES.
> > > [   340.855] (EE) modeset(0): glamor: Failed to create GL or GLES2 
> > > contexts
> > > [   340.985] (II) modeset(0): glamor initialization failed
> > > 
> > > This check in xenocara/xserver/glamor/glamor_egl.c glamor_egl_init()
> > > could be changed to include intel gen 3 hardware.
> > > 
> > > intel should be the preferred driver for this hardware.  I'll see if I
> > > can come up with a patch to get the pci vid/pid out of a drm device.
> > 
> > The diff below does that but startx will still result in the modesetting
> > driver being used.  I suspect that is due to libpciaccess use in
> > xf86-video-intel.
> 
> The problem on intel gen 3 is that it falls back to GLES.
> The max OpenGL compat profile for gen 3 is 1.4
> 
> With this diff startx works with modesetting and the llvmpipe
> Mesa driver is used on
> inteldrm0: apic 1 int 16, I945GM, gen 3

Would be interesting to see what upstream thinks about this.

Any clue why falling back to GLES causes issues?

> Index: xserver/glamor/glamor_egl.c
> ===================================================================
> RCS file: /cvs/xenocara/xserver/glamor/glamor_egl.c,v
> retrieving revision 1.11
> diff -u -p -r1.11 glamor_egl.c
> --- xserver/glamor/glamor_egl.c       11 Nov 2021 09:03:03 -0000      1.11
> +++ xserver/glamor/glamor_egl.c       27 Apr 2022 08:17:15 -0000
> @@ -1016,9 +1016,10 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd
>  
>          if (epoxy_gl_version() < 21) {
>              xf86DrvMsg(scrn->scrnIndex, X_INFO,
> -                       "glamor: Ignoring GL < 2.1, falling back to GLES.\n");
> +                       "glamor: Ignoring GL < 2.1\n");
>              eglDestroyContext(glamor_egl->display, glamor_egl->context);
>              glamor_egl->context = EGL_NO_CONTEXT;
> +            goto error;
>          }
>      }
>  
> 
> 

Reply via email to