[PATCH] drm/radeon: don't allow RADEON_GEM_DOMAIN_CPU for command submission

Christian König deathsimple at vodafone.de
Tue May 27 02:08:12 PDT 2014


Am 27.05.2014 02:56, schrieb Marek Olšák:
> From: Marek Olšák <marek.olsak at amd.com>
>
> It hangs the hardware.
>
> Signed-off-by: Marek Olšák <marek.olsak at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

Maybe CC stable as well? Anyway going to add it to my 3.15 queue.

Christian.

> ---
>   drivers/gpu/drm/radeon/radeon_cs.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
> index 2b6e0eb..2b78191 100644
> --- a/drivers/gpu/drm/radeon/radeon_cs.c
> +++ b/drivers/gpu/drm/radeon/radeon_cs.c
> @@ -152,6 +152,12 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
>   			uint32_t domain = r->write_domain ?
>   				r->write_domain : r->read_domains;
>   
> +			if (domain & RADEON_GEM_DOMAIN_CPU) {
> +				DRM_ERROR("RADEON_GEM_DOMAIN_CPU is not valid "
> +					  "for command submission\n");
> +				return -EINVAL;
> +			}
> +
>   			p->relocs[i].domain = domain;
>   			if (domain == RADEON_GEM_DOMAIN_VRAM)
>   				domain |= RADEON_GEM_DOMAIN_GTT;



More information about the dri-devel mailing list