OpenCloudOS-Kernel/drivers/gpu/drm/msm
Jordan Crouse 88b333b0ed drm/msm: Ensure that the hardware write pointer is valid
Currently the value written to CP_RB_WPTR is calculated on the fly as
(rb->next - rb->start). But as the code is designed rb->next is wrapped
before writing the commands so if a series of commands happened to
fit perfectly in the ringbuffer, rb->next would end up being equal to
rb->size / 4 and thus result in an out of bounds address to CP_RB_WPTR.

The easiest way to fix this is to mask WPTR when writing it to the
hardware; it makes the hardware happy and the rest of the ringbuffer
math appears to work and there isn't any point in upsetting anything.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
[squash in is_power_of_2() check]
Signed-off-by: Rob Clark <robdclark@gmail.com>
2016-12-29 15:02:58 -05:00
..
adreno drm/msm: Ensure that the hardware write pointer is valid 2016-12-29 15:02:58 -05:00
dsi Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next 2016-12-01 09:25:58 +10:00
edp drm/msm: update generated headers 2016-11-28 15:14:10 -05:00
hdmi Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next 2016-12-01 09:25:58 +10:00
mdp Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next 2016-12-01 09:25:58 +10:00
Kconfig drm/msm: submit support for in-fences 2016-09-15 17:39:49 -04:00
Makefile drm/msm: gpu: Add support for the GPMU 2016-11-28 15:14:16 -05:00
NOTES drm/msm: add mdp5/apq8x74 2014-01-09 14:44:06 -05:00
msm_atomic.c drm/msm: subclass drm_atomic_state 2016-11-27 11:32:27 -05:00
msm_debugfs.c drm/msm/mdp5: add debugfs to show smp block status 2016-11-27 11:32:34 -05:00
msm_debugfs.h drm/msm: move debugfs code to it's own file 2016-05-08 10:16:02 -04:00
msm_drv.c Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next 2016-12-01 09:25:58 +10:00
msm_drv.h drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_fb.c drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_fbdev.c drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_fence.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
msm_fence.h dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
msm_gem.c mm: use vmf->address instead of of vmf->virtual_address 2016-12-14 16:04:09 -08:00
msm_gem.h drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_gem_prime.c drm/msm: change gem->vmap() to get/put 2016-07-16 10:09:07 -04:00
msm_gem_shrinker.c Merge branch 'linus' into locking/core, to pick up fixes 2016-11-22 12:37:38 +01:00
msm_gem_submit.c drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_gem_vma.c drm/msm: support multiple address spaces 2016-11-27 11:23:09 -05:00
msm_gpu.c drm/msm: gpu: Add A5XX target support 2016-11-28 15:14:15 -05:00
msm_gpu.h drm/msm: gpu: Add A5XX target support 2016-11-28 15:14:15 -05:00
msm_iommu.c drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_kms.h drm/msm/mdp5: add debugfs to show smp block status 2016-11-27 11:32:34 -05:00
msm_mmu.h drm/msm: convert iova to 64b 2016-11-28 15:14:08 -05:00
msm_perf.c gpu: use %pd 2016-08-07 23:38:48 -04:00
msm_rd.c drm/msm/rd: support for 64b iova 2016-11-28 15:14:08 -05:00
msm_ringbuffer.c drm/msm: Ensure that the hardware write pointer is valid 2016-12-29 15:02:58 -05:00
msm_ringbuffer.h drm/msm: add a3xx gpu support 2013-08-24 14:57:18 -04:00