[PATCH] drm/radeon: fix display tiling setup on SI (original) (raw)

Marek Olšák maraeo at gmail.com
Tue Feb 18 02:04:10 PST 2014


Are you sure the index to si.tile_mode_array is correct? I wrote it for CI and I'm not sure if the index can be used for SI in this way too.

Marek

On Mon, Feb 17, 2014 at 8:21 PM, Alex Deucher <alexdeucher at gmail.com> wrote:

Apply the same logic as CI to SI for setting up the display tiling parameters. The num banks may vary per tiling index just like CI.

Bugs: https://bugs.freedesktop.org/showbug.cgi?id=71488 https://bugs.freedesktop.org/showbug.cgi?id=73946 https://bugs.freedesktop.org/showbug.cgi?id=74927 Signed-off-by: Alex Deucher <alexander.deucher at amd.com> Cc: stable at vger.kernel.org --- drivers/gpu/drm/radeon/atombioscrtc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombioscrtc.c b/drivers/gpu/drm/radeon/atombioscrtc.c index f0d409d..0d19f4f9 100644 --- a/drivers/gpu/drm/radeon/atombioscrtc.c +++ b/drivers/gpu/drm/radeon/atombioscrtc.c @@ -1176,7 +1176,7 @@ static int dce4crtcdosetbase(struct drmcrtc *crtc, evergreentilingfields(tilingflags, &bankw, &bankh, &mtaspect, &tilesplit); /* Set NUMBANKS. */ - if (rdev->family >= CHIPBONAIRE) { + if (rdev->family >= CHIPTAHITI) { unsigned tileb, index, numbanks, tilesplitbytes; /* Calculate the macrotile mode index. */ @@ -1194,13 +1194,14 @@ static int dce4crtcdosetbase(struct drmcrtc *crtc, return -EINVAL; } - numbanks = (rdev->config.cik.macrotilemodearray[index] >> 6) & 0x3; + if (rdev->family >= CHIPBONAIRE) + numbanks = (rdev->config.cik.macrotilemodearray[index] >> 6) & 0x3; + else + numbanks = (rdev->config.si.tilemodearray[index] >> 20) & 0x3; fbformat |= EVERGREENGRPHNUMBANKS(numbanks); } else { - /* SI and older. */ - if (rdev->family >= CHIPTAHITI) - tmp = rdev->config.si.tileconfig; - else if (rdev->family >= CHIPCAYMAN) + /* NI and older. */ + if (rdev->family >= CHIPCAYMAN) tmp = rdev->config.cayman.tileconfig; else tmp = rdev->config.evergreen.tileconfig; -- 1.8.3.1


dri-devel mailing list dri-devel at lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel



More information about the dri-devel mailing list