Merge "drm/msm: Mark the microcode buffers as read-only"
This commit is contained in:
commit
52f45fc339
2 changed files with 4 additions and 2 deletions
|
@ -410,7 +410,8 @@ static struct drm_gem_object *a5xx_ucode_load_bo(struct msm_gpu *gpu,
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
mutex_lock(&drm->struct_mutex);
|
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);
|
mutex_unlock(&drm->struct_mutex);
|
||||||
|
|
||||||
if (IS_ERR(bo))
|
if (IS_ERR(bo))
|
||||||
|
|
|
@ -459,7 +459,8 @@ void a5xx_gpmu_ucode_init(struct msm_gpu *gpu)
|
||||||
bosize = (cmds_size + (cmds_size / TYPE4_MAX_PAYLOAD) + 1) << 2;
|
bosize = (cmds_size + (cmds_size / TYPE4_MAX_PAYLOAD) + 1) << 2;
|
||||||
|
|
||||||
mutex_lock(&drm->struct_mutex);
|
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);
|
mutex_unlock(&drm->struct_mutex);
|
||||||
|
|
||||||
if (IS_ERR(a5xx_gpu->gpmu_bo))
|
if (IS_ERR(a5xx_gpu->gpmu_bo))
|
||||||
|
|
Loading…
Add table
Reference in a new issue