glsdk/dri2proto.git
7 years agoDEBIAN: debianization master glsdk-6_00_00_07
Nikhil Devshatwar [Wed, 15 May 2013 11:15:56 +0000 (16:45 +0530)]
DEBIAN: debianization

7 years agovideo support for dri2
Rob Clark [Tue, 15 Nov 2011 19:50:41 +0000 (13:50 -0600)]
video support for dri2

To allow the potential use of overlays to display video content, a few
extra parameters are required:

 + source buffer in different format (for example, various YUV formats)
   and size as compared to destination drawable
 + multi-planar formats where discontiguous buffers are used for
   different planes.  For example, luma and chroma split across
   multiple memory banks or with different tiled formats.
 + flipping between multiple back buffers, perhaps not in order (to
   handle video formats with B-frames)
 + cropping during swap.. in case of video, perhaps the required hw
   buffers are larger than the visible picture to account for codec
   borders (for example, reference frames where a block/macroblock
   moves past the edge of the visible picture, but back again in
   subsequent frames).

Current solutions use the GPU to do a scaled/colorconvert into a DRI2
buffer from the client context.  The goal of this protocol change is
to push the decision to use overlay or GPU blit to the xorg driver.

In many cases, an overlay will avoid several passes through memory
(blit/scale/colorconvert to DRI back-buffer on client side, blit to
front and fake-front, and then whatever compositing is done by the
window manager).  On the other hand, overlays can often be handled
directly by the scanout engine in the display hardware, with the GPU
switched off.

The disadvantages of overlays are that they are (usually) a limited
resource, sometimes with scaling constraints, and certainly with
limitations about transformational effects.

The goal of combining video and dri2 is to have the best of both worlds,
to have the flexibility of GPU blitting (ie. no limited number of video
ports, no constraint about transformational effects), while still having
the power consumption benefits of overlays (reduced memory bandwidth
usage and ability to shut off the GPU) when the UI is relatively
static other than the playing video.

And even when GPU blitting is used, DRI2DriverXV allows to save one or
two copies: (1) no need for maintainence of DRI2BufferFakeFrontLeft, and
(2) in case that a pointer swap is not possible for switching back and
front buffer (for example, Window redirected to a pixmap with extra
padding around edges for window decorations), the colorconvert/scale
blit can be combined with the copy to the front buffer.

See:
https://wiki.linaro.org/OfficeofCTO/MemoryManagement?action=AttachFile&do=get&target=linux-video.pdf

ChangeLog:
v1: initial version
v2: add attributes, remove DRI2GetVideoBuffers/DRI2ATTACH_VIDEO and
    instead use attributes to specify unscaled width/height
v3: support for variable length attributes and CSC matrix
v4: add header file changes

Note: I'm not entirely sure how to handle the wire representation of
float matrix for CSC.  OTOH, since DRI2 is a local-only protocol, I'm
not sure if it is necessary to precisely define this.  Thoughts?

Conflicts:

dri2proto.h
dri2proto.txt

7 years agoRemove extra DRI2SwapBuffers
Rob Clark [Mon, 19 Sep 2011 22:11:16 +0000 (17:11 -0500)]
Remove extra DRI2SwapBuffers

Remove duplicate DRI2SwapBuffers from 'A.2 Protocol Requests' section.

Conflicts:

dri2proto.txt

8 years agodri2proto: bump package to 2.8 freedesktop-dri2proto-2.8
Dave Airlie [Sat, 7 Jul 2012 09:20:12 +0000 (10:20 +0100)]
dri2proto: bump package to 2.8

this just so we can rely on 2.8 to build the server/mesa against.

Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agodri2proto: add prime protocol support. (v2.1)
Dave Airlie [Fri, 20 Jan 2012 10:34:58 +0000 (10:34 +0000)]
dri2proto: add prime protocol support. (v2.1)

So we reserve bits 16->19 for offload device ids, this means we can
have 6 offload devices, which is plenty for now, and we can bump
this further later without fear.

v2: I suck at maths, that is all. Fixed up the maths to match reality.
v2.1: fix typo

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agodri2proto: Add DRI2GetParam request
Chad Versace [Wed, 2 May 2012 19:03:31 +0000 (12:03 -0700)]
dri2proto: Add DRI2GetParam request

