[Mesa-dev] [PATCH v5 00/10] new series of Mesa for Tizen

Mun, Gwan-gyeong elongbug at gmail.com
Tue Nov 14 20:21:29 UTC 2017


Hi all,

I am sorry that I didn't have enough discussion about why new window
system code is needed for Tizen on mesa.

This is a brief architecture of Tizen Window System.

  +--------------------------------------------------------------------------------------------------+
  |                                 [Tizen Window System Architecture]
                              |
  |
                              |
  |
                              |
  |
                              |
  |                  +-----------------------+
+------------+      +------------+  |
  |                  | Enlightenment Display |                   |
       |      |   3D UI    |  |
  |                  |  Server for Tizen     +------------------>|
EvasGL   |      |   Toolkit  |  |
  |                  |                       |                   |
       |      |            |  |
  |                  |                       |
+-----+------+      +-----+------+  |
  |                  +--+-----------------+--+
|                   |         |
  |                     |                 |
v                   |         |
  |                     |                 |
+------------+            |         |
  |                     |                 |                      | GPU
Vendor |            |         |
  |                     |                 |                      |
GL/EGL    |<-----------+         |
  |                     |                 |                      |
Driver    |                      |
  |                     |                 |
+-----+------+                      |
  |                     |                 |
|                             |
  |                     v                 v
v                             |
  |   +-----------------------+    +----------------------+
+------------+                      |
  |   |         TDM           |    |        TBM           |      |
       |                      |
  |   |(Tizen Display Manager)+--->|(Tizen Buffer Manager)|<-----|
TPL-EGL  |                      |
  |   |                       |    |                      |      |
       |                      |
  |   +-----------------------+    +----------------------+
+------------+                      |
  |
                              |
  +--------------------------------------------------------------------------------------------------+



                                < display server / wayland-egl client >

    +-----------------------------+
+-------------------------------+
    |                             |                               |
                           |
    |  +-----------------------+  |                               |
+-----------------------+   |
    |  | Enlightenment Display +-------+                          |
|  wayland-egl client   |   |
    |  |  Server for Tizen     |  |    |                          |
+--+-------------+------+   |
    |  +----------+------------+  |    |                          |
  |             |          |
    |             |               |    |                          |
  |             |          |
    |             v               |    |                          |
  |             |          |
    |  +-----------------------+  |    |                          |
  |             |          |
    |  |     EVAS GL TBM       |  |    |                          |
  |             |          |
    |  +----+-------------+----+  |    |                          |
  |             |          |
    |       |             |       |    |                          |
  |             |          |
    |       |             v       |    |                          |
  v             v          |
    |       |        +---------+  |    |    +--------------+      |
+-----+   +-------------+   |
    |       |        |   EGL   +-------|--->|  GPU Vendor
|<---------+ EGL |   | wayland-egl |   |
    |       |        +----+----+  |    |    |  GL Driver   |      |
+--+--+   +---+---------+   |
    |       |             |       |    |    +--------------+      |
  |          |      ^      |
    |       v             v       |    |                          |
  v          v      |      |
    |  +---------+   +---------+  |    |    +--------------+      |
+--------------------+--+   |
    |  |   TBM   |<--+ TPL-EGL +-------|--->| wayland-tbm
|<---------+        TPL-EGL        |   |
    |  +---------+   +---------+  |    |    +--------------+      |
+-----------------------+   |
    |                             |    |            ^             |
                           |
    |                             |    |            |             |
                           |
    +-----------------------------+    +------------+
+-------------------------------+


* TBM:
   - Tizen Buffer Manager (TBM) provides the abstraction interface for
the graphic buffer manager
     in Tizen. [1]

   - Why does it needed?
     Because different vendors provides different user-level interface
for the memory manager,
     Tizen made TBM for supporting a common interface. refer [3], page 6-8.


* TDM:
   - TDM stands for Tizen Display Manager. Tizen Display Manager (TDM)
