There shouldn't be any reason to ever use uncached over writecombine, so just use writecombine for MSM_BO_UNCACHED. Note: userspace never used MSM_BO_UNCACHED anyway
Unified · Split
| @@ -213,10 +213,8 @@ void msm_gem_put_pages(struct drm_gem_object *obj) · 212 unmodified lines | |||
| 213 | 213 | ||
| 214 | static pgprot_t msm_gem_pgprot(struct msm_gem_object *msm_obj, pgprot_t prot) | 214 | static pgprot_t msm_gem_pgprot(struct msm_gem_object *msm_obj, pgprot_t prot) |
| 215 | { | 215 | { |
| 216 | if (msm_obj->flags & MSM_BO_WC) | 216 | if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED)) |
| 217 | return pgprot_writecombine(prot); | 217 | return pgprot_writecombine(prot); |
| 218 | if (msm_obj->flags & MSM_BO_UNCACHED) | ||
| 219 | return pgprot_noncached(prot); | ||
| 220 | return prot; | 218 | return prot; |
| 221 | } | 219 | } |
| 222 | 220 | ||
| @@ -94,7 +94,7 @@ struct drm_msm_param { · 93 unmodified lines | |||
| 94 | /* cache modes */ | 94 | /* cache modes */ |
| 95 | #define MSM_BO_CACHED 0x00010000 | 95 | #define MSM_BO_CACHED 0x00010000 |
| 96 | #define MSM_BO_WC 0x00020000 | 96 | #define MSM_BO_WC 0x00020000 |
| 97 | #define MSM_BO_UNCACHED 0x00040000 | 97 | #define MSM_BO_UNCACHED 0x00040000 /* deprecated, use MSM_BO_WC */ |
| 98 | #define MSM_BO_CACHED_COHERENT 0x080000 | 98 | #define MSM_BO_CACHED_COHERENT 0x080000 |
| 99 | 99 | ||
| 100 | #define MSM_BO_FLAGS (MSM_BO_SCANOUT | \ | 100 | #define MSM_BO_FLAGS (MSM_BO_SCANOUT | \ |