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
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to