Merge "drm/msm: Mark the microcode buffers as read-only"

This commit is contained in:
Linux Build Service Account 2017-02-23 21:35:14 -08:00 committed by Gerrit - the friendly Code Review server
commit 52f45fc339
2 changed files with 4 additions and 2 deletions

View file

@ -410,7 +410,8 @@ static struct drm_gem_object *a5xx_ucode_load_bo(struct msm_gpu *gpu,
void *ptr;
mutex_lock(&drm->struct_mutex);
bo = msm_gem_new(drm, fw->size - 4, MSM_BO_UNCACHED);
bo = msm_gem_new(drm, fw->size - 4,
MSM_BO_UNCACHED | MSM_BO_GPU_READONLY);
mutex_unlock(&drm->struct_mutex);
if (IS_ERR(bo))

View file

@ -459,7 +459,8 @@ void a5xx_gpmu_ucode_init(struct msm_gpu *gpu)
bosize = (cmds_size + (cmds_size / TYPE4_MAX_PAYLOAD) + 1) << 2;
mutex_lock(&drm->struct_mutex);
a5xx_gpu->gpmu_bo = msm_gem_new(drm, bosize, MSM_BO_UNCACHED);
a5xx_gpu->gpmu_bo = msm_gem_new(drm, bosize,
MSM_BO_UNCACHED | MSM_BO_GPU_READONLY);
mutex_unlock(&drm->struct_mutex);
if (IS_ERR(a5xx_gpu->gpmu_bo))