Overlay Text issue with Xorg modesetting driver

Shubham Kumar Jha shubham.kumar.jha at ni.com
Tue Jan 21 12:03:57 UTC 2020


Thanks for the response.
I would like to elaborate on the issue more to provide clarity on why I am using SHM pixmaps in place of regular pixmap. The example attached was just a reproducible case that was carved out of the application to showcase the issue. I have an application which allows users to display images on a Display Monitor connected to a Linux embedded hardware.  It also provides users with capability to draw shapes on top of image(overlays). The Overlays can be different shapes like lines , circles, points as well as text. The application was working fine until we switched from Intel driver to modsetting driver. As mentioned in my earlier conversation, expect for text all the other overlays(shapes) are working fine with modesetting driver. We are currently using 1.19.6 version of X server.


In the existing design, I copied the original image data into the SHM XImage and created SHM pixmap using the same memory segment. I use this SHM Pixmap to draw overlay shapes and display and later use XShmPutImage() to display XImage on the window. However if I modify this to regular Pixmap, I need to copy the original image data into an XImage, followed by copying XImage into pixmap using XGetImage() and then use XCopyArea() . My understanding is that we cannot copy the original image data directly into pixmap(without an XImage).  I am trying to avoid this extra copy which hits performance. Please correct me if I am wrong.

Thanks,
Shubham Jha
________________________________
From: Michel Dänzer <michel at daenzer.net>
Sent: 20 January 2020 22:00
To: Shubham Kumar Jha <shubham.kumar.jha at ni.com>
Cc: xorg-devel at lists.x.org <xorg-devel at lists.x.org>
Subject: [EXTERNAL] Re: Overlay Text issue with Xorg modesetting driver

On 2020-01-17 9:49 a.m., Shubham Kumar Jha wrote:
> Hi,
>
> I have attached an example which displays text and background rectangle When this piece of code is run with Intel as default XORG driver everything works fine both text and rectangle are being displayed,whereas when i switch to the Modesetting driver only the background rectangle is seen and text is not being displayed.
>
> I tried running XShmqueryversion with modesetting driver , it returned value of pixmap as True, so it means shared pixmaps should be supported.I have verified this behavior on Ubuntu 16.04.
>
> Kindly let me know if this is the expected behavior of modesetting driver, if not then how to go ahead with resolving this.

It could be a bug in glamor, but why are you using an SHM pixmap for
this anyway? AFAICT you're only drawing to it with Xft, not directly
with the CPU on the client side. So you could use a normal pixmap and
copy from that to the window with XCopyArea. That'll also work on setups
which actually don't support SHM pixmaps, e.g. Xwayland or Xorg with
EXA, and as a bonus should even perform better.


--
Earthling Michel Dänzer               |               https://urldefense.com/v3/__https://redhat.com__;!!FbZ0ZwI3Qg!7N2GCyBbR_Ijx5AjtKpNus0ud_uCXXmScktjQ9VpotsC6cakXYPa2uFiVRGgmNyrkfo$
Libre software enthusiast             |             Mesa and X developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20200121/075b1477/attachment.htm>


More information about the xorg-devel mailing list