[Nouveau] [PATCH] nouveau: put cursor BO in GART

Ben Skeggs skeggsb at gmail.com
Tue Jan 22 13:26:31 PST 2013


On Mon, Jan 21, 2013 at 12:15:38AM +0100, Marcin Slusarz wrote:
> Keeping it in VRAM wastes CPU time, because cursor_set ioctl reads
> handed BO back to RAM, just to write it to actual cursor BO.
> 
> Here (nv92/core i7), this patch decreases overall cpu usage of
> drmmode_load_cursor_argb from 4.6ms to ~90us and lets nv50_crtc_cursor_set
> disappear from perf traces.
> ---
> I considered accelerating kernel-side copying with GPU, but it turns out that:
> - it's slower (120-150us), with frequent bursts (up to 5ms)
> - not applicable to <nv50 hw, which needs to transform cursor data
> 
> Putting cursor BO in GART does not conflict with accelarating kernel side
> copying - times do not change, so it's safe to apply it.
Pushed, thanks!

> ---
>  src/drmmode_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 4d2d09d..ee0805d 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -567,7 +567,7 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
>  						 drmmode->mode_res->crtcs[num]);
>  	drmmode_crtc->drmmode = drmmode;
>  
> -	ret = nouveau_bo_new(pNv->dev, NOUVEAU_BO_VRAM | NOUVEAU_BO_MAP, 0,
> +	ret = nouveau_bo_new(pNv->dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0,
>  			     64*64*4, NULL, &drmmode_crtc->cursor);
>  	assert(ret == 0);
>  
> -- 
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau


More information about the Nouveau mailing list