* [PATCH 1/2] exa: turn WaitMarker into a NOP.
@ 2009-02-26 20:55 Maarten Maathuis
[not found] ` <1235681723-11180-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Maarten Maathuis @ 2009-02-26 20:55 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
- map should handle this.
---
src/nouveau_exa.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index b656ca7..20ad380 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -259,7 +259,7 @@ nouveau_exa_mark_sync(ScreenPtr pScreen)
static void
nouveau_exa_wait_marker(ScreenPtr pScreen, int marker)
{
- NVSync(xf86Screens[pScreen->myNum]);
+ return;
}
static Bool
--
1.6.1.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] exa: do PrepareAccess for classic too, since we do need to map the frontbuffer.
[not found] ` <1235681723-11180-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2009-02-26 20:55 ` Maarten Maathuis
[not found] ` <1235681723-11180-2-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-27 4:43 ` [PATCH 1/2] exa: turn WaitMarker into a NOP Ben Skeggs
1 sibling, 1 reply; 6+ messages in thread
From: Maarten Maathuis @ 2009-02-26 20:55 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
- I'm surprised we didn't get serious complaints about not being able to render to the frontbuffer.
---
src/nouveau_exa.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index 20ad380..4b21e80 100644
--- a/src/nouveau_exa.c
+++ b/src/nouveau_exa.c
@@ -265,12 +265,14 @@ nouveau_exa_wait_marker(ScreenPtr pScreen, int marker)
static Bool
nouveau_exa_prepare_access(PixmapPtr ppix, int index)
{
- ScrnInfoPtr pScrn = xf86Screens[ppix->drawable.pScreen->myNum];
+ ScreenPtr pScreen = ppix->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
NVPtr pNv = NVPTR(pScrn);
- if (pNv->exa_driver_pixmaps) {
+ if (pNv->exa_driver_pixmaps || pScreen->GetScreenPixmap(pScreen) == ppix) {
void *map = nouveau_exa_pixmap_map(ppix);
+ /* Really bad if this is the frontbuffer. */
if (!map)
return FALSE;
@@ -284,10 +286,11 @@ nouveau_exa_prepare_access(PixmapPtr ppix, int index)
static void
nouveau_exa_finish_access(PixmapPtr ppix, int index)
{
- ScrnInfoPtr pScrn = xf86Screens[ppix->drawable.pScreen->myNum];
+ ScreenPtr pScreen = ppix->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
NVPtr pNv = NVPTR(pScrn);
- if (pNv->exa_driver_pixmaps)
+ if (pNv->exa_driver_pixmaps || pScreen->GetScreenPixmap(pScreen) == ppix)
nouveau_exa_pixmap_unmap(ppix);
}
@@ -553,8 +556,6 @@ nouveau_exa_init(ScreenPtr pScreen)
exa->pixmapPitchAlign = 64;
exa->PixmapIsOffscreen = nouveau_exa_pixmap_is_offscreen;
- exa->PrepareAccess = nouveau_exa_prepare_access;
- exa->FinishAccess = nouveau_exa_finish_access;
exa->CreatePixmap = nouveau_exa_create_pixmap;
exa->DestroyPixmap = nouveau_exa_destroy_pixmap;
exa->ModifyPixmapHeader = nouveau_exa_modify_pixmap_header;
@@ -604,6 +605,9 @@ nouveau_exa_init(ScreenPtr pScreen)
exa->maxY = 2048;
}
+ exa->PrepareAccess = nouveau_exa_prepare_access;
+ exa->FinishAccess = nouveau_exa_finish_access;
+
exa->MarkSync = nouveau_exa_mark_sync;
exa->WaitMarker = nouveau_exa_wait_marker;
--
1.6.1.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] exa: do PrepareAccess for classic too, since we do need to map the frontbuffer.
[not found] ` <1235681723-11180-2-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2009-02-27 4:42 ` Ben Skeggs
[not found] ` <1235709737.3423.2.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Ben Skeggs @ 2009-02-27 4:42 UTC (permalink / raw)
To: Maarten Maathuis; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Thu, 2009-02-26 at 21:55 +0100, Maarten Maathuis wrote:
> - I'm surprised we didn't get serious complaints about not being able to render to the frontbuffer.
We don't get serious complaints because it's not an issue. EXA is given
the virtual address, and it remembers it. The design of the mm
guarantees the virtual address of the buffer won't change, map()/unmap()
are there merely for synchronisation of CPU/GPU access.
In the "classic" case, exaMarkSync()/exaWaitSync() do the
synchronisation job as we don't use prepare/finish_access().
Ben.
> ---
> src/nouveau_exa.c | 16 ++++++++++------
> 1 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
> index 20ad380..4b21e80 100644
> --- a/src/nouveau_exa.c
> +++ b/src/nouveau_exa.c
> @@ -265,12 +265,14 @@ nouveau_exa_wait_marker(ScreenPtr pScreen, int marker)
> static Bool
> nouveau_exa_prepare_access(PixmapPtr ppix, int index)
> {
> - ScrnInfoPtr pScrn = xf86Screens[ppix->drawable.pScreen->myNum];
> + ScreenPtr pScreen = ppix->drawable.pScreen;
> + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
> NVPtr pNv = NVPTR(pScrn);
>
> - if (pNv->exa_driver_pixmaps) {
> + if (pNv->exa_driver_pixmaps || pScreen->GetScreenPixmap(pScreen) == ppix) {
> void *map = nouveau_exa_pixmap_map(ppix);
>
> + /* Really bad if this is the frontbuffer. */
> if (!map)
> return FALSE;
>
> @@ -284,10 +286,11 @@ nouveau_exa_prepare_access(PixmapPtr ppix, int index)
> static void
> nouveau_exa_finish_access(PixmapPtr ppix, int index)
> {
> - ScrnInfoPtr pScrn = xf86Screens[ppix->drawable.pScreen->myNum];
> + ScreenPtr pScreen = ppix->drawable.pScreen;
> + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
> NVPtr pNv = NVPTR(pScrn);
>
> - if (pNv->exa_driver_pixmaps)
> + if (pNv->exa_driver_pixmaps || pScreen->GetScreenPixmap(pScreen) == ppix)
> nouveau_exa_pixmap_unmap(ppix);
> }
>
> @@ -553,8 +556,6 @@ nouveau_exa_init(ScreenPtr pScreen)
> exa->pixmapPitchAlign = 64;
>
> exa->PixmapIsOffscreen = nouveau_exa_pixmap_is_offscreen;
> - exa->PrepareAccess = nouveau_exa_prepare_access;
> - exa->FinishAccess = nouveau_exa_finish_access;
> exa->CreatePixmap = nouveau_exa_create_pixmap;
> exa->DestroyPixmap = nouveau_exa_destroy_pixmap;
> exa->ModifyPixmapHeader = nouveau_exa_modify_pixmap_header;
> @@ -604,6 +605,9 @@ nouveau_exa_init(ScreenPtr pScreen)
> exa->maxY = 2048;
> }
>
> + exa->PrepareAccess = nouveau_exa_prepare_access;
> + exa->FinishAccess = nouveau_exa_finish_access;
> +
> exa->MarkSync = nouveau_exa_mark_sync;
> exa->WaitMarker = nouveau_exa_wait_marker;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] exa: turn WaitMarker into a NOP.
[not found] ` <1235681723-11180-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-26 20:55 ` [PATCH 2/2] exa: do PrepareAccess for classic too, since we do need to map the frontbuffer Maarten Maathuis
@ 2009-02-27 4:43 ` Ben Skeggs
1 sibling, 0 replies; 6+ messages in thread
From: Ben Skeggs @ 2009-02-27 4:43 UTC (permalink / raw)
To: Maarten Maathuis; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Thu, 2009-02-26 at 21:55 +0100, Maarten Maathuis wrote:
> - map should handle this.
It does, but we don't use prepare/finish_access() hooks to do map() on
the buffer in the non-driver-pixmaps case. I guess we could use
prepare/finish_access() there too, it probably wouldn't hurt any.
Ben.
> ---
> src/nouveau_exa.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
> index b656ca7..20ad380 100644
> --- a/src/nouveau_exa.c
> +++ b/src/nouveau_exa.c
> @@ -259,7 +259,7 @@ nouveau_exa_mark_sync(ScreenPtr pScreen)
> static void
> nouveau_exa_wait_marker(ScreenPtr pScreen, int marker)
> {
> - NVSync(xf86Screens[pScreen->myNum]);
> + return;
> }
>
> static Bool
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] exa: do PrepareAccess for classic too, since we do need to map the frontbuffer.
[not found] ` <1235709737.3423.2.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2009-02-27 10:07 ` Hervé Cauwelier
[not found] ` <49A7BB4F.7040103-GANU6spQydw@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Hervé Cauwelier @ 2009-02-27 10:07 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Ben Skeggs a écrit :
> On Thu, 2009-02-26 at 21:55 +0100, Maarten Maathuis wrote:
>> - I'm surprised we didn't get serious complaints about not being able to render to the frontbuffer.
> We don't get serious complaints because it's not an issue. EXA is given
> the virtual address, and it remembers it. The design of the mm
> guarantees the virtual address of the buffer won't change, map()/unmap()
> are there merely for synchronisation of CPU/GPU access.
>
> In the "classic" case, exaMarkSync()/exaWaitSync() do the
> synchronisation job as we don't use prepare/finish_access().
>
> Ben.
I didn't complain because I think you have more important issues to
address, but I spend half of my work day on gnome-terminal and waiting a
couple of seconds when switching windows or desktops is rapidly
annoying. And no, I can't replace it because it's configured for my
needs and I heavily use the tabs.
If the bug could be addressed in gnome-terminal, I can work with them on
Gnome's bugzilla, with any detail you could give to me.
For now, I use a branch with Maarten's patches from February the 12th.
Hervé
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] exa: do PrepareAccess for classic too, since we do need to map the frontbuffer.
[not found] ` <49A7BB4F.7040103-GANU6spQydw@public.gmane.org>
@ 2009-02-27 11:31 ` Maarten Maathuis
0 siblings, 0 replies; 6+ messages in thread
From: Maarten Maathuis @ 2009-02-27 11:31 UTC (permalink / raw)
To: Hervé Cauwelier; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
You're confusing issues, yours is a performance issue, not a correctness issue.
Maarten.
On Fri, Feb 27, 2009 at 11:07 AM, Hervé Cauwelier
<herve.cauwelier-GANU6spQydw@public.gmane.org> wrote:
> Ben Skeggs a écrit :
>> On Thu, 2009-02-26 at 21:55 +0100, Maarten Maathuis wrote:
>>> - I'm surprised we didn't get serious complaints about not being able to render to the frontbuffer.
>> We don't get serious complaints because it's not an issue. EXA is given
>> the virtual address, and it remembers it. The design of the mm
>> guarantees the virtual address of the buffer won't change, map()/unmap()
>> are there merely for synchronisation of CPU/GPU access.
>>
>> In the "classic" case, exaMarkSync()/exaWaitSync() do the
>> synchronisation job as we don't use prepare/finish_access().
>>
>> Ben.
>
> I didn't complain because I think you have more important issues to
> address, but I spend half of my work day on gnome-terminal and waiting a
> couple of seconds when switching windows or desktops is rapidly
> annoying. And no, I can't replace it because it's configured for my
> needs and I heavily use the tabs.
>
> If the bug could be addressed in gnome-terminal, I can work with them on
> Gnome's bugzilla, with any detail you could give to me.
>
> For now, I use a branch with Maarten's patches from February the 12th.
>
> Hervé
> _______________________________________________
> Nouveau mailing list
> Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-27 11:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-26 20:55 [PATCH 1/2] exa: turn WaitMarker into a NOP Maarten Maathuis
[not found] ` <1235681723-11180-1-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-26 20:55 ` [PATCH 2/2] exa: do PrepareAccess for classic too, since we do need to map the frontbuffer Maarten Maathuis
[not found] ` <1235681723-11180-2-git-send-email-madman2003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-02-27 4:42 ` Ben Skeggs
[not found] ` <1235709737.3423.2.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-02-27 10:07 ` Hervé Cauwelier
[not found] ` <49A7BB4F.7040103-GANU6spQydw@public.gmane.org>
2009-02-27 11:31 ` Maarten Maathuis
2009-02-27 4:43 ` [PATCH 1/2] exa: turn WaitMarker into a NOP Ben Skeggs
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.