Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: make BO type check less restrictive

BO with ttm_bo_type_sg type can also have tiling_flag and metadata.
So so BO type check for only ttm_bo_type_kernel.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reported-by: Tom StDenis <Tom.StDenis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Nirmoy Das and committed by
Alex Deucher
030bb4ad cc1bcf85

+4 -4
+4 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
··· 1164 1164 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev); 1165 1165 struct amdgpu_bo_user *ubo; 1166 1166 1167 - BUG_ON(bo->tbo.type != ttm_bo_type_device); 1167 + BUG_ON(bo->tbo.type == ttm_bo_type_kernel); 1168 1168 if (adev->family <= AMDGPU_FAMILY_CZ && 1169 1169 AMDGPU_TILING_GET(tiling_flags, TILE_SPLIT) > 6) 1170 1170 return -EINVAL; ··· 1186 1186 { 1187 1187 struct amdgpu_bo_user *ubo; 1188 1188 1189 - BUG_ON(bo->tbo.type != ttm_bo_type_device); 1189 + BUG_ON(bo->tbo.type == ttm_bo_type_kernel); 1190 1190 dma_resv_assert_held(bo->tbo.base.resv); 1191 1191 ubo = to_amdgpu_bo_user(bo); 1192 1192 ··· 1213 1213 struct amdgpu_bo_user *ubo; 1214 1214 void *buffer; 1215 1215 1216 - BUG_ON(bo->tbo.type != ttm_bo_type_device); 1216 + BUG_ON(bo->tbo.type == ttm_bo_type_kernel); 1217 1217 ubo = to_amdgpu_bo_user(bo); 1218 1218 if (!metadata_size) { 1219 1219 if (ubo->metadata_size) { ··· 1263 1263 if (!buffer && !metadata_size) 1264 1264 return -EINVAL; 1265 1265 1266 - BUG_ON(bo->tbo.type != ttm_bo_type_device); 1266 + BUG_ON(bo->tbo.type == ttm_bo_type_kernel); 1267 1267 ubo = to_amdgpu_bo_user(bo); 1268 1268 if (buffer) { 1269 1269 if (buffer_size < ubo->metadata_size)