<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-u">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div>Hello,<br>
<br>
I'm working on Android in a virtualized environment under Xen hypervisor.<br>
I suppose that drm_hwcomposer will be the convenient choice as a generic solution in that case.<br>
<br>
I've implemented some platfomrXXX for our case, in which implemented Importer:<br>
I.e. ImportBuffer and ReleaseBuffer for native buffers(i.e. ION allocated memory) in/from DRM.<br>
I use the same ImportImage as in platformgeneric.cpp implementation(but I suppose it not used in our use-cases for now).<br>
Please note, we use custom paravirtual DRM driver on our platform.<br>
It has only one main plane so far.<br>
Taking that into account, I suppose that all composition is done in SurfaceFlinger in that case.
<br>
I.e.: hwc report that it won't take any layers and SurfaceFlinger will do composition and propagate one buffer as framebuffer target(via SetClientTarget)<br>
to hwc. That buffer will be placed on the main plane.<br>
<br>
Using drm_hwcomposer I see buffer registration/deregistration(DrmHwcBuffer::ImportBuffer / DrmHwcBuffer::Clear) for each composition.
<br>
That cause some performance issues, which may be specific to our platform/DRM realization/our use-case:<br>
In our virtualized environment Framebuffer registration/deregistration(drmModeAddFB2/drmModeRmFB) is performance costly. And de facto useless to do it for every frame, because SurfaceFlinger will not reallocate that framebuffer-target's(at least until display
resolution won't change). <br>
<br>
For example: If I allocate several buffers for final composition and register them once in DRM. Further, I will copy composition from framebuffer surface (provided by SurfaceFlinger) to one of that preallocated buffers and put it on a plane, it will be more
optimal than do drmModeAddFB2/drmModeRmFB for every buffer per composition.<br>
<br>
Could you please suggest me how to overcome that situation with buffers registration/deregistration?<br>
<br>
Kind regards,<br>
Andrii.<br>
</div>
<br>
<div id="Signature"></div>
</div>
</body>
</html>