Bump protocol version to 1.4.
Bump package version to 2.7.

This new protocol request effectively allows clients to perform feature
detection on the DDX.

If I had DRI2GetParam in June 2011, when I was implementing support in the
Intel DDX and Mesa for new hardware that required a new DRI2 attachment
format, then I could have avoided a week of pain caused by the necessity
to write a horrid feature detection hack [1] in Mesa. In the future, when
the work begins to add MSAA support to the Intel DDX, having a clean way
to do feature detection will allow us to avoid revisiting and expanding
that hack.

[1] mesa, commit aea2236a, function intel_verify_dri2_has_hi

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
8 years agodri2proto: Fix documented opcodes
Chad Versace [Wed, 2 May 2012 18:56:37 +0000 (11:56 -0700)]
dri2proto: Fix documented opcodes

Fix the documented opcodes in dri2proto.txt to be consistent with the
actual opcode values in dri2proto.h and in xcb/proto:src/dri2.xml. (It
looks like the opcodes were incorrect due to copy-paste errors).

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
9 years agoAdd attachment token DRI2BufferHiz
Chad Versace [Wed, 11 May 2011 19:50:11 +0000 (12:50 -0700)]
Add attachment token DRI2BufferHiz

... and bump version to 2.6.

CC: Eric Anholt <eric@anholt.net>
CC: Ian Romanick <idr@freedesktop.org>
CC: Kristian Høgsberg <krh@bitplanet.net
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
9 years agodri2proto: add a new DRI2BufferSwapComplete struct that matches the spec
Jesse Barnes [Thu, 5 May 2011 20:11:22 +0000 (13:11 -0700)]
dri2proto: add a new DRI2BufferSwapComplete struct that matches the spec

Just add a new struct to remain compatible with existing code.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
9 years agoRevert "dri2proto: make DRI2 swap event match GLX spec"
Jesse Barnes [Thu, 5 May 2011 16:22:39 +0000 (09:22 -0700)]
Revert "dri2proto: make DRI2 swap event match GLX spec"

This reverts commit 0ca3778de195a82087d0f07415a1cf8fc94f5b0a.

This broke compatibility by renaming existing struct fields.  So revert
in favor of a new struct.

9 years agodri2proto: make DRI2 swap event match GLX spec
Jesse Barnes [Tue, 3 May 2011 19:14:58 +0000 (12:14 -0700)]
dri2proto: make DRI2 swap event match GLX spec

We only spec a 32 bit sbc count, so drop the high bits.  Also make the
padding explicit.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
10 years agoFix DRI2Connect line encoding to match existing code
Marcin Kościelnicki [Thu, 13 May 2010 21:05:56 +0000 (21:05 +0000)]
Fix DRI2Connect line encoding to match existing code

Signed-off-by: Julien Cristau <jcristau@debian.org>
11 years agoconfig: update AC_PREREQ statement to 2.60
Gaetan Nadon [Sun, 28 Mar 2010 23:25:52 +0000 (19:25 -0400)]
config: update AC_PREREQ statement to 2.60

Unrelated to the previous patches, the new value simply reflects
the reality that the minimum level for autoconf to configure
all x.org modules is 2.60 dated June 2006.

ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
11 years agoconfig: remove the pkgconfig pc.in file from EXTRA_DIST
Gaetan Nadon [Sun, 28 Mar 2010 23:00:30 +0000 (19:00 -0400)]
config: remove the pkgconfig pc.in file from EXTRA_DIST

Automake always includes it in the tarball.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
11 years agoconfig: install and distribute dri2proto.txt
Gaetan Nadon [Sun, 28 Mar 2010 21:35:44 +0000 (17:35 -0400)]
config: install and distribute dri2proto.txt

It will now be installed in $docdir in addition
to being distributed in the tarball.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
11 years agoFix typo and obsolete reference in dri2proto.txt
Mike Stroyan [Tue, 16 Feb 2010 21:51:43 +0000 (14:51 -0700)]
Fix typo and obsolete reference in dri2proto.txt

11 years agoAdd more info about dri2proto events
Mike Stroyan [Tue, 16 Feb 2010 21:47:21 +0000 (14:47 -0700)]
Add more info about dri2proto events

11 years agoDefine an event to notify clients about the validity of their buffers.
Francisco Jerez [Mon, 8 Feb 2010 18:24:37 +0000 (19:24 +0100)]
Define an event to notify clients about the validity of their buffers.

Bumps the protocol and package versions.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
11 years agoMerge branch 'dri2-swapbuffers'
Jesse Barnes [Wed, 9 Dec 2009 00:03:11 +0000 (16:03 -0800)]
Merge branch 'dri2-swapbuffers'

11 years agoMakefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
Gaetan Nadon [Mon, 23 Nov 2009 00:24:47 +0000 (19:24 -0500)]
Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES

Now that the INSTALL file is generated.
Allows running make maintainer-clean.

11 years agoAdd a DRI2DriverVDPAU driver type.
Aaron Plattner [Mon, 12 Oct 2009 20:11:47 +0000 (13:11 -0700)]
Add a DRI2DriverVDPAU driver type.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
11 years agoREADME: file created or updated #24206
Gaetan Nadon [Mon, 16 Nov 2009 16:13:29 +0000 (11:13 -0500)]
README: file created or updated #24206

Contains a set of URLs to freedesktop.org.

11 years agoMakefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
Gaetan Nadon [Mon, 16 Nov 2009 00:45:26 +0000 (19:45 -0500)]
Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432

ChangeLog filename is known to Automake and requires no further
coding in the makefile.

11 years agoMakefile.am: INSTALL file is missing or incorrect #24206
Gaetan Nadon [Sun, 15 Nov 2009 23:31:28 +0000 (18:31 -0500)]
Makefile.am: INSTALL file is missing or incorrect #24206

The standard GNU file on building/installing  tarball is copied
using the XORG_INSTALL macro contained in XORG_DEFAULT_OPTIONS
Add INSTALL target

11 years agoconfigure.ac: deploy the new XORG_DEFAULT_OPTIONS #24242
Gaetan Nadon [Sun, 15 Nov 2009 23:11:36 +0000 (18:11 -0500)]
configure.ac: deploy the new XORG_DEFAULT_OPTIONS #24242

This macro aggregate a number of existing macros that sets commmon
X.Org components configuration options. It shields the configuration file from
future changes.

11 years agoconfigure.ac: AM_MAINTAINER_MODE missing #24238
Gaetan Nadon [Sun, 15 Nov 2009 18:55:25 +0000 (13:55 -0500)]
configure.ac: AM_MAINTAINER_MODE missing #24238

This turns off maintainer mode build rules in tarballs.
Works in conjunction with autogen.sh --enable-maintainer-mode

11 years ago.gitignore: use common defaults with custom section # 24239
Gaetan Nadon [Sat, 14 Nov 2009 23:26:46 +0000 (18:26 -0500)]
.gitignore: use common defaults with custom section # 24239

Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.

11 years agoFix cut & paste error: Extension Requests -> Extension Events
Jesse Barnes [Thu, 12 Nov 2009 17:23:03 +0000 (17:23 +0000)]
Fix cut & paste error: Extension Requests -> Extension Events

11 years agoAdd DRI2 event support for DRI2BufferSwapComplete
Jesse Barnes [Thu, 12 Nov 2009 15:26:40 +0000 (15:26 +0000)]
Add DRI2 event support for DRI2BufferSwapComplete

11 years agoPad out DRI2 swap buffers reply
Jesse Barnes [Wed, 11 Nov 2009 23:26:40 +0000 (15:26 -0800)]
Pad out DRI2 swap buffers reply

11 years agoAdd DRI2SwapInterval protocol
Jesse Barnes [Tue, 10 Nov 2009 20:12:07 +0000 (12:12 -0800)]
Add DRI2SwapInterval protocol

Needed to handle swap interval in the direct rendered case.

11 years agoBump package version to 2.2
Jesse Barnes [Thu, 29 Oct 2009 19:45:48 +0000 (12:45 -0700)]
Bump package version to 2.2

11 years agoFix DRI2SwapBuffers reply length
Jesse Barnes [Sat, 3 Oct 2009 05:23:09 +0000 (22:23 -0700)]
Fix DRI2SwapBuffers reply length

Length should be a CARD32 and match the endianness annotation.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
11 years agoAdd swap interval and synchronization support
Jesse Barnes [Fri, 2 Oct 2009 05:13:34 +0000 (22:13 -0700)]
Add swap interval and synchronization support

