All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Michel Dänzer" <michel.daenzer@amd.com>,
	"X.Org Developers" <xorg-devel@lists.x.org>,
	"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
	"Jerome Glisse" <jglisse@redhat.com>,
	"Dave Airlie" <airlied@redhat.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"mesa-dev@lists.freedesktop.org" <mesa-dev@lists.freedesktop.org>
Subject: Re: [xf86-video-ati] dri2: Enable BufferAge support
Date: Tue, 20 Jan 2015 11:47:31 -0500	[thread overview]
Message-ID: <CADnq5_NXZH2YcJ7aPA-oX3Z24t2sGhjPKY8VnwNrxLeQcnAMqw@mail.gmail.com> (raw)
In-Reply-To: <1421665245-5994-6-git-send-email-chris@chris-wilson.co.uk>

On Mon, Jan 19, 2015 at 6:00 AM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> For BufferAge support, we just have to guarrantee that we were not using
> the DRI2Buffer->flags field for anything else (i.e. it is always 0) and
> then to make sure that we exchange the flags field after buffer
> exchanges. radeon does not support TripleBuffering so we do not have to
> worry about perserving the flags when injecting the third buffer.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Jerome Glisse <jglisse@redhat.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  src/radeon_dri2.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
> index 0fbe96c..091cd06 100644
> --- a/src/radeon_dri2.c
> +++ b/src/radeon_dri2.c
> @@ -764,6 +764,11 @@ radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPt
>      front->name = back->name;
>      back->name = tmp;
>
> +    /* Swap flags so BufferAge works */
> +    tmp = front->flags;
> +    front->flags = back->flags;
> +    back->flags = tmp;
> +
>      /* Swap pixmap bos */
>      front_bo = radeon_get_pixmap_bo(front_priv->pixmap);
>      back_bo = radeon_get_pixmap_bo(back_priv->pixmap);
> @@ -1647,6 +1652,11 @@ radeon_dri2_screen_init(ScreenPtr pScreen)
>      dri2_info.CopyRegion2 = radeon_dri2_copy_region2;
>  #endif
>
> +#if DRI2INFOREC_VERSION >= 10
> +    dri2_info.version = 10;
> +    dri2_info.bufferAge = 1;
> +#endif
> +
>      info->dri2.enabled = DRI2ScreenInit(pScreen, &dri2_info);
>      return info->dri2.enabled;
>  }
> --
> 2.1.4
>
> _______________________________________________
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-01-20 16:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 11:00 Implement GLX_EXT_buffer_age for DRI2 Chris Wilson
     [not found] ` <1421665245-5994-1-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2015-01-19 11:00   ` [dri2proto] Declare DRI2ParamXHasBufferAge Chris Wilson
     [not found]     ` <1421665245-5994-2-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2015-01-20 20:53       ` [Mesa-dev] " Ian Romanick
2015-06-16 12:25         ` Martin Peres
2015-01-19 11:00   ` [xorg 1/3] dri2: Allow GetBuffers to match any format Chris Wilson
2015-01-20 20:49     ` [Mesa-dev] " Ian Romanick
2015-06-16 13:11       ` Martin Peres
2015-01-19 11:00   ` [xorg 2/3] dri2: Pass swap-interval=0 ScheduleSwap requests to the ddx Chris Wilson
2015-02-18 19:57     ` Fredrik Höglund
2015-01-19 11:00   ` [xorg 3/3] dri2: Reuse unused flags in GetBuffers protocol to pass last SBC Chris Wilson
2015-01-19 14:14     ` Chris Wilson
2015-01-19 14:29       ` [PATCH v2] " Chris Wilson
2015-01-20 21:55         ` Ian Romanick
2015-01-19 11:00   ` [xf86-video-ati] dri2: Enable BufferAge support Chris Wilson
2015-01-20 16:47     ` Alex Deucher [this message]
2015-01-19 11:00   ` [xf86-video-nouveau] " Chris Wilson
     [not found]     ` <1421665245-5994-7-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2015-05-09  4:41       ` Mario Kleiner
2015-01-19 11:00   ` [mesa 7/9] glx/dri2: Add DRI2GetParam() Chris Wilson
     [not found]     ` <1421665245-5994-8-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2015-01-20 19:11       ` [Mesa-dev] " Ian Romanick
2015-01-19 11:00   ` [mesa 8/9] glx/dri2: Move the wait after SwapBuffers into the next GetBuffers Chris Wilson
2015-01-20 20:03     ` Ian Romanick
2015-01-19 11:00   ` [mesa 9/9] glx/dri2: Implement getBufferAge Chris Wilson
2015-01-20 20:35     ` Ian Romanick
     [not found]       ` <54BEBBF9.8010104-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org>
2015-01-20 20:49         ` [Mesa-dev] " Ian Romanick
2015-01-20 21:49 ` Implement GLX_EXT_buffer_age for DRI2 Dave Airlie
2015-02-18 18:40   ` [Mesa-dev] " Daniel Stone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADnq5_NXZH2YcJ7aPA-oX3Z24t2sGhjPKY8VnwNrxLeQcnAMqw@mail.gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=airlied@redhat.com \
    --cc=alexander.deucher@amd.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jglisse@redhat.com \
    --cc=mesa-dev@lists.freedesktop.org \
    --cc=michel.daenzer@amd.com \
    --cc=xorg-devel@lists.x.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.