All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Cc: amd-gfx list <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH xf86-video-ati 4/4] glamor: Reallocate linear pixmap BO if necessary for DRI2 PRIME
Date: Tue, 13 Sep 2016 10:22:08 -0400	[thread overview]
Message-ID: <CADnq5_OrKzb6RGRdEjs1qPUDhssSrKzxDJS=9sfoErKJJEZYRg@mail.gmail.com> (raw)
In-Reply-To: <20160913085556.16189-4-michel-otUistvHUpPR7s880joybQ@public.gmane.org>

On Tue, Sep 13, 2016 at 4:55 AM, Michel Dänzer <michel@daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> Fixes corruption when using DRI2 PRIME render offloading with the master
> screen using this driver.
>
> (Ported from amdgpu commit 0007c2f018ba663303d91d847e7c085269a23062)
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

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

> ---
>  src/radeon_glamor.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
> index f46e8ba..7a6bf53 100644
> --- a/src/radeon_glamor.c
> +++ b/src/radeon_glamor.c
> @@ -342,6 +342,26 @@ radeon_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave,
>         CARD32 size;
>         int fd;
>
> +       if ((radeon_get_pixmap_tiling_flags(pixmap) &
> +            RADEON_TILING_MASK) != RADEON_TILING_LINEAR) {
> +               PixmapPtr linear;
> +
> +               /* We don't want to re-allocate the screen pixmap as
> +                * linear, to avoid trouble with page flipping
> +                */
> +               if (screen->GetScreenPixmap(screen) == pixmap)
> +                       return FALSE;
> +
> +               linear = screen->CreatePixmap(screen, pixmap->drawable.width,
> +                                             pixmap->drawable.height,
> +                                             pixmap->drawable.depth,
> +                                             CREATE_PIXMAP_USAGE_SHARED);
> +               if (!linear)
> +                       return FALSE;
> +
> +               radeon_glamor_set_pixmap_bo(&pixmap->drawable, linear);
> +       }
> +
>         fd = glamor_fd_from_pixmap(screen, pixmap, &stride, &size);
>         if (fd < 0)
>                 return FALSE;
> --
> 2.9.3
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2016-09-13 14:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13  8:55 [PATCH xf86-video-ati 1/4] glamor: Fix radeon_glamor_share_pixmap_backing for priv->bo == NULL Michel Dänzer
     [not found] ` <20160913085556.16189-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-09-13  8:55   ` [PATCH xf86-video-ati 2/4] Consolidate get_drawable_pixmap helper Michel Dänzer
2016-09-13  8:55   ` [PATCH xf86-video-ati 3/4] Move DRI2's local fixup_glamor helper to radeon_glamor_set_pixmap_bo Michel Dänzer
2016-09-13  8:55   ` [PATCH xf86-video-ati 4/4] glamor: Reallocate linear pixmap BO if necessary for DRI2 PRIME Michel Dänzer
     [not found]     ` <20160913085556.16189-4-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-09-13 14:22       ` Alex Deucher [this message]

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_OrKzb6RGRdEjs1qPUDhssSrKzxDJS=9sfoErKJJEZYRg@mail.gmail.com' \
    --to=alexdeucher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.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.