Commit d0b66b5a authored by Martin Jansa's avatar Martin Jansa

xf86-video-glamo: bump SRCREV, remove upstream applied patch

* remove mese-dri from RDEPENDS as we're now using kernel without DRM patch and it can fallback to sw rendering just fine
Signed-off-by: default avatarMartin Jansa <Martin.Jansa@gmail.com>
parent 324de164
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
......@@ -4,17 +4,16 @@ 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"
RDEPENDS_${PN} = "xserver-xorg-extension-dri xserver-xorg-extension-dri2 xserver-xorg-extension-glx"
PE = "2"
PV = "1.0.0+gitr${SRCPV}"
PR = "${INC_PR}.6"
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 \
file://0001-glamo-kms-driver-drop-unused-xf86_config.patch \
"
S = "${WORKDIR}/git"
SRCREV = "16af3c00195adc68cbd508e3613be4b2349260b3"
SRCREV = "cb9ed17035a79e49dde26a1e7e2bc5f10fd8144b"
EXTRA_OECONF = " --enable-kms "
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment