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

2017-11-15 Thread Eric Anholt
"Mun, Gwan-gyeong"  writes:

> 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|   |
> |  +-+   +-+  ||+--+  |
> +---+   |
> | ||^ |
>|
> | ||| |
>|
> +-+++
> 

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

2017-11-15 Thread Mun, Gwan-gyeong
2017-11-15 19:32 GMT+09:00 Nicolai Hähnle :
> Not sure if it's just my client, but all the nice ASCII art got messed up
> unfortunately :/
>
> On 14.11.2017 21:21, Mun, Gwan-gyeong wrote:
>>
>>
>> +--+
>>| [Tizen Window System Architecture]
>>|
>>|
>>|
>>|
>>|
>>|
>>|
>>|  +---+
>> ++  ++  |
>>|  | Enlightenment Display |   |
>> |  |   3D UI|  |
>>|  |  Server for Tizen +-->|
>> EvasGL   |  |   Toolkit  |  |
>>|  |   |   |
>
>
> and so on...
>
>

I'm sorry that I shared the broken ascii images.
Although when I sent the acsii image, I'd checked it on my text editor.
It has been messed. I don't know why my ascii image was broken.

therefore I attached a text file of the ascii image which describes
Tizen Window System Architecture and a relation between display server
and wayland-egl client.

>
>
>>
>> * 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.
>
>
> So it would be possible for the TBM backend to just call into libgbm, right?
>

Comparing to gbm, tbm backend also calls drm apis directly. this is
example for tbm-vc4 backend.[1]

For supporting the gbm on tizen, tizen has tbm backend for the gbm. [2]
This link requires an account for review.tzein.org.
If you don't want to create an account for https://review.tizen.org,
you can refer this link [3].

[1] https://github.com/elongbug/libtbm-vc4
[2] 
https://review.tizen.org/gerrit/gitweb?p=platform/core/uifw/libgbm.git;a=tree;f=backends/tbm;h=1fe83c7ff96840e68176128a2cc341c7858e794a;hb=refs/heads/tizen
[3] https://github.com/elongbug/libgbm-tbm


> Cheers,
> Nicolai
>

Best regard,

Gwan-gyeong.

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

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

2017-11-15 Thread Nicolai Hähnle
Not sure if it's just my client, but all the nice ASCII art got messed 
up unfortunately :/


On 14.11.2017 21:21, Mun, Gwan-gyeong wrote:

   
+--+
   | [Tizen Window System Architecture]
   |
   |
   |
   |
   |
   |
   |
   |  +---+
++  ++  |
   |  | Enlightenment Display |   |
|  |   3D UI|  |
   |  |  Server for Tizen +-->|
EvasGL   |  |   Toolkit  |  |
   |  |   |   |


and so on...






* 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.


So it would be possible for the TBM backend to just call into libgbm, right?

Cheers,
Nicolai





* 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=session=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 :

On Thursday, October 26, 2017 11:16:06 AM PDT Eric Anholt wrote:

Gwan-gyeong Mun  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 

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

2017-11-14 Thread Mun, Gwan-gyeong
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,
  

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

2017-10-27 Thread Kenneth Graunke
On Thursday, October 26, 2017 11:16:06 AM PDT Eric Anholt wrote:
> Gwan-gyeong Mun  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.


signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-10-26 Thread Eric Anholt
Gwan-gyeong Mun  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.


signature.asc
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-10-25 Thread Gwan-gyeong Mun
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/

Thanks,
Gwan-gyeong.


Gwan-gyeong Mun (10):
  egl: add a treatment of tizen platform on egl display (v2)
  egl/dri2: Add some member variables for tizen platform on
dri2_egl_display and dri2_egl_surface (v2)
  egl/tizen: add support of the swrast related features for tizen
platform (v2)
  configure.ac: Add tizen to supported platforms (v2)
  egl/tizen: add support of dri2_loader (v3)
  egl/tizen: add tizen specific implementations for
BindWaylandDisplayWL/UnbindWaylandDisplayWL/QueryWaylandBufferWL
(v2)
  egl/tizen: add tizen specific implementation for EGL_WAYLAND_BUFFER_WL
target of eglCreateImageKHR() (v2)
  egl/tizen: add EGL_NATIVE_SURFACE_TIZEN target of eglCreateImageKHR()
  egl/tizen: add support of dri_image_loader (v3)
  docs: add a high level info about Tizen / Tizen Porting Layer (TPL)
for EGL / Tizen Buffer Manager (TBM) / etc (v2)

 configure.ac  |   10 +-
 docs/systems.html |1 +
 docs/tizen.html   |  251 ++
 src/egl/Makefile.am   |6 +
 src/egl/drivers/dri2/egl_dri2.c   |   11 +
 src/egl/drivers/dri2/egl_dri2.h   |   28 +-
 src/egl/drivers/dri2/platform_tizen.c | 1418 +
 src/egl/main/eglapi.c |   15 +
 src/egl/main/egldisplay.c |   46 ++
 src/egl/main/egldisplay.h |9 +
 10 files changed, 1791 insertions(+), 4 deletions(-)
 create mode 100644 docs/tizen.html
 create mode 100644 src/egl/drivers/dri2/platform_tizen.c

-- 
2.14.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev