diff mbox

[rfc] hack patch to fix dirty on offload screens

Message ID 1433824332-25672-1-git-send-email-airlied@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dave Airlie June 9, 2015, 4:32 a.m. UTC
The offload screens on an nvidia gpu show dirt on them, this is due to the
stuff not being flushed fully back to the CPU side and into main memory,
for the secondary GPU to pick it up from.

This is the hack I used to have in UXA, which works here, however I'm sure
this isn't acceptable for upstream, so let me know what else I could try.

Dave.
---
 src/sna/sna_accel.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Chris Wilson June 9, 2015, 7:32 a.m. UTC | #1
On Tue, Jun 09, 2015 at 02:32:12PM +1000, Dave Airlie wrote:
> The offload screens on an nvidia gpu show dirt on them, this is due to the
> stuff not being flushed fully back to the CPU side and into main memory,
> for the secondary GPU to pick it up from.
> 
> This is the hack I used to have in UXA, which works here, however I'm sure
> this isn't acceptable for upstream, so let me know what else I could try.

Hmm, thinking about it we need to make the dst uncached as well as a PCI
device will bypass LLC.

So we do need the submit before the ProcessPending as that is where the
slave will then do its copy. My fault for thinking the copy would be
from its BlockHandler after amalgamating the damage.
-Chris
diff mbox

Patch

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index b40b99a..df8efb4 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -17638,7 +17638,9 @@  fallback:
 						    box, n, COPY_LAST))
 				goto fallback;
 
-			flush = true;
+			kgem_submit(&sna->kgem);
+			kgem_bo_map(&sna->kgem, __sna_pixmap_get_bo(dst));
+
 		}
 
 		DamageRegionProcessPending(&dirty->slave_dst->drawable);