From: "Peter Hanzel" Subject: vmwgfx + VMWare 7.0 -> libdrm modetest.c Date: Tue, 9 Feb 2010 14:05:03 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: dri-devel@lists.sourceforge.net List-Id: dri-devel@lists.freedesktop.org Hello. I have a question about libdrm/libkms and test/modetest/modetest.c. I am now working with vmwgfx + VMWare 7.0, where vmwgfx had correctly initialized framebuffer and also now using fbcon. Now I want to test it woth modetest.c This program is only for intel so i recoded it to use libkms functions. I had to add: struct kms_bo { struct kms_driver *kms; void *ptr; size_t size; size_t offset; size_t pitch; unsigned handle; }; to modetest.c to compile it. Now the test can set mode. I have tested 800x600 and also 1024x768. But my problem is that screen is always black. If you take a look into modetest.c it is making that nice one tilled colour screen. The problem lines are in: libkms/vmwgfx.c static int vmwgfx_bo_create(struct kms_driver *kms, const unsigned width, const unsigned height, const enum kms_bo_type type, const unsigned *attr, struct kms_bo **out) { .... do { ret = drmCommandWriteRead(bo->base.kms->fd, DRM_VMW_ALLOC_DMABUF, &arg, sizeof(arg)); } while (ret == -ERESTART); if (ret) goto err_free; bo->base.handle = rep->handle; bo->map_handle = rep->map_handle; bo->base.handle = rep->cur_gmr_id; bo->base.offset = rep->cur_gmr_offset; As you can see, there is: bo->base.handle = rep->handle; bo->base.handle = rep->cur_gmr_id; So it is overwiting the same base.handle. This handle I am using in modetest.c - drmModeAddFB(). << maybe here is error, bo->base.handle is not the correct one for use in drmModeAddFB( bo->handle) So my question is: 1) The need of define for strcut kms_bo (is is located in libkms/internal.h) 2) Why the screen is still black? Thanks. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com --