[Help]Question about graphics architecture for weson/wayland

Carsten Haitzler (The Rasterman) raster at rasterman.com
Tue Aug 19 00:18:52 PDT 2014


On Tue, 19 Aug 2014 06:59:22 +0000 Yang Andy <williamyang13 at hotmail.com> said:

> Hi Pekka
> 
> Thank you very much for your reply.
> 
> > If you have a DRM kernel driver supporting KMS, use Weston's drm-backend
> > but pass --use-pixman on the command line.
> 
> DRM kernel driver is for display device? Not for GPU?
> 
> In other words,i can use drm-backend even though i have no GPU device.

you may not have a drm driver for your hardware, but nothing stops you having
fdrm and kms drivers even without a 3d gpu. you may havd 2d accel hardware that
you want to manage or just simply buffer allocation/management (a lot of older
hardware requires display buffers to be in linear/physical (not virtual) memory
and thus requires a specialized allocator. some requires it to be in specific
physical memory ranges (an older soc i know requires all gfx buffers for
display and 2d accel to be inside the first physical 16mb of ram - on even
older hardware before my linux days all gfx primitives, sprites, cursors,
audio data, fb scanout control commands and floppy disk i/o data had to reside
in the same 512kb and if it didn't it was the cpu's job to get it to/from
there).

if clients software rendered, but used drm buffers to render into, then it
might be possible for the compositor (eg weston) if it knows it can, to program
hardware layers or fbs to point directly to these buffers to scan-out from.
this is how you get truly zero-copy display/output, but it would require that
client uses drm directly to allocate buffers, use software to render (or
whatever it likes actually), then sends compositor drm buffers.

as such this is on a "eventually we will do this" plan for efl, but as it is
not easy to support drm in a universal way to allocate buffers for
scanout/display (not the last time i looked), we've got that on the back-burner.

if one day there are api's we could use where we can allocate "drm buffers" an
d ensure they are linear (or of a specific format) or query them for the
layouts we do support (tiled vs linear), and can request properties on
allocation - eg "can scan out" "can be used as pointer" "can be used as
texture" etc. then that'd be awesome and we'd use it for our software rendering
(and have a wayland_software_drm engine or something - or maybe make the shm
engine detect this if it is available and auto use if it works). but we don't
have that today because last i looked.. no such thing exists that we can use -
someone correct me if something has changed... please! :)

> Andy
> > Date: Tue, 19 Aug 2014 09:44:14 +0300
> > From: ppaalanen at gmail.com
> > To: williamyang13 at hotmail.com
> > CC: raster at rasterman.com; wayland-devel at lists.freedesktop.org
> > Subject: Re: [Help]Question about graphics architecture for weson/wayland
> > 
> > On Tue, 19 Aug 2014 02:20:58 +0000
> > Yang Andy <williamyang13 at hotmail.com> wrote:
> > 
> > > My senario is that my target device do not support hardware
> > > accelerate.(do not use gpu) But i have to use EFL to develop
> > > application in wayland/weston platform.
> > > 
> > > In order to achieve my task,how do i setup weston?
> > 
> > Oh, so this was your real question.
> > 
> > If you have a DRM kernel driver supporting KMS, use Weston's drm-backend
> > but pass --use-pixman on the command line.
> > 
> > If you do not have a DRM driver, but you do have /dev/fb0, use Weston's
> > fbdev-backend.
> > 
> > 
> > Thanks,
> > pq
>  		 	   		  

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster at rasterman.com



More information about the wayland-devel mailing list