Commit 790d8449 authored by Marek Olšák's avatar Marek Olšák Committed by Greg Kroah-Hartman

drm/radeon: skip colorbuffer checking if COLOR_INFO.FORMAT is set to INVALID

commit 56492e0f upstream.

This fixes a bug which was causing rejections of valid GPU commands
from userspace.
Signed-off-by: default avatarMarek Olšák <marek.olsak@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e4496194
...@@ -942,7 +942,10 @@ static int evergreen_cs_track_check(struct radeon_cs_parser *p) ...@@ -942,7 +942,10 @@ static int evergreen_cs_track_check(struct radeon_cs_parser *p)
if (track->cb_dirty) { if (track->cb_dirty) {
tmp = track->cb_target_mask; tmp = track->cb_target_mask;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if ((tmp >> (i * 4)) & 0xF) { u32 format = G_028C70_FORMAT(track->cb_color_info[i]);
if (format != V_028C70_COLOR_INVALID &&
(tmp >> (i * 4)) & 0xF) {
/* at least one component is enabled */ /* at least one component is enabled */
if (track->cb_color_bo[i] == NULL) { if (track->cb_color_bo[i] == NULL) {
dev_warn(p->dev, "%s:%d mask 0x%08X | 0x%08X no cb for %d\n", dev_warn(p->dev, "%s:%d mask 0x%08X | 0x%08X no cb for %d\n",
......
...@@ -747,7 +747,10 @@ static int r600_cs_track_check(struct radeon_cs_parser *p) ...@@ -747,7 +747,10 @@ static int r600_cs_track_check(struct radeon_cs_parser *p)
if (track->cb_dirty) { if (track->cb_dirty) {
tmp = track->cb_target_mask; tmp = track->cb_target_mask;
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
if ((tmp >> (i * 4)) & 0xF) { u32 format = G_0280A0_FORMAT(track->cb_color_info[i]);
if (format != V_0280A0_COLOR_INVALID &&
(tmp >> (i * 4)) & 0xF) {
/* at least one component is enabled */ /* at least one component is enabled */
if (track->cb_color_bo[i] == NULL) { if (track->cb_color_bo[i] == NULL) {
dev_warn(p->dev, "%s:%d mask 0x%08X | 0x%08X no cb for %d\n", dev_warn(p->dev, "%s:%d mask 0x%08X | 0x%08X no cb for %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment