Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

eglCreatePixmapSurface for Mali-400 under linux

Hello everybody.

I am working on Mali-400 under linux. I want to create pixmap surface, but it always return EGL_BAD_MATCH error.

Here attribut list wich i use for eglChooseConfig

EGLint EGLRuntime::configAttributes[] =
    {
        /* DO NOT MODIFY. */
        /* These attributes are in a known order and may be re-written at initialization according to application requests. */
        EGL_SAMPLES,             0,
        EGL_ALPHA_SIZE,          0,
        EGL_RED_SIZE,            8,
        EGL_GREEN_SIZE,          8,
        EGL_BLUE_SIZE,           8,
        EGL_BUFFER_SIZE,         32,
        EGL_STENCIL_SIZE,        0,
        EGL_RENDERABLE_TYPE,     0, 
        EGL_SURFACE_TYPE,        EGL_PIXMAP_BIT ,
        EGL_DEPTH_SIZE,          24,
        EGL_NONE
    };

Here pixmap structure

typedef struct fbdev_pixmap
{
        unsigned int height;
        unsigned int width;
        unsigned int bytes_per_pixel;
        unsigned char buffer_size;
        unsigned char red_size;
        unsigned char green_size;
        unsigned char blue_size;
        unsigned char alpha_size;
        unsigned char luminance_size;
        fbdev_pixmap_flags flags;
        unsigned short *data;
} fbdev_pixmap;


fbdev_pixmap tempPixMap;
  tempPixMap.height = windowH;
  tempPixMap.width = windowW;
  tempPixMap.buffer_size = 32;
  tempPixMap.red_size = 8;
  tempPixMap.green_size = 8;
  tempPixMap.blue_size = 8;
  tempPixMap.alpha_size = 0; 
  tempPixMap.data = (unsigned short *)BitMapPtr;
  tempPixMap.flags = FBDEV_PIXMAP_SUPPORTS_UMP;

Here eglCreatePixmapSurface function call

surface = eglCreatePixmapSurface(display, config, (EGLNativePixmapType)(&tempPixMap), NULL);

What i am doing wrong?

Thanks.

  • Hi,

    Nothing seems overly obvious from what you showed, so we would need more information in order to figure this out.

    Do you have a small reproducer so we can begin investigation?

    Kind Regards,

    Michael McGeagh

  • Thanks, for reply.

    The problem solved.

    I was allocated memory without using UMP's API.

    ump_result umpResult;
    umpResult = ump_open();
    if( umpResult == UMP_ERROR )
    {
    printf("Sorry, can't open UMP, exiting...\n ");
    exit(1);
    }

    pixmapHandle =  ump_ref_drv_allocate( sizeOfBuffer  , UMP_REF_DRV_CONSTRAINT_NONE);

    fbdev_pixmap tempPixMap;
    tempPixMap.height = windowH;
    tempPixMap.width = windowW;
    tempPixMap.bytes_per_pixel = 4;
    tempPixMap.buffer_size = 32;
    tempPixMap.red_size = 8;
    tempPixMap.green_size = 8;
    tempPixMap.blue_size =  8;
    tempPixMap.alpha_size = 8;
    tempPixMap.luminance_size = 0;
    tempPixMap.flags = FBDEV_PIXMAP_SUPPORTS_UMP;
    tempPixMap.data = (unsigned short *)pixmapHandle;
  • Hi Ako6, could you read back the gpu result from  pixmapHandle in this way?