diff options
author | Konrad Dybcio <konrad.dybcio@somainline.org> | 2021-01-13 19:33:38 +0100 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2021-01-31 11:34:35 -0800 |
commit | cce212d84415635ba9a848afd94e9f61444c9187 (patch) | |
tree | 5cdeb1fe36da4d90f15d075ee5d11f5a8615e7d1 /drivers/gpu/drm/msm | |
parent | 89c1ab960717fb0e9b61c8cf90316bd41309e90a (diff) | |
download | lwn-cce212d84415635ba9a848afd94e9f61444c9187.tar.gz lwn-cce212d84415635ba9a848afd94e9f61444c9187.zip |
drm/msm/a5xx: Disable flat shading optimization
Port over the command from downstream to prevent undefined
behaviour.
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c index 24ab51bb5a01..23fc851756de 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c @@ -791,6 +791,9 @@ static int a5xx_hw_init(struct msm_gpu *gpu) adreno_is_a540(adreno_gpu)) gpu_write(gpu, REG_A5XX_UCHE_DBG_ECO_CNTL_2, regbit); + /* Disable All flat shading optimization (ALLFLATOPTDIS) */ + gpu_rmw(gpu, REG_A5XX_VPC_DBG_ECO_CNTL, 0, (1 << 10)); + /* Protect registers from the CP */ gpu_write(gpu, REG_A5XX_CP_PROTECT_CNTL, 0x00000007); |