All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fallback to std DRI2CopyRegion when DRI2UpdatePrime fails
@ 2014-10-05  7:06 Chris Wilson
       [not found] ` <1412492791-4121-1-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2014-10-05  7:06 UTC (permalink / raw)
  To: airlied; +Cc: xorg-devel, dri-devel

I was looking at a bug report today of intel/ati prime and noticed a
number of sna_share_pixmap_backing() failures (called from
DRI2UpdatePrime). These were failing as the request was for the scanout
buffer (which is tiled and so we refuse to share it, and since it is
already on the scanout we refuse to change tiling).

But looking at radeon_dri2_copy_region2(), if DRI2UpdatePrime() fails,
the copy is aborted and the update lost. If the copy is made to the
normal window drawable is that enough for it to be propagated back
through damage tracking?
---
 src/radeon_dri2.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 9a9918b..0d113b9 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -409,26 +409,27 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
     dst_drawable = &dst_private->pixmap->drawable;
 
     if (src_private->attachment == DRI2BufferFrontLeft) {
+	src_drawable = NULL;
 #ifdef USE_DRI2_PRIME
-	if (drawable->pScreen != pScreen) {
+	if (drawable->pScreen != pScreen)
 	    src_drawable = DRI2UpdatePrime(drawable, src_buffer);
-	    if (!src_drawable)
-		return;
-	} else
 #endif
+	if (src_drawable == NULL)
 	    src_drawable = drawable;
     }
     if (dst_private->attachment == DRI2BufferFrontLeft) {
+	dst_drawable = NULL;
 #ifdef USE_DRI2_PRIME
 	if (drawable->pScreen != pScreen) {
 	    dst_drawable = DRI2UpdatePrime(drawable, dest_buffer);
-	    if (!dst_drawable)
-		return;
-	    dst_ppix = (PixmapPtr)dst_drawable;
-	    if (dst_drawable != drawable)
-		translate = TRUE;
-	} else
+	    if (dst_drawable) {
+		dst_ppix = (PixmapPtr)dst_drawable;
+		if (dst_drawable != drawable)
+		    translate = TRUE;
+	    }
+	}
 #endif
+	if (dst_drawable == NULL)
 	    dst_drawable = drawable;
     }
 
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fallback to std DRI2CopyRegion when DRI2UpdatePrime fails
       [not found] ` <1412492791-4121-1-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
@ 2014-10-06  2:04   ` Michel Dänzer
  2014-10-06  6:39     ` Chris Wilson
  0 siblings, 1 reply; 4+ messages in thread
From: Michel Dänzer @ 2014-10-06  2:04 UTC (permalink / raw)
  To: Chris Wilson, airlied-H+wXaHxf7aLQT0dZR+AlfA
  Cc: xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 05.10.2014 16:06, Chris Wilson wrote:
> I was looking at a bug report today of intel/ati prime and noticed a
> number of sna_share_pixmap_backing() failures (called from
> DRI2UpdatePrime). These were failing as the request was for the scanout
> buffer (which is tiled and so we refuse to share it, and since it is
> already on the scanout we refuse to change tiling).
>
> But looking at radeon_dri2_copy_region2(), if DRI2UpdatePrime() fails,
> the copy is aborted and the update lost. If the copy is made to the
> normal window drawable is that enough for it to be propagated back
> through damage tracking?

Have you asked the reporter of that bug to test your patch?


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer
_______________________________________________
xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fallback to std DRI2CopyRegion when DRI2UpdatePrime fails
  2014-10-06  2:04   ` Michel Dänzer
@ 2014-10-06  6:39     ` Chris Wilson
       [not found]       ` <20141006063907.GB31284-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2014-10-06  6:39 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: xorg-devel, airlied, dri-devel

On Mon, Oct 06, 2014 at 11:04:51AM +0900, Michel Dänzer wrote:
> On 05.10.2014 16:06, Chris Wilson wrote:
> >I was looking at a bug report today of intel/ati prime and noticed a
> >number of sna_share_pixmap_backing() failures (called from
> >DRI2UpdatePrime). These were failing as the request was for the scanout
> >buffer (which is tiled and so we refuse to share it, and since it is
> >already on the scanout we refuse to change tiling).
> >
> >But looking at radeon_dri2_copy_region2(), if DRI2UpdatePrime() fails,
> >the copy is aborted and the update lost. If the copy is made to the
> >normal window drawable is that enough for it to be propagated back
> >through damage tracking?
> 
> Have you asked the reporter of that bug to test your patch?

They didn't notice the issue, presumably because it only happens quite
early in the DE startup. However, I do remember Dave mentioning what
seemed to be a similar issue: a peristent blank window. Hence the
inquisitive nature of the patch.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fallback to std DRI2CopyRegion when DRI2UpdatePrime fails
       [not found]       ` <20141006063907.GB31284-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
@ 2014-10-06  7:37         ` Mike Lothian
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Lothian @ 2014-10-06  7:37 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Dave Airlie,
	xorg-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Chris Wilson,
	Michel Dänzer


[-- Attachment #1.1: Type: text/plain, Size: 1548 bytes --]

Is this the issue in KDE that when I start a game I have to toggle
compositing a couple of times to get it rendering?
On 6 Oct 2014 07:39, "Chris Wilson" <chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org> wrote:

> On Mon, Oct 06, 2014 at 11:04:51AM +0900, Michel Dänzer wrote:
> > On 05.10.2014 16:06, Chris Wilson wrote:
> > >I was looking at a bug report today of intel/ati prime and noticed a
> > >number of sna_share_pixmap_backing() failures (called from
> > >DRI2UpdatePrime). These were failing as the request was for the scanout
> > >buffer (which is tiled and so we refuse to share it, and since it is
> > >already on the scanout we refuse to change tiling).
> > >
> > >But looking at radeon_dri2_copy_region2(), if DRI2UpdatePrime() fails,
> > >the copy is aborted and the update lost. If the copy is made to the
> > >normal window drawable is that enough for it to be propagated back
> > >through damage tracking?
> >
> > Have you asked the reporter of that bug to test your patch?
>
> They didn't notice the issue, presumably because it only happens quite
> early in the DE startup. However, I do remember Dave mentioning what
> seemed to be a similar issue: a peristent blank window. Hence the
> inquisitive nature of the patch.
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> dri-devel mailing list
> dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

[-- Attachment #1.2: Type: text/html, Size: 2114 bytes --]

[-- Attachment #2: Type: text/plain, Size: 219 bytes --]

_______________________________________________
xorg-devel-go0+a7rfsptAfugRpC6u6w@public.gmane.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-06  7:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-05  7:06 [PATCH] Fallback to std DRI2CopyRegion when DRI2UpdatePrime fails Chris Wilson
     [not found] ` <1412492791-4121-1-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org>
2014-10-06  2:04   ` Michel Dänzer
2014-10-06  6:39     ` Chris Wilson
     [not found]       ` <20141006063907.GB31284-aII6DKEyn0pWYbfKqPwjAkR8Iwp7RQ6xAL8bYrjMMd8@public.gmane.org>
2014-10-06  7:37         ` Mike Lothian

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.