Forum Topic - QNX 8.0.2 Intel x86_64 haswell drm-intel buffer mapping to the user space : (5 Items)
   
QNX 8.0.2 Intel x86_64 haswell drm-intel buffer mapping to the user space  
I am writing a short test program to connect to the drm-intel  server and finding that the server is crashing with the 
error :
[errno:3 @ io_mmap():1418] mmap() is called for DRM process directly, aborting execution!
after trying to map the frame buffer to the user space.
The test sequence of drm calls to to created the buffer is per DRM spec. 
Any comments from the group would be appreciated. The test source code could be provided if needed.

Regards,
Janusz
Re: QNX 8.0.2 Intel x86_64 haswell drm-intel buffer mapping to the user space  
Hi, 

looks like, you are trying to mmap directly against the file descriptor, opened against the drm-intel server.
The last drm-intel source  code, I saw,  simply calls abort(); if you  try that.
Would be interesting to see, what your test program is trying  to do.
Do you really use the normal drm API, provided by libdrm.so? 

-Michael

Re: QNX 8.0.2 Intel x86_64 haswell drm-intel buffer mapping to the user space  
I ran into the same issue when trying to use X11 with intel-drm. From what I know (and I'm not an expert on the subject)
, the QNX port of intel-drm is incomplete, and is (consciously) only sufficient for servicing Screen. If you try to use 
it as though it is a complete port you can run into unimplemented parts, such as the direct mmap() assertion.

--Elad
Re: QNX 8.0.2 Intel x86_64 haswell drm-intel buffer mapping to the user space  
Hi, 
as far as I remember, the drm_mmap() of the QNX port  calls mmap directly.
Do not use it. Change your code, like this:

 ret = drmIoctl(bo->fd, DRM_IOCTL_MODE_MAP_DUMB, &arg);
  if (ret)
          return ret;

#ifdef __QNXNTO__
        map = arg.cvaddr;
#else
        map = drm_mmap(0, bo->size, PROT_READ | PROT_WRITE, MAP_SHARED,
                       bo->fd, arg.offset);
#endif

-Michael
Re: QNX 8.0.2 Intel x86_64 haswell drm-intel buffer mapping to the user space  
Hi Michael,
     Thank you very much for a comment. That was exactly what i was missing.

Janusz