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

Marek Olšák maraeo at gmail.com
Tue May 27 05:32:05 PDT 2014


Yeah, feel free to add the Cc: stable tag.

Marek

On Tue, May 27, 2014 at 11:08 AM, Christian König
<deathsimple at vodafone.de> wrote:
> 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