mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/radeon: add a check to wait_reg_mem command
WAIT_REG_MEM on register does not allow the use of PFP. Enforce this restriction when checking packets sent from userland. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
40592a17b8
commit
d6e18a3406
@@ -2101,6 +2101,9 @@ static int evergreen_packet3_check(struct radeon_cs_parser *p,
|
||||
|
||||
ib[idx+1] = (ib[idx+1] & 0x3) | (offset & 0xfffffffc);
|
||||
ib[idx+2] = upper_32_bits(offset) & 0xff;
|
||||
} else if (idx_value & 0x100) {
|
||||
DRM_ERROR("cannot use PFP on REG wait\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case PACKET3_CP_DMA:
|
||||
|
||||
Reference in New Issue
Block a user