[Mesa-dev] [PATCH 0/8] GBM Graphics Buffer Manager
Chia-I Wu
olvaffe at gmail.com
Thu Jun 23 19:28:16 PDT 2011
On Fri, Jun 24, 2011 at 8:38 AM, Chia-I Wu <olvaffe at gmail.com> wrote:
> On Thu, Jun 23, 2011 at 8:07 PM, Benjamin Franzke
> <benjaminfranzke at googlemail.com> wrote:
>> 2011/6/23 Chia-I Wu <olvaffe at gmail.com>:
>>> On Thu, Jun 23, 2011 at 7:46 PM, Benjamin Franzke
>>> <benjaminfranzke at googlemail.com> wrote:
>>>> 2011/6/23 Chia-I Wu <olvaffe at gmail.com>:
>>>>> On Wed, Jun 22, 2011 at 10:30 PM, Benjamin Franzke
>>>>> <benjaminfranzke at googlemail.com> wrote:
>>>>>> Hi List,
>>>>>>
>>>>>> This series adds a graphics buffer management library which is
>>>>>> targeted to be used as native (drm) platform for egl on kms or openwfd,
>>>>>> and thus replaces the current mechanism of using a fd as EGLNativeDisplay
>>>>>> and EGL_MESA_drm_image to create buffers.
>>>>>> GBM uses the mesas internal dri interface or acts as a gallium state tracker.
>>>>>>
>>>>>> The mapping to EGL types is:
>>>>>>
>>>>>> gbm_device - EGLNativeDisplayType
>>>>>> gbm_bo - EGLNativePixmapType / EGL_NATIVE_PIXMAP_KHR
>>>>>>
>>>>>> This integrates better with the idea of EGL, which assumes there is
>>>>>> some kind of native library thats responsible for allocating buffers.
>>>>>>
>>>>>> We wanted to use libkms, but since that's explicitly designed to no
>>>>>> support hw renderable buffers we have to go a different route.
>>>>> The idea looks good to me in general. But would it make sense to
>>>>> replace st/gbm and targets/gdm by another backend that uses st/xa,
>>>>> which is supposed to have a stable ABI, instead (currently only on
>>>>> xa_branch)?
>>>>
>>>> For the reason of a stable ABI we dont need it, since all of gbm is inside mesa.
>>>> Maybe it could be used at some point to ease driver loading/sharing or
>>>> so, dont know,
>>>> but right now I think its easier to just have this small state tracker.
>>>> Since its inside mesa we could change it later if it feels better then.
>>> Ok. From a quick look I thought there was gbm_gallium_drm.so which
>>> loads egl_gallium's pipe drivers. As the pipe drivers should not
>>> exist, I'd like to see no external use of them. Maybe I was wrong.
>> Well, thats done, but i think thats not a problem.
>> I like to see a general drm-pipe in future, which is used only by
>> gallium state-trackers that need to load drivers, like egl, gbm(, xa),
>> so no external use.
> I meant external to egl_gallium. I plan to switch over to
> targets/egl-static for egl_gallium soon, and there will be no
> pipe_*.so anymore.
Does this patch work for you? I don't know an easy way to test gbm.
I'd like to commit it and then remove targets/egl (in favor of
targets/egl-static) before 7.11 branched.
> Another thing I just noticed is that gbm(_dri) is enabled by default
> and depends on --enable-shared-glapi, which is disabled by default.
> They should have the same default. Since shared glapi solves many
> linking issues, I'd like to see it enabled by default. But the thing
> is that it changes libGL and the change hasn't really been discussed
> or reviewed. It should deserve its own thread on the list.
>
>
>>>>>>
>>>>>> Benjamin Franzke (8):
>>>>>> dri: Add dupImage to DRIimageExtension
>>>>>> intel: Implement DRIimageExtension::dupImage
>>>>>> st/dri: Implement DRIimageExtension::dupImage
>>>>>> Add gbm (generic/graphics buffer manager)
>>>>>> gbm: Add dri backend
>>>>>> gbm: Add gallium (drm) backend
>>>>>> egl_dri2: Hookup gbm as drm platform
>>>>>> st/egl: Hookup gbm for drm backend
>>>>>>
>>>>>> Makefile | 11 +
>>>>>> configs/autoconf.in | 10 +-
>>>>>> configs/default | 14 +-
>>>>>> configure.ac | 70 ++++
>>>>>> include/EGL/eglplatform.h | 6 +
>>>>>> include/GL/internal/dri_interface.h | 2 +
>>>>>> src/egl/drivers/dri2/Makefile | 2 +
>>>>>> src/egl/drivers/dri2/egl_dri2.c | 76 +++--
>>>>>> src/egl/drivers/dri2/egl_dri2.h | 11 +
>>>>>> src/egl/drivers/dri2/platform_drm.c | 99 ++++--
>>>>>> src/egl/main/Makefile | 4 +
>>>>>> src/gallium/state_trackers/dri/drm/dri2.c | 19 +
>>>>>> src/gallium/state_trackers/egl/Makefile | 3 +-
>>>>>> src/gallium/state_trackers/egl/common/egl_g3d.c | 18 +-
>>>>>> src/gallium/state_trackers/egl/common/native.h | 3 +
>>>>>> src/gallium/state_trackers/egl/drm/modeset.c | 36 ++
>>>>>> src/gallium/state_trackers/egl/drm/native_drm.c | 77 ++---
>>>>>> src/gallium/state_trackers/egl/drm/native_drm.h | 4 +
>>>>>> src/gallium/state_trackers/gbm/Makefile | 46 +++
>>>>>> src/gallium/state_trackers/gbm/gbm_drm.c | 225 ++++++++++++
>>>>>> .../state_trackers/gbm/gbm_gallium_drmint.h | 74 ++++
>>>>>> src/gallium/targets/egl/Makefile | 2 +-
>>>>>> src/gallium/targets/gbm/Makefile | 32 ++
>>>>>> src/gallium/targets/gbm/gbm.c | 61 ++++
>>>>>> src/gallium/targets/gbm/pipe_loader.c | 192 ++++++++++
>>>>>> src/gallium/targets/gbm/pipe_loader.h | 48 +++
>>>>>> src/gbm/Makefile | 14 +
>>>>>> src/gbm/backends/Makefile | 14 +
>>>>>> src/gbm/backends/Makefile.template | 65 ++++
>>>>>> src/gbm/backends/dri/Makefile | 22 ++
>>>>>> src/gbm/backends/dri/driver_name.c | 89 +++++
>>>>>> src/gbm/backends/dri/gbm_dri.c | 377 ++++++++++++++++++++
>>>>>> src/gbm/backends/dri/gbm_driint.h | 78 ++++
>>>>>> src/gbm/main/Makefile | 90 +++++
>>>>>> src/gbm/main/backend.c | 128 +++++++
>>>>>> src/gbm/main/backend.h | 36 ++
>>>>>> src/gbm/main/common.c | 88 +++++
>>>>>> src/gbm/main/common.h | 42 +++
>>>>>> src/gbm/main/common_drm.h | 48 +++
>>>>>> src/gbm/main/gbm.c | 189 ++++++++++
>>>>>> src/gbm/main/gbm.h | 99 +++++
>>>>>> src/gbm/main/gbm.pc.in | 12 +
>>>>>> src/gbm/main/gbmint.h | 81 +++++
>>>>>> src/mesa/drivers/dri/intel/intel_screen.c | 27 ++-
>>>>>> 44 files changed, 2536 insertions(+), 108 deletions(-)
>>>>>> create mode 100644 src/gallium/state_trackers/gbm/Makefile
>>>>>> create mode 100644 src/gallium/state_trackers/gbm/gbm_drm.c
>>>>>> create mode 100644 src/gallium/state_trackers/gbm/gbm_gallium_drmint.h
>>>>>> create mode 100644 src/gallium/targets/gbm/Makefile
>>>>>> create mode 100644 src/gallium/targets/gbm/gbm.c
>>>>>> create mode 100644 src/gallium/targets/gbm/pipe_loader.c
>>>>>> create mode 100644 src/gallium/targets/gbm/pipe_loader.h
>>>>>> create mode 100644 src/gbm/Makefile
>>>>>> create mode 100644 src/gbm/backends/Makefile
>>>>>> create mode 100644 src/gbm/backends/Makefile.template
>>>>>> create mode 100644 src/gbm/backends/dri/Makefile
>>>>>> create mode 100644 src/gbm/backends/dri/driver_name.c
>>>>>> create mode 100644 src/gbm/backends/dri/gbm_dri.c
>>>>>> create mode 100644 src/gbm/backends/dri/gbm_driint.h
>>>>>> create mode 100644 src/gbm/main/Makefile
>>>>>> create mode 100644 src/gbm/main/backend.c
>>>>>> create mode 100644 src/gbm/main/backend.h
>>>>>> create mode 100644 src/gbm/main/common.c
>>>>>> create mode 100644 src/gbm/main/common.h
>>>>>> create mode 100644 src/gbm/main/common_drm.h
>>>>>> create mode 100644 src/gbm/main/gbm.c
>>>>>> create mode 100644 src/gbm/main/gbm.h
>>>>>> create mode 100644 src/gbm/main/gbm.pc.in
>>>>>> create mode 100644 src/gbm/main/gbmint.h
>>>>>>
>>>>>> --
>>>>>> 1.7.3.4
>>>>>>
>>>>>> _______________________________________________
>>>>>> mesa-dev mailing list
>>>>>> mesa-dev at lists.freedesktop.org
>>>>>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> olv at LunarG.com
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> olv at LunarG.com
>>>
>>
>
>
>
> --
> olv at LunarG.com
>
--
olv at LunarG.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-targets-gbm-build-pipe-drivers.patch
Type: text/x-patch
Size: 12555 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110624/c5cb6062/attachment-0001.bin>
More information about the mesa-dev
mailing list