can not set drm master with drm_setmaster_ioctl

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

can not set drm master with drm_setmaster_ioctl

4,334 Views
ekrem_sahin
Contributor I

Hello,

1.I am trying to create multiple frame buffer on top of a qt application without using qt that means from another executable to show some warning dialogs by using kernel drm ioctl api.First I opened /dev/dri/card0 succesfully but while setting to drm master with ioctl DRM_IOCTL_SET_MASTER I am getting error from kernel that shows drm master is already set.When I debugged the issue, I have observed that dev->master is already true on drm_setmaster_ioctl function and directly exiting from function without setting master on drivers/gpu/drm/drm_auth.c file because of qt application( that run on wayland).For that reason, I am getting permission denied error while calling DRM_IOCTL_MODE_SETCRTC ioctl call.

If I remove qt application and run my development app to draw some shape on screen it is working since at that moment there is no drm master and I can set drm master successfully.So I have observed that there is some ioctl call to share master permission DRM_IOCTL_AUTH_MAGIC but it did not helped me.I can hack the kernel code by removing dev->master check on drm_setmaster_ioctl function from drivers/gpu/drm/drm_auth.c but it is not a good approach.

Could you please give me some direction on the issue to see what I am missing?

2.When I tried to set different size for framebuffer other than our hdmi resolution(1280x720), I do not see any drawing shape on screen with my executable app that I ment on question 1, Could you help me to create different sizes framebuffer by using drm ioctl api?
3.Could you please give me a bit details for drm framebuffer and drm plane.I am a bit confused to use of these functionalities.So I want to show some warning dialogs, some information bar top of qt app on different place on screen, without using qt functions as I mentioned in first question and need to know which one I need to use, framebuffer or plane ? Could you please give me some idea and information ?

I am using bsp yocto release 4.14.98 and have a imx8qm-mek platform with hdmi connected to lilliput.

Best Regards

0 Kudos
Reply
8 Replies

4,216 Views
ekrem_sahin
Contributor I

Hello Igor,

Thanks for the information.

Best Regards

0 Kudos
Reply

4,225 Views
ekrem_sahin
Contributor I

Hello Igor,

The doc you provided not helping me.Could you please provide more information or doc ?

Best Regards

0 Kudos
Reply

4,223 Views
igorpadykov
NXP Employee
NXP Employee

Hi ekrem_sahin

 

unfortunately  I am not aware of other documents.

I believe in your case proper way is to proceed with help of

https://contact.nxp.com/new-prof-svcs-sw-tech

 

Best regards
igor

0 Kudos
Reply

4,246 Views
ekrem_sahin
Contributor I

Hello Igor,

From the document that you provided, I saw that imx framebuffer api is based on /dev/fb* interfaces.So is it based on using linux frame buffer ?Do you have an example/test source codes for the api ?

Also, I want to use drm ioctl api to reach /dev/dri/card* and want to ask you if you have an example/test source codes since I want to show some dialog on a plane on the QT app and failing while setting drm master when wayland is set already as drm master  while opening QT app?

Best Regards

0 Kudos
Reply

4,237 Views
igorpadykov
NXP Employee
NXP Employee

one can check Chapter 4 i.MX Framebuffer API  i.MX Graphics User’s Guide

 

"i.MX 8 on Linux OS supports Direct Rendering Manager (DRM) where the Linux framebuffer 
support is limited, recommended to Graphics Buffer Manager (GBM)."

 

Best regards
igor

 

0 Kudos
Reply

4,268 Views
ekrem_sahin
Contributor I

Hello Igorpadykov,

I think the framebuffer that you ment above is related to linux fbdev which uses /dev/fb* interfaces but what I am asking is the drm framebuffer

and drm planes by using drm ioctl api to reach /dev/dri/card* interfaces.So I tried to play with drm planes and imx8qm-mek device is supporting

upto 4 planes on hdmi.

Could you please double check my first question and Could you please correct me if I am wrong ?

Best Regards

0 Kudos
Reply

4,262 Views
igorpadykov
NXP Employee
NXP Employee

one can check Chapter 4 i.MX Framebuffer API  i.MX Graphics User’s Guide

 

"i.MX 8 on Linux OS supports Direct Rendering Manager (DRM) where the Linux framebuffer
support is limited, recommended to Graphics Buffer Manager (GBM)."

 

Best regards
igor

 

 

0 Kudos
Reply

4,272 Views
igorpadykov
NXP Employee
NXP Employee

Hi ekrem_sahin

 

reason may be that frame buffer drivers are not supported for i.MX 8.

 

1.jpg

 

Best regards
igor

 

0 Kudos
Reply