diff options
Diffstat (limited to 'meta-oe/recipes-graphics')
126 files changed, 7570 insertions, 6 deletions
diff --git a/meta-oe/recipes-graphics/drm/libdrm-2.4.24/glamo.patch b/meta-oe/recipes-graphics/drm/libdrm-2.4.24/glamo.patch new file mode 100644 index 0000000000..b397ded580 --- /dev/null +++ b/meta-oe/recipes-graphics/drm/libdrm-2.4.24/glamo.patch @@ -0,0 +1,1095 @@ +diff --git a/Makefile.am b/Makefile.am +index 25d1747..f384228 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -41,7 +41,11 @@ if HAVE_RADEON + RADEON_SUBDIR = radeon + endif + +-SUBDIRS = . $(LIBKMS_SUBDIR) $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) tests include ++if HAVE_GLAMO ++GLAMO_SUBDIR = glamo ++endif ++ ++SUBDIRS = . $(LIBKMS_SUBDIR) $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) $(GLAMO_SUBDIR) tests include + + libdrm_la_LTLIBRARIES = libdrm.la + libdrm_ladir = $(libdir) +diff --git a/configure.ac b/configure.ac +index 62db817..0b2a33e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -73,6 +73,11 @@ AC_ARG_ENABLE(nouveau-experimental-api, + [NOUVEAU=$enableval], [NOUVEAU=no]) + + ++AC_ARG_ENABLE(glamo-experimental-api, ++ AS_HELP_STRING([--enable-glamo-experimental-api], ++ [Enable support for Glamo's KMS API (default: disabled)]), ++ [GLAMO=$enableval], [GLAMO=no]) ++ + dnl =========================================================================== + dnl check compiler flags + AC_DEFUN([LIBDRM_CC_TRY_FLAG], [ +@@ -169,6 +174,11 @@ if test "x$NOUVEAU" = xyes; then + AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau (nvidia) support]) + fi + ++AM_CONDITIONAL(HAVE_GLAMO, [test "x$GLAMO" = xyes]) ++if test "x$GLAMO" = xyes; then ++ AC_DEFINE(HAVE_GLAMO, 1, [Have glamo support]) ++fi ++ + PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) + if test "x$HAVE_CAIRO" = xyes; then + AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) +@@ -262,6 +272,8 @@ AC_OUTPUT([ + radeon/libdrm_radeon.pc + nouveau/Makefile + nouveau/libdrm_nouveau.pc ++ glamo/Makefile ++ glamo/libdrm_glamo.pc + tests/Makefile + tests/modeprint/Makefile + tests/modetest/Makefile +diff --git a/glamo/Makefile.am b/glamo/Makefile.am +new file mode 100644 +index 0000000..1f17aa3 +--- /dev/null ++++ b/glamo/Makefile.am +@@ -0,0 +1,52 @@ ++# Copyright (c) 2009 Thomas Whtie <taw@bitwiz.org.uk> ++# Based on libdrm-glamo Copyright © 2008 Jérôme Glisse ++# ++# Permission is hereby granted, free of charge, to any person obtaining a ++# copy of this software and associated documentation files (the "Software"), ++# to deal in the Software without restriction, including without limitation ++# the rights to use, copy, modify, merge, publish, distribute, sublicense, ++# and/or sell copies of the Software, and to permit persons to whom the ++# Software is furnished to do so, subject to the following conditions: ++# ++# The above copyright notice and this permission notice (including the next ++# paragraph) shall be included in all copies or substantial portions of the ++# Software. ++# ++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS ++# IN THE SOFTWARE. ++# ++# Authors: ++# Jérôme Glisse <glisse@freedesktop.org> ++# Thomas White <taw@bitwiz.org.uk> ++ ++AM_CFLAGS = \ ++ $(WARN_CFLAGS) \ ++ -I$(top_srcdir) \ ++ -I$(top_srcdir)/glamo \ ++ $(PTHREADSTUBS_CFLAGS) \ ++ -I$(top_srcdir)/include/drm ++ ++libdrm_glamo_la_LTLIBRARIES = libdrm_glamo.la ++libdrm_glamo_ladir = $(libdir) ++libdrm_glamo_la_LDFLAGS = -version-number 1:0:0 -no-undefined ++libdrm_glamo_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ ++ ++libdrm_glamo_la_SOURCES = \ ++ glamo_bo_gem.c \ ++ glamo_track.c ++ ++libdrm_glamoincludedir = ${includedir}/libdrm ++libdrm_glamoinclude_HEADERS = \ ++ glamo_bo.h \ ++ glamo_bo_gem.h \ ++ glamo_track.h ++ ++pkgconfigdir = @pkgconfigdir@ ++pkgconfig_DATA = libdrm_glamo.pc ++ ++EXTRA_DIST = libdrm_glamo.pc.in +diff --git a/glamo/glamo_bo.h b/glamo/glamo_bo.h +new file mode 100644 +index 0000000..8ef2a18 +--- /dev/null ++++ b/glamo/glamo_bo.h +@@ -0,0 +1,183 @@ ++/* ++ * Copyright (c) 2009 Thomas White ++ * ++ * Heavily based on radeon_bo.h ++ * Copyright © 2008 Jérôme Glisse ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS ++ * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE ++ * USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ */ ++/* ++ * Authors: ++ * Jérôme Glisse <glisse@freedesktop.org> ++ * Thomas White <taw@bitwiz.org.uk> ++ */ ++#ifndef GLAMO_BO_H ++#define GLAMO_BO_H ++ ++#include <stdio.h> ++#include <stdint.h> ++#include "glamo_track.h" ++ ++/* bo object */ ++#define GLAMO_BO_FLAGS_MACRO_TILE 1 ++#define GLAMO_BO_FLAGS_MICRO_TILE 2 ++ ++struct glamo_bo_manager; ++ ++struct glamo_bo { ++ uint32_t alignment; ++ uint32_t handle; ++ uint32_t size; ++ uint32_t domains; ++ uint32_t flags; ++ unsigned cref; ++#ifdef GLAMO_BO_TRACK ++ struct glamo_track *track; ++#endif ++ struct glamo_bo_manager *bom; ++ void *virtual; ++ uint32_t space_accounted; ++}; ++ ++/* bo functions */ ++struct glamo_bo_funcs { ++ struct glamo_bo *(*bo_open)(struct glamo_bo_manager *bom, ++ uint32_t handle, ++ uint32_t size, ++ uint32_t alignment, ++ uint32_t domains, ++ uint32_t flags); ++ void (*bo_ref)(struct glamo_bo *bo); ++ struct glamo_bo *(*bo_unref)(struct glamo_bo *bo); ++ int (*bo_map)(struct glamo_bo *bo, int write); ++ int (*bo_unmap)(struct glamo_bo *bo); ++ int (*bo_wait)(struct glamo_bo *bo); ++}; ++ ++struct glamo_bo_manager { ++ struct glamo_bo_funcs *funcs; ++ int fd; ++ struct glamo_tracker tracker; ++}; ++ ++static inline void _glamo_bo_debug(struct glamo_bo *bo, ++ const char *op, ++ const char *file, ++ const char *func, ++ int line) ++{ ++ fprintf(stderr, "%s %p 0x%08X 0x%08X 0x%08X [%s %s %d]\n", ++ op, (void *)bo, bo->handle, bo->size, bo->cref, file, func, line); ++} ++ ++static inline struct glamo_bo *_glamo_bo_open(struct glamo_bo_manager *bom, ++ uint32_t handle, ++ uint32_t size, ++ uint32_t alignment, ++ uint32_t domains, ++ uint32_t flags, ++ const char *file, ++ const char *func, ++ int line) ++{ ++ struct glamo_bo *bo; ++ ++ bo = bom->funcs->bo_open(bom, handle, size, alignment, domains, flags); ++#ifdef GLAMO_BO_TRACK ++ if (bo) { ++ bo->track = glamo_tracker_add_track(&bom->tracker, bo->handle); ++ glamo_track_add_event(bo->track, file, func, "open", line); ++ } ++#endif ++ return bo; ++} ++ ++static inline void _glamo_bo_ref(struct glamo_bo *bo, ++ const char *file, ++ const char *func, ++ int line) ++{ ++ bo->cref++; ++#ifdef GLAMO_BO_TRACK ++ glamo_track_add_event(bo->track, file, func, "ref", line); ++#endif ++ bo->bom->funcs->bo_ref(bo); ++} ++ ++static inline struct glamo_bo *_glamo_bo_unref(struct glamo_bo *bo, ++ const char *file, ++ const char *func, ++ int line) ++{ ++ bo->cref--; ++#ifdef GLAMO_BO_TRACK ++ glamo_track_add_event(bo->track, file, func, "unref", line); ++ if (bo->cref <= 0) { ++ glamo_tracker_remove_track(&bo->bom->tracker, bo->track); ++ bo->track = NULL; ++ } ++#endif ++ return bo->bom->funcs->bo_unref(bo); ++} ++ ++static inline int _glamo_bo_map(struct glamo_bo *bo, ++ int write, ++ const char *file, ++ const char *func, ++ int line) ++{ ++ return bo->bom->funcs->bo_map(bo, write); ++} ++ ++static inline int _glamo_bo_unmap(struct glamo_bo *bo, ++ const char *file, ++ const char *func, ++ int line) ++{ ++ return bo->bom->funcs->bo_unmap(bo); ++} ++ ++static inline int _glamo_bo_wait(struct glamo_bo *bo, ++ const char *file, ++ const char *func, ++ int line) ++{ ++ return bo->bom->funcs->bo_wait(bo); ++} ++ ++#define glamo_bo_open(bom, h, s, a, d, f)\ ++ _glamo_bo_open(bom, h, s, a, d, f, __FILE__, __FUNCTION__, __LINE__) ++#define glamo_bo_ref(bo)\ ++ _glamo_bo_ref(bo, __FILE__, __FUNCTION__, __LINE__) ++#define glamo_bo_unref(bo)\ ++ _glamo_bo_unref(bo, __FILE__, __FUNCTION__, __LINE__) ++#define glamo_bo_map(bo, w)\ ++ _glamo_bo_map(bo, w, __FILE__, __FUNCTION__, __LINE__) ++#define glamo_bo_unmap(bo)\ ++ _glamo_bo_unmap(bo, __FILE__, __FUNCTION__, __LINE__) ++#define glamo_bo_debug(bo, opcode)\ ++ _glamo_bo_debug(bo, opcode, __FILE__, __FUNCTION__, __LINE__) ++#define glamo_bo_wait(bo) \ ++ _glamo_bo_wait(bo, __FILE__, __func__, __LINE__) ++ ++#endif +diff --git a/glamo/glamo_bo_gem.c b/glamo/glamo_bo_gem.c +new file mode 100644 +index 0000000..38a4436 +--- /dev/null ++++ b/glamo/glamo_bo_gem.c +@@ -0,0 +1,336 @@ ++/* ++ * Copyright © 2009 Thomas White ++ * ++ * Based on radeon_bo_gem.c, to which the following notice applies: ++ * ++ * Copyright © 2008 Dave Airlie ++ * Copyright © 2008 Jérôme Glisse ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS ++ * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE ++ * USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ */ ++/* ++ * Authors: ++ * Dave Airlie ++ * Jérôme Glisse <glisse@freedesktop.org> ++ * ++ * ++ * Memory mapping functions are based on intel_bufmgr_gem.c, to which the ++ * following notice applies: ++ * ++ * Copyright © 2007 Red Hat Inc. ++ * Copyright © 2007 Intel Corporation ++ * Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL ++ * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, ++ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR ++ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE ++ * USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ * ++ * ++ **************************************************************************/ ++/* ++ * Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com> ++ * Keith Whitwell <keithw-at-tungstengraphics-dot-com> ++ * Eric Anholt <eric@anholt.net> ++ * Dave Airlie <airlied@linux.ie> ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include <stdio.h> ++#include <stdint.h> ++#include <stdlib.h> ++#include <string.h> ++#include <sys/mman.h> ++#include <sys/ioctl.h> ++#include <errno.h> ++ ++#include "xf86drm.h" ++#include "drm.h" ++#include "glamo_drm.h" ++#include "glamo_bo.h" ++#include "glamo_bo_gem.h" ++ ++struct glamo_bo_gem { ++ struct glamo_bo base; ++ uint32_t name; ++ int map_count; ++}; ++ ++struct bo_manager_gem { ++ struct glamo_bo_manager base; ++}; ++ ++static struct glamo_bo *bo_open(struct glamo_bo_manager *bom, ++ uint32_t handle, ++ uint32_t size, ++ uint32_t alignment, ++ uint32_t domains, ++ uint32_t flags) ++{ ++ struct glamo_bo_gem *bo; ++ int r; ++ ++ bo = (struct glamo_bo_gem*)calloc(1, sizeof(struct glamo_bo_gem)); ++ if (bo == NULL) { ++ return NULL; ++ } ++ ++ bo->base.bom = bom; ++ bo->base.handle = 0; ++ bo->base.size = size; ++ bo->base.alignment = alignment; ++ bo->base.domains = domains; ++ bo->base.flags = flags; ++ bo->base.cref = 0; ++ bo->map_count = 0; ++ bo->base.virtual = NULL; ++ if (handle) { ++ struct drm_gem_open open_arg; ++ ++ memset(&open_arg, 0, sizeof(open_arg)); ++ open_arg.name = handle; ++ r = ioctl(bom->fd, DRM_IOCTL_GEM_OPEN, &open_arg); ++ if (r != 0) { ++ free(bo); ++ return NULL; ++ } ++ bo->base.handle = open_arg.handle; ++ bo->base.size = open_arg.size; ++ bo->name = handle; ++ } else { ++ struct drm_glamo_gem_create args; ++ ++ args.size = size; ++ args.alignment = alignment; ++ args.initial_domain = bo->base.domains; ++ args.no_backing_store = 0; ++ args.handle = 0; ++ r = drmCommandWriteRead(bom->fd, DRM_GLAMO_GEM_CREATE, ++ &args, sizeof(args)); ++ bo->base.handle = args.handle; ++ if (r) { ++ fprintf(stderr, "Failed to allocate :\n"); ++ fprintf(stderr, " size : %d bytes\n", size); ++ fprintf(stderr, " alignment : %d bytes\n", alignment); ++ free(bo); ++ return NULL; ++ } ++ } ++ glamo_bo_ref((struct glamo_bo*)bo); ++ return (struct glamo_bo*)bo; ++} ++ ++static void bo_ref(struct glamo_bo *bo) ++{ ++} ++ ++static struct glamo_bo *bo_unref(struct glamo_bo *bo) ++{ ++ struct glamo_bo_gem *bo_gem = (struct glamo_bo_gem*)bo; ++ struct drm_gem_close args; ++ ++ if (bo == NULL) { ++ return NULL; ++ } ++ if (bo->cref) { ++ return bo; ++ } ++ if (bo_gem->map_count) { ++ munmap(bo->virtual, bo->size); ++ } ++ ++ /* close object */ ++ args.handle = bo->handle; ++ ioctl(bo->bom->fd, DRM_IOCTL_GEM_CLOSE, &args); ++ memset(bo_gem, 0, sizeof(struct glamo_bo_gem)); ++ free(bo_gem); ++ return NULL; ++} ++ ++static int bo_map(struct glamo_bo *bo, int write) ++{ ++ struct glamo_bo_gem *bo_gem; ++ struct glamo_bo_manager *bufmgr; ++ int ret; ++ ++ bo_gem = (struct glamo_bo_gem *)bo; ++ bufmgr = (struct glamo_bo_manager*)bo->bom; ++ ++ /* Get a mapping of the buffer if we haven't before. */ ++ if (bo->virtual == NULL) { ++ ++ struct drm_glamo_gem_mmap mmap_arg; ++ ++ memset(&mmap_arg, 0, sizeof(mmap_arg)); ++ mmap_arg.handle = bo->handle; ++ ++ /* Get the fake offset back... */ ++ ret = ioctl(bufmgr->fd, DRM_IOCTL_GLAMO_GEM_MMAP, &mmap_arg); ++ if (ret != 0) { ++ fprintf(stderr, ++ "%s:%d: Error preparing BO map %d (%d): %s .\n", ++ __FILE__, __LINE__, ++ bo->handle, bo_gem->name, ++ strerror(errno)); ++ return ret; ++ } ++ /* and mmap it */ ++ bo->virtual = mmap(0, bo->size, PROT_READ | PROT_WRITE, ++ MAP_SHARED, bufmgr->fd, ++ mmap_arg.offset); ++ if (bo->virtual == MAP_FAILED) { ++ fprintf(stderr, ++ "%s:%d: Error mapping buffer %d (%d): %s .\n", ++ __FILE__, __LINE__, ++ bo->handle, bo_gem->name, ++ strerror(errno)); ++ return errno; ++ } ++ } ++ bo_gem->map_count++; ++ ++ return 0; ++} ++ ++static int bo_unmap(struct glamo_bo *bo) ++{ ++ struct glamo_bo_gem *bo_gem = (struct glamo_bo_gem*)bo; ++ ++ if ( bo_gem->map_count == 0 ) { ++ fprintf(stderr, "Not unmapping %p, because its map count" ++ " is already zero.\n", bo_gem); ++ return 0; ++ } ++ ++ if (--bo_gem->map_count > 0) { ++ return 0; ++ } ++ munmap(bo->virtual, bo->size); ++ bo->virtual = NULL; ++ return 0; ++} ++ ++static int bo_wait(struct glamo_bo *bo) ++{ ++ struct drm_glamo_gem_wait_rendering args; ++ int ret; ++ ++ args.handle = bo->handle; ++ args.have_handle = 1; ++ do { ++ ret = drmCommandWriteRead(bo->bom->fd, ++ DRM_GLAMO_GEM_WAIT_RENDERING, ++ &args, sizeof(args)); ++ } while (ret == -EAGAIN); ++ return ret; ++} ++ ++static struct glamo_bo_funcs bo_gem_funcs = { ++ bo_open, ++ bo_ref, ++ bo_unref, ++ bo_map, ++ bo_unmap, ++ bo_wait ++}; ++ ++struct glamo_bo_manager *glamo_bo_manager_gem_ctor(int fd) ++{ ++ struct bo_manager_gem *bomg; ++ ++ bomg = (struct bo_manager_gem*)calloc(1, sizeof(struct bo_manager_gem)); ++ if (bomg == NULL) return NULL; ++ ++ bomg->base.funcs = &bo_gem_funcs; ++ bomg->base.fd = fd; ++ return (struct glamo_bo_manager*)bomg; ++} ++ ++void glamo_bo_manager_gem_dtor(struct glamo_bo_manager *bom) ++{ ++ struct bo_manager_gem *bomg = (struct bo_manager_gem*)bom; ++ ++ if (bom == NULL) return; ++ free(bomg); ++} ++ ++uint32_t glamo_gem_get_name(struct glamo_bo *bo) ++{ ++ struct glamo_bo_gem *bo_gem = (struct glamo_bo_gem*)bo; ++ return bo_gem->name; ++} ++ ++int glamo_gem_name_buffer(struct glamo_bo *bo, uint32_t *name) ++{ ++ struct drm_gem_flink flink; ++ int r; ++ ++ if ( !bo ) { ++ fprintf(stderr, "No buffer object!\n"); ++ return -1; ++ } ++ ++ flink.handle = bo->handle; ++ r = ioctl(bo->bom->fd, DRM_IOCTL_GEM_FLINK, &flink); ++ if (r) return r; ++ ++ *name = flink.name; ++ return 0; ++} ++ ++int glamo_bo_subdata(struct glamo_bo *bo, unsigned long offset, ++ unsigned long size, const void *data) ++{ ++ int ret; ++ ++ if (size == 0 || data == NULL) ++ return 0; ++ ++ ret = bo_map(bo, 1); ++ if ( ret ) return ret; ++ ++ memcpy((unsigned char *)bo->virtual + offset, data, size); ++ ++ bo_unmap(bo); ++ ++ return 0; ++} +diff --git a/glamo/glamo_bo_gem.h b/glamo/glamo_bo_gem.h +new file mode 100644 +index 0000000..05b5fb9 +--- /dev/null ++++ b/glamo/glamo_bo_gem.h +@@ -0,0 +1,43 @@ ++/* ++ * Copyright © 2008 Dave Airlie ++ * Copyright © 2008 Jérôme Glisse ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS ++ * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE ++ * USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ */ ++/* ++ * Authors: ++ * Dave Airlie ++ * Jérôme Glisse <glisse@freedesktop.org> ++ */ ++#ifndef GLAMO_BO_GEM_H ++#define GLAMO_BO_GEM_H ++ ++#include "glamo_bo.h" ++ ++struct glamo_bo_manager *glamo_bo_manager_gem_ctor(int fd); ++void glamo_bo_manager_gem_dtor(struct glamo_bo_manager *bom); ++int glamo_gem_name_buffer(struct glamo_bo *bo, uint32_t *name); ++uint32_t glamo_gem_get_name(struct glamo_bo *bo); ++extern int glamo_bo_subdata(struct glamo_bo *bo, unsigned long offset, ++ unsigned long size, const void *data); ++#endif +diff --git a/glamo/glamo_track.c b/glamo/glamo_track.c +new file mode 100644 +index 0000000..27ffe41 +--- /dev/null ++++ b/glamo/glamo_track.c +@@ -0,0 +1,140 @@ ++/* ++ * Copyright © 2008 Jérôme Glisse ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS ++ * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE ++ * USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ */ ++/* ++ * Authors: ++ * Jérôme Glisse <glisse@freedesktop.org> ++ */ ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include "glamo_track.h" ++ ++void glamo_track_add_event(struct glamo_track *track, ++ const char *file, ++ const char *func, ++ const char *op, ++ unsigned line) ++{ ++ struct glamo_track_event *event; ++ ++ if (track == NULL) { ++ return; ++ } ++ event = (void*)calloc(1,sizeof(struct glamo_track_event)); ++ if (event == NULL) { ++ return; ++ } ++ event->line = line; ++ event->file = strdup(file); ++ event->func = strdup(func); ++ event->op = strdup(op); ++ if (event->file == NULL || event->func == NULL || event->op == NULL) { ++ free(event->file); ++ free(event->func); ++ free(event->op); ++ free(event); ++ return; ++ } ++ event->next = track->events; ++ track->events = event; ++} ++ ++struct glamo_track *glamo_tracker_add_track(struct glamo_tracker *tracker, ++ unsigned key) ++{ ++ struct glamo_track *track; ++ ++ track = (struct glamo_track*)calloc(1, sizeof(struct glamo_track)); ++ if (track) { ++ track->next = tracker->tracks.next; ++ track->prev = &tracker->tracks; ++ tracker->tracks.next = track; ++ if (track->next) { ++ track->next->prev = track; ++ } ++ track->key = key; ++ track->events = NULL; ++ } ++ return track; ++} ++ ++void glamo_tracker_remove_track(struct glamo_tracker *tracker, ++ struct glamo_track *track) ++{ ++ struct glamo_track_event *event; ++ void *tmp; ++ ++ if (track == NULL) { ++ return; ++ } ++ track->prev->next = track->next; ++ if (track->next) { ++ track->next->prev = track->prev; ++ } ++ track->next = track->prev = NULL; ++ event = track->events; ++ while (event) { ++ tmp = event; ++ free(event->file); ++ free(event->func); ++ free(event->op); ++ event = event->next; ++ free(tmp); ++ } ++ track->events = NULL; ++ free(track); ++} ++ ++void glamo_tracker_print(struct glamo_tracker *tracker, FILE *file) ++{ ++ struct glamo_track *track; ++ struct glamo_track_event *event; ++ void *tmp; ++ ++ track = tracker->tracks.next; ++ while (track) { ++ event = track->events; ++ fprintf(file, "[0x%08X] :\n", track->key); ++ while (event) { ++ tmp = event; ++ fprintf(file, " [0x%08X:%s](%s:%s:%d)\n", ++ track->key, event->op, event->file, ++ event->func, event->line); ++ free(event->file); ++ free(event->func); ++ free(event->op); ++ event->file = NULL; ++ event->func = NULL; ++ event->op = NULL; ++ event = event->next; ++ free(tmp); ++ } ++ track->events = NULL; ++ tmp = track; ++ track = track->next; ++ free(tmp); ++ } ++} +diff --git a/glamo/glamo_track.h b/glamo/glamo_track.h +new file mode 100644 +index 0000000..fedead7 +--- /dev/null ++++ b/glamo/glamo_track.h +@@ -0,0 +1,64 @@ ++/* ++ * Copyright © 2008 Jérôme Glisse ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS ++ * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE ++ * USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ */ ++/* ++ * Authors: ++ * Jérôme Glisse <glisse@freedesktop.org> ++ */ ++#ifndef GLAMO_TRACK_H ++#define GLAMO_TRACK_H ++ ++struct glamo_track_event { ++ struct glamo_track_event *next; ++ char *file; ++ char *func; ++ char *op; ++ unsigned line; ++}; ++ ++struct glamo_track { ++ struct glamo_track *next; ++ struct glamo_track *prev; ++ unsigned key; ++ struct glamo_track_event *events; ++}; ++ ++struct glamo_tracker { ++ struct glamo_track tracks; ++}; ++ ++void glamo_track_add_event(struct glamo_track *track, ++ const char *file, ++ const char *func, ++ const char *op, ++ unsigned line); ++struct glamo_track *glamo_tracker_add_track(struct glamo_tracker *tracker, ++ unsigned key); ++void glamo_tracker_remove_track(struct glamo_tracker *tracker, ++ struct glamo_track *track); ++void glamo_tracker_print(struct glamo_tracker *tracker, ++ FILE *file); ++ ++#endif +diff --git a/glamo/libdrm_glamo.pc.in b/glamo/libdrm_glamo.pc.in +new file mode 100644 +index 0000000..d4d8e70 +--- /dev/null ++++ b/glamo/libdrm_glamo.pc.in +@@ -0,0 +1,10 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: libdrm_glamo ++Description: Userspace interface to kernel DRM services for Glamo ++Version: 1.0.1 ++Libs: -L${libdir} -ldrm_glamo ++Cflags: -I${includedir} -I${includedir}/libdrm +diff --git a/include/drm/Makefile.am b/include/drm/Makefile.am +index 43695bd..f3f7edf 100644 +--- a/include/drm/Makefile.am ++++ b/include/drm/Makefile.am +@@ -35,6 +35,7 @@ klibdrminclude_HEADERS = \ + savage_drm.h \ + sis_drm.h \ + via_drm.h \ ++ glamo_drm.h \ + mach64_drm.h + + +diff --git a/include/drm/glamo_drm.h b/include/drm/glamo_drm.h +new file mode 100644 +index 0000000..7629ebc +--- /dev/null ++++ b/include/drm/glamo_drm.h +@@ -0,0 +1,153 @@ ++/* glamo_drm.h -- Public header for the Glamo driver ++ * ++ * Copyright 2009 Thomas White ++ * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. ++ * Copyright 2000 VA Linux Systems, Inc., Fremont, California. ++ * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. ++ * All rights reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR ++ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ * DEALINGS IN THE SOFTWARE. ++ * ++ * Authors: ++ * Thomas White <taw@bitwiz.org.uk> ++ * Kevin E. Martin <martin@valinux.com> ++ * Gareth Hughes <gareth@valinux.com> ++ * Keith Whitwell <keith@tungstengraphics.com> ++ */ ++ ++#ifndef __GLAMO_DRM_H__ ++#define __GLAMO_DRM_H__ ++ ++#include "drm.h" ++ ++#define GLAMO_GEM_DOMAIN_VRAM (0x1) ++ ++/* Glamo specific ioctls */ ++#define DRM_GLAMO_CMDBUF 0x01 ++#define DRM_GLAMO_SWAP 0x02 ++#define DRM_GLAMO_CMDBURST 0x03 ++ ++#define DRM_GLAMO_GEM_INFO 0x1c ++#define DRM_GLAMO_GEM_CREATE 0x1d ++#define DRM_GLAMO_GEM_MMAP 0x1e ++#define DRM_GLAMO_GEM_PIN 0x1f ++#define DRM_GLAMO_GEM_UNPIN 0x20 ++#define DRM_GLAMO_GEM_PREAD 0x21 ++#define DRM_GLAMO_GEM_PWRITE 0x22 ++#define DRM_GLAMO_GEM_WAIT_RENDERING 0x24 ++ ++#define DRM_IOCTL_GLAMO_CMDBUF DRM_IOW(DRM_COMMAND_BASE + DRM_GLAMO_CMDBUF, drm_glamo_cmd_buffer_t) ++#define DRM_IOCTL_GLAMO_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_GLAMO_SWAP) ++#define DRM_IOCTL_GLAMO_CMDBURST DRM_IOW(DRM_COMMAND_BASE + DRM_GLAMO_CMDBURST, drm_glamo_cmd_burst_t) ++ ++#define DRM_IOCTL_GLAMO_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_GLAMO_GEM_INFO, struct drm_glamo_gem_info) ++#define DRM_IOCTL_GLAMO_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_GLAMO_GEM_CREATE, struct drm_glamo_gem_create) ++#define DRM_IOCTL_GLAMO_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_GLAMO_GEM_MMAP, struct drm_glamo_gem_mmap) ++#define DRM_IOCTL_GLAMO_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_GLAMO_GEM_PIN, struct drm_glamo_gem_pin) ++#define DRM_IOCTL_GLAMO_GEM_UNPIN DRM_IOWR(DRM_COMMAND_BASE + DRM_GLAMO_GEM_UNPIN, struct drm_glamo_gem_unpin) ++#define DRM_IOCTL_GLAMO_GEM_PREAD DRM_IOWR(DRM_COMMAND_BASE + DRM_GLAMO_GEM_PREAD, struct drm_glamo_gem_pread) ++#define DRM_IOCTL_GLAMO_GEM_PWRITE DRM_IOWR(DRM_COMMAND_BASE + DRM_GLAMO_GEM_PWRITE, struct drm_glamo_gem_pwrite) ++#define DRM_IOCTL_GLAMO_GEM_WAIT_RENDERING DRM_IOW(DRM_COMMAND_BASE + DRM_GLAMO_GEM_WAIT_RENDERING, struct drm_glamo_gem_wait_rendering) ++ ++ ++/* Simple command submission - a list of 16-bit address-data pairs */ ++typedef struct drm_glamo_cmd_buffer { ++ unsigned int bufsz; /* Size of buffer, in bytes */ ++ char *buf; /* Buffer of stuff to go onto the ring buffer */ ++ unsigned int *obj_pos; /* Offsets (in bytes) at which to put objs */ ++ uint32_t *objs; /* List of buffer object (handles) to use */ ++ unsigned int nobjs; /* Number of objects referenced */ ++ int nbox; ++ struct drm_clip_rect *boxes; ++} drm_glamo_cmd_buffer_t; ++ ++ ++/* Burst command submission - base address and data: ++ * - Data can be 32-bit (more easily) ++ * - Easier for the kernel to validate */ ++typedef struct drm_glamo_cmd_burst { ++ uint16_t base; /* Base address (command) */ ++ int bufsz; /* Size of data, in bytes */ ++ uint16_t *data; /* Pointer to data */ ++ unsigned int *obj_pos; /* Offsets (in bytes) at which to put objs */ ++ uint32_t *objs; /* List of buffer object (handles) to use */ ++ unsigned int nobjs; /* Number of objects referenced */ ++} drm_glamo_cmd_burst_t; ++ ++struct drm_glamo_gem_info { ++ uint64_t vram_start; ++ uint64_t vram_size; ++}; ++ ++struct drm_glamo_gem_create { ++ uint64_t size; ++ uint64_t alignment; ++ uint32_t handle; ++ uint32_t initial_domain; // to allow VRAM to be created ++ uint32_t no_backing_store; ++}; ++ ++struct drm_glamo_gem_mmap { ++ uint32_t handle; /* Handle goes in... */ ++ uint64_t offset; /* ...offset comes out */ ++}; ++ ++struct drm_glamo_gem_wait_rendering { ++ uint32_t handle; ++ int have_handle; ++}; ++ ++struct drm_glamo_gem_pin { ++ uint32_t handle; ++ uint32_t pin_domain; ++ uint64_t alignment; ++ uint64_t offset; ++}; ++ ++struct drm_glamo_gem_unpin { ++ uint32_t handle; ++ uint32_t pad; ++}; ++ ++struct drm_glamo_gem_pread { ++ /** Handle for the object being read. */ ++ uint32_t handle; ++ uint32_t pad; ++ /** Offset into the object to read from */ ++ uint64_t offset; ++ /** Length of data to read */ ++ uint64_t size; ++ /** Pointer to write the data into. */ ++ uint64_t data_ptr; /* void *, but pointers are not 32/64 compatible */ ++}; ++ ++struct drm_glamo_gem_pwrite { ++ /** Handle for the object being written to. */ ++ uint32_t handle; ++ uint32_t pad; ++ /** Offset into the object to write to */ ++ uint64_t offset; ++ /** Length of data to write */ ++ uint64_t size; ++ /** Pointer to read the data from. */ ++ uint64_t data_ptr; /* void *, but pointers are not 32/64 compatible */ ++}; ++ ++#endif diff --git a/meta-oe/recipes-graphics/drm/libdrm-2.4.24/installtests.patch b/meta-oe/recipes-graphics/drm/libdrm-2.4.24/installtests.patch new file mode 100644 index 0000000000..9d6a168bbc --- /dev/null +++ b/meta-oe/recipes-graphics/drm/libdrm-2.4.24/installtests.patch @@ -0,0 +1,43 @@ +Index: libdrm-2.4.7/tests/Makefile.am +=================================================================== +--- libdrm-2.4.7.orig/tests/Makefile.am 2009-04-09 20:16:35.000000000 +0100 ++++ libdrm-2.4.7/tests/Makefile.am 2009-04-17 12:35:14.000000000 +0100 +@@ -6,10 +6,11 @@ + + LDADD = $(top_builddir)/libdrm.la + +-check_PROGRAMS = \ ++bin_PROGRAMS = \ + dristat \ + drmstat + ++check_PROGRAMS = + SUBDIRS = + + if HAVE_LIBKMS +Index: libdrm-2.4.7/tests/modeprint/Makefile.am +=================================================================== +--- libdrm-2.4.7.orig/tests/modeprint/Makefile.am 2009-02-17 19:52:37.000000000 +0000 ++++ libdrm-2.4.7/tests/modeprint/Makefile.am 2009-04-17 12:35:32.000000000 +0100 +@@ -3,7 +3,7 @@ + -I$(top_srcdir)/libdrm/intel/ \ + -I$(top_srcdir)/libdrm + +-noinst_PROGRAMS = \ ++bin_PROGRAMS = \ + modeprint + + modeprint_SOURCES = \ +Index: libdrm-2.4.7/tests/modetest/Makefile.am +=================================================================== +--- libdrm-2.4.7.orig/tests/modetest/Makefile.am 2009-02-17 19:52:37.000000000 +0000 ++++ libdrm-2.4.7/tests/modetest/Makefile.am 2009-04-17 12:35:42.000000000 +0100 +@@ -4,7 +4,7 @@ + -I$(top_srcdir)/libdrm \ + $(CAIRO_CFLAGS) + +-noinst_PROGRAMS = \ ++bin_PROGRAMS = \ + modetest + + modetest_SOURCES = \ diff --git a/meta-oe/recipes-graphics/drm/libdrm_2.4.24.bb b/meta-oe/recipes-graphics/drm/libdrm_2.4.24.bb new file mode 100644 index 0000000000..0a2365ec34 --- /dev/null +++ b/meta-oe/recipes-graphics/drm/libdrm_2.4.24.bb @@ -0,0 +1,39 @@ +SUMMARY = "Userspace interface to the kernel DRM services" +DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \ +stands for \"Direct Rendering Manager\", which is the kernel portion of the \ +\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \ +accelerated OpenGL drivers." +HOMEPAGE = "http://dri.freedesktop.org" +SECTION = "x11/base" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71" +SRC_URI = "http://dri.freedesktop.org/libdrm/libdrm-${PV}.tar.bz2" +PROVIDES = "drm" +DEPENDS = "libpthread-stubs udev cairo virtual/libx11" + +inherit autotools pkgconfig + +PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-kms ${@base_contains('MACHINE_FEATURES', 'x86', '${PN}-intel', '',d)}" +FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode*" +FILES_${PN}-drivers = "${libdir}/libdrm_*.so.*" +FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*" +FILES_${PN}-kms = "${libdir}/libkms*.so.*" + +LEAD_SONAME = "libdrm.so" + +EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'x86', '', '--disable-intel --disable-radeon',d)}" +EXTRA_OECONF_append_shr = " --enable-glamo-experimental-api" + +PR = "r8" + +SRC_URI += "file://installtests.patch" +SRC_URI += "file://glamo.patch" + +SRC_URI[md5sum] = "8d802bf3b368f9fac0d7d17516a9436f" +SRC_URI[sha256sum] = "c7012381f64458af9f291d913309448aac7dd23a28dc86c6970e4bf38effb6a5" + +do_compile_prepend_libc-uclibc() { + eval "${@base_contains('DISTRO_FEATURES', 'largefile', '', 'sed -i -e "/_FILE_OFFSET_BITS/d" ${S}/libkms/intel.c', d)}" + eval "${@base_contains('DISTRO_FEATURES', 'largefile', '', 'sed -i -e "/_FILE_OFFSET_BITS/d" ${S}/libkms/vmwgfx.c', d)}" + eval "${@base_contains('DISTRO_FEATURES', 'largefile', '', 'sed -i -e "/_FILE_OFFSET_BITS/d" ${S}/libkms/nouveau.c', d)}" +} diff --git a/meta-oe/recipes-graphics/mesa/README b/meta-oe/recipes-graphics/mesa/README new file mode 100644 index 0000000000..3c6de3ee42 --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/README @@ -0,0 +1,12 @@ +mesa-common.inc +* Settings shared by ALL recipes + +mesa-${PV}.inc +* Settings for particular version, mostly checksums and additional patches +* Patches are stored mesa-${PV} dir and -dri and xlib has adjusted FILESPATHPKG + +mesa-dri.inc +* Setting shared by ALL dri recipes - defines what is mesa-dri + +mesa-xlib.inc +* Setting shared by ALL xlib recipes - defines what is mesa-xlib diff --git a/meta-oe/recipes-graphics/mesa/mesa-7.10.2.inc b/meta-oe/recipes-graphics/mesa/mesa-7.10.2.inc new file mode 100644 index 0000000000..f49f495988 --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/mesa-7.10.2.inc @@ -0,0 +1,19 @@ +SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2;name=archive \ + file://glamo.patch \ + file://uclibc.patch \ + " + +DEPENDS += "talloc" + +SRC_URI[archive.md5sum] = "f5de82852f1243f42cc004039e10b771" +SRC_URI[archive.sha256sum] = "8ced2678ce11cf30804694a92ea3ca6b82f158ae8995bdc626c7e85aac71c7c1" + +EXTRA_OECONF += " --disable-gallium" + +#needs more testing and updated glamo.patch before making default +DEFAULT_PREFERENCE = "-2" + +do_configure_prepend() { + #check for python not python2, because python-native does not stage python2 binary/link + sed -i 's/AC_CHECK_PROGS(\[PYTHON2\], \[python2 python\])/AC_CHECK_PROGS(\[PYTHON2\], \[python python\])/g' ${S}/configure.ac +} diff --git a/meta-oe/recipes-graphics/mesa/mesa-7.10.2/glamo.patch b/meta-oe/recipes-graphics/mesa/mesa-7.10.2/glamo.patch new file mode 100644 index 0000000000..5aa45d57ef --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/mesa-7.10.2/glamo.patch @@ -0,0 +1,2425 @@ +git diff upstream/7.10 and gitorious/7.10 + +http://gitorious.org/mesa/mesa/commits/7.10 + +diff --git a/configs/autoconf.in b/configs/autoconf.in +index e2d70c6..5874955 100644 +--- a/configs/autoconf.in ++++ b/configs/autoconf.in +@@ -120,7 +120,7 @@ OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \ + $(EXTRA_LIB_PATH) @OSMESA_LIB_DEPS@ + EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @EGL_LIB_DEPS@ + GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLU_MESA_DEPS@ \ +- $(EXTRA_LIB_PATH) @GLU_LIB_DEPS@ ++ $(EXTRA_LIB_PATH) @GLU_LIB_DEPS@ -lstdc++ + GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLUT_MESA_DEPS@ \ + $(EXTRA_LIB_PATH) @GLUT_LIB_DEPS@ + GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \ +diff --git a/src/mesa/drivers/dri/glamo/Makefile b/src/mesa/drivers/dri/glamo/Makefile +new file mode 100644 +index 0000000..e77193d +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/Makefile +@@ -0,0 +1,22 @@ ++# src/mesa/drivers/dri/glamo/Makefile ++ ++TOP = ../../../../.. ++include $(TOP)/configs/current ++ ++LIBNAME = glamo_dri.so ++ ++DRIVER_SOURCES = \ ++ glamo_screen.c glamo_context.c glamo_state.c glamo_fbo.c glamo_tris.c \ ++ glamo_cmdq.c glamo_render.c ++ ++C_SOURCES = \ ++ $(COMMON_SOURCES) \ ++ $(DRIVER_SOURCES) ++ ++ASM_SOURCES = ++ ++DRI_LIB_DEPS += -ldrm_glamo ++ ++include ../Makefile.template ++ ++symlinks: +diff --git a/src/mesa/drivers/dri/glamo/glamo_cmdq.c b/src/mesa/drivers/dri/glamo/glamo_cmdq.c +new file mode 100644 +index 0000000..1334f8e +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_cmdq.c +@@ -0,0 +1,110 @@ ++/* ++ * Command queue submission via DRM ++ * ++ * Copyright 2009 Thomas White <taw@bitwiz.org.uk> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++ ++#include <stdint.h> ++#include <stdlib.h> ++#include <drm.h> ++#include <glamo_drm.h> ++#include <glamo_bo.h> ++ ++#include "glamo_context.h" ++#include "glamo_cmdq.h" ++ ++ ++/* Submit the prepared command sequence to the kernel */ ++void glamoDRMDispatch(glamoContext *gCtx) ++{ ++ drm_glamo_cmd_burst_t burst; ++ int r; ++ ++ burst.base = gCtx->cmd_burst_base; ++ burst.data = gCtx->cmdq_drm; ++ burst.bufsz = gCtx->cmdq_drm_used * 2; /* -> bytes */ ++ burst.nobjs = gCtx->cmdq_obj_used; ++ burst.objs = gCtx->cmdq_objs; ++ burst.obj_pos = gCtx->cmdq_obj_pos; ++ ++ r = drmCommandWrite(gCtx->drm_fd, DRM_GLAMO_CMDBURST, ++ &burst, sizeof(burst)); ++ if ( r != 0 ) { ++ fprintf(stderr, "DRM_GLAMO_CMDBURST failed\n"); ++ } ++ ++ /* Reset counts to zero for the next sequence */ ++ gCtx->cmdq_obj_used = 0; ++ gCtx->cmdq_drm_used = 0; ++} ++ ++ ++void glamoDRMAddData(glamoContext *gCtx, uint32_t val, int len) ++{ ++ if ( gCtx->cmdq_drm_used+4 > gCtx->cmdq_drm_size ) { ++ fprintf(stderr, "Burst command too large\n"); ++ return; ++ } ++ ++ /* Record command */ ++ if ( len == 2 ) { ++ gCtx->cmdq_drm[gCtx->cmdq_drm_used++] = val & 0xffff; ++ } else if ( len == 4 ) { ++ gCtx->cmdq_drm[gCtx->cmdq_drm_used++] = val & 0x0000ffff; ++ gCtx->cmdq_drm[gCtx->cmdq_drm_used++] = val & 0xffff0000; ++ } else { ++ fprintf(stderr, "Wrong command length!\n"); ++ } ++} ++ ++ ++void glamoDRMAddBO(glamoContext *gCtx, struct glamo_bo *bo) ++{ ++ if ( gCtx->cmdq_drm_used+4 > gCtx->cmdq_drm_size ) { ++ fprintf(stderr, "Burst command too large\n"); ++ return; ++ } ++ ++ /* Record object position */ ++ gCtx->cmdq_objs[gCtx->cmdq_obj_used] = bo->handle; ++ /* -> bytes */ ++ gCtx->cmdq_obj_pos[gCtx->cmdq_obj_used] = gCtx->cmdq_drm_used * 2; ++ gCtx->cmdq_obj_used++; ++ ++ /* Record command */ ++ gCtx->cmdq_drm[gCtx->cmdq_drm_used++] = 0x0000; ++ gCtx->cmdq_drm[gCtx->cmdq_drm_used++] = 0x0000; ++} ++ ++ ++void glamoDRMStartBurst(glamoContext *gCtx, uint16_t base) ++{ ++ gCtx->cmd_burst_base = base; ++} ++ ++ ++void glamoInitCmdqCache(glamoContext *gCtx) ++{ ++ gCtx->cmdq_objs = malloc(1024); ++ gCtx->cmdq_obj_pos = malloc(1024); ++ gCtx->cmdq_obj_used = 0; ++ gCtx->cmdq_drm_used = 0; ++ gCtx->cmdq_drm_size = 4 * 1024; ++ gCtx->cmdq_drm = malloc(gCtx->cmdq_drm_size); ++} +diff --git a/src/mesa/drivers/dri/glamo/glamo_cmdq.h b/src/mesa/drivers/dri/glamo/glamo_cmdq.h +new file mode 100644 +index 0000000..7420d7b +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_cmdq.h +@@ -0,0 +1,33 @@ ++/* ++ * Command queue submission via DRM ++ * ++ * Copyright 2009 Thomas White <taw@bitwiz.org.uk> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++ ++#include <stdint.h> ++#include <glamo_bo.h> ++ ++#include "glamo_context.h" ++ ++ ++extern void glamoDRMDispatch(glamoContext *gCtx); ++extern void glamoDRMAddBO(glamoContext *gCtx, struct glamo_bo *bo); ++extern void glamoDRMAddData(glamoContext *gCtx, uint32_t val, int len); ++extern void glamoDRMStartBurst(glamoContext *gCtx, uint16_t base); ++extern void glamoInitCmdqCache(glamoContext *gCtx); +diff --git a/src/mesa/drivers/dri/glamo/glamo_context.c b/src/mesa/drivers/dri/glamo/glamo_context.c +new file mode 100644 +index 0000000..39eb4e7 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_context.c +@@ -0,0 +1,360 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * Roughly based on sis_context.c (c) 2003 Eric Anholt ++ * and radeon_common_context.c ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++ ++#include "dri_util.h" ++#include "drirenderbuffer.h" ++#include "utils.h" ++ ++#include "swrast/swrast.h" ++#include "swrast_setup/swrast_setup.h" ++#include "drivers/common/driverfuncs.h" ++#include "vbo/vbo.h" ++#include "tnl/tnl.h" ++#include "tnl/t_pipeline.h" ++#include "main/state.h" ++ ++#include "glamo_context.h" ++#include "glamo_screen.h" ++#include "glamo_state.h" ++#include "glamo_fbo.h" ++#include "glamo_tris.h" ++#include "glamo_render.h" ++#include "glamo_cmdq.h" ++ ++#include <glamo_bo.h> ++#include <glamo_bo_gem.h> ++#include <glamo_drm.h> ++ ++ ++#define DRIVER_DATE "20090913" ++ ++ ++static inline struct glamo_renderbuffer *glamo_get_renderbuffer( ++ struct gl_framebuffer *fb, ++ int att_index) ++{ ++ if ( att_index >= 0 ) { ++ struct glamo_renderbuffer *gr; ++ gr = glamo_renderbuffer(fb->Attachment[att_index].Renderbuffer); ++ return gr; ++ } else { ++ return NULL; ++ } ++} ++ ++ ++static const GLubyte *glamoGetString(struct gl_context *ctx, GLenum name) ++{ ++ static char buffer[128]; ++ ++ switch (name) { ++ case GL_VENDOR: ++ return (GLubyte *)"Thomas White"; ++ case GL_RENDERER: { ++ driGetRendererString(buffer, "Glamo", DRIVER_DATE, 0); ++ return (GLubyte *) buffer; ++ } ++ default: ++ return 0; ++ } ++} ++ ++ ++/* Called when Mesa needs to know the size of the framebuffer */ ++static void glamoBufferSize(struct gl_framebuffer *buffer, ++ GLuint *width, GLuint *height) ++{ ++ GET_CURRENT_CONTEXT(ctx); ++ glamoContextPtr glamo = GLAMO_CONTEXT(ctx); ++ ++ *width = glamo->driDrawable->w; ++ *height = glamo->driDrawable->h; ++} ++ ++ ++GLboolean glamoCreateContext(const struct gl_config *glVisual, ++ __DRIcontext *driContextPriv, ++ void *sharedContextPrivate) ++{ ++ struct gl_context *ctx, *shareCtx; ++ __DRIscreen *sPriv = driContextPriv->driScreenPriv; ++ glamoContextPtr context; ++ glamoScreenPtr glamoScreen; ++ struct dd_function_table functions; ++ ++ context = (glamoContextPtr)CALLOC(sizeof(*context)); ++ if ( context == NULL ) return GL_FALSE; ++ ++ _mesa_init_driver_functions(&functions); ++ ++ /* Allocate the Mesa context */ ++ if ( sharedContextPrivate ) ++ shareCtx = ((glamoContextPtr)sharedContextPrivate)->glCtx; ++ else ++ shareCtx = NULL; ++ context->glCtx = _mesa_create_context(glVisual, shareCtx, ++ &functions, (void *)context); ++ if ( context->glCtx == NULL ) { ++ FREE(context); ++ return GL_FALSE; ++ } ++ driContextPriv->driverPrivate = context; ++ ctx = context->glCtx; ++ ++ glamoScreen = context->glamoScreen = (glamoScreenPtr)sPriv->private; ++ ++ ctx->Driver.GetString = glamoGetString; ++ ctx->Driver.GetBufferSize = glamoBufferSize; ++ ++ context->driContext = driContextPriv; ++ context->driScreen = sPriv; ++ context->driDrawable = NULL; ++ context->drm_fd = sPriv->fd; ++ ++ /* Initialize the software rasterizer and helper modules. */ ++ _swrast_CreateContext(ctx); ++ _vbo_CreateContext(ctx); ++ _tnl_CreateContext(ctx); ++ _swsetup_CreateContext(ctx); ++ ++ /* Install our pipeline (see glamo_render.c) */ ++ _tnl_install_pipeline(ctx, glamo_pipeline); ++ ++ _swrast_allow_pixel_fog(ctx, GL_TRUE); ++ _swrast_allow_vertex_fog(ctx, GL_FALSE); ++ _tnl_allow_pixel_fog(ctx, GL_TRUE); ++ _tnl_allow_vertex_fog(ctx, GL_FALSE); ++ ++ glamoInitCmdqCache(context); ++ glamoInitStateFuncs(ctx); ++ glamoInitTriFuncs(ctx); ++ ++ return GL_TRUE; ++} ++ ++ ++void glamoDestroyContext(__DRIcontext *driContextPriv) ++{ ++ glamoContextPtr context; ++ ++ context = (glamoContextPtr)driContextPriv->driverPrivate; ++ assert(context != NULL); ++ ++ if ( context != NULL ) { ++ ++ _swsetup_DestroyContext(context->glCtx); ++ _tnl_DestroyContext(context->glCtx); ++ _vbo_DestroyContext(context->glCtx); ++ _swrast_DestroyContext(context->glCtx); ++ ++ _mesa_destroy_context(context->glCtx); ++ ++ } ++ ++ FREE(context); ++} ++ ++ ++void glamo_update_renderbuffers(__DRIcontext *context, ++ __DRIdrawable *drawable) ++{ ++ unsigned int attachments[10]; ++ __DRIbuffer *buffers; ++ __DRIscreen *screen; ++ int i, count; ++ struct glamo_framebuffer *draw; ++ glamoContextPtr glamo; ++ struct glamo_bo *bo; ++ ++ draw = drawable->driverPrivate; ++ screen = context->driScreenPriv; ++ glamo = (glamoContextPtr)context->driverPrivate; ++ i = 0; ++ if ( draw->color_rb[0] ) { ++ attachments[i++] = __DRI_BUFFER_FRONT_LEFT; ++ } ++ if ( draw->color_rb[1] ) { ++ attachments[i++] = __DRI_BUFFER_BACK_LEFT; ++ } ++ ++ buffers = screen->dri2.loader->getBuffers(drawable, ++ &drawable->w, ++ &drawable->h, ++ attachments, i, ++ &count, ++ drawable->loaderPrivate); ++ if ( buffers == NULL ) return; ++ ++ /* Set one cliprect to cover the whole drawable */ ++ drawable->x = 0; ++ drawable->y = 0; ++ drawable->backX = 0; ++ drawable->backY = 0; ++ drawable->numClipRects = 1; ++ drawable->pClipRects[0].x1 = 0; ++ drawable->pClipRects[0].y1 = 0; ++ drawable->pClipRects[0].x2 = drawable->w; ++ drawable->pClipRects[0].y2 = drawable->h; ++ drawable->numBackClipRects = 1; ++ drawable->pBackClipRects[0].x1 = 0; ++ drawable->pBackClipRects[0].y1 = 0; ++ drawable->pBackClipRects[0].x2 = drawable->w; ++ drawable->pBackClipRects[0].y2 = drawable->h; ++ ++ /* For each attachment */ ++ for ( i=0; i<count; i++ ) { ++ ++ struct glamo_renderbuffer *grb; ++ ++ switch ( buffers[i].attachment ) { ++ case __DRI_BUFFER_FRONT_LEFT: ++ grb = draw->color_rb[0]; ++ break; ++ case __DRI_BUFFER_BACK_LEFT: ++ grb = draw->color_rb[1]; ++ break; ++ case __DRI_BUFFER_DEPTH: ++ grb = glamo_get_renderbuffer(&draw->base, BUFFER_DEPTH); ++ break; ++ case __DRI_BUFFER_STENCIL: ++ grb = glamo_get_renderbuffer(&draw->base, ++ BUFFER_STENCIL); ++ break; ++ case __DRI_BUFFER_FAKE_FRONT_LEFT: ++ grb = draw->color_rb[0]; ++ break; ++ case __DRI_BUFFER_ACCUM: ++ default: ++ fprintf(stderr, ++ "Unhandled buffer attach event," ++ " attachment type %d\n", buffers[i].attachment); ++ return; ++ } ++ ++ if ( grb == NULL ) { ++ /* Don't know how to handle this type of buffer */ ++ continue; ++ } ++ ++ if ( grb->bo ) { ++ uint32_t name = glamo_gem_get_name(grb->bo); ++ if ( name == buffers[i].name ) { ++ /* Buffer already attached. No action needed */ ++ continue; ++ } ++ } ++ ++ grb->cpp = buffers[i].cpp; ++ grb->pitch = buffers[i].pitch; ++ grb->width = drawable->w; ++ grb->height = drawable->h; ++ ++ bo = glamo_bo_open(glamo->glamoScreen->bom, buffers[i].name, ++ 0, 0, GLAMO_GEM_DOMAIN_VRAM, ++ buffers[i].flags); ++ if ( bo == NULL ) { ++ fprintf(stderr, "Failed to attach buffer %d\n", ++ buffers[i].name); ++ } ++ ++ glamo_renderbuffer_set_bo(grb, bo); ++ glamo_bo_unref(bo); ++ ++ } ++ ++ driUpdateFramebufferSize(glamo->glCtx, drawable); ++} ++ ++ ++GLboolean glamoMakeCurrent(__DRIcontext *driContextPriv, ++ __DRIdrawable *driDrawPriv, ++ __DRIdrawable *driReadPriv) ++{ ++ struct glamo_framebuffer *draw_fb; ++ struct gl_framebuffer *read_fb; ++ glamoContextPtr glamo; ++ ++ if ( driContextPriv == NULL ) { ++ _mesa_make_current(NULL, NULL, NULL); ++ return GL_TRUE; ++ } ++ ++ /* The Glamo context we're switching to */ ++ glamo = (glamoContextPtr)driContextPriv->driverPrivate; ++ ++ glamo->driDrawable = driDrawPriv; ++ ++ /* These two will probably be the same */ ++ draw_fb = (struct glamo_framebuffer *)driDrawPriv->driverPrivate; ++ read_fb = (struct gl_framebuffer *)driReadPriv->driverPrivate; ++ ++ glamo_update_renderbuffers(driContextPriv, driDrawPriv); ++ if (driDrawPriv != driReadPriv) ++ glamo_update_renderbuffers(driContextPriv, driReadPriv); ++ ++ _mesa_make_current(glamo->glCtx, &draw_fb->base, read_fb); ++ _mesa_update_state(glamo->glCtx); ++ ++ return GL_TRUE; ++} ++ ++ ++GLboolean glamoUnbindContext(__DRIcontext *driContextPriv) ++{ ++ return GL_TRUE; ++} ++ ++ ++/* Convert IEEE754 32-bit float to Glamo's signed 24-bit float */ ++uint32_t float7s16(GLfloat in) ++{ ++ uint32_t a, b; ++ uint32_t sign, expo, mant; /* Sign, exponent, significand */ ++ ++ a = *(uint32_t *)∈ ++ ++ /* This is bad */ ++ if ( a & 0x40000000 ) { ++ printf(stderr, "Warning: Exponent won't fit into 7 bits\n"); ++ } ++ ++ /* This hopefully isn't a big problem */ ++ if ( a & 0x0000007f ) { ++ printf(stderr, "Warning: Precision lost in FP conversion\n"); ++ } ++ ++ /* Separate out the right bits */ ++ mant = a & 0x007fff80; /* Bits 7-22 (bits 0-6 are lost) */ ++ expo = a & 0x3f800000; /* Bits 23-29 (bit 30 is lost) */ ++ sign = a & 0x80000000; /* Bit 31 */ ++ ++ /* Shift and recombine */ ++ b = sign >> 8; /* Fills bit 23 */ ++ b |= expo >> 7; /* Fills bits 16-22 */ ++ b |= mant >> 7; /* Fills bits 0-15 */ ++ ++ return b; ++} +diff --git a/src/mesa/drivers/dri/glamo/glamo_context.h b/src/mesa/drivers/dri/glamo/glamo_context.h +new file mode 100644 +index 0000000..8de3946 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_context.h +@@ -0,0 +1,106 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * Roughly based on sis_context.h (c) 2003 Eric Anholt ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef __GLAMO_CONTEXT_H ++#define __GLAMO_CONTEXT_H ++ ++ ++#include "dri_util.h" ++#include "utils.h" ++#include "tnl/t_vertex.h" ++ ++#include "glamo_screen.h" ++ ++ ++typedef struct glamo_context glamoContext; ++typedef struct glamo_context *glamoContextPtr; ++ ++struct glamo_context { ++ ++ struct gl_context *glCtx; /* Must be first in this structure */ ++ ++ int drm_fd; /* DRM fd */ ++ ++ __DRIcontext *driContext; /* DRI context */ ++ __DRIscreen *driScreen; /* DRI screen */ ++ __DRIdrawable *driDrawable; /* DRI drawable bound to this ctx */ ++ ++ glamoScreenPtr glamoScreen; /* Screen private DRI data */ ++ ++ driOptionCache optionCache; ++ ++ uint16_t *cmdq_drm; /* Command queue cache */ ++ uint16_t cmd_burst_base; ++ int cmdq_drm_used; ++ int cmdq_drm_size; ++ int cmdq_obj_used; ++ uint32_t *cmdq_objs; ++ unsigned int *cmdq_obj_pos; ++ ++ /* Information about the current primitive */ ++ struct { ++ GLuint id; ++ uint32_t primitive; /* Current hardware primitive type */ ++ struct glamo_bo *vb_bo; ++ uint8_t *vb; ++ unsigned int start_offset; /* Byte offset of start */ ++ unsigned int current_offset; /* Byte offset of next vertex */ ++ unsigned int count; /* Number of vertices */ ++ } prim; ++ ++ /* Current vertex format and attributes */ ++ int vertex_size; ++ struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX]; ++ ++ /* State */ ++ GLuint new_state; /* State which must be updated */ ++ uint16_t col_clear; ++ ++}; ++ ++#define GLAMO_CONTEXT(ctx) ((glamoContextPtr)(ctx->DriverCtx)) ++ ++#define TAG(x) glamo##x ++#include "tnl_dd/t_dd_vertex.h" ++#undef TAG ++ ++extern GLboolean glamoCreateContext(const struct gl_config *glVis, ++ __DRIcontext *driContextPriv, ++ void *sharedContextPrivate); ++extern void glamoDestroyContext(__DRIcontext *dcp); ++extern GLboolean glamoMakeCurrent(__DRIcontext *driContextPriv, ++ __DRIdrawable *driDrawPriv, ++ __DRIdrawable *driReadPriv); ++extern GLboolean glamoUnbindContext(__DRIcontext *driContextPriv); ++extern void glamo_update_renderbuffers(__DRIcontext *context, ++ __DRIdrawable *drawable); ++ ++#define GLAMO_PACKCOLOR565(r, g, b) \ ++ ((((r) & 0xf8) << 8) \ ++ | (((g) & 0xfc) << 3) \ ++ | (((b) & 0xf8) >> 3)) ++ ++extern uint32_t float7s16(GLfloat in); ++ ++#endif /* __GLAMO_CONTEXT_H */ +diff --git a/src/mesa/drivers/dri/glamo/glamo_fbo.c b/src/mesa/drivers/dri/glamo/glamo_fbo.c +new file mode 100644 +index 0000000..e25ca31 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_fbo.c +@@ -0,0 +1,130 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * Roughly based on radeon_fbo.c (c) 2008 Red Hat Inc ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++ ++#include "main/imports.h" ++#include "main/macros.h" ++#include "main/mtypes.h" ++#include "main/formats.h" ++#include "main/fbobject.h" ++#include "main/framebuffer.h" ++#include "main/renderbuffer.h" ++#include "main/context.h" ++#include "dri_util.h" ++ ++/* This comes from libdrm_glamo */ ++#include <glamo_bo.h> ++ ++#include "glamo_fbo.h" ++ ++ ++static void glamo_delete_renderbuffer(struct gl_renderbuffer *rb) ++{ ++ struct glamo_renderbuffer *grb = glamo_renderbuffer(rb); ++ ++ ASSERT(grb); ++ ++ if ( grb && grb->bo ) { ++ glamo_bo_unref(grb->bo); ++ } ++ free(grb); ++} ++ ++ ++static void *glamo_get_pointer(struct gl_context *ctx, struct gl_renderbuffer *rb, ++ GLint x, GLint y) ++{ ++ return NULL; /* Can't be directly addressed */ ++} ++ ++ ++/* Called for each hardware renderbuffer when a _window_ is resized. ++ * Just update fields. ++ * Not used for user-created renderbuffers! ++ */ ++static GLboolean glamo_alloc_window_storage(struct gl_context *ctx, ++ struct gl_renderbuffer *rb, ++ GLenum internalFormat, ++ GLuint width, GLuint height) ++{ ++ ASSERT(rb->Name == 0); ++ rb->Width = width; ++ rb->Height = height; ++ rb->Format = internalFormat; ++ return GL_TRUE; ++} ++ ++ ++/* Create a buffer, such as a colour or depth buffer */ ++struct glamo_renderbuffer *glamo_create_renderbuffer(GLenum format, ++ __DRIdrawable *driDrawPriv) ++{ ++ struct glamo_renderbuffer *grb; ++ ++ grb = CALLOC_STRUCT(glamo_renderbuffer); ++ if ( !grb ) return NULL; ++ ++ _mesa_init_renderbuffer(&grb->base, 0); ++ grb->base.ClassID = GLAMO_RB_CLASS; ++ ++ switch (format) { ++ case GL_RGB5: ++ grb->base.Format = MESA_FORMAT_RGB565; ++ grb->base._BaseFormat = GL_RGB; ++ ++ grb->base.DataType = GL_UNSIGNED_BYTE; ++ break; ++ case GL_DEPTH_COMPONENT16: ++ grb->base.DataType = GL_UNSIGNED_SHORT; ++ grb->base._BaseFormat = GL_DEPTH_COMPONENT; ++ break; ++ default: ++ fprintf(stderr, "%s: Unknown format 0x%04x\n", __FUNCTION__, format); ++ _mesa_delete_renderbuffer(&grb->base); ++ return NULL; ++ } ++ ++ grb->dPriv = driDrawPriv; ++ grb->base.InternalFormat = format; ++ ++ grb->base.Delete = glamo_delete_renderbuffer; ++ grb->base.AllocStorage = glamo_alloc_window_storage; ++ grb->base.GetPointer = glamo_get_pointer; ++ ++ return grb; ++} ++ ++ ++void glamo_renderbuffer_set_bo(struct glamo_renderbuffer *grb, ++ struct glamo_bo *bo) ++{ ++ struct glamo_bo *old; ++ old = grb->bo; ++ grb->bo = bo; ++ glamo_bo_ref(bo); ++ if ( old ) glamo_bo_unref(old); ++} ++ ++ ++/* kate: space-indent on; indent-width 3; mixedindent off; indent-mode cstyle; */ +diff --git a/src/mesa/drivers/dri/glamo/glamo_fbo.h b/src/mesa/drivers/dri/glamo/glamo_fbo.h +new file mode 100644 +index 0000000..48210dd +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_fbo.h +@@ -0,0 +1,77 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef __GLAMO_FBO_H ++#define __GLAMO_FBO_H ++ ++ ++#include "main/mtypes.h" ++#include "dri_util.h" ++ ++ ++/* This is just a marker so we can tell a Glamo renderbuffer from a Mesa one */ ++#define GLAMO_RB_CLASS (0xdeadbeef) ++ ++ ++struct glamo_renderbuffer ++{ ++ struct gl_renderbuffer base; /* Must be first */ ++ struct glamo_bo *bo; ++ unsigned int cpp; ++ unsigned int pitch; ++ unsigned int width; ++ unsigned int height; ++ ++ __DRIdrawable *dPriv; ++}; ++ ++ ++struct glamo_framebuffer ++{ ++ struct gl_framebuffer base; ++ struct glamo_renderbuffer *color_rb[2]; ++}; ++ ++ ++/* This is just a small wrapper function to return NULL if the gl_renderbuffer ++ * is not a glamo_renderbuffer */ ++static inline struct glamo_renderbuffer ++ *glamo_renderbuffer(struct gl_renderbuffer *rb) ++{ ++ struct glamo_renderbuffer *grb = (struct glamo_renderbuffer *)rb; ++ if ( grb && grb->base.ClassID == GLAMO_RB_CLASS ) ++ return grb; ++ else ++ return NULL; ++} ++ ++ ++extern struct glamo_renderbuffer *glamo_create_renderbuffer(GLenum format, ++ __DRIdrawable *driDrawPriv); ++ ++extern void glamo_renderbuffer_set_bo(struct glamo_renderbuffer *grb, ++ struct glamo_bo *bo); ++ ++#endif /* __GLAMO_FBO_H */ ++ ++/* kate: space-indent on; indent-width 3; mixedindent off; indent-mode cstyle; */ +diff --git a/src/mesa/drivers/dri/glamo/glamo_regs.h b/src/mesa/drivers/dri/glamo/glamo_regs.h +new file mode 100644 +index 0000000..02b2294 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_regs.h +@@ -0,0 +1,174 @@ ++#ifndef _GLAMO_REGS_H ++#define _GLAMO_REGS_H ++ ++/* Smedia Glamo 336x/337x driver ++ * ++ * (C) 2007 by OpenMoko, Inc. ++ * Author: Harald Welte <laforge@openmoko.org> ++ * All rights reserved. ++ * ++ * Modified for Glamo Mesa driver by Thomas White <taw@bitwiz.org.uk> ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++enum glamo_regster_offsets { ++ GLAMO_REGOFS_GENERIC = 0x0000, ++ GLAMO_REGOFS_HOSTBUS = 0x0200, ++ GLAMO_REGOFS_MEMORY = 0x0300, ++ GLAMO_REGOFS_VIDCAP = 0x0400, ++ GLAMO_REGOFS_ISP = 0x0500, ++ GLAMO_REGOFS_JPEG = 0x0800, ++ GLAMO_REGOFS_MPEG = 0x0c00, ++ GLAMO_REGOFS_LCD = 0x1100, ++ GLAMO_REGOFS_MMC = 0x1400, ++ GLAMO_REGOFS_MPROC0 = 0x1500, ++ GLAMO_REGOFS_MPROC1 = 0x1580, ++ GLAMO_REGOFS_CMDQUEUE = 0x1600, ++ GLAMO_REGOFS_RISC = 0x1680, ++ GLAMO_REGOFS_2D = 0x1700, ++ GLAMO_REGOFS_3D = 0x1b00, ++}; ++ ++ ++#define REG_MPEG(x) (GLAMO_REGOFS_MPEG+(x)) ++ ++enum glamo_register_mpeg { ++ // ++ GLAMO_REG_MPEG_DC_ADDRL = REG_MPEG(0x3c), ++ GLAMO_REG_MPEG_DC_ADDRH = REG_MPEG(0x3e), ++ GLAMO_REG_MPEG_AC_ADDRL = REG_MPEG(0x40), ++ GLAMO_REG_MPEG_AC_ADDRH = REG_MPEG(0x42), ++ // ++ GLAMO_REG_MPEG_SAFE_1 = REG_MPEG(0x60), ++ GLAMO_REG_MPEG_SAFE_2 = REG_MPEG(0x62), ++ GLAMO_REG_MPEG_SAFE_3 = REG_MPEG(0x64), ++ // ++ GLAMO_REG_MPEG_DEC_OUT0_Y_ADDRL = REG_MPEG(0x6e), ++ GLAMO_REG_MPEG_DEC_OUT0_Y_ADDRH = REG_MPEG(0x70), ++ GLAMO_REG_MPEG_DEC_OUT0_U_ADDRL = REG_MPEG(0x72), ++ GLAMO_REG_MPEG_DEC_OUT0_U_ADDRH = REG_MPEG(0x74), ++ GLAMO_REG_MPEG_DEC_OUT0_V_ADDRL = REG_MPEG(0x76), ++ GLAMO_REG_MPEG_DEC_OUT0_V_ADDRH = REG_MPEG(0x78), ++ GLAMO_REG_MPEG_DEC_OUT1_Y_ADDRL = REG_MPEG(0x7a), ++ GLAMO_REG_MPEG_DEC_OUT1_Y_ADDRH = REG_MPEG(0x7c), ++ GLAMO_REG_MPEG_DEC_OUT1_U_ADDRL = REG_MPEG(0x7e), ++ GLAMO_REG_MPEG_DEC_OUT1_U_ADDRH = REG_MPEG(0x80), ++ GLAMO_REG_MPEG_DEC_OUT1_V_ADDRL = REG_MPEG(0x82), ++ GLAMO_REG_MPEG_DEC_OUT1_V_ADDRH = REG_MPEG(0x84), ++ GLAMO_REG_MPEG_DEC_OUT2_Y_ADDRL = REG_MPEG(0x86), ++ GLAMO_REG_MPEG_DEC_OUT2_Y_ADDRH = REG_MPEG(0x88), ++ GLAMO_REG_MPEG_DEC_OUT2_U_ADDRL = REG_MPEG(0x8a), ++ GLAMO_REG_MPEG_DEC_OUT2_U_ADDRH = REG_MPEG(0x8c), ++ GLAMO_REG_MPEG_DEC_OUT2_V_ADDRL = REG_MPEG(0x8e), ++ GLAMO_REG_MPEG_DEC_OUT2_V_ADDRH = REG_MPEG(0x90), ++ GLAMO_REG_MPEG_DEC_WIDTH = REG_MPEG(0x92), ++ GLAMO_REG_MPEG_DEC_HEIGHT = REG_MPEG(0x94), ++ GLAMO_REG_MPEG_SPECIAL = REG_MPEG(0x96), ++ GLAMO_REG_MPEG_DEC_IN_ADDRL = REG_MPEG(0x98), ++ GLAMO_REG_MPEG_DEC_IN_ADDRH = REG_MPEG(0x9a), ++ // ++ GLAMO_REG_MPEG_DEBLK_THRESHOLD = REG_MPEG(0xc0), ++ // ++ GLAMO_REG_MPEG_DEC_STATUS = REG_MPEG(0xc8), ++ GLAMO_REG_MPEG_DEC_RB0 = REG_MPEG(0xca), ++ GLAMO_REG_MPEG_DEC_RB1 = REG_MPEG(0xcc), ++}; ++ ++ ++#define REG_2D(x) (GLAMO_REGOFS_2D+(x)) ++ ++enum glamo_register_2d { ++ GLAMO_REG_2D_SRC_ADDRL = REG_2D(0x00), ++ GLAMO_REG_2D_SRC_ADDRH = REG_2D(0x02), ++ GLAMO_REG_2D_SRC_PITCH = REG_2D(0x04), ++ GLAMO_REG_2D_SRC_X = REG_2D(0x06), ++ GLAMO_REG_2D_SRC_Y = REG_2D(0x08), ++ GLAMO_REG_2D_DST_X = REG_2D(0x0a), ++ GLAMO_REG_2D_DST_Y = REG_2D(0x0c), ++ GLAMO_REG_2D_DST_ADDRL = REG_2D(0x0e), ++ GLAMO_REG_2D_DST_ADDRH = REG_2D(0x10), ++ GLAMO_REG_2D_DST_PITCH = REG_2D(0x12), ++ GLAMO_REG_2D_DST_HEIGHT = REG_2D(0x14), ++ GLAMO_REG_2D_RECT_WIDTH = REG_2D(0x16), ++ GLAMO_REG_2D_RECT_HEIGHT = REG_2D(0x18), ++ GLAMO_REG_2D_PAT_ADDRL = REG_2D(0x1a), ++ GLAMO_REG_2D_PAT_ADDRH = REG_2D(0x1c), ++ GLAMO_REG_2D_PAT_FG = REG_2D(0x1e), ++ GLAMO_REG_2D_PAT_BG = REG_2D(0x20), ++ GLAMO_REG_2D_SRC_FG = REG_2D(0x22), ++ GLAMO_REG_2D_SRC_BG = REG_2D(0x24), ++ GLAMO_REG_2D_MASK1 = REG_2D(0x26), ++ GLAMO_REG_2D_MASK2 = REG_2D(0x28), ++ GLAMO_REG_2D_MASK3 = REG_2D(0x2a), ++ GLAMO_REG_2D_MASK4 = REG_2D(0x2c), ++ GLAMO_REG_2D_ROT_X = REG_2D(0x2e), ++ GLAMO_REG_2D_ROT_Y = REG_2D(0x30), ++ GLAMO_REG_2D_LEFT_CLIP = REG_2D(0x32), ++ GLAMO_REG_2D_TOP_CLIP = REG_2D(0x34), ++ GLAMO_REG_2D_RIGHT_CLIP = REG_2D(0x36), ++ GLAMO_REG_2D_BOTTOM_CLIP = REG_2D(0x38), ++ GLAMO_REG_2D_COMMAND1 = REG_2D(0x3A), ++ GLAMO_REG_2D_COMMAND2 = REG_2D(0x3C), ++ GLAMO_REG_2D_COMMAND3 = REG_2D(0x3E), ++ GLAMO_REG_2D_SAFE = REG_2D(0x40), ++ GLAMO_REG_2D_STATUS = REG_2D(0x42), ++ GLAMO_REG_2D_ID1 = REG_2D(0x44), ++ GLAMO_REG_2D_ID2 = REG_2D(0x46), ++ GLAMO_REG_2D_ID3 = REG_2D(0x48), ++}; ++ ++ ++/* No offset this time */ ++#define REG_3D(x) (x) ++ ++enum glamo_register_3d ++{ ++ /* Fire the engine */ ++ G3D_FIRE = REG_3D(0x2058), ++ ++ /* Streams of vertex/colour/normal/texcoord data */ ++ G3D_ACTIVE_STREAMS = REG_3D(0x1f00), ++ G3D_LAST_STREAM__VCOLFMT = REG_3D(0x2030), ++ G3D_STREAM_MODE_0 = REG_3D(0x1f10), ++ G3D_STREAM_BASE_0 = REG_3D(0x1f14), ++ G3D_STREAM_MODE_1 = REG_3D(0x1f18), ++ G3D_STREAM_BASE_1 = REG_3D(0x1f1c), ++ G3D_STREAM_MODE_2 = REG_3D(0x1f20), ++ G3D_STREAM_BASE_2 = REG_3D(0x1f24), ++ G3D_STREAM_MODE_3 = REG_3D(0x1f28), ++ G3D_STREAM_BASE_3 = REG_3D(0x1f2c), ++ G3D_STREAM_MODE_4 = REG_3D(0x1f30), ++ G3D_STREAM_BASE_4 = REG_3D(0x1f34), ++ G3D_STREAM_MODE_5 = REG_3D(0x1f38), ++ G3D_STREAM_BASE_5 = REG_3D(0x1f3c), ++ G3D_STREAM_MODE_6 = REG_3D(0x1f40), ++ G3D_STREAM_BASE_6 = REG_3D(0x1f44), ++ G3D_STREAM_MODE_7 = REG_3D(0x1f48), ++ G3D_STREAM_BASE_7 = REG_3D(0x1f4c), ++ ++ /* Modelview*projection matrix */ ++ G3D_MATRIX_MVP = REG_3D(0x26a0), /* .. 0x27df */ ++ ++ /* Modelview matrix */ ++ G3D_MATRIX_MV = REG_3D(0x26e0), /* .. 0x270f */ ++ ++ /* Inverse MVP, 3x3 only */ ++ G3D_MATRIX_IMVP = REG_3D(0x2710), /* .. 0x2733 */ ++ ++}; ++ ++#endif /* _GLAMO_REGS_H */ +diff --git a/src/mesa/drivers/dri/glamo/glamo_render.c b/src/mesa/drivers/dri/glamo/glamo_render.c +new file mode 100644 +index 0000000..d8b21d5 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_render.c +@@ -0,0 +1,230 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * ++ * Based on intel_render.c, to which the following notice applies: ++ * ++ * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ++ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++ ++/* ++ * Render unclipped vertex buffers by emitting vertices directly to ++ * dma buffers. Use strip/fan hardware acceleration where possible. ++ * ++ */ ++#include "main/glheader.h" ++#include "main/context.h" ++#include "main/macros.h" ++#include "main/imports.h" ++#include "main/mtypes.h" ++#include "main/enums.h" ++ ++#include "tnl/t_context.h" ++#include "tnl/t_vertex.h" ++#include "tnl/t_pipeline.h" ++#include "math/m_xform.h" ++ ++#include "glamo_context.h" ++#include "glamo_tris.h" ++#include "glamo_regs.h" ++ ++/* ++ * Render unclipped vertex buffers by emitting vertices directly to ++ * VRAM buffers. Use strip/fan hardware primitives where possible. ++ * Try to simulate missing primitives with indexed vertices. ++ */ ++#define HAVE_POINTS 1 ++#define HAVE_LINES 1 ++#define HAVE_LINE_STRIPS 0 ++#define HAVE_TRIANGLES 1 ++#define HAVE_TRI_STRIPS 0 ++#define HAVE_TRI_STRIP_1 0 ++#define HAVE_TRI_FANS 0 ++#define HAVE_POLYGONS 0 ++#define HAVE_QUADS 0 ++#define HAVE_QUAD_STRIPS 0 ++#define HAVE_ELTS 0 ++ ++ ++static void glamoFlushPrim(struct glamo_context *gCtx) ++{ ++ printf("glamoFlushPrim: %i vertices, %i %i\n", gCtx->prim.count, ++ gCtx->prim.start_offset, gCtx->prim.current_offset); ++ ++ if ( gCtx->prim.vb_bo == NULL ) return; ++ ++ /* Upload to hardware */ ++ glamo_bo_subdata(gCtx->prim.vb_bo, 0, gCtx->prim.current_offset, ++ gCtx->prim.vb); ++ ++ /* Dispatch to the hardware */ ++ glamoDRMStartBurst(gCtx, G3D_STREAM_MODE_0); ++ glamoDRMAddData(gCtx, 0x000f0300, 4); ++ glamoDRMAddBO(gCtx, gCtx->prim.vb_bo); ++ glamoDRMDispatch(gCtx); ++ ++ /* Please use a new BO for the next buffer */ ++ gCtx->prim.vb_bo = NULL; ++ ++ /* Continue from new start */ ++ gCtx->prim.start_offset = gCtx->prim.current_offset; ++} ++ ++ ++static inline GLuint glamoGetVBMax(struct glamo_context *gCtx) ++{ ++ return GLAMO_VB_SIZE / gCtx->vertex_size; ++} ++ ++ ++static inline GLuint glamoGetCurrentMax(struct glamo_context *gCtx) ++{ ++ /* How many more vertices can be accommodated? ++ * Each vertex takes up 4x 32-bit fixed point values */ ++ return (GLAMO_VB_SIZE - gCtx->prim.current_offset) / gCtx->vertex_size; ++} ++ ++ ++#define LOCAL_VARS \ ++ struct glamo_context *gCtx = GLAMO_CONTEXT(ctx); ++ ++#define INIT(prim) ++ ++#define FLUSH() glamoFlushPrim(gCtx) ++ ++#define GET_SUBSEQUENT_VB_MAX_VERTS() glamoGetVBMax(gCtx) ++#define GET_CURRENT_VB_MAX_VERTS() glamoGetCurrentMax(gCtx) ++ ++#define ALLOC_VERTS(nr) glamoGetPrimSpace(gCtx, nr) ++ ++#define EMIT_VERTS(ctx, j, nr, buf) \ ++ _tnl_emit_vertices_to_buffer(ctx, j, (j)+(nr), buf) ++ ++#define TAG(x) glamo_##x ++#include "tnl_dd/t_dd_dmatmp.h" ++ ++ ++/**********************************************************************/ ++/* Render pipeline stage */ ++/**********************************************************************/ ++ ++static void glamoFireEngine(struct glamo_context *gCtx) ++{ ++ glamoDRMStartBurst(gCtx, G3D_FIRE); ++ glamoDRMAddData(gCtx, 0, 2); /* Fire! */ ++ glamoDRMDispatch(gCtx); ++} ++ ++ ++static GLboolean glamoRunRender(struct gl_context *ctx, ++ struct tnl_pipeline_stage *stage) ++{ ++ TNLcontext *tnl = TNL_CONTEXT(ctx); ++ struct glamo_context *gCtx = GLAMO_CONTEXT(ctx); ++ struct vertex_buffer *VB = &tnl->vb; ++ GLuint i; ++ ++ printf("glamoRunRender\n"); ++ ++ /* Don't handle clipping */ ++ if ( !glamo_validate_render(ctx, VB) ) { ++ return GL_TRUE; /* Failed */ ++ } ++ ++ /* Validate GPU state */ ++ if ( gCtx->new_state ) { ++ if ( !glamoValidateState(ctx, gCtx->new_state) ) { ++ printf("Couldn't validate state...\n"); ++ } ++ } /* else nothing to update */ ++ ++ tnl->clipspace.new_inputs |= VERT_BIT_POS; ++ ++ tnl->Driver.Render.Start(ctx); ++ ++ for ( i=0; i<VB->PrimitiveCount; i++ ) { ++ ++ GLuint prim = _tnl_translate_prim(&VB->Primitive[i]); ++ GLuint start = VB->Primitive[i].start; ++ GLuint length = VB->Primitive[i].count; ++ ++ if (!length) continue; ++ ++ glamo_render_tab_verts[prim & PRIM_MODE_MASK](ctx, start, ++ start + length, prim); ++ ++ } ++ ++ tnl->Driver.Render.Finish(ctx); ++ ++ glamoFireEngine(gCtx); ++ ++ return GL_FALSE; /* Ok */ ++} ++ ++ ++static const struct tnl_pipeline_stage _glamo_render_stage = { ++ "glamo render", ++ NULL, ++ NULL, ++ NULL, ++ NULL, ++ glamoRunRender ++}; ++ ++ ++const struct tnl_pipeline_stage *glamo_pipeline[] = { ++ &_tnl_vertex_transform_stage, ++ &_tnl_normal_transform_stage, ++ &_tnl_lighting_stage, ++ &_tnl_fog_coordinate_stage, ++ &_tnl_texgen_stage, ++ &_tnl_texture_transform_stage, ++ &_tnl_point_attenuation_stage, ++ &_tnl_vertex_program_stage, ++ &_glamo_render_stage, /* ADD: unclipped rastersetup-to-dma */ ++ &_tnl_render_stage, ++ 0, ++}; +diff --git a/src/mesa/drivers/dri/glamo/glamo_render.h b/src/mesa/drivers/dri/glamo/glamo_render.h +new file mode 100644 +index 0000000..99c36a8 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_render.h +@@ -0,0 +1,31 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef __GLAMO_RENDER_H ++#define __GLAMO_RENDER_H ++ ++#include "main/mtypes.h" ++ ++extern const struct tnl_pipeline_stage *glamo_pipeline[]; ++ ++#endif /* __GLAMO_RENDER_H */ +diff --git a/src/mesa/drivers/dri/glamo/glamo_screen.c b/src/mesa/drivers/dri/glamo/glamo_screen.c +new file mode 100644 +index 0000000..cc8a730 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_screen.c +@@ -0,0 +1,250 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * Roughly based on sis_screen.c (c) 2003 Eric Anholt ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++ ++#include "dri_util.h" ++#include "utils.h" ++#include "xmlconfig.h" ++#include "GL/internal/dri_interface.h" ++#include "main/framebuffer.h" ++#include "main/renderbuffer.h" ++ ++#include "glamo_screen.h" ++#include "glamo_context.h" ++#include "glamo_fbo.h" ++ ++/* This comes from libdrm_glamo */ ++#include <glamo_bo_gem.h> ++ ++ ++static int glamoInitDriver(__DRIscreen *psp) ++{ ++ return 0; ++} ++ ++ ++static glamoScreenPtr glamoCreateScreen(__DRIscreen *sPriv) ++{ ++ glamoScreenPtr glamoScreen; ++ ++ /* Allocate the private area */ ++ glamoScreen = (glamoScreenPtr)CALLOC(sizeof(*glamoScreen)); ++ if ( glamoScreen == NULL ) ++ return NULL; ++ ++ glamoScreen->driScreen = sPriv; ++ ++ /* This is our link to the kernel's memory manager, via libdrm */ ++ glamoScreen->bom = glamo_bo_manager_gem_ctor(sPriv->fd); ++ ++ return glamoScreen; ++} ++ ++ ++static void glamoDestroyScreen(__DRIscreen *sPriv) ++{ ++ glamoScreenPtr glamoScreen = (glamoScreenPtr)sPriv->private; ++ ++ if ( glamoScreen == NULL ) ++ return; ++ ++ FREE(glamoScreen); ++ sPriv->private = NULL; ++} ++ ++ ++static const __DRIconfig **glamoInitScreen(__DRIscreen *sPriv) ++{ ++ __DRIconfig **configs; ++ uint8_t depth_bits_array[2]; ++ uint8_t stencil_bits_array[2]; ++ uint8_t msaa_samples_array[1]; ++ static const GLenum db_modes[] = { GLX_SWAP_COPY_OML, GLX_NONE }; ++ ++ /* Driver initialisation */ ++ if ( glamoInitDriver(sPriv) ) { ++ return NULL; ++ } ++ ++ /* Screen-specific initialisation */ ++ sPriv->private = glamoCreateScreen(sPriv); ++ if ( !sPriv->private ) { ++ glamoDestroyScreen(sPriv); ++ return NULL; ++ } ++ ++ depth_bits_array[0] = 0; ++ stencil_bits_array[0] = 0; ++ depth_bits_array[1] = 16; ++ stencil_bits_array[1] = 0; ++ msaa_samples_array[0] = 0; ++ ++ configs = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5, ++ depth_bits_array, stencil_bits_array, 2, ++ db_modes, 2, msaa_samples_array, 1, GL_TRUE); ++ ++ if ( configs == NULL ) { ++ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); ++ return NULL; ++ } ++ ++ return (const __DRIconfig **)configs; ++} ++ ++ ++static const __DRIconfig **glamoInitScreen2(__DRIscreen *sPriv) ++{ ++ __DRIconfig **configs; ++ uint8_t depth_bits_array[2]; ++ uint8_t stencil_bits_array[2]; ++ uint8_t msaa_samples_array[1]; ++ static const GLenum db_modes[] = { GLX_SWAP_COPY_OML, GLX_NONE }; ++ ++ /* Driver initialisation */ ++ if ( glamoInitDriver(sPriv) ) { ++ return NULL; ++ } ++ ++ /* Screen-specific initialisation */ ++ sPriv->private = glamoCreateScreen(sPriv); ++ if ( !sPriv->private ) { ++ glamoDestroyScreen(sPriv); ++ return NULL; ++ } ++ ++ depth_bits_array[0] = 0; ++ stencil_bits_array[0] = 0; ++ depth_bits_array[1] = 16; ++ stencil_bits_array[1] = 0; ++ msaa_samples_array[0] = 0; ++ ++ configs = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5, ++ depth_bits_array, stencil_bits_array, 2, ++ db_modes, 2, msaa_samples_array, 1, GL_TRUE); ++ ++ if ( configs == NULL ) { ++ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); ++ return NULL; ++ } ++ ++ return (const __DRIconfig **)configs; ++} ++ ++ ++/* Allocate buffers for a context. This is where the fun starts... */ ++static GLboolean glamoCreateBuffer(__DRIscreen *driScrnPriv, ++ __DRIdrawable *driDrawPriv, ++ const struct gl_config *mesaVis, ++ GLboolean isPixmap) ++{ ++ struct glamo_framebuffer *gfb; ++ GLenum rgbFormat; ++ ++ if ( isPixmap ) return GL_FALSE; /* not implemented */ ++ ++ gfb = CALLOC_STRUCT(glamo_framebuffer); ++ if ( !gfb ) return GL_FALSE; ++ ++ _mesa_initialize_window_framebuffer(&gfb->base, mesaVis); ++ ++ /* we only support this one format at the moment */ ++ rgbFormat = GL_RGB5; ++ ++ /* Front color renderbuffer */ ++ gfb->color_rb[0] = glamo_create_renderbuffer(rgbFormat, driDrawPriv); ++ _mesa_add_renderbuffer(&gfb->base, BUFFER_FRONT_LEFT, ++ &gfb->color_rb[0]->base); ++ ++ /* Back color renderbuffer, if requested */ ++ if ( mesaVis->doubleBufferMode ) { ++ gfb->color_rb[1] = glamo_create_renderbuffer(rgbFormat, driDrawPriv); ++ _mesa_add_renderbuffer(&gfb->base, BUFFER_BACK_LEFT, ++ &gfb->color_rb[1]->base); ++ } ++ ++ if ( mesaVis->depthBits == 16 ) { ++ struct glamo_renderbuffer *depth; ++ depth = glamo_create_renderbuffer(GL_DEPTH_COMPONENT16, driDrawPriv); ++ _mesa_add_renderbuffer(&gfb->base, BUFFER_DEPTH, &depth->base); ++ } ++ ++ /* Add software renderbuffers for the things we can't support in hardware */ ++ _mesa_add_soft_renderbuffers(&gfb->base, ++ GL_FALSE, /* color */ ++ GL_FALSE, /* depth */ ++ mesaVis->stencilBits > 0, /* stencil, if required */ ++ mesaVis->accumRedBits > 0, /* accum, if required */ ++ GL_FALSE, /* alpha */ ++ GL_FALSE /* aux */ ++ ); ++ driDrawPriv->driverPrivate = (void *)gfb; ++ ++ return (driDrawPriv->driverPrivate != NULL); ++} ++ ++ ++static void glamoDestroyBuffer(__DRIdrawable *driDrawPriv) ++{ ++} ++ ++ ++static void glamoSwapBuffers(__DRIdrawable *driDrawPriv) ++{ ++ printf("glamoSwapBuffers\n"); fflush(stdout); ++} ++ ++ ++/* ++ * Mesa entry points ++ * ++ * See src/mesa/drivers/dri/common/dri_util.h for information about these ++ */ ++const struct __DriverAPIRec driDriverAPI = { ++ .InitScreen = glamoInitScreen, ++ .DestroyScreen = glamoDestroyScreen, ++ .CreateContext = glamoCreateContext, ++ .DestroyContext = glamoDestroyContext, ++ .CreateBuffer = glamoCreateBuffer, ++ .DestroyBuffer = glamoDestroyBuffer, ++ .SwapBuffers = glamoSwapBuffers, ++ .MakeCurrent = glamoMakeCurrent, ++ .UnbindContext = glamoUnbindContext, ++ .GetSwapInfo = NULL, /* Not used */ ++ .WaitForMSC = NULL, ++ .WaitForSBC = NULL, ++ .SwapBuffersMSC = NULL, ++ .CopySubBuffer = NULL, ++ .GetDrawableMSC = NULL, /* Not used */ ++ .InitScreen2 = glamoInitScreen2, /* For DRI2 */ ++}; ++ ++/* This is the table of extensions that the loader will dlsym() for. */ ++PUBLIC const __DRIextension *__driDriverExtensions[] = { ++ &driCoreExtension.base, ++ &driLegacyExtension.base, ++ &driDRI2Extension.base, ++ NULL ++}; ++ ++/* kate: space-indent on; indent-width 3; mixedindent off; indent-mode cstyle; */ +diff --git a/src/mesa/drivers/dri/glamo/glamo_screen.h b/src/mesa/drivers/dri/glamo/glamo_screen.h +new file mode 100644 +index 0000000..3f2eb5f +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_screen.h +@@ -0,0 +1,44 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * Roughly based on sis_screen.h (c) 2003 Eric Anholt ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef __GLAMO_SCREEN_H ++#define __GLAMO_SCREEN_H ++ ++#include "xmlconfig.h" ++#include "dri_util.h" ++ ++#include <glamo_bo_gem.h> ++ ++typedef struct { ++ ++ __DRIscreen *driScreen; ++ driOptionCache optionCache; ++ ++ struct glamo_bo_manager *bom; ++ ++} glamoScreenRec, *glamoScreenPtr; ++ ++#endif /* __GLAMO_SCREEN_H */ ++ ++/* kate: space-indent on; indent-width 3; mixedindent off; indent-mode cstyle; */ +diff --git a/src/mesa/drivers/dri/glamo/glamo_state.c b/src/mesa/drivers/dri/glamo/glamo_state.c +new file mode 100644 +index 0000000..3aa2f8b +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_state.c +@@ -0,0 +1,305 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009-2010 Thomas White <taw@bitwiz.org.uk> ++ * Roughly based on sis_state.c (c) 2003 Eric Anholt ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * ++ * Also partially based on intel_fbo.c, to which the following notice applies: ++ * ++ * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas. ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ++ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++ ++#include "main/context.h" ++#include "main/framebuffer.h" ++#include "main/api_arrayelt.h" ++#include "main/macros.h" ++#include "swrast/swrast.h" ++#include "swrast_setup/swrast_setup.h" ++#include "tnl/tnl.h" ++ ++#include "glamo_fbo.h" ++#include "glamo_state.h" ++#include "glamo_context.h" ++#include "glamo_cmdq.h" ++#include "glamo_regs.h" ++ ++ ++static void glamoResizeBuffers(struct gl_context *ctx, struct gl_framebuffer *fb, ++ GLuint width, GLuint height) ++{ ++ struct glamo_framebuffer *glamo_fb = (struct glamo_framebuffer *)fb; ++ int i; ++ ++ _mesa_resize_framebuffer(ctx, fb, width, height); ++ ++ fb->Initialized = GL_TRUE; /* XXX remove someday */ ++ ++ if (fb->Name != 0) { ++ return; ++ } ++ ++ /* Make sure all window system renderbuffers are up to date */ ++ for (i = 0; i < 2; i++) { ++ struct gl_renderbuffer *rb = &glamo_fb->color_rb[i]->base; ++ ++ /* only resize if size is changing */ ++ if (rb && (rb->Width != width || rb->Height != height)) { ++ rb->AllocStorage(ctx, rb, rb->InternalFormat, ++ width, height); ++ } ++ } ++} ++ ++ ++static void glamoClear(struct gl_context *ctx, GLbitfield mask) ++{ ++ glamoContext *gCtx; ++ struct gl_framebuffer *fb; ++ int i; ++ ++ gCtx = GLAMO_CONTEXT(ctx); ++ fb = ctx->DrawBuffer; ++ ++ printf("glamoClear (%f %f %f %f)\n", ctx->Color.ClearColor[0], ++ ctx->Color.ClearColor[1], ctx->Color.ClearColor[2], ++ ctx->Color.ClearColor[3]); fflush(stdout); ++ ++ for (i = 0; i < fb->_NumColorDrawBuffers; i++) { ++ ++ struct glamo_renderbuffer *grb; ++ ++ grb = glamo_renderbuffer(fb->_ColorDrawBuffers[i]); ++ ++ glamoDRMStartBurst(gCtx, GLAMO_REG_2D_DST_X); ++ glamoDRMAddData(gCtx, fb->_Xmin, 2); /* dest X */ ++ glamoDRMAddData(gCtx, fb->_Ymin, 2); /* dest Y */ ++ glamoDRMAddBO(gCtx, grb->bo); /* dest L/H */ ++ glamoDRMAddData(gCtx, grb->pitch & 0x7ff, 2); /* dest pitch */ ++ glamoDRMAddData(gCtx, grb->height, 2); /* dest height */ ++ glamoDRMAddData(gCtx, fb->_Xmax-fb->_Xmin, 2); /* width */ ++ glamoDRMAddData(gCtx, fb->_Ymax-fb->_Ymin, 2); /* height */ ++ glamoDRMAddData(gCtx, 0x0000, 2); /* patt L */ ++ glamoDRMAddData(gCtx, 0x0000, 2); /* patt H */ ++ glamoDRMAddData(gCtx, gCtx->col_clear, 2); /* FG colour */ ++ glamoDRMDispatch(gCtx); ++ ++ glamoDRMStartBurst(gCtx, GLAMO_REG_2D_COMMAND1); ++ glamoDRMAddData(gCtx, 0x0000, 2); /* Cmd param 1 */ ++ glamoDRMAddData(gCtx, 0xf0 << 8, 2); /* Cmd param 2 */ ++ glamoDRMAddData(gCtx, 0x0000, 2); /* Cmd param 3 */ ++ glamoDRMDispatch(gCtx); ++ ++ } ++} ++ ++ ++static void glamoClearColor(struct gl_context *ctx, const GLfloat color[4]) ++{ ++ struct glamo_context *gCtx = GLAMO_CONTEXT(ctx); ++ GLubyte col_byte[4]; ++ ++ printf("glamoClearColor (%f %f %f %f)\n", color[0], color[1], color[2], ++ color[3]); fflush(stdout); ++ ++ CLAMPED_FLOAT_TO_UBYTE(col_byte[0], color[0]); ++ CLAMPED_FLOAT_TO_UBYTE(col_byte[1], color[1]); ++ CLAMPED_FLOAT_TO_UBYTE(col_byte[2], color[2]); ++ CLAMPED_FLOAT_TO_UBYTE(col_byte[3], color[3]); ++ ++ gCtx->col_clear = GLAMO_PACKCOLOR565(col_byte[0], col_byte[1], ++ col_byte[2]); ++} ++ ++ ++static void glamoShadeModel(struct gl_context *ctx, GLenum mode) ++{ ++ printf("glamoShadeModel\n"); fflush(stdout); ++} ++ ++ ++static void glamoViewport(struct gl_context *ctx, GLint x, GLint y, ++ GLsizei width, GLsizei height ) ++{ ++ struct glamo_context *gCtx = GLAMO_CONTEXT(ctx); ++ __DRIcontext *driContext = gCtx->driContext; ++ void (*old_viewport)(struct gl_context *ctx, GLint x, GLint y, ++ GLsizei w, GLsizei h); ++ ++ if ( !driContext->driScreenPriv->dri2.enabled ) return; ++ ++ /* TODO: Flush before fiddling with fake front buffer */ ++ ++ if ( ctx->DrawBuffer->Name == 0 ) { ++ ++ glamo_update_renderbuffers(driContext, ++ driContext->driDrawablePriv); ++ if ( driContext->driDrawablePriv ++ != driContext->driReadablePriv ) { ++ glamo_update_renderbuffers(driContext, ++ driContext->driReadablePriv); ++ } ++ ++ } ++ ++ old_viewport = ctx->Driver.Viewport; ++ ctx->Driver.Viewport = NULL; ++ gCtx->driDrawable = driContext->driDrawablePriv; ++ ctx->Driver.Viewport = old_viewport; ++} ++ ++ ++static void glamoUploadMatrix(struct glamo_context *gCtx, uint16_t mreg, ++ GLfloat *matrix) ++{ ++ int i; ++ char *type; ++ ++ switch ( mreg ) { ++ case G3D_MATRIX_MVP : ++ type = "MVP"; break; ++ case G3D_MATRIX_MV : ++ type = "MV"; break; ++ case G3D_MATRIX_IMVP : ++ type = "inverse MVP"; break; ++ default : ++ type = "unknown"; break; ++ } ++ printf("Uploading %s matrix...\n", type); ++ ++ glamoDRMStartBurst(gCtx, mreg); ++ if ( mreg != G3D_MATRIX_IMVP ) { ++ for ( i=0; i<16; i++ ) { ++ glamoDRMAddData(gCtx, float7s16(matrix[i]), 4); ++ } ++ } else { ++ /* Normal matrix needs special treatment */ ++ for ( i=0; i<3; i++ ) { ++ glamoDRMAddData(gCtx, float7s16(matrix[4*i]), 4); ++ glamoDRMAddData(gCtx, float7s16(matrix[4*i+1]), 4); ++ glamoDRMAddData(gCtx, float7s16(matrix[4*i+2]), 4); ++ } ++ } ++ glamoDRMDispatch(gCtx); ++} ++ ++ ++GLboolean glamoValidateState(struct gl_context *ctx, GLuint new_state) ++{ ++ struct glamo_context *gCtx = GLAMO_CONTEXT(ctx); ++ ++ if ( new_state & (_NEW_MODELVIEW|_NEW_PROJECTION) ) { ++ ++ glamoUploadMatrix(gCtx, G3D_MATRIX_MVP, ++ ctx->_ModelProjectMatrix.m); ++ ++ /* FIXME: The following two aren't needed unless lighting ++ * is in use... */ ++ glamoUploadMatrix(gCtx, G3D_MATRIX_MV, ++ ctx->ModelviewMatrixStack.Top->m); ++ _math_matrix_alloc_inv(&(ctx->_ModelProjectMatrix)); ++ _math_matrix_analyse(&(ctx->_ModelProjectMatrix)); ++ glamoUploadMatrix(gCtx, G3D_MATRIX_IMVP, ++ ctx->_ModelProjectMatrix.inv); ++ } ++ ++ gCtx->new_state = 0; ++ return GL_TRUE; ++} ++ ++ ++static void glamoUpdateState(struct gl_context *ctx, GLbitfield new_state) ++{ ++ struct glamo_context *gCtx = GLAMO_CONTEXT(ctx); ++ ++ printf("glamoUpdateState\n"); ++ ++ _swrast_InvalidateState(ctx, new_state); ++ _swsetup_InvalidateState(ctx, new_state); ++ _vbo_InvalidateState(ctx, new_state); ++ _tnl_InvalidateState(ctx, new_state); ++ _ae_invalidate_state(ctx, new_state); ++ ++ /* Make a note that some state has changed, ++ * so that it can be sent to the GPU later. */ ++ gCtx->new_state |= new_state; ++} ++ ++ ++static void glamoFlush(struct gl_context *ctx) ++{ ++ printf("glamoFlush\n"); ++} ++ ++ ++void glamoInitStateFuncs(struct gl_context *ctx) ++{ ++ ctx->Driver.UpdateState = glamoUpdateState; ++ ctx->Driver.Clear = glamoClear; ++ ctx->Driver.ClearColor = glamoClearColor; ++ ctx->Driver.ClearDepth = NULL; ++ ctx->Driver.ClearStencil = NULL; ++ ctx->Driver.AlphaFunc = NULL; ++ ctx->Driver.BlendFuncSeparate = NULL; ++ ctx->Driver.ColorMask = NULL; ++ ctx->Driver.CullFace = NULL; ++ ctx->Driver.DepthMask = NULL; ++ ctx->Driver.DepthFunc = NULL; ++ ctx->Driver.DepthRange = NULL; ++ ctx->Driver.DrawBuffer = NULL; ++ ctx->Driver.Enable = NULL; ++ ctx->Driver.FrontFace = NULL; ++ ctx->Driver.Fogfv = NULL; ++ ctx->Driver.Hint = NULL; ++ ctx->Driver.Lightfv = NULL; ++ ctx->Driver.LogicOpcode = NULL; ++ ctx->Driver.PolygonMode = NULL; ++ ctx->Driver.PolygonStipple = NULL; ++ ctx->Driver.ReadBuffer = NULL; ++ ctx->Driver.RenderMode = NULL; ++ ctx->Driver.Scissor = NULL; ++ ctx->Driver.ShadeModel = glamoShadeModel; ++ ctx->Driver.LightModelfv = NULL; ++ ctx->Driver.Viewport = glamoViewport; ++ ctx->Driver.ResizeBuffers = glamoResizeBuffers; ++ ctx->Driver.Flush = glamoFlush; ++} +diff --git a/src/mesa/drivers/dri/glamo/glamo_state.h b/src/mesa/drivers/dri/glamo/glamo_state.h +new file mode 100644 +index 0000000..c3872c0 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_state.h +@@ -0,0 +1,34 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * Roughly based on sis_state.h (c) 2003 Eric Anholt ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef __GLAMO_STATE_H ++#define __GLAMO_STATE_H ++ ++#include "main/context.h" ++ ++extern void glamoInitStateFuncs(struct gl_context *ctx); ++ ++#endif /* __GLAMO_STATE_H */ ++ ++/* kate: space-indent on; indent-width 3; mixedindent off; indent-mode cstyle; */ +diff --git a/src/mesa/drivers/dri/glamo/glamo_tris.c b/src/mesa/drivers/dri/glamo/glamo_tris.c +new file mode 100644 +index 0000000..c45fe53 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_tris.c +@@ -0,0 +1,310 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ * ++ * Based on intel_tris.c, to which the following notice applies: ++ * ++ * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. ++ * All Rights Reserved. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sub license, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the ++ * next paragraph) shall be included in all copies or substantial portions ++ * of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ++ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++ ++#include <glamo_bo.h> ++#include <glamo_bo_gem.h> ++#include <glamo_drm.h> ++ ++#include "main/mtypes.h" ++#include "swrast/swrast.h" ++#include "tnl/t_context.h" ++#include "tnl/t_vertex.h" ++#include "tnl/t_pipeline.h" ++ ++#include "glamo_tris.h" ++#include "glamo_context.h" ++ ++ ++static void glamoRunPipeline(struct gl_context *ctx) ++{ ++ printf("glamoRunPipeline\n"); ++ ++ /* TODO: Emit state */ ++ ++ _tnl_run_pipeline(ctx); ++} ++ ++ ++static void glamoRenderStart(struct gl_context *ctx) ++{ ++ struct glamo_context *gCtx = GLAMO_CONTEXT(ctx); ++ ++ /* Decide which attributes will be used */ ++ gCtx->vertex_attrs[0].attrib = _TNL_ATTRIB_POS; ++ gCtx->vertex_attrs[0].format = EMIT_4F; ++ ++ gCtx->vertex_size = _tnl_install_attrs(ctx, gCtx->vertex_attrs, 1, ++ NULL, 0); ++} ++ ++ ++static void glamoRenderFinish(struct gl_context *ctx) ++{ ++ printf("glamoRenderFinish\n"); ++} ++ ++ ++static void glamoPrimitiveNotify(struct gl_context *ctx, GLenum prim) ++{ ++ printf("glamoPrimitiveNotify\n"); ++} ++ ++ ++uint32_t *glamoGetPrimSpace(struct glamo_context *gCtx, unsigned int count) ++{ ++ uint32_t *addr; ++ ++ printf("glamoGetPrimSpace\n"); ++ ++ /* Check for space in the existing VB */ ++ if (gCtx->prim.vb_bo == NULL || (gCtx->prim.current_offset + ++ count * gCtx->vertex_size) > GLAMO_VB_SIZE) { ++ ++ /* Not enough space, or no VB existing. Start a new one... */ ++ if (gCtx->prim.vb == NULL) { ++ printf("Allocated %i bytes\n", GLAMO_VB_SIZE); ++ gCtx->prim.vb = malloc(GLAMO_VB_SIZE); ++ } ++ gCtx->prim.vb_bo = glamo_bo_open(gCtx->glamoScreen->bom, 0, ++ GLAMO_VB_SIZE, 4, ++ GLAMO_GEM_DOMAIN_VRAM, 0); ++ gCtx->prim.start_offset = 0; ++ gCtx->prim.current_offset = 0; ++ } ++ ++ addr = (uint32_t *)(gCtx->prim.vb + gCtx->prim.current_offset); ++ gCtx->prim.current_offset += gCtx->vertex_size * count; ++ gCtx->prim.count += count; ++ ++ return addr; ++} ++ ++ ++#define COPY_DWORDS( j, vb, vertsize, v ) \ ++do { \ ++ for ( j = 0 ; j < vertsize ; j++ ) { \ ++ vb[j] = ((GLuint *)v)[j]; \ ++ } \ ++ vb += vertsize; \ ++} while (0) ++ ++ ++static void glamo_draw_triangle(struct glamo_context *gCtx, ++ glamoVertexPtr v0, glamoVertexPtr v1, ++ glamoVertexPtr v2) ++{ ++ GLuint *vb = glamoGetPrimSpace(gCtx, 3); ++ int j; ++ ++ COPY_DWORDS(j, vb, gCtx->vertex_size, v0); ++ COPY_DWORDS(j, vb, gCtx->vertex_size, v1); ++ COPY_DWORDS(j, vb, gCtx->vertex_size, v2); ++} ++ ++ ++static void glamo_draw_line(struct glamo_context *gCtx, ++ glamoVertexPtr v0, glamoVertexPtr v1) ++{ ++ GLuint *vb = glamoGetPrimSpace(gCtx, 2); ++ int j; ++ ++ COPY_DWORDS(j, vb, gCtx->vertex_size, v0); ++ COPY_DWORDS(j, vb, gCtx->vertex_size, v1); ++} ++ ++ ++static void glamo_draw_point(struct glamo_context *gCtx, glamoVertexPtr v0) ++{ ++ GLuint *vb = glamoGetPrimSpace(gCtx, 2); ++ int j; ++ ++ COPY_DWORDS(j, vb, gCtx->vertex_size, v0); ++} ++ ++ ++#define TRI( a, b, c ) \ ++do { \ ++ glamo_draw_triangle(gCtx, a, b, c ); \ ++} while (0) ++ ++ ++#define QUAD( a, b, c, d ) \ ++printf("Drawing a quad\n"); \ ++do { \ ++ glamo_draw_triangle(gCtx, a, b, d); \ ++ glamo_draw_triangle(gCtx, b, c, d); \ ++} while (0) ++ ++ ++#define LINE(v0, v1) \ ++do { \ ++ glamo_draw_line(gCtx, v0, v1); \ ++} while (0) ++ ++ ++#define POINT(v0) \ ++do { \ ++ glamo_draw_point(gCtx, v0); \ ++} while (0) ++ ++ ++#define IND (0) ++#define TAG(x) x ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_offset ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_twoside ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_twoside_offset ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_unfilled ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_offset_unfilled ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_twoside_unfilled ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_twoside_offset_unfilled ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_fallback ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_offset_fallback ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_twoside_fallback ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_twoside_offset_fallback ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_unfilled_fallback ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_offset_unfilled_fallback ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_twoside_unfilled_fallback ++#include "tnl_dd/t_dd_tritmp.h" ++ ++#define IND (0) ++#define TAG(x) x##_twoside_offset_unfilled_fallback ++#include "tnl_dd/t_dd_tritmp.h" ++ ++ ++static void init_rast_tab() ++{ ++ init(); ++ init_offset(); ++ init_twoside(); ++ init_twoside_offset(); ++ init_unfilled(); ++ init_offset_unfilled(); ++ init_twoside_unfilled(); ++ init_twoside_offset_unfilled(); ++ init_fallback(); ++ init_offset_fallback(); ++ init_twoside_fallback(); ++ init_twoside_offset_fallback(); ++ init_unfilled_fallback(); ++ init_offset_unfilled_fallback(); ++ init_twoside_unfilled_fallback(); ++ init_twoside_offset_unfilled_fallback(); ++} ++ ++ ++void glamoInitTriFuncs(struct gl_context *ctx) ++{ ++ TNLcontext *tnl = TNL_CONTEXT(ctx); ++ struct glamo_context *gCtx = GLAMO_CONTEXT(ctx); ++ static int firsttime = 1; ++ ++ if (firsttime) { ++ init_rast_tab(); ++ firsttime = 0; ++ } ++ ++ gCtx->prim.start_offset = 0; ++ gCtx->prim.current_offset = 0; ++ gCtx->prim.vb_bo = NULL; ++ gCtx->prim.vb = NULL; ++ gCtx->prim.count = 0; ++ ++ tnl->Driver.RunPipeline = glamoRunPipeline; ++ tnl->Driver.Render.Start = glamoRenderStart; ++ tnl->Driver.Render.Finish = glamoRenderFinish; ++ tnl->Driver.Render.PrimitiveNotify = glamoPrimitiveNotify; ++ tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple; ++ tnl->Driver.Render.BuildVertices = _tnl_build_vertices; ++ tnl->Driver.Render.CopyPV = _tnl_copy_pv; ++ tnl->Driver.Render.Interp = _tnl_interp; ++} +diff --git a/src/mesa/drivers/dri/glamo/glamo_tris.h b/src/mesa/drivers/dri/glamo/glamo_tris.h +new file mode 100644 +index 0000000..ea396c1 +--- /dev/null ++++ b/src/mesa/drivers/dri/glamo/glamo_tris.h +@@ -0,0 +1,38 @@ ++/* ++ * Direct Rendering Support for SMedia Glamo 336x/337x ++ * ++ * (c) 2009 Thomas White <taw@bitwiz.org.uk> ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN ++ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ++ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++#ifndef __GLAMO_TRIS_H ++#define __GLAMO_TRIS_H ++ ++#include "main/mtypes.h" ++ ++#include "glamo_context.h" ++ ++/* Amount of space reserved for vertex submission */ ++#define GLAMO_VB_SIZE (32*1024) ++ ++extern void glamoInitTriFuncs(struct gl_context *ctx); ++extern uint32_t *glamoGetPrimSpace(struct glamo_context *gCtx, ++ unsigned int count); ++ ++#endif /* __GLAMO_TRIS_H */ +diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h +index 997fc0b..e3c9119 100644 +--- a/src/mesa/tnl_dd/t_dd_dmatmp.h ++++ b/src/mesa/tnl_dd/t_dd_dmatmp.h +@@ -127,6 +127,8 @@ static void TAG(render_points_verts)( struct gl_context *ctx, + currentsz = dmasz; + } + ++ FLUSH(); ++ + } else { + fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__); + return; +@@ -162,6 +164,8 @@ static void TAG(render_lines_verts)( struct gl_context *ctx, + currentsz = dmasz; + } + ++ FLUSH(); ++ + } else { + fprintf(stderr, "%s - cannot draw primitive\n", __FUNCTION__); + return; +@@ -191,7 +195,7 @@ static void TAG(render_line_strip_verts)( struct gl_context *ctx, + TAG(emit_verts)( ctx, j, nr, ALLOC_VERTS(nr) ); + currentsz = dmasz; + } +- ++ + FLUSH(); + + } else { +@@ -294,6 +298,8 @@ static void TAG(render_triangles_verts)( struct gl_context *ctx, + TAG(emit_verts)( ctx, j, nr, ALLOC_VERTS(nr) ); + currentsz = dmasz; + } ++ ++ FLUSH(); + } + + +@@ -567,6 +573,8 @@ static void TAG(render_quads_verts)( struct gl_context *ctx, + TAG(emit_verts)( ctx, j, nr, ALLOC_VERTS(nr) ); + currentsz = dmasz; + } ++ ++ FLUSH(); + } + else if (HAVE_ELTS) { + /* Hardware doesn't have a quad primitive type -- try to +@@ -640,6 +648,8 @@ static void TAG(render_quads_verts)( struct gl_context *ctx, + tmp = EMIT_VERTS(ctx, j + 1, 3, tmp); + (void) tmp; + } ++ ++ FLUSH(); + } + else { + /* Vertices won't fit in a single buffer, should never happen. diff --git a/meta-oe/recipes-graphics/mesa/mesa-7.10.2/uclibc.patch b/meta-oe/recipes-graphics/mesa/mesa-7.10.2/uclibc.patch new file mode 100644 index 0000000000..0508112df9 --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/mesa-7.10.2/uclibc.patch @@ -0,0 +1,26 @@ +Index: Mesa-7.9.1/src/mesa/main/imports.c +=================================================================== +--- Mesa-7.9.1.orig/src/mesa/main/imports.c 2010-12-15 13:50:00.000000000 -0800 ++++ Mesa-7.9.1/src/mesa/main/imports.c 2011-01-10 12:23:48.848656001 -0800 +@@ -757,7 +757,7 @@ + float + _mesa_strtof( const char *s, char **end ) + { +-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) ++#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(__UCLIBC__) + static locale_t loc = NULL; + if (!loc) { + loc = newlocale(LC_CTYPE_MASK, "C", NULL); +Index: Mesa-7.9.1/src/glsl/strtod.c +=================================================================== +--- Mesa-7.9.1.orig/src/glsl/strtod.c 2011-01-10 20:08:01.568656001 -0800 ++++ Mesa-7.9.1/src/glsl/strtod.c 2011-01-10 20:08:39.898656001 -0800 +@@ -44,7 +44,7 @@ + double + glsl_strtod(const char *s, char **end) + { +-#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) ++#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && !defined(__UCLIBC__) + static locale_t loc = NULL; + if (!loc) { + loc = newlocale(LC_CTYPE_MASK, "C", NULL); diff --git a/meta-oe/recipes-graphics/mesa/mesa-common.inc b/meta-oe/recipes-graphics/mesa/mesa-common.inc new file mode 100644 index 0000000000..4073d6ffe9 --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/mesa-common.inc @@ -0,0 +1,53 @@ +SECTION = "x11" + +DESCRIPTION = "An open source implementation of the OpenGL spec" +HOMEPAGE = "http://mesa3d.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://docs/license.html;md5=7a3373c039b6b925c427755a4f779c1d" + +INC_PR = "r11" +PE = "2" + +PROTO_DEPS = "xf86driproto glproto" +LIB_DEPS = "virtual/libx11 libxext libxxf86vm libxdamage libxfixes" + +DEPENDS = "${PROTO_DEPS} ${LIB_DEPS}" + +SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/MesaLib-${PV}.tar.bz2;name=archive \ + " +S = "${WORKDIR}/Mesa-${PV}" + +PROVIDES = "virtual/libgl" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--enable-glu \ + --disable-glw \ + --disable-glut \ + " + +inherit glx-use-tls + +# Package contents vary according to ${MACHINE_DRI_MODULES}. +PACKAGE_ARCH = "${MACHINE_ARCH}" + +PACKAGES =+ "libegl libegl-dev libegl-dbg libglu libglu-dev libosmesa libosmesa-dev libgl libgl-dev" +FILES_${PN} += "${libdir}/dri/*.so" +FILES_libegl = "${libdir}/libEGL.so.* ${libdir}/egl/*.so" +FILES_libgl = "${libdir}/libGL.so.*" +FILES_libglu = "${libdir}/libGLU.so.*" +FILES_libosmesa = "${libdir}/libOSMesa.so.*" + +FILES_libegl-dev = "${libdir}/libEGL.* ${includedir}/EGL" +FILES_libgl-dev = "${libdir}/libGL.* ${includedir}/GL" +FILES_libglu-dev = "${libdir}/libGLU.* ${includedir}/GL/glu*.h" +FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h" + +FILES_${PN}-dbg += "${libdir}/dri/.debug/*" +FILES_libegl-dbg += "${libdir}/egl/.debug/*" + +NATIVE_INSTALL_WORKS = "1" +do_install_append () { + install -d ${D}/${includedir}/GL + cp -pPr ${S}/include/GL/internal* ${D}/${includedir}/GL +} diff --git a/meta-oe/recipes-graphics/mesa/mesa-dri.inc b/meta-oe/recipes-graphics/mesa/mesa-dri.inc new file mode 100644 index 0000000000..4f42b79306 --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/mesa-dri.inc @@ -0,0 +1,10 @@ +DEPENDS += "dri2proto expat libdrm makedepend-native" + +#not supported in oe-core base.bbclass +#FILESPATHPKG =. "mesa-${PV}:mesa:" +FILESPATH =. "${FILE_DIRNAME}/mesa:${FILE_DIRNAME}/mesa-${PV}:" + +# most of our targets do not have DRI so will use mesa-xlib +DEFAULT_PREFERENCE = "-1" + +EXTRA_OECONF += " --with-driver=dri --with-dri-drivers=swrast,${MACHINE_DRI_MODULES}" diff --git a/meta-oe/recipes-graphics/mesa/mesa-dri_7.10.2.bb b/meta-oe/recipes-graphics/mesa/mesa-dri_7.10.2.bb new file mode 100644 index 0000000000..26b56e426c --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/mesa-dri_7.10.2.bb @@ -0,0 +1,4 @@ +require mesa-common.inc +require mesa-${PV}.inc +require mesa-dri.inc +PR = "${INC_PR}.0" diff --git a/meta-oe/recipes-graphics/mesa/mesa-xlib.inc b/meta-oe/recipes-graphics/mesa/mesa-xlib.inc new file mode 100644 index 0000000000..cabe6e5ec5 --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/mesa-xlib.inc @@ -0,0 +1,2 @@ +FILESPATHPKG =. "mesa-${PV}:mesa:" +EXTRA_OECONF += " --with-driver=xlib" diff --git a/meta-oe/recipes-graphics/mesa/mesa-xlib_7.10.2.bb b/meta-oe/recipes-graphics/mesa/mesa-xlib_7.10.2.bb new file mode 100644 index 0000000000..93bb8cd19b --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/mesa-xlib_7.10.2.bb @@ -0,0 +1,4 @@ +require mesa-common.inc +require mesa-${PV}.inc +require mesa-xlib.inc +PR = "${INC_PR}.0" diff --git a/meta-oe/recipes-graphics/mesa/mesa_7.10.2.bb b/meta-oe/recipes-graphics/mesa/mesa_7.10.2.bb new file mode 100644 index 0000000000..4cb8db7f73 --- /dev/null +++ b/meta-oe/recipes-graphics/mesa/mesa_7.10.2.bb @@ -0,0 +1,6 @@ +# This is a dummy package so OE can use the poky mesa files +require mesa-dri_${PV}.bb + +PR = "${INC_PR}.0" + +EXTRA_OECONF += "--disable-egl" diff --git a/meta-oe/recipes-graphics/tasks/task-fonts-truetype.bb b/meta-oe/recipes-graphics/tasks/task-fonts-truetype.bb new file mode 100644 index 0000000000..8ffa88b64e --- /dev/null +++ b/meta-oe/recipes-graphics/tasks/task-fonts-truetype.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "Install one of these tasks to get support for truetype fonts." +SECTION = "fonts" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${TOPDIR}/meta-shr/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +PV = "1.0" +PR = "r0" + +inherit task + +PACKAGES += "\ + ${PN}-core \ + ${PN}-chinese \ + ${PN}-japanese \ +" + +RRECOMMENDS_task-fonts-truetype = "\ + ${PN}-core \ + ${PN}-chinese \ + ${PN}-japanese \ +" + +RDEPENDS_task-fonts-truetype-core = "\ + fontconfig-utils \ + \ + ttf-dejavu-common \ + ttf-dejavu-sans \ + ttf-dejavu-sans-mono \ +" +# ttf-dejavu-serif \ + +RDEPENDS_task-fonts-truetype-chinese = "\ + ${PN}-core \ + ttf-arphic-uming \ +" + +RDEPENDS_task-fonts-truetype-japanese = "\ + ${PN}-core \ + ttf-sazanami-gothic \ + ttf-sazanami-mincho \ +" diff --git a/meta-oe/recipes-graphics/ttf-fonts/ttf-liberation_0.2.bb b/meta-oe/recipes-graphics/ttf-fonts/ttf-liberation_0.2.bb new file mode 100644 index 0000000000..5ebb257515 --- /dev/null +++ b/meta-oe/recipes-graphics/ttf-fonts/ttf-liberation_0.2.bb @@ -0,0 +1,23 @@ +require ttf.inc + +DESCRIPTION = "Liberation fonts - TTF Version" +HOMEPAGE = "https://www.redhat.com/promo/fonts/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://License.txt;md5=5b171c5100029d884fcea21d9a2b7543 \ +" + +PR = "r3" + +SRC_URI = "http://fedorahosted.org/liberation-fonts/export/807b6dfd069b998cd9b4d3158da98817ef23c79d/F-9/liberation-fonts-ttf-3.tar.gz" +S = "${WORKDIR}/liberation-fonts-${PV}" + +PACKAGES = "${PN}-dbg ttf-liberation-mono ttf-liberation-sans ttf-liberation-serif" +RRECOMMENDS_${PN}-dbg = "" + +FILES_ttf-liberation-mono = "${datadir}/fonts/truetype/*Mono*" +FILES_ttf-liberation-sans = "${datadir}/fonts/truetype/*Sans*" +FILES_ttf-liberation-serif = "${datadir}/fonts/truetype/*Serif*" + +SRC_URI[md5sum] = "77728078a17e39f7c242b42c3bf6feb8" +SRC_URI[sha256sum] = "174cf27c57612971434ec8cc4a52bfd37bad8408e9b9219539c6d5113df6ff8f" diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/iphone3g/pointercal.xinput b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/iphone3g/pointercal.xinput new file mode 100644 index 0000000000..d6ce56b820 --- /dev/null +++ b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/iphone3g/pointercal.xinput @@ -0,0 +1 @@ +xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 -102 4739 6 7321; diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/nokia900/pointercal.xinput b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/nokia900/pointercal.xinput new file mode 100644 index 0000000000..66bb32cab4 --- /dev/null +++ b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/nokia900/pointercal.xinput @@ -0,0 +1,2 @@ +xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 204 3897 3763 178; + diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/om-gta01/pointercal.xinput b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/om-gta01/pointercal.xinput new file mode 100644 index 0000000000..be25da3529 --- /dev/null +++ b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/om-gta01/pointercal.xinput @@ -0,0 +1,2 @@ +xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 107 918 911 98 +xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 1 diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/om-gta02/pointercal.xinput b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/om-gta02/pointercal.xinput new file mode 100644 index 0000000000..be25da3529 --- /dev/null +++ b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/om-gta02/pointercal.xinput @@ -0,0 +1,2 @@ +xinput set-int-prop "Touchscreen" "Evdev Axis Calibration" 32 107 918 911 98 +xinput set-int-prop "Touchscreen" "Evdev Axes Swap" 8 1 diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput new file mode 100644 index 0000000000..9633fc5f32 --- /dev/null +++ b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput/pointercal.xinput @@ -0,0 +1 @@ +# replace with valid machine specific pointercal.xinput diff --git a/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb new file mode 100644 index 0000000000..e611862a4f --- /dev/null +++ b/meta-oe/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "Touchscreen calibration data from xinput-calibrator" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${TOPDIR}/meta-shr/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SECTION = "base" + +PR = "r2" +SRC_URI = "file://pointercal.xinput" +S = "${WORKDIR}" + +do_install() { + # Only install file if it has a contents + if [ -s ${S}/pointercal.xinput ]; then + install -d ${D}${sysconfdir}/ + install -m 0644 ${S}/pointercal.xinput ${D}${sysconfdir}/ + fi +} + +ALLOW_EMPTY_${PN} = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" +CONFFILES_${PN} = "${sysconfdir}/pointercal.xinput" diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator.inc b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator.inc new file mode 100644 index 0000000000..357b0e5c04 --- /dev/null +++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator.inc @@ -0,0 +1,8 @@ +DESCRIPTION = "A generic touchscreen calibration program for X.Org" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/xinput_calibrator" +LICENSE = "MIT/X11" +DEPENDS = "virtual/libx11 libxi" +RDEPENDS_${PN} = "xinput pointercal-xinput" +INC_PR = "r7" + +inherit autotools diff --git a/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_0.6.1.bb b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_0.6.1.bb new file mode 100644 index 0000000000..2eb3cc9427 --- /dev/null +++ b/meta-oe/recipes-graphics/xinput-calibrator/xinput-calibrator_0.6.1.bb @@ -0,0 +1,17 @@ +require xinput-calibrator.inc + +LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=998e238a7638a7446eaeb02398f691fc" +SRC_URI = "git://github.com/tias/xinput_calibrator.git;protocol=git" + +SRCREV = "d2ce98b3f638667dd64b6d718721379b2dc750a7" +PR = "${INC_PR}.0" +S = "${WORKDIR}/git/" + +do_install_append() { + install -d ${D}${bindir} + install -m 0755 scripts/xinput_calibrator_pointercal.sh ${D}${bindir}/xinput_calibrator_once.sh + ln -s ${bindir}/xinput_calibrator_x11 ${D}${bindir}/xinput_calibrator + install -d ${D}${datadir}/applications/ + install -m 0755 scripts/xinput_calibrator.desktop ${D}${datadir}/applications/xinput-calibrator.desktop + install -m 0755 scripts/xinput_calibrator_get_hal_calibration.sh ${D}${bindir}/xinput_calibrator_get_hal_calibration.sh +} diff --git a/meta-oe/recipes-graphics/xorg-app/rgb_1.0.4.bb b/meta-oe/recipes-graphics/xorg-app/rgb_1.0.4.bb new file mode 100644 index 0000000000..59dca2ac7d --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-app/rgb_1.0.4.bb @@ -0,0 +1,10 @@ +require xorg-app-common.inc +DEPENDS += " xproto util-macros" +LIC_FILES_CHKSUM = "file://COPYING;md5=ef598adbe241bd0b0b9113831f6e249a" +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "35c6cccbf25a872bdd62bfcb1a73d951" +SRC_URI[sha256sum] = "80887da011ad086fff88bfd16c6d9d5ac7da45ef1bc9d0c192a6f370423370f1" + +FILES_${PN} += "${datadir}/X11" diff --git a/meta-oe/recipes-graphics/xorg-app/xinput_1.5.3.bb b/meta-oe/recipes-graphics/xorg-app/xinput_1.5.3.bb new file mode 100644 index 0000000000..c1acc983d6 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-app/xinput_1.5.3.bb @@ -0,0 +1,8 @@ +require xorg-app-common.inc +LIC_FILES_CHKSUM = "file://COPYING;md5=22c34ea36136407a77702a8b784f9bd0" +DESCRIPTION = "a utility to configure and test XInput devices" +DEPENDS += " libxi" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "1e2f0ad4f3fa833b65c568907f171d28" +SRC_URI[sha256sum] = "6aade131cecddaeefc39ddce1dd5e8473f6039c2e4efbfd9fbb5ee2a75885c76" diff --git a/meta-oe/recipes-graphics/xorg-app/xorg-app-common.inc b/meta-oe/recipes-graphics/xorg-app/xorg-app-common.inc new file mode 100644 index 0000000000..8358af4d5b --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-app/xorg-app-common.inc @@ -0,0 +1,15 @@ +DESCRIPTION = "X application" +HOMEPAGE = "http://www.x.org/" +SECTION = "x11/apps" +LICENSE = "MIT-X" +DEPENDS = "util-macros-native virtual/libx11" + +INC_PR = "r5" + +SRC_URI = "${XORG_MIRROR}/individual/app/${BPN}-${PV}.tar.bz2" + +S = "${WORKDIR}/${BPN}-${PV}" + +inherit autotools pkgconfig + +FILES_${PN} += " /usr/lib/X11/${BPN} /usr/share/X11/app-defaults/" diff --git a/meta-oe/recipes-graphics/xorg-doc/xorg-doc-common.inc b/meta-oe/recipes-graphics/xorg-doc/xorg-doc-common.inc new file mode 100644 index 0000000000..f4b8b00de5 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-doc/xorg-doc-common.inc @@ -0,0 +1,12 @@ +DESCRIPTION = "X documentation" +HOMEPAGE = "http://www.x.org" +SECTION = "x11/docs" +LICENSE = "MIT-X" + +SRC_URI = "${XORG_MIRROR}/individual/doc/${BPN}-${PV}.tar.bz2" + +S = "${WORKDIR}/${BPN}-${PV}" + +INC_PR = "r1" + +inherit autotools pkgconfig diff --git a/meta-oe/recipes-graphics/xorg-doc/xorg-sgml-doctools_1.7.bb b/meta-oe/recipes-graphics/xorg-doc/xorg-sgml-doctools_1.7.bb new file mode 100644 index 0000000000..55f4bacc23 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-doc/xorg-sgml-doctools_1.7.bb @@ -0,0 +1,8 @@ +require xorg-doc-common.inc +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "2588efb3f49f7fc6ecf41ce42e0b2e5e" +SRC_URI[sha256sum] = "84fd94e5c50556e6f77501485f8a48724cf3c95c6d58480bc280258ba14580c8" + +FILES_${PN} += " /usr/share/sgml/X11" diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-keyboard_1.6.0.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-keyboard_1.6.0.bb new file mode 100644 index 0000000000..cbbc7c717c --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-keyboard_1.6.0.bb @@ -0,0 +1,17 @@ +require xorg-driver-input.inc + +SUMMARY = "X.Org X server -- keyboard input driver" + +DESCRIPTION = "keyboard is an Xorg input driver for keyboards. The \ +driver supports the standard OS-provided keyboard interface. The driver \ +functions as a keyboard input device, and may be used as the X server's \ +core keyboard." + +LIC_FILES_CHKSUM = "file://COPYING;md5=ea2099d24ac9e316a6d4b9f20b3d4e10" + +DEPENDS += " kbproto" +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "e2abe9f13e526a73cb68a7d257546eba" +SRC_URI[sha256sum] = "c46c790fec905d696573b7a374b10ab8b4389112a8f69993fe011006c99e858e" diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-mouse_1.7.0.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mouse_1.7.0.bb new file mode 100644 index 0000000000..88b304ffa4 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mouse_1.7.0.bb @@ -0,0 +1,17 @@ +require xorg-driver-input.inc + +SUMMARY = "X.Org X server -- mouse input driver" + +DESCRIPTION = "mouse is an Xorg input driver for mice. The driver \ +supports most available mouse types and interfaces. The mouse driver \ +functions as a pointer input device, and may be used as the X server's \ +core pointer. Multiple mice are supported by multiple instances of this \ +driver." + +LIC_FILES_CHKSUM = "file://COPYING;md5=237eb1d1a602d29ef2af62d8fba60f19" + +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "7f31472689c15b6de62eff04d0fb57d7" +SRC_URI[sha256sum] = "4e989542b5e9e0c5f9087288b18e70de1064dd27c83a4bc6dce58f3ea9d74994" diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi new file mode 100644 index 0000000000..906043947e --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<deviceinfo version="0.2"> + <device> + <match key="info.capabilities" contains="input.touchpad"> + <merge key="input.x11_driver" type="string">tslib</merge> + </match> + <match key="info.capabilities" contains="input.touchscreen"> + <merge key="input.x11_driver" type="string">tslib</merge> + </match> + </device> +</deviceinfo> diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules new file mode 100644 index 0000000000..ec130c257d --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules @@ -0,0 +1,5 @@ +# create /dev/input/touchscreenX symlink, tag xf86-input-tslib as driver +SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen%n", ENV{x11_driver}="tslib" +SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen%n", ENV{x11_driver}="tslib" + + diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch new file mode 100644 index 0000000000..07754731dd --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch @@ -0,0 +1,20 @@ +xorg-server-1.7.3/hw/xfree86/common/xf86Helper.c contains this code +causing a double free crash on chvt or exit: + + /* This should *really* be handled in drv->UnInit(dev) call instead, but + * if the driver forgets about it make sure we free it or at least crash + * with flying colors */ + if (pInp->private) + xfree(pInp->private); +Index: xf86-input-tslib-0.0.6/src/tslib.c +=================================================================== +--- xf86-input-tslib-0.0.6.orig/src/tslib.c ++++ xf86-input-tslib-0.0.6/src/tslib.c +@@ -435,6 +435,7 @@ xf86TslibUninit(InputDriverPtr drv, Inpu + xf86TslibControlProc(pInfo->dev, DEVICE_OFF); + ts_close(priv->ts); + xfree(pInfo->private); ++ pInfo->private = NULL; + xf86DeleteInput(pInfo, 0); + } + diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch new file mode 100644 index 0000000000..a1f6ba8f9e --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch @@ -0,0 +1,34 @@ +From Grazvydas Ignotas + +At least xserver 1.7.4 crashes on XGetPointerControl request because of xf86-input-tslib: + +Program received signal SIGSEGV, Segmentation fault. +#0 0x000355e0 in ProcGetPointerControl (client=0x4a2e58) at devices.c:2122 +#1 0x00062fa8 in Dispatch () at dispatch.c:439 +#2 0x00022444 in main (argc=4, argv=0xbeebedc4, envp=0xbeebedd8) at main.c:285 + +This happens because ptrfeed field is not set in device structure from tslib. +To fix this, call InitPtrFeedbackClassDeviceStruct() during DEVICE_INIT to get necessary setup done (as done in other input drivers). + +--- +diff -ur xf86-input-tslib-0.0.6/src/tslib.c xf86-input-tslib-0.0.6_/src/tslib.c +--- xf86-input-tslib-0.0.6/src/tslib.c 2010-02-09 12:23:22.000000000 +0200 ++++ xf86-input-tslib-0.0.6_/src/tslib.c 2010-02-09 12:37:33.000000000 +0200 +@@ -103,8 +103,6 @@ + static void + PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl) + { +- ErrorF("%s\n", __FUNCTION__); +- return; + } + + static Bool +@@ -406,6 +404,8 @@ + xf86MotionHistoryAllocate(pInfo); + #endif + ++ if (!InitPtrFeedbackClassDeviceStruct(device, PointerControlProc)) ++ return !Success; + break; + + case DEVICE_ON: diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb new file mode 100644 index 0000000000..d5d11ce158 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb @@ -0,0 +1,32 @@ +require xorg-driver-input.inc +DESCRIPTION = "X.Org X server -- tslib input driver" +DEPENDS += "tslib" +RRECOMMENDS_${PN} += "tslib-calibrate" +RSUGGESTS_${PN} += "hal" + +# derived from xf86-input-void, that's why I kept MIT-X, but it's not clear, see COPYING +LIC_FILES_CHKSUM = "file://src/tslib.c;endline=28;md5=bd62eaef222dcf5cd59e490a12bd795e \ + file://COPYING;md5=4641deddaa80fe7ca88e944e1fd94a94" + +PR = "${INC_PR}.1" + +SRC_URI = "http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-${PV}.tar.bz2;name=archive \ + file://double-free-crash.patch \ + file://10-x11-input-tslib.fdi \ + file://xserver-174-XGetPointerControl.patch \ + file://99-xf86-input-tslib.rules \ +" +SRC_URI[md5sum] = "b7a4d2f11637ee3fcf432e044b1d017f" +SRC_URI[sha256sum] = "5f46fdef095a6e44a69e0f0b57c7d665224b26d990d006611236d8332e85b105" + +do_configure_prepend() { + rm -rf ${S}/m4/ || true +} +do_install_append() { + install -d ${D}/${datadir}/hal/fdi/policy/20thirdparty + install -m 0644 ${WORKDIR}/10-x11-input-tslib.fdi ${D}/${datadir}/hal/fdi/policy/20thirdparty + install -d ${D}/lib/udev/rules.d + install -m 0644 ${WORKDIR}/99-xf86-input-tslib.rules ${D}/lib/udev/rules.d/ +} + +FILES_${PN} += "${datadir}/hal /lib/udev" diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb new file mode 100644 index 0000000000..d555fbc4be --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-fbdev_0.4.2.bb @@ -0,0 +1,9 @@ +require xorg-driver-video.inc +LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8" + +DESCRIPTION = "X.Org X server -- fbdev display driver" +PE = "1" +PR = "${INC_PR}.1" + +SRC_URI[md5sum] = "53a533d9e0c2da50962282526bace074" +SRC_URI[sha256sum] = "93b271b4b41d7e5ca108849a583b9523e96c51813d046282285355b7001f82d5" diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-drm-define-GLAMO_CMDQ_MAX_COUNT-instead-of-mag.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-drm-define-GLAMO_CMDQ_MAX_COUNT-instead-of-mag.patch new file mode 100644 index 0000000000..0c7350fc18 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-drm-define-GLAMO_CMDQ_MAX_COUNT-instead-of-mag.patch @@ -0,0 +1,66 @@ +From e2d0f9a3ba7f36b0b8ac8d736dd76da6e5e07f38 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Fri, 29 Oct 2010 11:19:08 +0200 +Subject: [PATCH] glamo-drm: define GLAMO_CMDQ_MAX_COUNT instead of magic constant 1024 + +* fix check for full queue, because size != count here +* make sure we have enough space in queue for 2 resp. 4 more commands in + GlamoDRMAddCommand resp. GlamoDRMAddCommandBO + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + src/glamo-drm.c | 16 +++++++++++----- + 1 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/src/glamo-drm.c b/src/glamo-drm.c +index aac93bb..01e8510 100644 +--- a/src/glamo-drm.c ++++ b/src/glamo-drm.c +@@ -32,6 +32,8 @@ + + #include "glamo.h" + ++/* How many commands can be stored before forced dispatch */ ++#define GLAMO_CMDQ_MAX_COUNT 1024 + + /* Submit the prepared command sequence to the kernel */ + void GlamoDRMDispatch(GlamoPtr pGlamo) +@@ -60,7 +62,7 @@ void GlamoDRMDispatch(GlamoPtr pGlamo) + + void GlamoDRMAddCommand(GlamoPtr pGlamo, uint16_t reg, uint16_t val) + { +- if ( pGlamo->cmdq_drm_used == pGlamo->cmdq_drm_size ) { ++ if ( pGlamo->cmdq_drm_used >= GLAMO_CMDQ_MAX_COUNT - 2 ) { + xf86DrvMsg(pGlamo->pScreen->myNum, X_INFO, + "Forced command cache flush.\n"); + GlamoDRMDispatch(pGlamo); +@@ -74,7 +76,8 @@ void GlamoDRMAddCommand(GlamoPtr pGlamo, uint16_t reg, uint16_t val) + + void GlamoDRMAddCommandBO(GlamoPtr pGlamo, uint16_t reg, struct glamo_bo *bo) + { +- if ( pGlamo->cmdq_drm_used == pGlamo->cmdq_drm_size ) { ++ if ( pGlamo->cmdq_drm_used >= GLAMO_CMDQ_MAX_COUNT - 4 || ++ pGlamo->cmdq_obj_used >= GLAMO_CMDQ_MAX_COUNT) { + xf86DrvMsg(pGlamo->pScreen->myNum, X_INFO, + "Forced command cache flush.\n"); + GlamoDRMDispatch(pGlamo); +@@ -98,10 +101,13 @@ void GlamoDRMAddCommandBO(GlamoPtr pGlamo, uint16_t reg, struct glamo_bo *bo) + + void GlamoDRMInit(GlamoPtr pGlamo) + { +- pGlamo->cmdq_objs = malloc(1024); +- pGlamo->cmdq_obj_pos = malloc(1024); ++ pGlamo->cmdq_objs = malloc(GLAMO_CMDQ_MAX_COUNT); ++ pGlamo->cmdq_obj_pos = malloc(GLAMO_CMDQ_MAX_COUNT); + pGlamo->cmdq_obj_used = 0; + pGlamo->cmdq_drm_used = 0; +- pGlamo->cmdq_drm_size = 4 * 1024; ++ /* we're using 2bytes per entry (uint16_t) that's why we need to allocate ++ * GLAMO_CMDQ_MAX_COUNT * 2 bytes ++ */ ++ pGlamo->cmdq_drm_size = 2 * GLAMO_CMDQ_MAX_COUNT; + pGlamo->cmdq_drm = malloc(pGlamo->cmdq_drm_size); + } +-- +1.7.3.2 + diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb new file mode 100644 index 0000000000..c9e1d5699a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb @@ -0,0 +1,19 @@ +require xorg-driver-video.inc +DESCRIPTION = "X.Org X server -- Glamo display driver with KMS support" +DEPENDS += "libdrm" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8" + +RDEPENDS_${PN} = "xserver-xorg-extension-dri xserver-xorg-extension-dri2 xserver-xorg-extension-glx mesa-dri" +PE = "2" +PV = "1.0.0+gitr${SRCPV}" +PR = "${INC_PR}.5" + +SRC_URI = "git://git.openmoko.org/git/xf86-video-glamo.git;protocol=git;branch=master \ + file://0001-glamo-drm-define-GLAMO_CMDQ_MAX_COUNT-instead-of-mag.patch \ + " + +S = "${WORKDIR}/git" +SRCREV = "16af3c00195adc68cbd508e3613be4b2349260b3" + +EXTRA_OECONF = " --enable-kms " diff --git a/meta-oe/recipes-graphics/xorg-driver/xorg-driver-common.inc b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-common.inc new file mode 100644 index 0000000000..970b0d1762 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-common.inc @@ -0,0 +1,40 @@ +DESCRIPTION = "X driver" +HOMEPAGE = "http://www.x.org" +SECTION = "x11/drivers" +LICENSE = "MIT-X" +INC_PR = "r15" + +DEPENDS = "randrproto xorg-server xproto" + +SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2" + +S = "${WORKDIR}/${BPN}-${PV}" + +FILES_${PN} += " ${libdir}/xorg/modules" +FILES_${PN}-dbg += "${libdir}/xorg/modules/*/.debug" + +inherit autotools pkgconfig + +TARGET_CPPFLAGS += "-I${STAGING_DIR_HOST}/usr/include/xorg" + +# Another sucky behavor from Xorg configure scripts. +# They use AC_CHECK_FILE to check for DRI headers. Yuck! +# Of course this will blow up when cross compiling. + +do_configure_prepend() { + incdir=${layout_includedir}/xorg + for f in dri.h sarea.h dristruct.h exa.h damage.h xf86Module.h; do + path="$incdir/$f" + if [ -f "${STAGING_DIR_HOST}/$path" ]; then + p=`echo "$path" | sed 'y%*+%pp%;s%[^_[:alnum:]]%_%g'` + eval "export ac_cv_file_$p=yes" + fi + done +} + +# FIXME: We don't want to include the libtool archives (*.la) from modules +# directory, as they serve no useful purpose. Upstream should fix Makefile.am +do_install_append() { + find ${D}${libdir}/xorg/modules -regex ".*\.la$" | xargs rm -f -- +} + diff --git a/meta-oe/recipes-graphics/xorg-driver/xorg-driver-input.inc b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-input.inc new file mode 100644 index 0000000000..e44dbd58fe --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-input.inc @@ -0,0 +1,4 @@ +include xorg-driver-common.inc + +DEPENDS = "randrproto inputproto xserver-xorg xproto" + diff --git a/meta-oe/recipes-graphics/xorg-driver/xorg-driver-video.inc b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-video.inc new file mode 100644 index 0000000000..36b5b75951 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xorg-driver-video.inc @@ -0,0 +1,4 @@ +include xorg-driver-common.inc + +DEPENDS = "randrproto renderproto videoproto xextproto fontsproto xserver-xorg xproto" + diff --git a/meta-oe/recipes-graphics/xorg-lib/liblbxutil-1.1.0/mkg3states-1.1.patch b/meta-oe/recipes-graphics/xorg-lib/liblbxutil-1.1.0/mkg3states-1.1.patch new file mode 100644 index 0000000000..f9f4a6382c --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/liblbxutil-1.1.0/mkg3states-1.1.patch @@ -0,0 +1,55 @@ +diff -uNr liblbxutil-1.1.0.orig/configure.ac liblbxutil-1.1.0/configure.ac +--- liblbxutil-1.1.0.orig/configure.ac 2009-12-04 23:52:04.000000000 +0100 ++++ liblbxutil-1.1.0/configure.ac 2009-12-16 10:45:00.000000000 +0100 +@@ -50,4 +50,5 @@ + + AC_OUTPUT([Makefile + src/Makefile ++ src/image/Makefile + lbxutil.pc]) +diff -uNr liblbxutil-1.1.0.orig/src/image/Makefile.am liblbxutil-1.1.0/src/image/Makefile.am +--- liblbxutil-1.1.0.orig/src/image/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ liblbxutil-1.1.0/src/image/Makefile.am 2009-12-16 10:45:00.000000000 +0100 +@@ -0,0 +1,15 @@ ++# evil hack ++CFLAGS=$(CFLAGS_FOR_BUILD) ++CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++LDFLAGS=$(LDFLAGS_FOR_BUILD) ++ ++CC=$(CC_FOR_BUILD) ++LIBTOOL = @LIBTOOL@ --tag=CC ++ ++noinst_PROGRAMS = mkg3states ++ ++mkg3states_SOURCES = \ ++ mkg3states.c ++ ++mkg3states_CFLAGS=$(CFLAGS_FOR_BUILD) ++mkg3states_LDFLAGS=$(LDFLAGS_FOR_BUILD) +diff -uNr liblbxutil-1.1.0.orig/src/Makefile.am liblbxutil-1.1.0/src/Makefile.am +--- liblbxutil-1.1.0.orig/src/Makefile.am 2009-12-16 10:48:11.000000000 +0100 ++++ liblbxutil-1.1.0/src/Makefile.am 2009-12-16 10:46:47.000000000 +0100 +@@ -3,10 +3,7 @@ + AM_CFLAGS = $(CWARNFLAGS) $(LBXUTIL_CFLAGS) + INCLUDES = -I$(top_srcdir)/include + +-noinst_PROGRAMS = mkg3states +- +-mkg3states_SOURCES = \ +- $(srcdir)/image/mkg3states.c ++SUBDIRS = image + + liblbxutil_la_SOURCES = \ + $(srcdir)/lbx_zlib/reqstats.h \ +@@ -38,9 +35,8 @@ + + $(srcdir)/image/dfaxg42d.c: g3states.h + +-g3states.h: mkg3states +- -rm -f g3states.h +- $(AM_V_GEN) ./mkg3states -c > g3states.h_ && mv g3states.h_ g3states.h ++g3states.h: image/mkg3states ++ $(AM_V_GEN) ./image/mkg3states -c > g3states.h_ && mv g3states.h_ g3states.h + + liblbxutil_la_LDFLAGS = -version-number 1:0:0 -no-undefined + diff --git a/meta-oe/recipes-graphics/xorg-lib/liblbxutil_1.1.0.bb b/meta-oe/recipes-graphics/xorg-lib/liblbxutil_1.1.0.bb new file mode 100644 index 0000000000..52235866e9 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/liblbxutil_1.1.0.bb @@ -0,0 +1,14 @@ +require xorg-lib-common.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=b0d5bdc98f7ebab3b6c3791d9bf40907" + +DESCRIPTION = "XFIXES Extension" +DEPENDS += " xextproto xproto zlib" +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI += "file://mkg3states-1.1.patch" +SRC_URI[md5sum] = "273329a78c2e9ea189ac416c7fde94a1" +SRC_URI[sha256sum] = "c6b6ff7858ec619cafa8205debca6bf78c5610a2844a782ed643c7fd017cf8ae" + +export CC_FOR_BUILD = "gcc" diff --git a/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.1/keysymdef_include.patch b/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.1/keysymdef_include.patch new file mode 100644 index 0000000000..1a30e345f9 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.1/keysymdef_include.patch @@ -0,0 +1,19 @@ +diff -uNr libX11-1.3.6.orig//configure.ac libX11-1.3.6/configure.ac +--- libX11-1.3.6.orig//configure.ac 2010-09-20 08:04:16.000000000 +0200 ++++ libX11-1.3.6/configure.ac 2010-09-28 16:29:26.000000000 +0200 +@@ -355,7 +355,14 @@ + # Find keysymdef.h + # + AC_MSG_CHECKING([keysym definitions]) +-KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11 ++AC_ARG_WITH(keysymdefdir, ++ AC_HELP_STRING([--with-keysymdefdir=DIR], [The location of keysymdef.h]), ++ KEYSYMDEFDIR=$withval, KEYSYMDEFDIR="") ++ ++if test x$KEYSYMDEFDIR = x; then ++ KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11 ++fi ++ + FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h" + for i in $FILES; do + if test -f "$KEYSYMDEFDIR/$i"; then diff --git a/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.1/x11_disable_makekeys.patch b/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.1/x11_disable_makekeys.patch new file mode 100644 index 0000000000..9763313975 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.1/x11_disable_makekeys.patch @@ -0,0 +1,29 @@ +Index: libX11-1.3.4/src/util/Makefile.am +=================================================================== +--- libX11-1.3.4.orig/src/util/Makefile.am ++++ libX11-1.3.4/src/util/Makefile.am +@@ -1,24 +1 @@ +- +-noinst_PROGRAMS=makekeys +- +-makekeys_CFLAGS = \ +- $(X11_CFLAGS) \ +- $(CWARNFLAGS) +- +-CC = @CC_FOR_BUILD@ +-CPPFLAGS = @CPPFLAGS_FOR_BUILD@ +-CFLAGS = @CFLAGS_FOR_BUILD@ +-LDFLAGS = @LDFLAGS_FOR_BUILD@ +- + EXTRA_DIST = mkks.sh +- +-if LINT +-# Check source code with tools like lint & sparse +- +-ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) +- +-lint: +- $(LINT) $(ALL_LINT_FLAGS) makekeys.c +- +-endif LINT diff --git a/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.3/keysymdef_include.patch b/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.3/keysymdef_include.patch new file mode 100644 index 0000000000..1a30e345f9 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.3/keysymdef_include.patch @@ -0,0 +1,19 @@ +diff -uNr libX11-1.3.6.orig//configure.ac libX11-1.3.6/configure.ac +--- libX11-1.3.6.orig//configure.ac 2010-09-20 08:04:16.000000000 +0200 ++++ libX11-1.3.6/configure.ac 2010-09-28 16:29:26.000000000 +0200 +@@ -355,7 +355,14 @@ + # Find keysymdef.h + # + AC_MSG_CHECKING([keysym definitions]) +-KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11 ++AC_ARG_WITH(keysymdefdir, ++ AC_HELP_STRING([--with-keysymdefdir=DIR], [The location of keysymdef.h]), ++ KEYSYMDEFDIR=$withval, KEYSYMDEFDIR="") ++ ++if test x$KEYSYMDEFDIR = x; then ++ KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11 ++fi ++ + FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h" + for i in $FILES; do + if test -f "$KEYSYMDEFDIR/$i"; then diff --git a/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.3/x11_disable_makekeys.patch b/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.3/x11_disable_makekeys.patch new file mode 100644 index 0000000000..9763313975 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libx11-1.4.3/x11_disable_makekeys.patch @@ -0,0 +1,29 @@ +Index: libX11-1.3.4/src/util/Makefile.am +=================================================================== +--- libX11-1.3.4.orig/src/util/Makefile.am ++++ libX11-1.3.4/src/util/Makefile.am +@@ -1,24 +1 @@ +- +-noinst_PROGRAMS=makekeys +- +-makekeys_CFLAGS = \ +- $(X11_CFLAGS) \ +- $(CWARNFLAGS) +- +-CC = @CC_FOR_BUILD@ +-CPPFLAGS = @CPPFLAGS_FOR_BUILD@ +-CFLAGS = @CFLAGS_FOR_BUILD@ +-LDFLAGS = @LDFLAGS_FOR_BUILD@ +- + EXTRA_DIST = mkks.sh +- +-if LINT +-# Check source code with tools like lint & sparse +- +-ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ +- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) +- +-lint: +- $(LINT) $(ALL_LINT_FLAGS) makekeys.c +- +-endif LINT diff --git a/meta-oe/recipes-graphics/xorg-lib/libx11.inc b/meta-oe/recipes-graphics/xorg-lib/libx11.inc new file mode 100644 index 0000000000..d1e646af0a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libx11.inc @@ -0,0 +1,52 @@ +require xorg-lib-common.inc + +DESCRIPTION = "Base X libs." +COMMON_DEPENDS = "util-macros xtrans libxdmcp libxau \ + bigreqsproto xproto xextproto xcmiscproto \ + xf86bigfontproto kbproto inputproto xproto-native" + +DEPENDS = "libxcb ${COMMON_DEPENDS}" +DEPENDS_virtclass-native = "${COMMON_DEPENDS}" +DEPENDS_virtclass-nativesdk = "${COMMON_DEPENDS}" + +FILESPATHPKG .= ":libx11-${PV}:libx11" +BBCLASSEXTEND = "native nativesdk" +PROVIDES = "virtual/libx11" +PE = "1" + +PACKAGES =+ "${PN}-xcb" + +FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${libdir}/X11/Xcms.txt" +FILES_${PN}-xcb += "${libdir}/libX11-xcb.so.*" +FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale" + +XORG_PN = "libX11" + +EXTRA_OECONF += " --with-xcb --with-keysymdefdir=${STAGING_INCDIR}/X11 --with-groff=no --with-ps2pdf=no --with-fop=no" +EXTRA_OECONF_virtclass-native = " --without-xcb --with-groff=no --with-ps2pdf=no --with-fop=no" +EXTRA_OECONF_virtclass-nativesdk = " --without-xcb --with-groff=no --with-ps2pdf=no --with-fop=no" + +# Below option is added to overcome the GCC bug on ARM +# see http://gcc.gnu.org/PR42981 for further details. +# We could potentially take it off when its fixed in gcc 4.5 + +CFLAGS_append_arm = " -fforward-propagate " + +SRC_URI += " file://keysymdef_include.patch \ + file://x11_disable_makekeys.patch \ +" + +do_compile_prepend() { + ( + unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS + cd src/util; + mv makekeys.c.orig makekeys.c || true + # MIN_REHASH 10 is only in 1.0.1 + sed -i -e 's:MIN_REHASH 10:MIN_REHASH 16:g' makekeys.c + sed -i -e 's:MIN_REHASH 15:MIN_REHASH 16:g' makekeys.c + touch makekeys-makekeys.o ; ${BUILD_CC} ${BUILD_CFLAGS} -I${STAGING_INCDIR_NATIVE} makekeys.c -o makekeys + # mv to stop it getting rebuilt + mv makekeys.c makekeys.c.orig + cd ../../ + ) || exit 1 +} diff --git a/meta-oe/recipes-graphics/xorg-lib/libx11_1.4.1.bb b/meta-oe/recipes-graphics/xorg-lib/libx11_1.4.1.bb new file mode 100644 index 0000000000..a4423305ec --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libx11_1.4.1.bb @@ -0,0 +1,12 @@ +require libx11.inc + +LICENSE = "MIT & MIT-style & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7" + +#--without-xcb is not an option anymore +#http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=15e5eaf62897b3179d1fbe457cb19f886f0449f8 +DEPENDS_virtclass-native = "libxcb-native ${COMMON_DEPENDS}" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "4603bdbce1bd73cbc140de402fe6ed24" +SRC_URI[sha256sum] = "70f4e0f798645a0f269f362bfdbd4c7934dae3a2dd9ecbad28d6ede414f63ce2" diff --git a/meta-oe/recipes-graphics/xorg-lib/libx11_1.4.3.bb b/meta-oe/recipes-graphics/xorg-lib/libx11_1.4.3.bb new file mode 100644 index 0000000000..481b90f386 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libx11_1.4.3.bb @@ -0,0 +1,12 @@ +require libx11.inc + +LICENSE = "MIT & MIT-style & BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=172255dee66bb0151435b2d5d709fcf7" + +#--without-xcb is not an option anymore +#http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=15e5eaf62897b3179d1fbe457cb19f886f0449f8 +DEPENDS_virtclass-native = "libxcb-native ${COMMON_DEPENDS}" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "85e942627aaa020813e0eb8433353563" +SRC_URI[sha256sum] = "38b5ddd93291714a46a02cb8a5dd94b995a04ed76a608551c44d1598e113635a" diff --git a/meta-oe/recipes-graphics/xorg-lib/libxaw_1.0.9.bb b/meta-oe/recipes-graphics/xorg-lib/libxaw_1.0.9.bb new file mode 100644 index 0000000000..980de3a30c --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libxaw_1.0.9.bb @@ -0,0 +1,28 @@ +require xorg-lib-common.inc +DESCRIPTION = "X Athena Widget Set" +DEPENDS += "xproto virtual/libx11 libxext xextproto libxt libxmu libxpm libxp printproto libxau" + +LIC_FILES_CHKSUM = "file://COPYING;md5=f1beacbc336a5a256bb28dbfcf01c2be" + +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "ccc57478c41b7a75b9702241b889b1d4" +SRC_URI[sha256sum] = "a83977546b78e24ac5dca86affc10b6404a87c16272405b05386feca1a2db037" + +# disable docs as groff detection doesn't work on some hosts while cross compilling +EXTRA_OECONF += " --disable-docs " + +do_install_append () { + ln -sf libXaw6.so.6 ${D}${libdir}/libXaw.so.6 + ln -sf libXaw7.so.7 ${D}${libdir}/libXaw.so.7 + ln -sf libXaw7.so.7 ${D}${libdir}/libXaw.so +} + +PACKAGES =+ "libxaw6 libxaw7 libxaw8" + +FILES_libxaw6 = "${libdir}/libXaw*.so.6*" +FILES_libxaw7 = "${libdir}/libXaw*.so.7*" +FILES_libxaw8 = "${libdir}/libXaw8.so.8*" + +XORG_PN = "libXaw" diff --git a/meta-oe/recipes-graphics/xorg-lib/libxfixes_5.0.bb b/meta-oe/recipes-graphics/xorg-lib/libxfixes_5.0.bb new file mode 100644 index 0000000000..4ca1ea284b --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libxfixes_5.0.bb @@ -0,0 +1,22 @@ +SUMMARY = "XFixes: X Fixes extension library." + +DESCRIPTION = "X applications have often needed to work around various \ +shortcomings in the core X window system. This extension is designed to \ +provide the minimal server-side support necessary to eliminate problems \ +caused by these workarounds." + +require xorg-lib-common.inc + +LICENSE = "MIT-style" +LIC_FILES_CHKSUM = "file://COPYING;md5=3c1ce42c334a6f5cccb0277556a053e0" + +DEPENDS += "virtual/libx11 xproto fixesproto xextproto" +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "678071bd7f9f7467e2fc712d81022318" +SRC_URI[sha256sum] = "537a2446129242737a35db40081be4bbcc126e56c03bf5f2b142b10a79cda2e3" + +BBCLASSEXTEND = "native" + +XORG_PN = "libXfixes" diff --git a/meta-oe/recipes-graphics/xorg-lib/libxi_1.4.2.bb b/meta-oe/recipes-graphics/xorg-lib/libxi_1.4.2.bb new file mode 100644 index 0000000000..94299c0913 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libxi_1.4.2.bb @@ -0,0 +1,21 @@ +require xorg-lib-common.inc + +SUMMARY = "XI: X Input extension library" + +DESCRIPTION = "libxi is an extension to the X11 protocol to support \ +input devices other than the core X keyboard and pointer. It allows \ +client programs to select input from these devices independently from \ +each other and independently from the core devices." + +LICENSE = "MIT & MIT-style" +LIC_FILES_CHKSUM = "file://COPYING;md5=17b064789fab936a1c58c4e13d965b0f \ + file://src/XIGetDevFocus.c;endline=23;md5=cdfb0d435a33ec57ea0d1e8e395b729f" + +DEPENDS += "libxext inputproto" +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "3d14f7bfc4a4335cf0144de9b67a5444" +SRC_URI[sha256sum] = "272b8041efc0a0203fb0ba33481ddec989539aed862181b58c8c3e410e325691" + +XORG_PN = "libXi" diff --git a/meta-oe/recipes-graphics/xorg-lib/libxkbui_1.0.2.bb b/meta-oe/recipes-graphics/xorg-lib/libxkbui_1.0.2.bb new file mode 100644 index 0000000000..499caf16cd --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libxkbui_1.0.2.bb @@ -0,0 +1,10 @@ +require xorg-lib-common.inc +DESCRIPTION = "X11 keyboard UI presentation library" +LICENSE = "GPL" +LIC_FILES_CHKSUM = "file://COPYING;md5=4641deddaa80fe7ca88e944e1fd94a94" +DEPENDS += "virtual/libx11 libxt libxkbfile" +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "1143e456f7429e18e88f2eadb2f2b6b1" +SRC_URI[sha256sum] = "20c23101d63234ee5f6d696dfa069b29c6c58e39eff433bcd7705b50b3ffa214" diff --git a/meta-oe/recipes-graphics/xorg-lib/libxt_1.1.1.bb b/meta-oe/recipes-graphics/xorg-lib/libxt_1.1.1.bb new file mode 100644 index 0000000000..8c22f62eca --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-lib/libxt_1.1.1.bb @@ -0,0 +1,37 @@ +require xorg-lib-common.inc + +SUMMARY = "Xt: X Toolkit Intrinsics library" + +DESCRIPTION = "The Intrinsics are a programming library tailored to the \ +special requirements of user interface construction within a network \ +window system, specifically the X Window System. The Intrinsics and a \ +widget set make up an X Toolkit. The Intrinsics provide the base \ +mechanism necessary to build a wide variety of interoperating widget \ +sets and application environments. The Intrinsics are a layer on top of \ +Xlib, the C Library X Interface. They extend the fundamental \ +abstractions provided by the X Window System while still remaining \ +independent of any particular user interface policy or style." + +LICENSE = "MIT & MIT-style" +LIC_FILES_CHKSUM = "file://COPYING;md5=3239170e81427c5948287df07691f03f" + +DEPENDS += "libsm virtual/libx11 kbproto" +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "eb22c0a1f172b06b97a3f5ae89768412" +SRC_URI[sha256sum] = "a2a1c29c684e3c9082cdb920b5aea802b179d19107b9ab2170fda07575559da7" + +EXTRA_OECONF += "--disable-install-makestrs --disable-xkb" + +do_compile() { + ( + unset CC LD CXX CCLD + oe_runmake -C util 'XT_CFLAGS=' 'CC=${BUILD_CC}' 'LD=${BUILD_LD}' 'CXX=${BUILD_CXX}' 'CCLD=${BUILD_CCLD}' 'CFLAGS=-D_GNU_SOURCE -I${STAGING_INCDIR_NATIVE} ${BUILD_CFLAGS}' 'LDFLAGS=${BUILD_LDFLAGS}' 'CXXFLAGS=${BUILD_CXXFLAGS}' 'CPPFLAGS=${BUILD_CPPFLAGS}' makestrs + ) || exit 1 + oe_runmake +} + +BBCLASSEXTEND = "native" + +XORG_PN = "libXt" diff --git a/meta-oe/recipes-graphics/xorg-lib/pixman_0.20.0.bb b/meta-oe/recipes-graphics/xorg-lib/pixman_0.20.0.bb index b3fbd4f155..b66bc2a735 100644 --- a/meta-oe/recipes-graphics/xorg-lib/pixman_0.20.0.bb +++ b/meta-oe/recipes-graphics/xorg-lib/pixman_0.20.0.bb @@ -1,7 +1,7 @@ require pixman.inc -SRC_URI[archive.md5sum] = "c1a31d5cedfa97c5af7148a2d1fd4356" -SRC_URI[archive.sha256sum] = "9c02c22c6cc3f28f3633d02ef6f0cac130518f621edb011ebbbf08cd1a81251a" +SRC_URI[md5sum] = "c1a31d5cedfa97c5af7148a2d1fd4356" +SRC_URI[sha256sum] = "9c02c22c6cc3f28f3633d02ef6f0cac130518f621edb011ebbbf08cd1a81251a" PR = "${INC_PR}.0" diff --git a/meta-oe/recipes-graphics/xorg-lib/pixman_0.21.4.bb b/meta-oe/recipes-graphics/xorg-lib/pixman_0.21.4.bb index f0e9e388b1..237e4efa69 100644 --- a/meta-oe/recipes-graphics/xorg-lib/pixman_0.21.4.bb +++ b/meta-oe/recipes-graphics/xorg-lib/pixman_0.21.4.bb @@ -1,7 +1,7 @@ require pixman.inc -SRC_URI[archive.md5sum] = "e50975ace979cd416a505827c15191b4" -SRC_URI[archive.sha256sum] = "57783330ee2f96121dc267b7f25b98356fd09fe9de185cd39e72e906b6444013" +SRC_URI[md5sum] = "e50975ace979cd416a505827c15191b4" +SRC_URI[sha256sum] = "57783330ee2f96121dc267b7f25b98356fd09fe9de185cd39e72e906b6444013" LICENSE = "MIT & MIT-style & Public Domain" LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3\ diff --git a/meta-oe/recipes-graphics/xorg-lib/xorg-lib-common.inc b/meta-oe/recipes-graphics/xorg-lib/xorg-lib-common.inc index 93212c591f..2f73375074 100644 --- a/meta-oe/recipes-graphics/xorg-lib/xorg-lib-common.inc +++ b/meta-oe/recipes-graphics/xorg-lib/xorg-lib-common.inc @@ -1,6 +1,5 @@ HOMEPAGE = "http://www.x.org" BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg" - SECTION = "x11/libs" LICENSE = "MIT-X" DEPENDS = "util-macros" diff --git a/meta-oe/recipes-graphics/xorg-proto/fixesproto_5.0.bb b/meta-oe/recipes-graphics/xorg-proto/fixesproto_5.0.bb new file mode 100644 index 0000000000..004813f668 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-proto/fixesproto_5.0.bb @@ -0,0 +1,21 @@ +require xorg-proto-common.inc +SUMMARY = "XFixes: X Fixes extension headers" + +DESCRIPTION = "This package provides the wire protocol for the X Fixes \ +extension. This extension is designed to provide server-side support \ +for application work arounds to shortcomings in the core X window \ +system." + + +LICENSE = "MIT & MIT-style" +LIC_FILES_CHKSUM = "file://COPYING;md5=262a7a87da56e66dd639bf7334a110c6 \ + file://xfixesproto.h;endline=44;md5=3deb31fbde34b96c9f19072b8d854fea" + +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "e7431ab84d37b2678af71e29355e101d" +SRC_URI[sha256sum] = "ba2f3f31246bdd3f2a0acf8bd3b09ba99cab965c7fb2c2c92b7dc72870e424ce" + + +CONFLICTS = "fixesext" diff --git a/meta-oe/recipes-graphics/xorg-proto/xextproto_7.2.0.bb b/meta-oe/recipes-graphics/xorg-proto/xextproto_7.2.0.bb new file mode 100644 index 0000000000..9272ac1fff --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-proto/xextproto_7.2.0.bb @@ -0,0 +1,19 @@ +require xorg-proto-common.inc +SUMMARY = "XExt: X Extension headers" + +DESCRIPTION = "This package provides the wire protocol for several X \ +extensions. These protocol extensions include DOUBLE-BUFFER, DPMS, \ +Extended-Visual-Information, LBX, MIT_SHM, MIT_SUNDRY-NONSTANDARD, \ +Multi-Buffering, SECURITY, SHAPE, SYNC, TOG-CUP, XC-APPGROUP, XC-MISC, \ +XTEST. In addition a small set of utility functions are also \ +available." + +LICENSE = "MIT & MIT-style" +LIC_FILES_CHKSUM = "file://COPYING;md5=86f273291759d0ba2a22585cd1c06c53" + +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "220732210ceffb01bf1caf970e3b1bfb" +SRC_URI[sha256sum] = "d2bc4208c6b1883ebe00bc5c0048e5d825038cda56775f74bb4aa89afdc576d5" + diff --git a/meta-oe/recipes-graphics/xorg-proto/xorg-proto-common.inc b/meta-oe/recipes-graphics/xorg-proto/xorg-proto-common.inc index 3e7c701c79..dc6fedf164 100644 --- a/meta-oe/recipes-graphics/xorg-proto/xorg-proto-common.inc +++ b/meta-oe/recipes-graphics/xorg-proto/xorg-proto-common.inc @@ -1,5 +1,6 @@ DESCRIPTION = "X protocol headers: ${BPN}" HOMEPAGE = "http://www.x.org" +BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg" SECTION = "x11/libs" LICENSE = "MIT-X" @@ -9,9 +10,10 @@ ALLOW_EMPTY = "1" INC_PR = "r2" -SRC_URI = "${XORG_MIRROR}/individual/proto/${BPN}-${PV}.tar.bz2;name=archive" +SRC_URI = "${XORG_MIRROR}/individual/proto/${BPN}-${PV}.tar.bz2" S = "${WORKDIR}/${BPN}-${PV}" inherit autotools pkgconfig +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-graphics/xorg-proto/xproto_7.0.21.bb b/meta-oe/recipes-graphics/xorg-proto/xproto_7.0.21.bb new file mode 100644 index 0000000000..2bc95097de --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-proto/xproto_7.0.21.bb @@ -0,0 +1,16 @@ +require xorg-proto-common.inc + +SUMMARY = "Xlib: C Language X interface headers" + +DESCRIPTION = "This package provides the basic headers for the X Window \ +System." + +LICENSE = "MIT & MIT-style" +LIC_FILES_CHKSUM = "file://COPYING;md5=b9e051107d5628966739a0b2e9b32676" + +PE = "1" +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "c5a93a69b701cf81925fab02b35b0d0e" +SRC_URI[sha256sum] = "38ee2f032c3a9e30504593f8b5e6c1161a6629daba93748a71c6f70c16f65548" + diff --git a/meta-oe/recipes-graphics/xorg-util/util-macros_1.13.0.bb b/meta-oe/recipes-graphics/xorg-util/util-macros_1.13.0.bb new file mode 100644 index 0000000000..3f4471aee6 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-util/util-macros_1.13.0.bb @@ -0,0 +1,15 @@ +require xorg-util-common.inc + +DESCRIPTION = "X autotools macros" +PE = "1" + +LICENSE = "MIT & MIT-style" +LIC_FILES_CHKSUM = "file://COPYING;md5=1970511fddd439b07a6ba789d28ff662" + +ALLOW_EMPTY = "1" +BBCLASSEXTEND = "native nativesdk" + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "31e9ddcbc1d8bc8c09ab180443974dd1" +SRC_URI[sha256sum] = "7bff944fb120192e7fe1706e9c0b7e41666e7983ce3e2bdef0b7734392d9e695" diff --git a/meta-oe/recipes-graphics/xorg-util/xorg-util-common.inc b/meta-oe/recipes-graphics/xorg-util/xorg-util-common.inc new file mode 100644 index 0000000000..e5c8ce9304 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-util/xorg-util-common.inc @@ -0,0 +1,11 @@ +HOMEPAGE = "http://www.x.org" +SECTION = "x11/utils" +LICENSE = "MIT-X" + +INC_PR = "r2" + +SRC_URI = "${XORG_MIRROR}/individual/util/${BPN}-${PV}.tar.gz" + +S = "${WORKDIR}/${BPN}-${PV}" + +inherit autotools pkgconfig diff --git a/meta-oe/recipes-graphics/xorg-xserver/xorg-xserver-common.inc b/meta-oe/recipes-graphics/xorg-xserver/xorg-xserver-common.inc new file mode 100644 index 0000000000..79f13fc135 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xorg-xserver-common.inc @@ -0,0 +1,112 @@ +HOMEPAGE = "http://www.x.org" +SECTION = "x11/base" +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://COPYING;md5=3dd2bbe3563837f80ed8926b06c1c353" + +INC_PR = "r18" + +PROVIDES = "virtual/xserver" + +# Config manager for xserver, options are: hal, udev, empty (for configuration in xorg.conf) +DISTRO_XORG_CONFIG_MANAGER ?= "hal" +DISTRO_XORG_CONFIG_MANAGER_shr ?= "udev" + +# default none, enabled by DISTRO_XORG_CONFIG_MANAGER setting +CONFIG_MANAGER_OPTION += "${@['--disable-config-hal','--enable-config-hal',''][bb.data.getVar('DISTRO_XORG_CONFIG_MANAGER',d) in ['hal']]}" +CONFIG_MANAGER_OPTION += "${@['--disable-config-udev','--enable-config-udev',''][bb.data.getVar('DISTRO_XORG_CONFIG_MANAGER',d) in ['udev']]}" + +DEPENDS = "fontconfig freetype flex-native liblbxutil kbproto \ +xf86driproto drm glproto randrproto renderproto fixesproto damageproto \ +xcmiscproto xextproto xproto xf86miscproto xf86vidmodeproto xf86bigfontproto \ +scrnsaverproto bigreqsproto resourceproto fontsproto inputproto \ +xf86dgaproto videoproto compositeproto trapproto recordproto dmxproto \ +resourceproto xineramaproto xtrans evieext libxkbfile libxfont libxau \ +libfontenc libxdmcp libxxf86vm libxaw libxmu libxt libxpm libxext libx11 \ +libxkbui libxxf86misc libxi libdmx libxtst libxres virtual/libgl libxcalibrate \ +libxv ${DISTRO_XORG_CONFIG_MANAGER}" + +RRECOMMENDS_${PN} = "libpciaccess" + +XORG_PN = "xorg-server" +SRC_URI = "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${PV}.tar.bz2" + +S = "${WORKDIR}/${XORG_PN}-${PV}" + +inherit autotools pkgconfig glx-use-tls + +EXTRA_OECONF += " --enable-xcalibrate \ + --enable-kdrive \ + --enable-xephyr \ + --disable-xfbdev \ + --disable-xnest \ + --disable-kdrive-vesa \ + --with-default-font-path="/usr/share/fonts/X11/misc" \ + ac_cv_file__usr_share_sgml_X11_defs_ent=no" + +# CONFIG_MANAGER_OPTION is used only in recipes which support those options + +EXTRA_OECONF_append_arm = " ac_cv_header_linux_apm_bios_h=no " + +PACKAGES =+ "xserver-security-policy" +FILES_xserver-security-policy += "${libdir}/xserver/SecurityPolicy" +RRECOMMENDS_${PN} += "xserver-security-policy xkeyboard-config rgb xserver-xorg-conf" + +PACKAGES =+ "${PN}-sdl ${PN}-fbdev ${PN}-xprint ${PN}-xvfb ${PN}-utils ${PN}-xephyr" + +RDEPENDS_${PN}-xvfb += "xkeyboard-config" + +FILES_${PN}-fbdev = "${bindir}/Xfbdev" +FILES_${PN}-sdl = "${bindir}/Xsdl" +FILES_${PN}-xprint = "${libdir}/X11/xserver/*/print" +FILES_${PN}-xvfb = "${bindir}/Xvfb" +FILES_${PN}-utils = "${bindir}/scanpci ${bindir}/pcitweak ${bindir}/ioport ${bindir}/in[bwl] ${bindir}/out[bwl] ${bindir}/mmap[rw] ${bindir}/gtf ${bindir}/getconfig ${bindir}/getconfig.pl" +FILES_${PN} = "${bindir} ${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/modules ${libdir}/xorg/modules /etc/X11 ${libdir}/xorg/protocol.txt ${datadir}/X11/xorg.conf.d" +FILES_${PN}-doc += "${libdir}/X11/doc /usr/share/X11/xkb/compiled/README.compiled" +FILES_${PN}-xephyr = "${bindir}/Xephyr" + +FILES_${PN}-dbg += "${libdir}/xorg/modules/.debug \ + ${libdir}/xorg/modules/*/.debug \ + ${libdir}/xorg/modules/*/*/.debug \ + " + +# Split out some modules and extensions from the main package +# These aren't needed for basic operations and only take up space: +# 32.0k libdri.so +# 336.0k libglx.so +# 1360k libint10.so +# 180.0k libwfb.so +# 320.0k libxaa.so +# 124.0k libxf1bpp.so +# 84.0k libxf4bpp.so + +PACKAGES =+ "${PN}-extension-dri \ + ${PN}-extension-dri2 \ + ${PN}-extension-glx \ + ${PN}-module-libint10 \ + ${PN}-module-libafb \ + ${PN}-module-libwfb \ + ${PN}-module-libmfb \ + ${PN}-module-libcfb \ + ${PN}-module-xaa \ + ${PN}-module-libxf1bpp \ + ${PN}-module-libxf4bpp" + +FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so" +FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so" +FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so" +FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.so" +FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.so" +FILES_${PN}-module-libwfb = "${libdir}/xorg/modules/libwfb.so" +FILES_${PN}-module-libmfb = "${libdir}/xorg/modules/libmfb.so" +FILES_${PN}-module-libcfb = "${libdir}/xorg/modules/libcfb.so" +FILES_${PN}-module-xaa = "${libdir}/xorg/modules/libxaa.so" +FILES_${PN}-module-libxf1bpp = "${libdir}/xorg/modules/libxf1bpp.so" +FILES_${PN}-module-libxf4bpp = "${libdir}/xorg/modules/libxf4bpp.so" + +PACKAGES =+ "${PN}-multimedia-modules" + +FILES_${PN}-multimedia-modules = "${libdir}/xorg/modules/multimedia/*drv*" + +do_install_append () { + ln -sf ${datadir}/fonts/X11 ${D}/${libdir}/X11/fonts +} diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.10.0.901/hack-assume-pixman-supports-overlapped-blt.patch b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.10.0.901/hack-assume-pixman-supports-overlapped-blt.patch new file mode 100644 index 0000000000..a947582f15 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.10.0.901/hack-assume-pixman-supports-overlapped-blt.patch @@ -0,0 +1,14 @@ +diff --git a/fb/fbcopy.c b/fb/fbcopy.c +index 07eb663..ba394b7 100644 +--- a/fb/fbcopy.c ++++ b/fb/fbcopy.c +@@ -91,8 +91,7 @@ fbCopyNtoN (DrawablePtr pSrcDrawable, + while (nbox--) + { + #ifndef FB_ACCESS_WRAPPER /* pixman_blt() doesn't support accessors yet */ +- if (pm == FB_ALLONES && alu == GXcopy && !reverse && +- !upsidedown) ++ if (pm == FB_ALLONES && alu == GXcopy) + { + if (!pixman_blt ((uint32_t *)src, (uint32_t *)dst, srcStride, dstStride, srcBpp, dstBpp, + (pbox->x1 + dx + srcXoff), diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.10.0.901/hack-fbdev-ignore-return-mode.patch b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.10.0.901/hack-fbdev-ignore-return-mode.patch new file mode 100644 index 0000000000..d3661cbea2 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.10.0.901/hack-fbdev-ignore-return-mode.patch @@ -0,0 +1,39 @@ +Ugly hack that prevents server termination with xf86-video-fbdev-0.4.1 +(and probably other) while returning from chvt or resume on some +hardware (e. g. zaurus). + +Correct fix would require debugging of fbdev mode during LeaveVT and +EnterVT. + +This patch may cause staying in incorrect or corrupted display mode +after EnterVT, but on man affected devices it does not cause any visible +problems. + +Hacked code is never called on properly written drivers. + +Devices affected and testers involved for future patch removal: +Sharp Zaurus (spitz/akita): Stanislav Brabec <utx@penguin.cz> + +See also: +https://bugzilla.redhat.com/show_bug.cgi?id=238451 + +The bug (first line indicates that your device is affected): + +(EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode + +Fatal server error: +EnterVT failed for screen 0 + +Index: xorg-server-1.7.3/hw/xfree86/fbdevhw/fbdevhw.c +=================================================================== +--- xorg-server-1.7.3.orig/hw/xfree86/fbdevhw/fbdevhw.c ++++ xorg-server-1.7.3/hw/xfree86/fbdevhw/fbdevhw.c +@@ -571,7 +571,7 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, Displa + #if DEBUG + print_fbdev_mode("returned", &set_var); + #endif +- return FALSE; ++ /* return FALSE; UGLY HACK to allow return from chvt */ + } + + if (!check) diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/dolt-fix.patch b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/dolt-fix.patch new file mode 100644 index 0000000000..e332ce0bbe --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/dolt-fix.patch @@ -0,0 +1,22 @@ +Index: xorg-server/m4/dolt.m4 +=================================================================== +--- xorg-server.orig/m4/dolt.m4 2009-04-14 21:14:56.000000000 +0400 ++++ xorg-server/m4/dolt.m4 2009-07-15 12:38:33.796848843 +0400 +@@ -147,7 +147,7 @@ + cat <<__DOLTLIBTOOL__EOF__ > doltlibtool + #!$DOLT_BASH + __DOLTLIBTOOL__EOF__ +- cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool ++ cat <<'__DOLTLIBTOOL__EOF__' | sed -e "s/@host_alias@/$host_alias/g" >>doltlibtool + top_builddir_slash="${0%%doltlibtool}" + : ${top_builddir_slash:=./} + args=() +@@ -163,7 +163,7 @@ + if $modeok && $tagok ; then + . ${top_builddir_slash}doltcompile "${args@<:@@@:>@}" + else +- exec ${top_builddir_slash}libtool "$[]@" ++ exec ${top_builddir_slash}@host_alias@-libtool "$[]@" + fi + __DOLTLIBTOOL__EOF__ + diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/hack-assume-pixman-supports-overlapped-blt.patch b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/hack-assume-pixman-supports-overlapped-blt.patch new file mode 100644 index 0000000000..a947582f15 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/hack-assume-pixman-supports-overlapped-blt.patch @@ -0,0 +1,14 @@ +diff --git a/fb/fbcopy.c b/fb/fbcopy.c +index 07eb663..ba394b7 100644 +--- a/fb/fbcopy.c ++++ b/fb/fbcopy.c +@@ -91,8 +91,7 @@ fbCopyNtoN (DrawablePtr pSrcDrawable, + while (nbox--) + { + #ifndef FB_ACCESS_WRAPPER /* pixman_blt() doesn't support accessors yet */ +- if (pm == FB_ALLONES && alu == GXcopy && !reverse && +- !upsidedown) ++ if (pm == FB_ALLONES && alu == GXcopy) + { + if (!pixman_blt ((uint32_t *)src, (uint32_t *)dst, srcStride, dstStride, srcBpp, dstBpp, + (pbox->x1 + dx + srcXoff), diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/hack-fbdev-ignore-return-mode.patch b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/hack-fbdev-ignore-return-mode.patch new file mode 100644 index 0000000000..d3661cbea2 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/hack-fbdev-ignore-return-mode.patch @@ -0,0 +1,39 @@ +Ugly hack that prevents server termination with xf86-video-fbdev-0.4.1 +(and probably other) while returning from chvt or resume on some +hardware (e. g. zaurus). + +Correct fix would require debugging of fbdev mode during LeaveVT and +EnterVT. + +This patch may cause staying in incorrect or corrupted display mode +after EnterVT, but on man affected devices it does not cause any visible +problems. + +Hacked code is never called on properly written drivers. + +Devices affected and testers involved for future patch removal: +Sharp Zaurus (spitz/akita): Stanislav Brabec <utx@penguin.cz> + +See also: +https://bugzilla.redhat.com/show_bug.cgi?id=238451 + +The bug (first line indicates that your device is affected): + +(EE) FBDEV(0): FBIOPUT_VSCREENINFO succeeded but modified mode + +Fatal server error: +EnterVT failed for screen 0 + +Index: xorg-server-1.7.3/hw/xfree86/fbdevhw/fbdevhw.c +=================================================================== +--- xorg-server-1.7.3.orig/hw/xfree86/fbdevhw/fbdevhw.c ++++ xorg-server-1.7.3/hw/xfree86/fbdevhw/fbdevhw.c +@@ -571,7 +571,7 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, Displa + #if DEBUG + print_fbdev_mode("returned", &set_var); + #endif +- return FALSE; ++ /* return FALSE; UGLY HACK to allow return from chvt */ + } + + if (!check) diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/randr-support.patch b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/randr-support.patch new file mode 100644 index 0000000000..abc7db41eb --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-1.9.4/randr-support.patch @@ -0,0 +1,102 @@ +diff -uNr xorg-server-1.9.0.orig//hw/xfree86/common/xf86Xinput.c xorg-server-1.9.0/hw/xfree86/common/xf86Xinput.c +--- xorg-server-1.9.0.orig//hw/xfree86/common/xf86Xinput.c 2010-08-13 07:53:48.000000000 +0200 ++++ xorg-server-1.9.0/hw/xfree86/common/xf86Xinput.c 2010-08-28 21:31:10.000000000 +0200 +@@ -106,6 +106,8 @@ + + #include "os.h" + ++#define RR_Rotate_All (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270) ++ + EventListPtr xf86Events = NULL; + + /** +@@ -1359,4 +1361,73 @@ + EnableDevice(dev, TRUE); + } + ++/* Taken from evdev-properties.h. */ ++#define EVDEV_PROP_SWAP_AXES "Evdev Axes Swap" ++#define EVDEV_PROP_INVERT_AXES "Evdev Axis Inversion" ++ ++/* This is a hack until we get device -> CRTC association. */ ++void ++xf86InputRotationNotify(Rotation rotation) ++{ ++ DeviceIntPtr dev; ++ LocalDevicePtr local; ++ int ret; ++ int swap_axes = 0; ++ CARD8 invert[2] = { 0, 0 }; ++ static Atom prop_swap = 0, prop_invert = 0; ++ static int atom_generation = -1; ++ ++ if (atom_generation != serverGeneration) { ++ prop_swap = 0; ++ prop_invert = 0; ++ } ++ ++ switch (rotation & RR_Rotate_All) { ++ case RR_Rotate_0: ++ swap_axes = 1; ++ invert[0] = 0; ++ invert[1] = 0; ++ break; ++ case RR_Rotate_90: ++ swap_axes = 0; ++ invert[0] = 0; ++ invert[1] = 1; ++ break; ++ case RR_Rotate_180: ++ swap_axes = 1; ++ invert[0] = 0; ++ invert[1] = 0; ++ break; ++ case RR_Rotate_270: ++ swap_axes = 0; ++ invert[0] = 0; ++ invert[1] = 1; ++ break; ++ } ++ ++ if (!prop_swap) ++ prop_swap = MakeAtom(EVDEV_PROP_SWAP_AXES, ++ strlen(EVDEV_PROP_SWAP_AXES), TRUE); ++ if (!prop_invert) ++ prop_invert = MakeAtom(EVDEV_PROP_INVERT_AXES, ++ strlen(EVDEV_PROP_INVERT_AXES), TRUE); ++ ++ for (dev = inputInfo.devices; dev; dev = dev->next) { ++ local = dev->public.devicePrivate; ++ ret = XIChangeDeviceProperty(dev, prop_swap, XA_INTEGER, 8, ++ PropModeReplace, 1, &swap_axes, FALSE); ++ if (ret != Success) { ++ xf86Msg(X_ERROR, "Changing swap_xy property failed!\n"); ++ continue; ++ } ++ ret = XIChangeDeviceProperty(dev, prop_invert, XA_INTEGER, 8, ++ PropModeReplace, 2, invert, FALSE); ++ if (ret != Success) { ++ xf86Msg(X_ERROR, "Changing invert property failed!\n"); ++ continue; ++ } ++ } ++} ++ ++ + /* end of xf86Xinput.c */ +diff -uNr xorg-server-1.9.0.orig//hw/xfree86/modes/xf86Crtc.c xorg-server-1.9.0/hw/xfree86/modes/xf86Crtc.c +--- xorg-server-1.9.0.orig//hw/xfree86/modes/xf86Crtc.c 2010-07-20 05:24:12.000000000 +0200 ++++ xorg-server-1.9.0/hw/xfree86/modes/xf86Crtc.c 2010-08-28 21:28:48.000000000 +0200 +@@ -387,6 +387,12 @@ + if (didLock) + crtc->funcs->unlock (crtc); + ++ /* ++ * Rotate Touchscreen ++ */ ++ xf86InputRotationNotify(crtc->rotation); ++ ++ + return ret; + } + diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/am3517-evm/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/am3517-evm/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/am3517-evm/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/am37x-evm/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/am37x-evm/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/am37x-evm/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/archos5/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/archos5/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/archos5/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/archos5it/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/archos5it/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/archos5it/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/at91sam9263ek/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/at91sam9263ek/xorg.conf new file mode 100644 index 0000000000..7f3eb7797f --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/at91sam9263ek/xorg.conf @@ -0,0 +1,11 @@ +Section "ServerLayout" + Identifier "default" + InputDevice "atmel-ts" "CorePointer" +EndSection + +Section "InputDevice" + Identifier "atmel-ts" + Driver "evdev" + Option "SwapAxes" "1" + Option "Device" "/dev/input/touchscreen0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/at91sam9g45ek/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/at91sam9g45ek/xorg.conf new file mode 100644 index 0000000000..0502f8737c --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/at91sam9g45ek/xorg.conf @@ -0,0 +1,23 @@ +Section "ServerLayout" + Identifier "default" + InputDevice "atmel-tsadcc" "CorePointer" +EndSection + +Section "InputDevice" + Identifier "atmel-tsadcc" + Driver "evdev" + Option "Device" "/dev/input/touchscreen0" +EndSection + +Section "InputDevice" + Driver "mouse" + Identifier "Mouse[1]" + Option "Buttons" "10" + Option "Device" "/dev/input/mice" +EndSection + +Section "InputDevice" + Driver "kbd" + Identifier "Keyboard[0]" + Option "Protocol" "Standard" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/babbage/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/babbage/xorg.conf new file mode 100644 index 0000000000..d4d41db42d --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/babbage/xorg.conf @@ -0,0 +1,56 @@ +# +# X11 configuration for i.MX51 Babbage EVK +# Based on pm9263 by Koan sas +# + +Section "Monitor" + Identifier "Display" +EndSection + +Section "Device" + Identifier "fbdevice" + Driver "fbdev" + Option "fbdev" "/dev/fb0" + Option "shadowfb" "true" +EndSection + +Section "Screen" + Identifier "fbscreen" + Device "fbdevice" + Monitor "Display" +EndSection + +Section "InputDevice" + Identifier "mxc_ts" + Driver "evdev" + Option "SwapAxes" "0" + Option "Device" "/dev/input/touchscreen0" +EndSection + +Section "InputDevice" + Identifier "Generic Mouse" + Driver "mouse" + Option "CorePointer" +EndSection + +Section "InputDevice" + Identifier "Keypad" + Driver "evdev" + Option "Device" "/dev/input/event0" +# Option "XkbModel" "nokiarx51" +# Option "XkbLayout" "us" +EndSection + +Section "ServerLayout" + Identifier "Layout" + Screen "fbscreen" + InputDevice "mxc_ts" "CorePointer" + InputDevice "Keypad" +# Enable mouse only if necessary, it may interfere with touchscreen behaviour +# InputDevice "Generic Mouse" +EndSection + +#Section "ServerFlags" +# Option "AutoAddDevices" "false" +#EndSection + diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/beagleboard/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/beagleboard/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/beagleboard/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/bug/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/bug/xorg.conf new file mode 100644 index 0000000000..cf684ec177 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/bug/xorg.conf @@ -0,0 +1,75 @@ +# +# Initial version of X11 configuration for BugLabs BUG device. +# +# Up to 2 LCD modules are supported (as DISPLAY=0.0/0.1). +# Touchscreen on both screen works properly (req tslib 0.0.6 driver). +# +# Mouse is not supported yet because the evdev driver need a precise +# dev node and evdev dev nodes are somewhat random +# + +Section "Monitor" + Identifier "Monitor 1" +EndSection + +Section "Monitor" + Identifier "Monitor 2" +EndSection + +Section "Device" + Identifier "fbdev Device 2" + Driver "fbdev" + Option "fbdev" "/dev/fb2" + Option "shadowfb" "true" +EndSection + +Section "Device" + Identifier "fbdev Device 1" + Driver "fbdev" + Option "fbdev" "/dev/fb1" + Option "shadowfb" "true" +EndSection + +Section "Screen" + Identifier "fbdev Screen 2" + Device "fbdev Device 2" + Monitor "Monitor 2" +EndSection + +Section "Screen" + Identifier "fbdev Screen 1" + Device "fbdev Device 1" + Monitor "Monitor 1" +EndSection + +Section "ServerLayout" + Identifier "Layout" + Screen "fbdev Screen 1" + Screen "fbdev Screen 2" Below "fbdev Screen 1" + InputDevice "ts4" + InputDevice "ts5" + InputDevice "Keyboard" +EndSection + +Section "InputDevice" + Identifier "ts5" + Driver "tslib" + Option "Device" "/dev/input/bmi_lcd_ts5" + Option "ScreenNumber" "1" +EndSection + +Section "InputDevice" + Identifier "ts4" + Driver "tslib" + Option "Device" "/dev/input/bmi_lcd_ts4" + Option "ScreenNumber" "0" +EndSection + +Section "InputDevice" + Identifier "Keyboard" + Driver "kbd" +EndSection + +Section "ServerFlags" + Option "AutoAddDevices" "false" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/bug20/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/bug20/xorg.conf new file mode 100644 index 0000000000..6301d06900 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/bug20/xorg.conf @@ -0,0 +1,37 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" +# Load "type1" +# Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" + InputDevice "bmi-lcd-ts" "CorePointer" +EndSection + +Section "InputDevice" + Identifier "bmi-lcd-ts" + Driver "tslib" + Option "SwapAxes" "1" + Option "Device" "/dev/input/touchscreen0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/cm-t35/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/cm-t35/xorg.conf new file mode 100644 index 0000000000..07d849d705 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/cm-t35/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/dm37x-evm/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/dm37x-evm/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/dm37x-evm/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/eee701/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/eee701/xorg.conf new file mode 100644 index 0000000000..4ee293b797 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/eee701/xorg.conf @@ -0,0 +1,97 @@ +Section "ServerLayout" + Identifier "X.org Configured" + Screen 0 "Screen0" 0 0 + InputDevice "Touchpad" + InputDevice "Keyboard" + InputDevice "Mouse" + Option "AllowEmptyInput" "false" +EndSection + +Section "Files" + ModulePath "/usr/lib/xorg/modules" + FontPath "/usr/share/fonts/X11/misc" +EndSection + +Section "Module" + Load "dbe" + Load "extmod" +EndSection + +Section "InputDevice" + Identifier "Keyboard" + Driver "kbd" + Option "CoreKeyboard" +EndSection + +Section "InputDevice" + Identifier "Touchpad" + Driver "synaptics" + Option "TapButton1" "1" + Option "CorePointer" +EndSection + +Section "InputDevice" + Identifier "Mouse" + Driver "mouse" + Option "Protocol" "Auto" +EndSection + + +Section "Monitor" + Identifier "Monitor0" + VendorName "Monitor Vendor" + ModelName "Monitor Model" +EndSection + +Section "Device" + ### Available Driver options are:- + ### Values: <i>: integer, <f>: float, <bool>: "True"/"False", + ### <string>: "String", <freq>: "<f> Hz/kHz/MHz" + ### [arg]: arg optional + #Option "NoAccel" # [<bool>] + #Option "SWcursor" # [<bool>] + #Option "ColorKey" # <i> + #Option "CacheLines" # <i> + #Option "Dac6Bit" # [<bool>] + #Option "DRI" # [<bool>] + #Option "NoDDC" # [<bool>] + #Option "ShowCache" # [<bool>] + #Option "XvMCSurfaces" # <i> + #Option "PageFlip" # [<bool>] + Identifier "Card0" + Driver "intel" + VendorName "Unknown Vendor" + BoardName "Unknown Board" + BusID "PCI:0:2:0" +EndSection + +Section "Screen" + Identifier "Screen0" + Device "Card0" + Monitor "Monitor0" + SubSection "Display" + Viewport 0 0 + Depth 1 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 4 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 8 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 15 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 16 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 24 + EndSubSection +EndSection + diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/htcdream/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/htcdream/xorg.conf new file mode 100644 index 0000000000..be3c6ec545 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/htcdream/xorg.conf @@ -0,0 +1,69 @@ +Section "Monitor" + Identifier "Monitor0" + Mode "320x480" + DotClock 0 + HTimings 320 320 320 320 + VTimings 480 480 480 480 + Flags "-HSync" "-VSync" + EndMode +EndSection + +Section "Device" + Identifier "fbdev" + Driver "fbdev" + Option "ShadowFB" "on" + Option "Rotate" "CW" # comment for disabling rotation +EndSection + +Section "Screen" + Identifier "Framebuffer" + Device "fbdev" + Monitor "Monitor0" + DefaultFbBpp 16 + SubSection "Display" + Depth 16 + Modes "320x480" + EndSubSection +EndSection + + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Framebuffer" + InputDevice "Trackball" + InputDevice "Touchscreen" + InputDevice "Keyboard" +EndSection + +Section "InputDevice" + Identifier "Trackball" + Driver "evdev" + Option "Device" "/dev/input/event2" + Option "ScreenNumber" "0" + Option "ReportingMode" "Raw" + Option "SwapAxes" "True" # comment for disabling rotation + Option "InvertY" "True" # comment for disabling rotation +EndSection + + +Section "InputDevice" + Identifier "Touchscreen" + Driver "evdev" + Option "Device" "/dev/input/event1" + Option "SwapAxes" "True" # comment for disabling rotation + Option "InvertY" "True" # comment for disabling rotation + Option "ReportingMode" "Raw" +EndSection + +Section "InputDevice" + Identifier "Keyboard" + Driver "kbd" + Option "XkbLayout" "us" + Option "XkbModel" "htcdream" +EndSection + + +Section "ServerFlags" + Option "AutoAddDevices" "false" +EndSection + diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/htcleo/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/htcleo/xorg.conf new file mode 100644 index 0000000000..4153a26281 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/htcleo/xorg.conf @@ -0,0 +1,73 @@ +Section "Monitor" + Identifier "Monitor0" + Mode "480x800" + DotClock 0 + HTimings 480 480 480 480 + VTimings 800 800 800 800 + Flags "-HSync" "-VSync" + EndMode +EndSection + + + +Section "Device" + Identifier "fbdev" + Driver "fbdev" + Option "ShadowFB" "on" + #Option "Rotate" "CW" +EndSection + + +Section "Screen" + Identifier "Framebuffer" + Device "fbdev" + Monitor "Monitor" + DefaultFbBpp 16 + SubSection "Display" + Depth 16 + Modes "480x800" + EndSubSection +EndSection + +Section "Screen" + Identifier "480x800x16" + Device "fbdev" + Monitor "Monitor" + DefaultFbBpp 16 + SubSection "Display" + Depth 16 + Modes "480x800" + EndSubSection +EndSection + + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Framebuffer" + InputDevice "Touchscreen" "CorePointer" + InputDevice "Keyboard" "CoreKeyboard" +EndSection + +Section "InputDevice" + Identifier "Mouse0" + Driver "mouse" + Option "Protocol" "auto" + Option "Device" "/dev/input/mice" + Option "Emulate3Buttons" "no" + Option "ZAxisMapping" "4 5" +EndSection + + +Section "InputDevice" + Identifier "Touchscreen" + Driver "tslib" + Option "Protocol" "auto" + Option "Device" "/dev/input/event0" + Option "CorePointer" "true" +EndSection + +Section "InputDevice" + Identifier "Keyboard" + Driver "kbd" + Option "XkbLayout" "en_US" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/igep0020/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/igep0020/xorg.conf new file mode 100644 index 0000000000..07d849d705 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/igep0020/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/ion/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/ion/xorg.conf new file mode 100644 index 0000000000..95a15235b9 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/ion/xorg.conf @@ -0,0 +1,51 @@ +# xorg.conf (X.Org X Window System server configuration file) +# +# This file was generated by dexconf, the Debian X Configuration tool, using +# values from the debconf database. +# +# Edit this file with caution, and see the xorg.conf manual page. +# (Type "man xorg.conf" at the shell prompt.) +# +# This file is automatically updated on xserver-xorg package upgrades *only* +# if it has not been modified since the last upgrade of the xserver-xorg +# package. +# +# Note that some configuration settings that could be done previously +# in this file, now are automatically configured by the server and settings +# here are ignored. +# +# If you have edited this file but would like it to be automatically updated +# again, run the following command: +# sudo dpkg-reconfigure -phigh xserver-xorg + +Section "Device" + Identifier "NVidia" + Driver "nvidia" +# Option "NoLogo" "True" +EndSection + +Section "Monitor" + Identifier "DELL 2007WFP" +# Option "DPMS" + HorizSync 30.0-83.0 + VertRefresh 56.0-76.0 + ModeLine "1680x1050" 119.0 1680 1728 1760 1840 1050 1053 1059 1080 -HSync +VSync +EndSection + +Section "Screen" + Identifier "Default Screen" + Device "NVidia" + Monitor "DELL 2007WFP" + DefaultDepth 24 + SubSection "Display" + Depth 24 + Modes "1680x1050" + ViewPort 0 0 + EndSubSection +EndSection + +Section "Module" + Load "glx" +EndSection + + diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf new file mode 100644 index 0000000000..83ac9c1486 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/iphone3g/xorg.conf @@ -0,0 +1,29 @@ +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "fbdev" + Option "ShadowFB" "on" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" +EndSection + + +Section "InputDevice" + Identifier "touchscreen" + Driver "evdev" + Option "Device" "/dev/input/event2" + Option "ReportingMode" "Raw" + Option "SendCoreEvents" "On" + Option "GrabDevices" "True" + Option "InvertY" "0" + Option "SwapAxes" "0" +EndSection + + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" + InputDevice "touchscreen" "CorePointer" "AlwaysCore" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/mh355/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/mh355/xorg.conf new file mode 100644 index 0000000000..4c275c9dc4 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/mh355/xorg.conf @@ -0,0 +1,47 @@ +# +# X11 configuration for Microhard MH355 device +# (C)2010 Koan sas - www.KoanSoftware.com +# + +Section "Monitor" + Identifier "Display" +EndSection + +Section "Device" + Identifier "fbdevice" + Driver "fbdev" + Option "fbdev" "/dev/fb0" + Option "shadowfb" "true" +EndSection + +Section "Screen" + Identifier "fbscreen" + Device "fbdevice" + Monitor "Display" +EndSection + +Section "InputDevice" + Identifier "mh355-ts" + Driver "evdev" + Option "SwapAxes" "1" + Option "Device" "/dev/input/touchscreen0" +EndSection + +Section "InputDevice" + Identifier "Generic Mouse" + Driver "mouse" + Option "CorePointer" +EndSection + +Section "ServerLayout" + Identifier "Layout" + Screen "fbscreen" + InputDevice "mh355-ts" "CorePointer" +# Enable mouse only if necessary, it may interfere with touchscreen behaviour +# InputDevice "Generic Mouse" +EndSection + +Section "ServerFlags" + Option "AutoAddDevices" "false" +EndSection + diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/nokia800/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/nokia800/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/nokia800/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/nokia900/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/nokia900/xorg.conf new file mode 100644 index 0000000000..d9d742ffb0 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/nokia900/xorg.conf @@ -0,0 +1,62 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Default Monitor" +EndSection + +Section "Device" + Identifier "Default omapfb Device" + Driver "omapfb" + Option "fb" "/dev/fb0" + +EndSection + +Section "InputDevice" + Identifier "gpio-keys" + Driver "evdev" + Option "Device" "/dev/input/event0" +EndSection + +Section "InputDevice" + Identifier "twl4030_pwrbutton" + Driver "evdev" + Option "Device" "/dev/input/event3" +EndSection + + +Section "InputDevice" + Identifier "Keyboard" + Driver "evdev" + Option "Device" "/dev/input/event1" + Option "XkbModel" "nokiarx51" + Option "XkbLayout" "us" + Option "CoreKeyboard" +EndSection + +Section "InputDevice" + Identifier "Touchscreen" + Driver "evdev" + Option "Device" "/dev/input/event2" +EndSection + +Section "Screen" + Identifier "Default Screen" + Device "Default omapfb Device" +EndSection + +Section "ServerLayout" + Identifier "Default Layout" + Screen "Default Screen" + InputDevice "Touchscreen" + InputDevice "Keyboard" + InputDevice "gpio-keys" + InputDevice "twl4030_pwrbutton" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/om-gta01/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/om-gta01/xorg.conf new file mode 100644 index 0000000000..edb5e0ee41 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/om-gta01/xorg.conf @@ -0,0 +1,49 @@ +Section "Monitor" + Identifier "LCD Panel" +EndSection + + +Section "Device" + Identifier "Fbdev" + Driver "fbdev" +EndSection + + +Section "Screen" + Identifier "Default Screen" + Device "Fbdev" + Monitor "LCD Panel" +EndSection + + +Section "InputDevice" + Identifier "Power Button" + Driver "evdev" + Option "Device" "/dev/input/event2" +EndSection + + +Section "InputDevice" + Identifier "AUX Button" + Driver "evdev" + Option "Device" "/dev/input/event0" +EndSection + + +Section "InputDevice" + Identifier "Touchscreen" + Driver "evdev" + Option "Device" "/dev/input/event1" +EndSection + +Section "ServerFlags" + Option "AutoAddDevices" "False" +EndSection + +Section "ServerLayout" + Identifier "Default Layout" + Screen "Default Screen" + InputDevice "Power Button" + InputDevice "AUX Button" + InputDevice "Touchscreen" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/om-gta02/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/om-gta02/xorg.conf new file mode 100644 index 0000000000..de6ed1c14f --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/om-gta02/xorg.conf @@ -0,0 +1,55 @@ +Section "Module" + Load "glx" + Load "dri2" +EndSection + + +Section "Monitor" + Identifier "LCD Panel" +EndSection + + +Section "Device" + Identifier "Glamo Graphics Chip" + Driver "glamo" +EndSection + + +Section "Screen" + Identifier "Default Screen" + Device "Glamo Graphics Chip" + Monitor "LCD Panel" +EndSection + + +Section "InputDevice" + Identifier "Power Button" + Driver "evdev" + Option "Device" "/dev/input/event0" +EndSection + + +Section "InputDevice" + Identifier "AUX Button" + Driver "evdev" + Option "Device" "/dev/input/event2" +EndSection + + +Section "InputDevice" + Identifier "Touchscreen" + Driver "evdev" + Option "Device" "/dev/input/event1" +EndSection + +Section "ServerFlags" + Option "AutoAddDevices" "False" +EndSection + +Section "ServerLayout" + Identifier "Default Layout" + Screen "Default Screen" + InputDevice "Power Button" + InputDevice "AUX Button" + InputDevice "Touchscreen" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3-pandora/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3-pandora/xorg.conf new file mode 100644 index 0000000000..446ac9777f --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3-pandora/xorg.conf @@ -0,0 +1,24 @@ +Section "Module" + Load "extmod" + Load "dbe" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3-touchbook/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3-touchbook/xorg.conf new file mode 100644 index 0000000000..56425abf81 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3-touchbook/xorg.conf @@ -0,0 +1,25 @@ +Section "Module" + Load "extmod" + Load "dbe" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "fbdev" + Option "ShadowFB" "false" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3evm/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3evm/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omap3evm/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omapzoom/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omapzoom/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omapzoom/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omapzoom2/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omapzoom2/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omapzoom2/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omapzoom36x/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omapzoom36x/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/omapzoom36x/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/overo/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/overo/xorg.conf new file mode 100644 index 0000000000..983bb0823a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/overo/xorg.conf @@ -0,0 +1,29 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "glx" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/palmpre/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/palmpre/xorg.conf new file mode 100644 index 0000000000..6915b87b96 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/palmpre/xorg.conf @@ -0,0 +1,58 @@ +Section "Module" + Load "extmod" + Load "dbe" + Load "freetype" + Load "type1" + Load "record" + Load "dri" +EndSection + +Section "Monitor" + Identifier "Builtin Default Monitor" +EndSection + +Section "Device" + Identifier "Builtin Default fbdev Device 0" + Driver "omapfb" + Option "fb" "/dev/fb0" +EndSection + +Section "Screen" + Identifier "Builtin Default fbdev Screen 0" + Device "Builtin Default fbdev Device 0" + Monitor "Builtin Default Monitor" +EndSection + +Section "ServerLayout" + Identifier "Builtin Default Layout" + Screen "Builtin Default fbdev Screen 0" + InputDevice "Touchscreen" "CorePointer" +EndSection + +Section "InputDevice" + Identifier "Touchscreen" + Driver "evdev" + Option "Device" "/dev/input/event6" + Option "SendCoreEvents" "true" + Option "Protocol" "Auto" + Option "Width" "320" + Option "Height" "528" + Option "EmulateRightButton" "1" + Option "CorePointer" "true" +EndSection + +Section "InputDevice" + Identifier "Keyboard" + Driver "palm-pre" + Option "Device" "/dev/input/event2" + Option "SendCoreEvents" "true" + #Option "XkbModel" "palm-pre" + Option "XkbLayout" "palm-pre" +# Option "XKbOptions" "" +EndSection + +#Section "InputDevice" +# Identifier "Keyboard" +# Driver "evdev" +# Option "Device" "/dev/input/event2" +#EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/ronetix-pm9263/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/ronetix-pm9263/xorg.conf new file mode 100644 index 0000000000..d4651ad877 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/ronetix-pm9263/xorg.conf @@ -0,0 +1,47 @@ +# +# X11 configuration for Ronetix PM9263 device. +# (C)2009-2010 Koan sas - www.KoanSoftware.com +# + +Section "Monitor" + Identifier "Display" +EndSection + +Section "Device" + Identifier "fbdevice" + Driver "fbdev" + Option "fbdev" "/dev/fb0" + Option "shadowfb" "true" +EndSection + +Section "Screen" + Identifier "fbscreen" + Device "fbdevice" + Monitor "Display" +EndSection + +Section "InputDevice" + Identifier "atmel-ts" + Driver "evdev" + Option "SwapAxes" "1" + Option "Device" "/dev/input/touchscreen0" +EndSection + +Section "InputDevice" + Identifier "Generic Mouse" + Driver "mouse" + Option "CorePointer" +EndSection + +Section "ServerLayout" + Identifier "Layout" + Screen "fbscreen" + InputDevice "atmel-ts" "CorePointer" +# Enable mouse only if necessary, it may interfere with touchscreen behaviour +# InputDevice "Generic Mouse" +EndSection + +Section "ServerFlags" + Option "AutoAddDevices" "false" +EndSection + diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/spitz/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/spitz/xorg.conf new file mode 100644 index 0000000000..224df5c8b0 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/spitz/xorg.conf @@ -0,0 +1,49 @@ +Section "Device" + Identifier "Generic Video Card" + Driver "fbdev" + Option "UseFBDev" "true" + Option "Rotate" "CW" +EndSection + +Section "Monitor" + Identifier "Generic Monitor" + Option "DPMS" + HorizSync 28-32 + VertRefresh 43-60 +EndSection + +Section "Screen" + Identifier "Default Screen" + Device "Generic Video Card" + Monitor "Generic Monitor" + DefaultDepth 16 + SubSection "Display" + Depth 1 + Modes "640x480" + EndSubSection + SubSection "Display" + Depth 4 + Modes "640x480" + EndSubSection + SubSection "Display" + Depth 8 + Modes "640x480" + EndSubSection + SubSection "Display" + Depth 15 + Modes "640x480" + EndSubSection + SubSection "Display" + Depth 16 + Modes "640x480" + EndSubSection + SubSection "Display" + Depth 24 + Modes "640x480" + EndSubSection +EndSection + +Section "ServerLayout" + Identifier "Default Layout" + Screen "Default Screen" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/vortex86sx/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/vortex86sx/xorg.conf new file mode 100644 index 0000000000..0f03faf33d --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/vortex86sx/xorg.conf @@ -0,0 +1,13 @@ +Section "Device" + Identifier "Card0" + Driver "vesa" +EndSection + +# SIS driver is proper one for this device but fails with misc errors. +#Section "Device" +# Identifier "Card0" +# Driver "sis" +# +# Disable MMX/SSE tests +# Option "BenchmarkMemCpy" "off" +#EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/xilinx-ml507/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/xilinx-ml507/xorg.conf new file mode 100644 index 0000000000..2950193ce3 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/xilinx-ml507/xorg.conf @@ -0,0 +1,39 @@ +Section "Monitor" + Identifier "LCD Panel" +EndSection + +Section "Device" + Identifier "Xilinx frame buffer" + Driver "fbdev" +EndSection + +Section "Screen" + Identifier "Default Screen" + Device "Xilinx frame buffer" + Monitor "LCD Panel" + SubSection "Display" + Depth 24 + Modes "640x480" + EndSubSection +EndSection + +Section "InputDevice" + Identifier "Keyboard" + Driver "kbd" +# Option "XkbLayout" "es" +# Option "XkbModel" "pc105" +EndSection + +Section "InputDevice" + Identifier "Mouse" + Driver "mouse" + Option "protocol" "auto" + Option "device" "/dev/input/mice" +EndSection + +Section "ServerLayout" + Identifier "Default Layout" + Screen "Default Screen" + InputDevice "Keyboard" + InputDevice "Mouse" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/xilinx-virtex5/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/xilinx-virtex5/xorg.conf new file mode 100644 index 0000000000..61f0f9fcdd --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/xilinx-virtex5/xorg.conf @@ -0,0 +1,38 @@ +# Xorg conf file for Xilinx platforms +Section "Monitor" + Identifier "LCD Panel" +EndSection + +Section "Device" + Identifier "Xilinx frame buffer" + Driver "fbdev" +EndSection + +Section "Screen" + Identifier "Default Screen" + Device "Xilinx frame buffer" + Monitor "LCD Panel" + SubSection "Display" + Depth 24 + Modes "640x480" + EndSubSection +EndSection + +Section "InputDevice" + Identifier "Keyboard" + Driver "kbd" +EndSection + +Section "InputDevice" + Identifier "Mouse" + Driver "mouse" + Option "protocol" "auto" + Option "device" "/dev/input/mice" +EndSection + +Section "ServerLayout" + Identifier "Default Layout" + Screen 0 "Default Screen" 0 0 + InputDevice "Keyboard" + InputDevice "Mouse" +EndSection diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/xorg.conf b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/xorg.conf new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf/xorg.conf diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf_0.1.bb b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf_0.1.bb new file mode 100644 index 0000000000..ae4493d41d --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg-conf_0.1.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Machine specific xorg.conf files" +PR = "r43" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${TOPDIR}/meta-shr/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://xorg.conf" + +do_install() { + install -d ${D}/${sysconfdir}/X11 + install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/ +} + +# Set some dependencies to make the confs actually work +RDEPENDS_omap3 = "xf86-video-omapfb" + +CONFFILES_${PN} += "${sysconfdir}/X11/xorg.conf" +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg_1.10.0.901.bb b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg_1.10.0.901.bb new file mode 100644 index 0000000000..c1d956648a --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg_1.10.0.901.bb @@ -0,0 +1,29 @@ +# Assign it here, since the hal->udev transition happens post 1.7 in angstrom +DISTRO_XORG_CONFIG_MANAGER_angstrom = "udev" + +require xorg-xserver-common.inc + +DESCRIPTION = "the X.Org X server" +DEPENDS += "pixman libpciaccess openssl dri2proto glproto xorg-minimal-fonts font-util-native" +PE = "2" +PR = "${INC_PR}.0" + +SRC_URI += " \ + file://hack-fbdev-ignore-return-mode.patch \ + file://hack-assume-pixman-supports-overlapped-blt.patch \ + " +SRC_URI[md5sum] = "d750cf5f6342b548b7ac2be56e9d1841" +SRC_URI[sha256sum] = "de18f52c35fc3d3f18c7e905296f9de5ac42dc71e4e01da9ae8e154a78c7771c" + +do_install_prepend() { + mkdir -p ${D}/${libdir}/X11/fonts +} + +# The NVidia driver requires Xinerama support in the X server. Ion uses it. +PACKAGE_ARCH_ion = "${MACHINE_ARCH}" +XINERAMA = "${@['--disable-xinerama','--enable-xinerama'][bb.data.getVar('MACHINE',d) in ['ion']]}" + +EXTRA_OECONF += " ${CONFIG_MANAGER_OPTION} ${XINERAMA} --disable-kdrive --disable-xephyr --disable-xsdl --disable-xfake --disable-xfbdev --disable-dmx" +EXTRA_OECONF += " --enable-dri2 --disable-unit-tests --disable-docs --disable-devel-docs" + +export LDFLAGS += " -ldl " diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg_1.9.4.bb b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg_1.9.4.bb new file mode 100644 index 0000000000..086ac176f3 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg_1.9.4.bb @@ -0,0 +1,31 @@ +# Assign it here, since the hal->udev transition happens post 1.7 in angstrom +DISTRO_XORG_CONFIG_MANAGER_angstrom = "udev" + +require xorg-xserver-common.inc + +DESCRIPTION = "the X.Org X server" +DEPENDS += "pixman libpciaccess openssl dri2proto glproto xorg-minimal-fonts font-util-native" +PE = "2" +PR = "${INC_PR}.0" + +SRC_URI += " \ + file://dolt-fix.patch \ + file://randr-support.patch \ + file://hack-fbdev-ignore-return-mode.patch \ + file://hack-assume-pixman-supports-overlapped-blt.patch \ + " +SRC_URI[md5sum] = "040f091dfdfb4e335116eb0032cc690b" +SRC_URI[sha256sum] = "ad11047ebba58f2e37b03c70c986db3ea0cc0f1a19d2d3612713ab77b8ec2458" + +do_install_prepend() { + mkdir -p ${D}/${libdir}/X11/fonts +} + +# The NVidia driver requires Xinerama support in the X server. Ion uses it. +PACKAGE_ARCH_ion = "${MACHINE_ARCH}" +XINERAMA = "${@['--disable-xinerama','--enable-xinerama'][bb.data.getVar('MACHINE',d) in ['ion']]}" + +EXTRA_OECONF += " ${CONFIG_MANAGER_OPTION} ${XINERAMA} --disable-kdrive --disable-xephyr --disable-xsdl --disable-xfake --disable-xfbdev --disable-dmx" +EXTRA_OECONF += " --enable-dri2 --disable-unit-tests --disable-docs --disable-devel-docs" + +export LDFLAGS += " -ldl " diff --git a/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg_git.bb b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg_git.bb new file mode 100644 index 0000000000..be441a35af --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-xserver/xserver-xorg_git.bb @@ -0,0 +1,38 @@ +# Assign it here, since the hal->udev transition happens post 1.7 in angstrom +DISTRO_XORG_CONFIG_MANAGER_angstrom = "udev" + +require xorg-xserver-common.inc + +LICENSE = "MIT-X" +LIC_FILES_CHKSUM = "file://COPYING;md5=74df27b6254cc88d2799b5f4f5949c00" + +DESCRIPTION = "the X.Org X server" +DEPENDS += "pixman libpciaccess openssl dri2proto glproto xorg-minimal-fonts font-util-native" +PV = "1.10.0.901" +PR = "${INC_PR}.0" +PR_append = "+gitr${SRCPV}" +PE = "2" + +#DEFAULT_PREFERENCE = "-1" + +SRCREV = "1f51fe4f748b2997e466863d8387bd6791b32931" +SRC_URI = " \ + git://anongit.freedesktop.org/xorg/xserver;protocol=git;branch=server-1.10-branch \ + file://hack-fbdev-ignore-return-mode.patch \ + file://hack-assume-pixman-supports-overlapped-blt.patch \ +" + +S = "${WORKDIR}/git" + +do_install_prepend() { + mkdir -p ${D}/${libdir}/X11/fonts +} + +# The NVidia driver requires Xinerama support in the X server. Ion uses it. +PACKAGE_ARCH_ion = "${MACHINE_ARCH}" +XINERAMA = "${@['--disable-xinerama','--enable-xinerama'][bb.data.getVar('MACHINE',d) in ['ion']]}" + +EXTRA_OECONF += " ${CONFIG_MANAGER_OPTION} ${XINERAMA} --disable-kdrive --disable-xephyr --disable-xsdl --disable-xfake --disable-xfbdev --disable-dmx" +EXTRA_OECONF += " --enable-dri2 --disable-unit-tests --disable-docs --disable-devel-docs" + +export LDFLAGS += " -ldl " diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/89xTs_Calibrate.xinput_calibrator.patch b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/89xTs_Calibrate.xinput_calibrator.patch new file mode 100644 index 0000000000..c04ad961a2 --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/89xTs_Calibrate.xinput_calibrator.patch @@ -0,0 +1,12 @@ +Index: xserver-common/X11/Xsession.d/89xTs_Calibrate_xinput_calibrator +=================================================================== +--- xserver-common/X11/Xsession.d/89xTs_Calibrate_xinput_calibrator (revision 0) ++++ xserver-common/X11/Xsession.d/89xTs_Calibrate_xinput_calibrator (revision 0) +@@ -0,0 +1,7 @@ ++#!/bin/sh ++ ++if [ -e /usr/bin/xinput_calibrator_once.sh ] ; then ++ if [ -e /etc/pointercal.xinput ] ; then ++ /usr/bin/xinput_calibrator_once.sh ++ fi ++fi diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/89xdgautostart.sh b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/89xdgautostart.sh new file mode 100644 index 0000000000..9886f9fee1 --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/89xdgautostart.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +XDGAUTOSTART=/etc/xdg/autostart +if [ -d $XDGAUTOSTART ] ; then + for SCRIPT in $XDGAUTOSTART/*; do + CMD=`grep ^Exec= $SCRIPT | cut -d '=' -f 2` + $CMD & + done +fi diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/90xXWindowManager.patch b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/90xXWindowManager.patch new file mode 100644 index 0000000000..be5f5ce70c --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/90xXWindowManager.patch @@ -0,0 +1,11 @@ +Index: xserver-common/X11/Xsession.d/90xXWindowManager +=================================================================== +--- xserver-common/X11/Xsession.d/90xXWindowManager (revision 0) ++++ xserver-common/X11/Xsession.d/90xXWindowManager (revision 0) +@@ -0,0 +1,6 @@ ++#!/bin/sh ++if [ -x $HOME/.Xsession ]; then ++ exec $HOME/.Xsession ++else ++ exec /usr/bin/x-window-manager ++fi diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.add.dpi.for.gta.patch b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.add.dpi.for.gta.patch new file mode 100644 index 0000000000..f6e36d9e10 --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.add.dpi.for.gta.patch @@ -0,0 +1,29 @@ +xdpyinfo returns 96, but 285 is right value (but 280 is used as it renders 4 columns of illume icons instead of 3 and empty space) + +diff -uNr xserver-common-1.33.orig//X11/xserver-common xserver-common-1.33/X11/xserver-common +--- xserver-common-1.33.orig//X11/xserver-common 2010-04-28 23:27:10.000000000 +0200 ++++ xserver-common-1.33/X11/xserver-common 2010-04-28 23:29:07.000000000 +0200 +@@ -133,19 +133,19 @@ + ARGS="$ARGS -screen ${SCREEN_SIZE}" + DPI="225" ;; + "gta01" ) +- DPI="285" ++ DPI="280" + if [ "$XSERVER" != "Xorg" ] ; then + ARGS="$ARGS -screen 480x640" + else +- ARGS="$ARGS -nocursor" ++ ARGS="$ARGS -dpi ${DPI} -nocursor" + fi + ;; + "gta02") +- DPI="285" ++ DPI="280" + if [ "$XSERVER" != "Xorg" ] ; then + ARGS="$ARGS -screen ${SCREEN_SIZE}" + else +- ARGS="$ARGS -nocursor" ++ ARGS="$ARGS -dpi ${DPI} -nocursor" + fi + ;; + "motorola_ezx_platform") diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.add.nocursor.for.gta.patch b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.add.nocursor.for.gta.patch new file mode 100644 index 0000000000..bd16efc106 --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.add.nocursor.for.gta.patch @@ -0,0 +1,20 @@ +diff -uNr xserver-common-1.33.orig//X11/xserver-common xserver-common-1.33/X11/xserver-common +--- xserver-common-1.33.orig//X11/xserver-common 2010-04-28 10:44:23.000000000 +0200 ++++ xserver-common-1.33/X11/xserver-common 2010-04-28 10:46:41.000000000 +0200 +@@ -136,12 +136,16 @@ + DPI="285" + if [ "$XSERVER" != "Xorg" ] ; then + ARGS="$ARGS -screen 480x640" ++ else ++ ARGS="$ARGS -nocursor" + fi + ;; + "gta02") + DPI="285" + if [ "$XSERVER" != "Xorg" ] ; then + ARGS="$ARGS -screen ${SCREEN_SIZE}" ++ else ++ ARGS="$ARGS -nocursor" + fi + ;; + "motorola_ezx_platform") diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.add.xserver-system.patch b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.add.xserver-system.patch new file mode 100644 index 0000000000..5d9d5d128d --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.add.xserver-system.patch @@ -0,0 +1,12 @@ +diff -uNr xserver-common-1.33.orig//X11/xserver-common xserver-common-1.33/X11/xserver-common +--- xserver-common-1.33.orig//X11/xserver-common 2010-04-28 23:27:10.000000000 +0200 ++++ xserver-common-1.33/X11/xserver-common 2010-04-28 23:29:07.000000000 +0200 +@@ -192,3 +196,8 @@ + if [ "$XSERVER" != "Xorg" ] ; then + ARGS="$ARGS $MOUSE" + fi ++ ++# let a local script modify the variables ++if [ -e /etc/X11/xserver-system ] ; then ++ . /etc/X11/xserver-system ++fi diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.n900.patch b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.n900.patch new file mode 100644 index 0000000000..4d36f5f713 --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/Xserver.n900.patch @@ -0,0 +1,17 @@ +diff -uri xserver-common-1.33.orig/X11/xserver-common xserver-common-1.33/X11/xserver-common +--- xserver-common-1.33.orig/X11/xserver-common 2010-09-14 17:10:35.955430177 +0200 ++++ xserver-common-1.33/X11/xserver-common 2010-09-14 17:17:12.484423440 +0200 +@@ -132,6 +132,13 @@ + "nokia_n800" | "nokia_rx-44" | "nokia_n770") + ARGS="$ARGS -screen ${SCREEN_SIZE}" + DPI="225" ;; ++ "nokia_rx-51_board" ) ++ DPI="267" ++ if [ "$XSERVER" != "Xorg" ] ; then ++ ARGS="$ARGS -screen ${SCREEN_SIZE}" ++ else ++ ARGS="$ARGS -dpi ${DPI} -nocursor" ++ fi ;; + "gta01" ) + DPI="280" + if [ "$XSERVER" != "Xorg" ] ; then diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/gplv2-license.patch b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/gplv2-license.patch new file mode 100644 index 0000000000..ec93253347 --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/gplv2-license.patch @@ -0,0 +1,353 @@ +COPYING: add GPLv2 license file + +this is a local file recipe and the license file is missing.In order +to pass the license checksum checking, the license file is needed. So +this patch add the GPLv2 license file. + +Signed-off-by: Yu Ke <ke.yu@intel.com> + +diff --git a/COPYING b/COPYING +new file mode 100644 +index 0000000..d511905 +--- /dev/null ++++ b/COPYING +@@ -0,0 +1,339 @@ ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 ++ ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++License is intended to guarantee your freedom to share and change free ++software--to make sure the software is free for all its users. This ++General Public License applies to most of the Free Software ++Foundation's software and to any other program whose authors commit to ++using it. (Some other Free Software Foundation software is covered by ++the GNU Lesser General Public License instead.) You can apply it to ++your programs, too. ++ ++ When we speak of free software, we are referring to freedom, not ++price. Our General Public Licenses are designed to make sure that you ++have the freedom to distribute copies of free software (and charge for ++this service if you wish), that you receive source code or can get it ++if you want it, that you can change the software or use pieces of it ++in new free programs; and that you know you can do these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++anyone to deny you these rights or to ask you to surrender the rights. ++These restrictions translate to certain responsibilities for you if you ++distribute copies of the software, or if you modify it. ++ ++ For example, if you distribute copies of such a program, whether ++gratis or for a fee, you must give the recipients all the rights that ++you have. You must make sure that they, too, receive or can get the ++source code. And you must show them these terms so they know their ++rights. ++ ++ We protect your rights with two steps: (1) copyright the software, and ++(2) offer you this license which gives you legal permission to copy, ++distribute and/or modify the software. ++ ++ Also, for each author's protection and ours, we want to make certain ++that everyone understands that there is no warranty for this free ++software. If the software is modified by someone else and passed on, we ++want its recipients to know that what they have is not the original, so ++that any problems introduced by others will not reflect on the original ++authors' reputations. ++ ++ Finally, any free program is threatened constantly by software ++patents. We wish to avoid the danger that redistributors of a free ++program will individually obtain patent licenses, in effect making the ++program proprietary. To prevent this, we have made it clear that any ++patent must be licensed for everyone's free use or not licensed at all. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. ++ ++ GNU GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License applies to any program or other work which contains ++a notice placed by the copyright holder saying it may be distributed ++under the terms of this General Public License. The "Program", below, ++refers to any such program or work, and a "work based on the Program" ++means either the Program or any derivative work under copyright law: ++that is to say, a work containing the Program or a portion of it, ++either verbatim or with modifications and/or translated into another ++language. (Hereinafter, translation is included without limitation in ++the term "modification".) Each licensee is addressed as "you". ++ ++Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running the Program is not restricted, and the output from the Program ++is covered only if its contents constitute a work based on the ++Program (independent of having been made by running the Program). ++Whether that is true depends on what the Program does. ++ ++ 1. You may copy and distribute verbatim copies of the Program's ++source code as you receive it, in any medium, provided that you ++conspicuously and appropriately publish on each copy an appropriate ++copyright notice and disclaimer of warranty; keep intact all the ++notices that refer to this License and to the absence of any warranty; ++and give any other recipients of the Program a copy of this License ++along with the Program. ++ ++You may charge a fee for the physical act of transferring a copy, and ++you may at your option offer warranty protection in exchange for a fee. ++ ++ 2. You may modify your copy or copies of the Program or any portion ++of it, thus forming a work based on the Program, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) You must cause the modified files to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ b) You must cause any work that you distribute or publish, that in ++ whole or in part contains or is derived from the Program or any ++ part thereof, to be licensed as a whole at no charge to all third ++ parties under the terms of this License. ++ ++ c) If the modified program normally reads commands interactively ++ when run, you must cause it, when started running for such ++ interactive use in the most ordinary way, to print or display an ++ announcement including an appropriate copyright notice and a ++ notice that there is no warranty (or else, saying that you provide ++ a warranty) and that users may redistribute the program under ++ these conditions, and telling the user how to view a copy of this ++ License. (Exception: if the Program itself is interactive but ++ does not normally print such an announcement, your work based on ++ the Program is not required to print an announcement.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Program, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Program, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Program. ++ ++In addition, mere aggregation of another work not based on the Program ++with the Program (or with a work based on the Program) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may copy and distribute the Program (or a work based on it, ++under Section 2) in object code or executable form under the terms of ++Sections 1 and 2 above provided that you also do one of the following: ++ ++ a) Accompany it with the complete corresponding machine-readable ++ source code, which must be distributed under the terms of Sections ++ 1 and 2 above on a medium customarily used for software interchange; or, ++ ++ b) Accompany it with a written offer, valid for at least three ++ years, to give any third party, for a charge no more than your ++ cost of physically performing source distribution, a complete ++ machine-readable copy of the corresponding source code, to be ++ distributed under the terms of Sections 1 and 2 above on a medium ++ customarily used for software interchange; or, ++ ++ c) Accompany it with the information you received as to the offer ++ to distribute corresponding source code. (This alternative is ++ allowed only for noncommercial distribution and only if you ++ received the program in object code or executable form with such ++ an offer, in accord with Subsection b above.) ++ ++The source code for a work means the preferred form of the work for ++making modifications to it. For an executable work, complete source ++code means all the source code for all modules it contains, plus any ++associated interface definition files, plus the scripts used to ++control compilation and installation of the executable. However, as a ++special exception, the source code distributed need not include ++anything that is normally distributed (in either source or binary ++form) with the major components (compiler, kernel, and so on) of the ++operating system on which the executable runs, unless that component ++itself accompanies the executable. ++ ++If distribution of executable or object code is made by offering ++access to copy from a designated place, then offering equivalent ++access to copy the source code from the same place counts as ++distribution of the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 4. You may not copy, modify, sublicense, or distribute the Program ++except as expressly provided under this License. Any attempt ++otherwise to copy, modify, sublicense or distribute the Program is ++void, and will automatically terminate your rights under this License. ++However, parties who have received copies, or rights, from you under ++this License will not have their licenses terminated so long as such ++parties remain in full compliance. ++ ++ 5. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Program or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Program (or any work based on the ++Program), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Program or works based on it. ++ ++ 6. Each time you redistribute the Program (or any work based on the ++Program), the recipient automatically receives a license from the ++original licensor to copy, distribute or modify the Program subject to ++these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties to ++this License. ++ ++ 7. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Program at all. For example, if a patent ++license would not permit royalty-free redistribution of the Program by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Program. ++ ++If any portion of this section is held invalid or unenforceable under ++any particular circumstance, the balance of the section is intended to ++apply and the section as a whole is intended to apply in other ++circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system, which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 8. If the distribution and/or use of the Program is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Program under this License ++may add an explicit geographical distribution limitation excluding ++those countries, so that distribution is permitted only in or among ++countries not thus excluded. In such case, this License incorporates ++the limitation as if written in the body of this License. ++ ++ 9. The Free Software Foundation may publish revised and/or new versions ++of the General Public License from time to time. Such new versions will ++be similar in spirit to the present version, but may differ in detail to ++address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Program ++specifies a version number of this License which applies to it and "any ++later version", you have the option of following the terms and conditions ++either of that version or of any later version published by the Free ++Software Foundation. If the Program does not specify a version number of ++this License, you may choose any version ever published by the Free Software ++Foundation. ++ ++ 10. If you wish to incorporate parts of the Program into other free ++programs whose distribution conditions are different, write to the author ++to ask for permission. For software which is copyrighted by the Free ++Software Foundation, write to the Free Software Foundation; we sometimes ++make exceptions for this. Our decision will be guided by the two goals ++of preserving the free status of all derivatives of our free software and ++of promoting the sharing and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ++REPAIR OR CORRECTION. ++ ++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Programs ++ ++ If you develop a new program, and you want it to be of the greatest ++possible use to the public, the best way to achieve this is to make it ++free software which everyone can redistribute and change under these terms. ++ ++ To do so, attach the following notices to the program. It is safest ++to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least ++the "copyright" line and a pointer to where the full notice is found. ++ ++ <one line to give the program's name and a brief idea of what it does.> ++ Copyright (C) <year> <name of author> ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) year name of author ++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. ++ This is free software, and you are welcome to redistribute it ++ under certain conditions; type `show c' for details. ++ ++The hypothetical commands `show w' and `show c' should show the appropriate ++parts of the General Public License. Of course, the commands you use may ++be called something other than `show w' and `show c'; they could even be ++mouse-clicks or menu items--whatever suits your program. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the program, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program ++ `Gnomovision' (which makes passes at compilers) written by James Hacker. ++ ++ <signature of Ty Coon>, 1 April 1989 ++ Ty Coon, President of Vice ++ ++This General Public License does not permit incorporating your program into ++proprietary programs. If your program is a subroutine library, you may ++consider it more useful to permit linking proprietary applications with the ++library. If this is what you want to do, use the GNU Lesser General ++Public License instead of this License. diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/setDPI.sh b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/setDPI.sh new file mode 100644 index 0000000000..04a2edd6c6 --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common-1.34/setDPI.sh @@ -0,0 +1,92 @@ +#! /bin/sh +# +# Copyright Matthias Hentges <devel@hentges.net> (c) 2006 +# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) +# +# Filename: setDPI.sh +# Date: 09-Apr-06 + +# This script configures Xft.dpi dependent on your screens DPI. This insures that the same font-size +# setting of 7 can be used on all machines. + + +XDEFAULTS="/etc/X11/Xdefaults" + + + +set_dpi() { + + CURRENT_SETTING="`cat ${XDEFAULTS} | sed -n "/Xft.dpi\:/s/.*\:\(.*\)/\1/p" | sed -n "s/\ //p"`" + + if test "$CURRENT_SETTING" != "$1" + then + echo "Using Xft.dpi of $SET_SCREEN_DPI for your $SCREEN_DPI DPI screen" + + if grep -q "Xft.dpi" "$XDEFAULTS" + then + cat "${XDEFAULTS}" | sed "s/^Xft.dpi\:.*/Xft.dpi\: $SET_SCREEN_DPI/" > "${XDEFAULTS}_" + mv "${XDEFAULTS}_" "${XDEFAULTS}" + else + echo -e "Xft.dpi: $SET_SCREEN_DPI\n" >> "$XDEFAULTS" + fi + else + echo "Your $SCREEN_DPI DPI screen is already configured." + fi +} + +set_rxvt_font() { + + CURRENT_SETTING="`cat ${XDEFAULTS} | sed -n "/Rxvt\*font/s/\(.*\pixelsize=\)\(.*\)/\2/p"`" + + if test "$1" -gt 100 + then + + # Configure the rxvt font-size for your screen here: + test "$1" -gt 180 -a "$1" -lt "221" && RXVT_FONT_SIZE=16 + + if test -z "$RXVT_FONT_SIZE" + then + echo "WARNING: No rxvt font-size configured for a $SCREEN_DPI DPI screen!" + echo "Defaulting to size 9" + RXVT_FONT_SIZE=9 + fi + + if test "$CURRENT_SETTING" != "$RXVT_FONT_SIZE" + then + echo "Using a rxvt font-size of $RXVT_FONT_SIZE" + cat ${XDEFAULTS} | sed "/Rxvt\*font/s/\(.*\pixelsize\)\(=*.*\)/\1=$RXVT_FONT_SIZE/" > ${XDEFAULTS}_ + mv ${XDEFAULTS}_ ${XDEFAULTS} + else + echo "The rxvt font-size is already configured" + fi + fi +} + +if test -z "$DISPLAY" +then + echo "DISPLAY is not set, aborting..." + exit 0 +fi + +SCREEN_DPI="`/usr/bin/xdpyinfo | grep "dots per inch" | awk '{print $2}'| sed -n "s/\(.*\)x\(.*\)/\2/p"`" + +if test -z "$SCREEN_DPI" +then + echo "WARNING: Couldn't read your screens DPI, defaulting to 100" + SCREEN_DPI=100 +fi + +# Configure your screen here: +test "$SCREEN_DPI" -gt 180 -a "$SCREEN_DPI" -lt "221" && SET_SCREEN_DPI=160 +test "$SCREEN_DPI" -gt 90 -a "$SCREEN_DPI" -lt "121" && SET_SCREEN_DPI=100 + + +if test -z "$SET_SCREEN_DPI" +then + echo "WARNING: No default configuration found for your $SCREEN_DPI DPI screen!" + echo "Using 100 DPI" + SET_SCREEN_DPI=100 +fi + +set_dpi "$SET_SCREEN_DPI" +set_rxvt_font "$SCREEN_DPI" diff --git a/meta-oe/recipes-graphics/xserver-common/xserver-common_1.34.bb b/meta-oe/recipes-graphics/xserver-common/xserver-common_1.34.bb new file mode 100644 index 0000000000..8269205b67 --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-common/xserver-common_1.34.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Common X11 scripts and support files" +LICENSE = "GPL" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +RDEPENDS_${PN} = "xmodmap xrandr xdpyinfo" +PR = "r0" + +PACKAGE_ARCH = "all" + +RCONFLICTS_${PN} = "xserver-kdrive-common" +RREPLACES_${PN} = "xserver-kdrive-common" + +# we are using a gpe-style Makefile +inherit gpe + +SRC_URI[md5sum] = "82f2f84cd96610e8f7b92c700cd31c14" +SRC_URI[sha256sum] = "cd04c33418f776b1e13fcc7af3d6bd0c7cccd03fbabd7dbcd97f88166cc34210" + +SRC_URI_append = " \ + file://gplv2-license.patch \ + file://setDPI.sh \ + file://89xdgautostart.sh" + +RDEPENDS_${PN}_append_shr = " xinput-calibrator " + +SRC_URI_append_shr = " file://89xTs_Calibrate.xinput_calibrator.patch \ + file://90xXWindowManager.patch \ + file://Xserver.add.nocursor.for.gta.patch \ + file://Xserver.add.xserver-system.patch \ + file://Xserver.add.dpi.for.gta.patch \ + file://Xserver.n900.patch" + +do_install_append() { + install -m 0755 "${WORKDIR}/setDPI.sh" "${D}/etc/X11/Xinit.d/50setdpi" + install -m 0755 "${WORKDIR}/89xdgautostart.sh" "${D}/etc/X11/Xsession.d/89xdgautostart" + sed -i 's:^BINDIR=.*$:BINDIR=${bindir}:' ${D}/etc/X11/xserver-common +} + diff --git a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/gplv2-license.patch b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/gplv2-license.patch new file mode 100644 index 0000000000..ec93253347 --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/gplv2-license.patch @@ -0,0 +1,353 @@ +COPYING: add GPLv2 license file + +this is a local file recipe and the license file is missing.In order +to pass the license checksum checking, the license file is needed. So +this patch add the GPLv2 license file. + +Signed-off-by: Yu Ke <ke.yu@intel.com> + +diff --git a/COPYING b/COPYING +new file mode 100644 +index 0000000..d511905 +--- /dev/null ++++ b/COPYING +@@ -0,0 +1,339 @@ ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 ++ ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++License is intended to guarantee your freedom to share and change free ++software--to make sure the software is free for all its users. This ++General Public License applies to most of the Free Software ++Foundation's software and to any other program whose authors commit to ++using it. (Some other Free Software Foundation software is covered by ++the GNU Lesser General Public License instead.) You can apply it to ++your programs, too. ++ ++ When we speak of free software, we are referring to freedom, not ++price. Our General Public Licenses are designed to make sure that you ++have the freedom to distribute copies of free software (and charge for ++this service if you wish), that you receive source code or can get it ++if you want it, that you can change the software or use pieces of it ++in new free programs; and that you know you can do these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++anyone to deny you these rights or to ask you to surrender the rights. ++These restrictions translate to certain responsibilities for you if you ++distribute copies of the software, or if you modify it. ++ ++ For example, if you distribute copies of such a program, whether ++gratis or for a fee, you must give the recipients all the rights that ++you have. You must make sure that they, too, receive or can get the ++source code. And you must show them these terms so they know their ++rights. ++ ++ We protect your rights with two steps: (1) copyright the software, and ++(2) offer you this license which gives you legal permission to copy, ++distribute and/or modify the software. ++ ++ Also, for each author's protection and ours, we want to make certain ++that everyone understands that there is no warranty for this free ++software. If the software is modified by someone else and passed on, we ++want its recipients to know that what they have is not the original, so ++that any problems introduced by others will not reflect on the original ++authors' reputations. ++ ++ Finally, any free program is threatened constantly by software ++patents. We wish to avoid the danger that redistributors of a free ++program will individually obtain patent licenses, in effect making the ++program proprietary. To prevent this, we have made it clear that any ++patent must be licensed for everyone's free use or not licensed at all. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. ++ ++ GNU GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License applies to any program or other work which contains ++a notice placed by the copyright holder saying it may be distributed ++under the terms of this General Public License. The "Program", below, ++refers to any such program or work, and a "work based on the Program" ++means either the Program or any derivative work under copyright law: ++that is to say, a work containing the Program or a portion of it, ++either verbatim or with modifications and/or translated into another ++language. (Hereinafter, translation is included without limitation in ++the term "modification".) Each licensee is addressed as "you". ++ ++Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running the Program is not restricted, and the output from the Program ++is covered only if its contents constitute a work based on the ++Program (independent of having been made by running the Program). ++Whether that is true depends on what the Program does. ++ ++ 1. You may copy and distribute verbatim copies of the Program's ++source code as you receive it, in any medium, provided that you ++conspicuously and appropriately publish on each copy an appropriate ++copyright notice and disclaimer of warranty; keep intact all the ++notices that refer to this License and to the absence of any warranty; ++and give any other recipients of the Program a copy of this License ++along with the Program. ++ ++You may charge a fee for the physical act of transferring a copy, and ++you may at your option offer warranty protection in exchange for a fee. ++ ++ 2. You may modify your copy or copies of the Program or any portion ++of it, thus forming a work based on the Program, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) You must cause the modified files to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ b) You must cause any work that you distribute or publish, that in ++ whole or in part contains or is derived from the Program or any ++ part thereof, to be licensed as a whole at no charge to all third ++ parties under the terms of this License. ++ ++ c) If the modified program normally reads commands interactively ++ when run, you must cause it, when started running for such ++ interactive use in the most ordinary way, to print or display an ++ announcement including an appropriate copyright notice and a ++ notice that there is no warranty (or else, saying that you provide ++ a warranty) and that users may redistribute the program under ++ these conditions, and telling the user how to view a copy of this ++ License. (Exception: if the Program itself is interactive but ++ does not normally print such an announcement, your work based on ++ the Program is not required to print an announcement.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Program, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Program, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Program. ++ ++In addition, mere aggregation of another work not based on the Program ++with the Program (or with a work based on the Program) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may copy and distribute the Program (or a work based on it, ++under Section 2) in object code or executable form under the terms of ++Sections 1 and 2 above provided that you also do one of the following: ++ ++ a) Accompany it with the complete corresponding machine-readable ++ source code, which must be distributed under the terms of Sections ++ 1 and 2 above on a medium customarily used for software interchange; or, ++ ++ b) Accompany it with a written offer, valid for at least three ++ years, to give any third party, for a charge no more than your ++ cost of physically performing source distribution, a complete ++ machine-readable copy of the corresponding source code, to be ++ distributed under the terms of Sections 1 and 2 above on a medium ++ customarily used for software interchange; or, ++ ++ c) Accompany it with the information you received as to the offer ++ to distribute corresponding source code. (This alternative is ++ allowed only for noncommercial distribution and only if you ++ received the program in object code or executable form with such ++ an offer, in accord with Subsection b above.) ++ ++The source code for a work means the preferred form of the work for ++making modifications to it. For an executable work, complete source ++code means all the source code for all modules it contains, plus any ++associated interface definition files, plus the scripts used to ++control compilation and installation of the executable. However, as a ++special exception, the source code distributed need not include ++anything that is normally distributed (in either source or binary ++form) with the major components (compiler, kernel, and so on) of the ++operating system on which the executable runs, unless that component ++itself accompanies the executable. ++ ++If distribution of executable or object code is made by offering ++access to copy from a designated place, then offering equivalent ++access to copy the source code from the same place counts as ++distribution of the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 4. You may not copy, modify, sublicense, or distribute the Program ++except as expressly provided under this License. Any attempt ++otherwise to copy, modify, sublicense or distribute the Program is ++void, and will automatically terminate your rights under this License. ++However, parties who have received copies, or rights, from you under ++this License will not have their licenses terminated so long as such ++parties remain in full compliance. ++ ++ 5. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Program or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Program (or any work based on the ++Program), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Program or works based on it. ++ ++ 6. Each time you redistribute the Program (or any work based on the ++Program), the recipient automatically receives a license from the ++original licensor to copy, distribute or modify the Program subject to ++these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties to ++this License. ++ ++ 7. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Program at all. For example, if a patent ++license would not permit royalty-free redistribution of the Program by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Program. ++ ++If any portion of this section is held invalid or unenforceable under ++any particular circumstance, the balance of the section is intended to ++apply and the section as a whole is intended to apply in other ++circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system, which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 8. If the distribution and/or use of the Program is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Program under this License ++may add an explicit geographical distribution limitation excluding ++those countries, so that distribution is permitted only in or among ++countries not thus excluded. In such case, this License incorporates ++the limitation as if written in the body of this License. ++ ++ 9. The Free Software Foundation may publish revised and/or new versions ++of the General Public License from time to time. Such new versions will ++be similar in spirit to the present version, but may differ in detail to ++address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Program ++specifies a version number of this License which applies to it and "any ++later version", you have the option of following the terms and conditions ++either of that version or of any later version published by the Free ++Software Foundation. If the Program does not specify a version number of ++this License, you may choose any version ever published by the Free Software ++Foundation. ++ ++ 10. If you wish to incorporate parts of the Program into other free ++programs whose distribution conditions are different, write to the author ++to ask for permission. For software which is copyrighted by the Free ++Software Foundation, write to the Free Software Foundation; we sometimes ++make exceptions for this. Our decision will be guided by the two goals ++of preserving the free status of all derivatives of our free software and ++of promoting the sharing and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ++REPAIR OR CORRECTION. ++ ++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Programs ++ ++ If you develop a new program, and you want it to be of the greatest ++possible use to the public, the best way to achieve this is to make it ++free software which everyone can redistribute and change under these terms. ++ ++ To do so, attach the following notices to the program. It is safest ++to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least ++the "copyright" line and a pointer to where the full notice is found. ++ ++ <one line to give the program's name and a brief idea of what it does.> ++ Copyright (C) <year> <name of author> ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) year name of author ++ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. ++ This is free software, and you are welcome to redistribute it ++ under certain conditions; type `show c' for details. ++ ++The hypothetical commands `show w' and `show c' should show the appropriate ++parts of the General Public License. Of course, the commands you use may ++be called something other than `show w' and `show c'; they could even be ++mouse-clicks or menu items--whatever suits your program. ++ ++You should also get your employer (if you work as a programmer) or your ++school, if any, to sign a "copyright disclaimer" for the program, if ++necessary. Here is a sample; alter the names: ++ ++ Yoyodyne, Inc., hereby disclaims all copyright interest in the program ++ `Gnomovision' (which makes passes at compilers) written by James Hacker. ++ ++ <signature of Ty Coon>, 1 April 1989 ++ Ty Coon, President of Vice ++ ++This General Public License does not permit incorporating your program into ++proprietary programs. If your program is a subroutine library, you may ++consider it more useful to permit linking proprietary applications with the ++library. If this is what you want to do, use the GNU Lesser General ++Public License instead of this License. diff --git a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm new file mode 100755 index 0000000000..39ce890fdf --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init-2.0/xserver-nodm @@ -0,0 +1,44 @@ +#!/bin/sh + +. /etc/init.d/functions + +for x in $(cat /proc/cmdline); do + case $x in + x11=false) + echo "X Server disabled" + exit 0; + ;; + esac +done + +case "$1" in + start) + # We don't want this script to block the rest of the boot process + if [ "$2" != "background" ]; then + $0 $1 background & + else + . /etc/profile + + echo "Starting Xserver" + . /etc/X11/xserver-common + xinit /etc/X11/Xsession -- `which $XSERVER` $ARGS >/var/log/Xsession.log 2>&1 + fi + ;; + + stop) + echo "Stopping XServer" + killproc xinit + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 0 diff --git a/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb new file mode 100644 index 0000000000..8310bcd81d --- /dev/null +++ b/meta-oe/recipes-graphics/xserver-nodm-init/xserver-nodm-init_2.0.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "Simple Xserver Init Script (no dm)" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" +SECTION = "x11" +PRIORITY = "optional" +RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit" +DEFAULT_PREFERENCE = "-1" +PR = "r4" + +SRC_URI = "file://xserver-nodm \ + file://gplv2-license.patch \ +" +S = ${WORKDIR} + +PACKAGE_ARCH = "all" + +do_install() { + install -d ${D}/etc + install -d ${D}/etc/init.d + install xserver-nodm ${D}/etc/init.d +} + +inherit update-rc.d + +INITSCRIPT_NAME = "xserver-nodm" +INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ." +INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ." |