Based on SGI_video_sync, SGI_swap_control and OML_sync_control, add swap
interval and synchronization support to DRI2.  Useful for throttling rendering
and basic performance metrics.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
11 years agoUpdate protocol description for swapbuffers
Jesse Barnes [Mon, 8 Jun 2009 23:12:50 +0000 (16:12 -0700)]
Update protocol description for swapbuffers

11 years agoMake swapbuffers an async request
Kristian Høgsberg [Wed, 3 Jun 2009 21:36:43 +0000 (17:36 -0400)]
Make swapbuffers an async request

The protocol now require a DRI2GetBuffersWithFormat request to follow the
swapbuffer request so.

11 years agoAdd SwapBuffers request
Jesse Barnes [Fri, 1 May 2009 21:41:55 +0000 (14:41 -0700)]
Add SwapBuffers request

Add a SwapBuffers request for requesting a front<->back swap.  Returns a
whole new set of buffers to the client to allow for triple buffering
etc.

11 years agoAdd protocol for DRI2GetBuffersWithFormat
Ian Romanick [Tue, 21 Apr 2009 04:16:24 +0000 (21:16 -0700)]
Add protocol for DRI2GetBuffersWithFormat

This function replaces DRI2GetBuffers.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
11 years agoBump to 2.0 and release
Kristian Høgsberg [Mon, 20 Apr 2009 18:08:19 +0000 (14:08 -0400)]
Bump to 2.0 and release

12 years agoDistribute the protocol documentation
Julien Cristau [Fri, 9 Jan 2009 05:07:59 +0000 (06:07 +0100)]
Distribute the protocol documentation

12 years agoJanitor: Correct make distcheck and dont distribute autogen.sh
Paulo Cesar Pereira de Andrade [Tue, 27 Jan 2009 22:06:28 +0000 (20:06 -0200)]
Janitor: Correct make distcheck and dont distribute autogen.sh

12 years agoBump to 1.99.3 and back out the value bitmask from the CopyRegion request.
Kristian Høgsberg [Tue, 2 Dec 2008 01:57:40 +0000 (20:57 -0500)]
Bump to 1.99.3 and back out the value bitmask from the CopyRegion request.

12 years agoBump version to 1.99.2.
Kristian Høgsberg [Mon, 1 Dec 2008 19:01:42 +0000 (14:01 -0500)]
Bump version to 1.99.2.

12 years agoAdd protocol documentation, update to DRI2CopyRegion request.
Kristian Høgsberg [Wed, 15 Oct 2008 03:19:15 +0000 (23:19 -0400)]
Add protocol documentation, update to DRI2CopyRegion request.

12 years agoUpdate to 1.99.1 - drop sarea and perform swap buffer in X server.
Kristian Høgsberg [Tue, 12 Aug 2008 16:52:33 +0000 (12:52 -0400)]
Update to 1.99.1 - drop sarea and perform swap buffer in X server.

Still to resolve is the swap buffer request.  It should probably be
broken into two requests, one to post the swap request and one to wait
for it to be completed.  Also, need to find a good solution to
CopySubBuffer that doesn't require a roundtrip per rectangle.

Don't need to solve all this for 2.0, though, can add requests later on.

13 years agoAdjust pkg-config cflags to match other proto modules.
Kristian Høgsberg [Wed, 2 Apr 2008 23:11:32 +0000 (19:11 -0400)]
Adjust pkg-config cflags to match other proto modules.

13 years agoAdd reemitDrawableInfo protocol.
Kristian Høgsberg [Wed, 26 Mar 2008 20:00:05 +0000 (16:00 -0400)]
Add reemitDrawableInfo protocol.

Also, remove the screen number where it's redundant and rename
drmDrawable in the create drawable request to just 'handle' now that
we don't rely on drm drawables.

13 years agoFix typo in xDRI2QueryVersionReq req type field.
Kristian Høgsberg [Wed, 12 Mar 2008 21:50:34 +0000 (17:50 -0400)]
Fix typo in xDRI2QueryVersionReq req type field.

13 years agoInitial commit.
Kristian Høgsberg [Tue, 11 Mar 2008 04:12:55 +0000 (00:12 -0400)]
Initial commit.