[PATCH for v4.9 LTS 13/87] drm/msm: Ensure that the hardware write pointer is valid

2017-07-14 Thread Levin, Alexander (Sasha Levin)
From: Jordan Crouse [ Upstream commit 88b333b0ed790f9433ff542b163bf972953b74d3 ] 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

[PATCH for v4.9 LTS 13/87] drm/msm: Ensure that the hardware write pointer is valid

2017-07-14 Thread Levin, Alexander (Sasha Levin)
From: Jordan Crouse [ Upstream commit 88b333b0ed790f9433ff542b163bf972953b74d3 ] 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