From 2a8f0bbfddb760bc288fc9c479d11c42275db17f Mon Sep 17 00:00:00 2001 From: PFO Date: Wed, 1 Jun 2011 16:52:21 +0200 Subject: Adds debug messages --- src/gallium/state_trackers/egl/android/native_android.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp b/src/gallium/state_trackers/egl/android/native_android.cpp index 6cf57744b3..97dee0538b 100644 --- a/src/gallium/state_trackers/egl/android/native_android.cpp +++ b/src/gallium/state_trackers/egl/android/native_android.cpp @@ -413,7 +413,11 @@ android_display_create_window_surface(struct native_display *ndpy, asurf = CALLOC_STRUCT(android_surface); if (!asurf) + { + LOGE("Can't allocate android surface structure... X_x "); return NULL; + } + LOGI("Android surface struct allocated :)"); asurf->adpy = adpy; asurf->win = win; -- cgit v1.2.3 From b03e5437e16c420878d5b0f26303aa3d160e3c60 Mon Sep 17 00:00:00 2001 From: PFO Date: Wed, 15 Jun 2011 15:41:06 +0200 Subject: This reverts commit 42da268: "Unsets uncompilable features" --- src/mesa/Android.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/Android.mk b/src/mesa/Android.mk index 9c9ab75964..f361aca3e4 100644 --- a/src/mesa/Android.mk +++ b/src/mesa/Android.mk @@ -4,8 +4,8 @@ include $(LOCAL_PATH)/sources.mak common_CFLAGS := \ -DPTHREADS \ - -DFEATURE_ES1=0 \ - -DFEATURE_ES2=0 \ + -DFEATURE_ES1=1 \ + -DFEATURE_ES2=1 \ -fvisibility=hidden \ -Wno-sign-compare -- cgit v1.2.3 From 008f076f30d63099dddca09e0b8dae45739d3b53 Mon Sep 17 00:00:00 2001 From: PFO Date: Wed, 15 Jun 2011 15:42:35 +0200 Subject: [Radeon] r300: uses Android's mmap as done in r600 --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 9eb833454d..b582cf44d1 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -43,6 +43,25 @@ #define RADEON_BO_FLAGS_MICRO_TILE 2 #define RADEON_BO_FLAGS_MICRO_TILE_SQUARE 0x20 +#ifdef ANDROID + +extern void* __mmap2(void*, size_t, int, int, int, size_t); + +#define MMAP2_SHIFT 12 +static void* android_mmap2(void *addr, size_t size, int prot, int flags, int fd, unsigned long long offset) +{ + if ( offset & ((1UL << MMAP2_SHIFT)-1) ) { + errno = EINVAL; + return MAP_FAILED; + } + + return __mmap2(addr, size, prot, flags, fd, (size_t)(offset >> MMAP2_SHIFT)); +} + +#define mmap(addr, size, prot, flags, fd, offset) android_mmap2(addr, size, prot, flags, fd, offset) + +#endif /* ANDROID */ + extern const struct pb_vtbl radeon_bo_vtbl; -- cgit v1.2.3 From 8f0a87fd310fb6208fc365a68dff499d40cfa997 Mon Sep 17 00:00:00 2001 From: PFO Date: Thu, 16 Jun 2011 15:06:29 +0200 Subject: Revert "Verbose output for radeon/drm" This reverts commit df1458659d427f8664c59dc5a4622da15a18b640. --- src/gallium/state_trackers/egl/android/native_android.cpp | 7 ------- src/gralloc/gralloc_gem_radeon.c | 6 +----- src/gralloc/gralloc_mod.c | 6 +----- 3 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp b/src/gallium/state_trackers/egl/android/native_android.cpp index 97dee0538b..7687ec86a6 100644 --- a/src/gallium/state_trackers/egl/android/native_android.cpp +++ b/src/gallium/state_trackers/egl/android/native_android.cpp @@ -510,24 +510,17 @@ android_display_init_drm(struct native_display *ndpy) if (!err) { const gralloc_module_t *gr = (gralloc_module_t *) mod; - _eglLog(_EGL_WARNING, "drm PFO (line:%d)", __LINE__); err = -EINVAL; if (gr->perform) - { err = gr->perform(gr, GRALLOC_MODULE_PERFORM_GET_DRM_FD, &fd); - _eglLog(_EGL_WARNING, "drm PFO (line:%d)", __LINE__); - } } - _eglLog(_EGL_WARNING, "drm PFO (line:%d) fd = %d", __LINE__, fd); if (!err && fd >= 0) { drmVersionPtr version; const char *name; version = drmGetVersion(fd); - _eglLog(_EGL_WARNING, "drm PFO (line:%d)", __LINE__); if (version) { name = get_drm_screen_name(fd, version); - _eglLog(_EGL_WARNING, "drm PFO (line:%d) name : %s", __LINE__, name); if (name) { adpy->base.screen = adpy->event_handler->new_drm_screen(&adpy->base, name, fd); diff --git a/src/gralloc/gralloc_gem_radeon.c b/src/gralloc/gralloc_gem_radeon.c index 4bd384c027..addb3419a6 100644 --- a/src/gralloc/gralloc_gem_radeon.c +++ b/src/gralloc/gralloc_gem_radeon.c @@ -72,12 +72,10 @@ eg_init_tile_config(struct radeon_info *info) memset(&ginfo, 0, sizeof(ginfo)); ginfo.request = RADEON_INFO_TILING_CONFIG; ginfo.value = (long) &val; - LOGE("PFO gralloc line : %d", __LINE__); ret = drmCommandWriteRead(info->drm->fd, DRM_RADEON_INFO, &ginfo, sizeof(ginfo)); if (ret) return ret; - LOGE("PFO gralloc line : %d", __LINE__); info->tile_config = val; switch (info->tile_config & 0xf) { @@ -97,7 +95,6 @@ eg_init_tile_config(struct radeon_info *info) return -EINVAL; break; } - LOGE("PFO gralloc line : %d", __LINE__); info->num_banks = (info->tile_config & 0xf0) >> 4; @@ -113,8 +110,7 @@ eg_init_tile_config(struct radeon_info *info) break; } - LOGE("PFO gralloc line : %d", __LINE__); - info->have_tiling_info = 1; + info->have_tiling_info = 1; info->allow_color_tiling = 0; return 0; diff --git a/src/gralloc/gralloc_mod.c b/src/gralloc/gralloc_mod.c index 7f708616c8..bc0786eb3e 100644 --- a/src/gralloc/gralloc_mod.c +++ b/src/gralloc/gralloc_mod.c @@ -138,22 +138,18 @@ drm_mod_alloc_gpu0(alloc_device_t *dev, int w, int h, int format, int usage, struct drm_bo_t *bo; int size, bpp, ret; - LOGE("PFO gralloc line : %d", __LINE__); ret = drm_gem_drv_init(drm); if (ret) return ret; - LOGE("PFO gralloc line : %d", __LINE__); bpp = drm_mod_get_bpp(format); if (!bpp) return -EINVAL; - LOGE("PFO gralloc line : %d", __LINE__); bo = drm_gem_drv_alloc(drm, w, h, format, usage, stride); if (!bo) return -EINVAL; - LOGE("PFO gralloc line : %d", __LINE__); - if (bo->usage & GRALLOC_USAGE_HW_FB) { + if (bo->usage & GRALLOC_USAGE_HW_FB) { ret = drm_kms_add_fb(drm, bo); if (ret) { LOGE("failed to add fb"); -- cgit v1.2.3 From 5607823fe4ff35e11086efa6302d8fbacd315b06 Mon Sep 17 00:00:00 2001 From: PFO Date: Fri, 17 Jun 2011 16:01:06 +0200 Subject: radeon/r300: code cleanup --- src/gralloc/gralloc_gem_radeon.c | 4 ++-- src/mesa/vbo/vbo_exec_api.c | 21 +-------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/gralloc/gralloc_gem_radeon.c b/src/gralloc/gralloc_gem_radeon.c index addb3419a6..469a1488a0 100644 --- a/src/gralloc/gralloc_gem_radeon.c +++ b/src/gralloc/gralloc_gem_radeon.c @@ -223,12 +223,12 @@ drm_gem_radeon_init(struct drm_module_t *drm) drm->gem = (void *) info; -/* ret = eg_init_tile_config(info); + ret = eg_init_tile_config(info); if (ret) { radeon_bo_manager_gem_dtor(info->bufmgr); free(info); return ret; - }*/ + } drm_gem_radeon_init_features(drm); diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 3c430b9a05..d9656b3caf 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -432,7 +432,7 @@ do { \ * Flush (draw) vertices. * \param unmap - leave VBO unmapped after flushing? */ -/*static void +static void vbo_exec_FlushVertices_internal(struct vbo_exec_context *exec, GLboolean unmap) { if (exec->vtx.vert_count || unmap) { @@ -444,7 +444,6 @@ vbo_exec_FlushVertices_internal(struct vbo_exec_context *exec, GLboolean unmap) reset_attrfv( exec ); } } -*/ #if FEATURE_beginend @@ -548,24 +547,6 @@ static void GLAPIENTRY vbo_exec_EvalPoint2( GLint i, GLint j ) #endif /* FEATURE_evaluators */ -/** - * Flush (draw) vertices. - * \param unmap - leave VBO unmapped after flushing? - */ -static void -vbo_exec_FlushVertices_internal(struct vbo_exec_context *exec, GLboolean unmap) -{ - if (exec->vtx.vert_count || unmap) { - vbo_exec_vtx_flush( exec, unmap ); - } - - if (exec->vtx.vertex_size) { - vbo_exec_copy_to_current( exec ); - reset_attrfv( exec ); - } -} - - /** * Called via glBegin. */ -- cgit v1.2.3