From: "Christian König" <deathsimple@vodafone.de>
To: "Michel Dänzer" <michel@daenzer.net>,
dri-devel@lists.freedesktop.org, mesa-dev@lists.freedesktop.org
Subject: Re: [PATCH 2/2] r600g/radeonsi: Prefer VRAM for CPU -> GPU streaming buffers
Date: Thu, 31 Jul 2014 11:52:28 +0200 [thread overview]
Message-ID: <53DA11DC.3060601@vodafone.de> (raw)
In-Reply-To: <1406799831-2502-5-git-send-email-michel@daenzer.net>
Am 31.07.2014 um 11:43 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
At least for PIPE_USAGE_STREAM buffers that's a bad idea, cause they are
used by VDPAU to read back to data to a CPU buffer and that's really
slow from VRAM.
Christian.
> ---
> src/gallium/drivers/radeon/r600_buffer_common.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
> index 154c33d..d747cbc 100644
> --- a/src/gallium/drivers/radeon/r600_buffer_common.c
> +++ b/src/gallium/drivers/radeon/r600_buffer_common.c
> @@ -110,14 +110,21 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
> enum radeon_bo_flag flags = 0;
>
> switch (res->b.b.usage) {
> - case PIPE_USAGE_DYNAMIC:
> - case PIPE_USAGE_STREAM:
> - flags = RADEON_FLAG_GTT_WC;
> - /* fall through */
> case PIPE_USAGE_STAGING:
> /* Transfers are likely to occur more often with these resources. */
> res->domains = RADEON_DOMAIN_GTT;
> break;
> + case PIPE_USAGE_STREAM:
> + case PIPE_USAGE_DYNAMIC:
> + /* Older kernels didn't always flush the HDP cache before
> + * CS execution
> + */
> + if (rscreen->info.drm_minor < 40) {
> + res->domains = RADEON_DOMAIN_GTT;
> + flags = RADEON_FLAG_GTT_WC;
> + break;
> + }
> + /* fall through */
> case PIPE_USAGE_DEFAULT:
> case PIPE_USAGE_IMMUTABLE:
> default:
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
next prev parent reply other threads:[~2014-07-31 9:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 9:43 [PATCH 0/2] radeon: Allow streaming data from CPU to GPU via VRAM Michel Dänzer
2014-07-31 9:43 ` [PATCH 1/2] drm/radeon: s/ioctl_wait_idle/mmio_hpd_flush/ Michel Dänzer
2014-07-31 18:39 ` Alex Deucher
2014-07-31 9:43 ` [PATCH 2/2] drm/radeon: Always flush the HDP cache before submitting a CS to the GPU Michel Dänzer
2014-07-31 9:43 ` [PATCH 1/2] r600g/radeonsi: Reduce or even drop special treatment of persistent mappings Michel Dänzer
2014-07-31 17:36 ` Marek Olšák
2014-07-31 9:43 ` [PATCH 2/2] r600g/radeonsi: Prefer VRAM for CPU -> GPU streaming buffers Michel Dänzer
2014-07-31 9:52 ` Christian König [this message]
2014-07-31 9:57 ` Michel Dänzer
2014-07-31 10:06 ` Christian König
2014-07-31 17:40 ` Marek Olšák
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=53DA11DC.3060601@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=mesa-dev@lists.freedesktop.org \
--cc=michel@daenzer.net \
/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.