[Mesa-users] linux-fbdev
Jamie Amendolagine
jamie.amendolagine at gmail.com
Thu Jun 3 10:07:22 PDT 2010
OH, I see. I'll try that out. Thanks.
Jamie
On Thu, Jun 3, 2010 at 2:22 AM, Chia-I Wu <olvaffe at gmail.com> wrote:
> On Thu, Jun 3, 2010 at 12:58 AM, Jamie Amendolagine
> <jamie.amendolagine at gmail.com> wrote:
> > I'm not too familiar with the code, but it does look like the qemu SVGA
> > driver is lacking the 3D functionality.
> > Should this work in software mode?
> Yes, but it requires an fbdev backend. That is,
>
> * add fbdev sw_winsys to src/gallium/winsys/sw/
> * add fbdev native_display to src/gallium/state_trackers/egl/
>
> The former is responsible for copying buffers to the fbdev. The latter may
> export the current var info in the form of an EGLModeMESA and use
> resource_surface for buffer management.
>
> You are also gonna need to define the native display, window, and pixmap
> types
> for fbdev. The window and pixmap types may be arbitrary as they are not
> used.
> The natual choice for the native display type may be an fd (int) or the
> device
> path (char *).
> > I'm trying this:
> > export EGL_DRIVER=/usr/local/lib/egl/egl_kms_swrast.so
> > cd progs/egl
> > ./eglinfo
> > eglinfo: eglInitialize failed
> >
> > I seem to get the same with the other egl programs. Maybe I'll try the
> patch
> > from here: http://airlied.livejournal.com/69291.html ...
> >
> >
> >
> > The following is the config that I used:
> > ----------------------------------------------------------
> > # -*-makefile-*-
> > # Configuration for linux-dri: Linux DRI hardware drivers for XFree86 &
> > others
> >
> > include $(TOP)/configs/default
> >
> > CONFIG_NAME = linux-dri
> >
> > # Compiler and flags
> > CC = i686-linux-uclibc-gcc
> > CXX = i686-linux-uclibc-g++
> >
> >
> >
> > #MKDEP = /usr/X11R6/bin/makedepend
> > #MKDEP = gcc -M
> > #MKDEP_OPTIONS = -fdepend
> > -I/root/oryza/neworyzans/output/staging/usr/include
> > -I/root/oryza/neworyzans/output/staging/usr/includeX11/extensions/
> > MKDEP_OPTIONS = -fdepend $(SNAP_MKDEP_OPTIONS)
> >
> > OPT_FLAGS = -O2 -g
> > PIC_FLAGS = -fPIC
> >
> > # Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
> > ARCH_FLAGS ?=
> >
> > DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
> > -D_BSD_SOURCE -D_GNU_SOURCE \
> > -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
> > -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
> > -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
> >
> > X11_INCLUDES = -I/usr/X11R6/include
> >
> > CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
> > $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
> >
> > CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
> >
> > GLUT_CFLAGS = -fexceptions
> >
> > # Work around aliasing bugs - developers should comment this out
> > CFLAGS += -fno-strict-aliasing
> > CXXFLAGS += -fno-strict-aliasing
> >
> > MESA_ASM_SOURCES =
> >
> > # Library/program dependencies
> > EXTRA_LIB_PATH=$(SNAP_EXTRA_LIB_PATH)
> > APP_LIB_DEPS+=$(SNAP_EXTRA_LIB_PATH)
> >
> > LIBDRM_CFLAGS = $(shell pkg-config --cflags libdrm)
> > LIBDRM_LIB = $(shell pkg-config --libs libdrm)
> > DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
> $(LIBDRM_LIB)
> > GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage
> -lXfixes
> > \
> > -lm -lpthread -ldl $(LIBDRM_LIB)
> >
> >
> > # Directories
> > SRC_DIRS := glsl mesa/es glx egl $(SRC_DIRS)
> > PROGRAM_DIRS := egl $(PROGRAM_DIRS) es1/screen es1/xegl es2/xegl
> >
> > # EGL directories
> > EGL_DRIVERS_DIRS = glx
> > EGL_DISPLAYS = x11 kms
> >
> > DRIVER_DIRS = dri
> > WINDOW_SYSTEM = dri
> > GALLIUM_WINSYS_DIRS = drm egl_drm
> > GALLIUM_WINSYS_DRM_DIRS = egl es vmware swrast
> > GALLIUM_STATE_TRACKERS_DIRS = egl es vega
> >
> > DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon \
> > savage sis tdfx unichrome swrast
> >
> > INTEL_LIBS = `pkg-config --libs libdrm_intel`
> > INTEL_CFLAGS = `pkg-config --cflags libdrm_intel`
> >
> > RADEON_LIBS = `pkg-config --libs libdrm_radeon`
> > RADEON_CFLAGS = `pkg-config --cflags libdrm_radeon`
> >
> >
> >
> >
> >
> >
> > On Tue, Jun 1, 2010 at 9:36 PM, Jamie Amendolagine
> > <jamie.amendolagine at gmail.com> wrote:
> >>
> >> Ah. I'll try compiling qemu from source to see what options there are
> etc
> >> -- it looks like there is a kms option and maybe qemu from the ubuntu
> repo
> >> is not enabling it...
> >> If I can not get that to work, is there a best way to get
> >> mesa/egl/ogles-1/2/ovg working without X11? Even in software mode?
> >>
> >> Jamie
> >>
> >>
> >>
> >>
> >> On Tue, Jun 1, 2010 at 7:20 PM, Chia-I Wu <olvaffe at gmail.com> wrote:
> >>>
> >>> On Wed, Jun 2, 2010 at 1:13 AM, Jamie Amendolagine
> >>> <jamie.amendolagine at gmail.com> wrote:
> >>> > So, I can't find any instructions on getting this up and running
> >>> > (x86-linux-uclibc-mesa-7.8.1 / qemu). I think that I'm pretty close.
> >>> > Any
> >>> > help is much appreciated, and I promise to submit any patches that
> are
> >>> > useful...
> >>> >
> >>> > So far I've got the kernel (2.6.34) built with kms, and vmwgfx
> support.
> >>> > I
> >>> > boot an x86 image (uclibc) in qemu.
> >>> >
> >>> > /usr/bin/qemu -kernel '/home/jamie/neworyzans/bzImage.kms2' -append
> >>> > 'root=/dev/sda rw video=vmwgfx ' -boot c -m 128 -hda
> >>> > '/home/jamie/neworyzans/output/images/rootfs.i686.ext2' -net
> >>> > nic,vlan=0,model=e1000 -net tap,ifname=tap0,script=/etc/qemu-ifup
> -vga
> >>> > vmware
> >>> >
> >>> > on boot I modprobe the modules:
> >>> > modprobe vmwgfx
> >>> > The gfx resolution changes (corrupting the console), and the
> following
> >>> > modules seem to load OK:
> >>> >
> >>> > lsmod:
> >>> > Module Size Used by Tainted: G
> >>> > vmwgfx 62458 0
> >>> > ttm 49037 1 vmwgfx
> >>> > drm 164569 2 vmwgfx,ttm
> >>> > agpgart 31292 2 ttm,drm
> >>> >
> >>> > qemu complains with the following:
> >>> > vmsvga_value_write: Bad colour depth: 24 bits
> >>> > vmsvga_value_write: Bad register 09
> >>> > vmsvga_value_write: Bad register 0a
> >>> > vmsvga_value_write: Bad register 0b
> >>> >
> >>> >
> >>> > If I go ahead and try and run an app, I get this:
> >>> > export EGL_DRIVER=/usr/local/lib/egl/egl_kms_vmwgfx.so
> >>> > cd progs/egl
> >>> > ./eglscreen
> >>> > segfault
> >>> >
> >>> > ./strace ./eglscreen
> >>> > (attached out.txt)
> >>> >
> >>> >
> >>> > on the console running qemu I get this:
> >>> > vmsvga_value_write: Bad register 22
> >>> > vmsvga_value_write: Bad register 22
> >>> > vmsvga_value_write: Bad register 22
> >>> > vmsvga_value_write: Bad register 22
> >>> > ...
> >>> > vmsvga_value_write: Bad register 22
> >>> > vmsvga_value_write: Bad register 22
> >>> > vmsvga_value_write: Bad register 22
> >>> > vmsvga_value_write: Bad register 22
> >>> >
> >>> > Am I doing anything obviously wrong?
> >>> I don't think qemu SVGA emulation implements the 3D interface used by
> >>> gallium
> >>> vmwgfx driver. It might be the problem.
> >>>
> >>>
> >>> --
> >>> olv at LunarG.com
> >>
> >
> >
>
>
>
> --
> olv at LunarG.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-users/attachments/20100603/fe66be53/attachment.htm>
More information about the mesa-users
mailing list