provides the display device
     abstraction interface for the display server to allow the direct
access to graphics hardware
     in a safe and efficient manner as a display HAL. The primary goal
of TDM is the unification
     of display hardware management procedures in user space. [2]

   - Why does it needed?
     Because different vendors provides different user-level interface
for the display devices,
     Tizen made TDM for supporting a common interface. refer [3], page 15-16.


* wayland-tbm:
    - wayland-tbm is a protocol for graphics memory management for Tizen.
      The wayland-tbm provides the library for sharing the
tbm_surfaces between the client and the server.
      When the client creates the wl_buffer though the wayland-tbm
library, the client can gets
      the wl_buffer which is shared with the server through the wl_tbm protocol.

    - wayland-tbm suppots two major features
       1) sharing the tbm_surfaces between the client and the server
          * it is similar with wayland-drm but it shares tbm_surface
as a base buffer.

       2) obtaining the scanout buffer and assigning it to the server
or the client.
          * Because some vendor provide limited scanout buffers,
therefore tizen added a protocol
            of releasing/assigning scanoutbuffers.

          * non-compisite mode / direct rendering: obtaining scanout
buffer from display-server and
                                                   assigning it to the
wayland-egl client.
          * composite mode: obtaining the scanout buffer from the
wayland-egl client and assigning it
                            to the display-server.


* TPL-EGL:
    - TPL-EGL is an abstraction layer for surface and buffer
management on Tizen platform aimed to
      implement the EGL porting layer of OpenGLES driver over various
display protocols.
      TPL-EGL treats tbm_surface as a base buffer object. And it uses
wayland-tbm protocol
      instead of wayland-drm for sharing buffers on wayland-egl.
      It supports tbm, wayland-egl, gbm window system.
      And tizen's enligthenment display server create egl_display from
tbm instead of gbm. [4],[5]


Compared to mesa, Tizen Platform depends on TBM, TDM, wayland-tbm protocol.
Tizen uses TBM for treating a native buffer. And Display manager uses
tbm_surface as a base buffer for displying.
And for sharing native buffers between display server and wayland-egl
client tizen uses wayland-tbm protocol
also wayland-tbm protocol/library provides a manners of managing
limited scanout buffers between the client and the server.
Therefore to support Tizen to mesa egl, I am suggesting to add new
window system code for Tizen.

Thanks for reading this far, comments welcome.

Thanks,

Gwan-gyeong.

[1] https://wiki.tizen.org/TBM
[2] https://wiki.tizen.org/TDM
[3] Tizen Buffer HAL and Tizen Display HAL
     https://www.tizenconference.com/frontend/site/show-details?eventId=2612&object=session&id=21124
     https://swoogo.s3.amazonaws.com/uploads/46837-5926fd6b24dfd.pdf
[4] https://www.x.org/wiki/Events/XDC2016/Program/XDC2016_Tizen_Window_System_EGL_Vulkan.pdf
[5] https://wiki.tizen.org/3.0_Porting_Guide/Graphics_and_UI

2017-10-28 2:22 GMT+09:00 Kenneth Graunke <kenneth at whitecape.org>:
> On Thursday, October 26, 2017 11:16:06 AM PDT Eric Anholt wrote:
>> Gwan-gyeong Mun <elongbug at gmail.com> writes:
>>
>> > Hi,
>> >
>> > These Patch v5 series modified with new helper function series [1].
>> >
>> > These series only have mesa for tizen feature.
>> >
>> > [1] https://patchwork.freedesktop.org/series/32577/
>>
>> Rather than have another giant pile of window system code in the tree,
>> I'd like to see a serious discussion of why you aren't using the
>> existing wayland and gbm platforms and what you would need from them.
>> The TPL stuff looks like abstraction for the sake of abstraction, to me.
>
> I agree with Eric.  I've never understood why this is necessary.



-- 
Gwan-gyeong Mun


More information about the mesa-dev mailing list