diff options
author | Dave Airlie <airlied@redhat.com> | 2009-11-20 09:22:39 +1000 |
---|---|---|
committer | Dave Airlie <airlied@itt42.(none)> | 2009-11-20 10:15:00 +1000 |
commit | f7f58ef4c042e492618665a6c5555e8e67387ab3 (patch) | |
tree | cb820199f3b12ad2caa0d565796ea6f6393fbbc2 /src | |
parent | 02d017a0552db2c8a48506c5b26c48a1a2ab75b6 (diff) |
radeon: r100/r200 have a 2047 scissor limit
We were overflowing this in my case with a 2704 width desktop,
so videos were stopping around 700 bytes across the screen.
can I haz shatter already?
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_textured_videofuncs.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c index c7d9b028..6ac2d6ea 100644 --- a/src/radeon_textured_videofuncs.c +++ b/src/radeon_textured_videofuncs.c @@ -344,12 +344,17 @@ FUNC_NAME(RADEONDisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv FINISH_ACCEL(); } - BEGIN_ACCEL(2); - OUT_ACCEL_REG(RADEON_RE_TOP_LEFT, 0); - OUT_ACCEL_REG(RADEON_RE_WIDTH_HEIGHT, (((pPixmap->drawable.width) << RADEON_RE_WIDTH_SHIFT) | - ((pPixmap->drawable.height) << RADEON_RE_HEIGHT_SHIFT))); - FINISH_ACCEL(); - + { + int scissor_w, scissor_h; + scissor_w = MIN(pPixmap->drawable.width, 2047); + scissor_h = MIN(pPixmap->drawable.height, 2047); + + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_RE_TOP_LEFT, 0); + OUT_ACCEL_REG(RADEON_RE_WIDTH_HEIGHT, ((scissor_w << RADEON_RE_WIDTH_SHIFT) | + (scissor_h << RADEON_RE_HEIGHT_SHIFT))); + FINISH_ACCEL(); + } if (pPriv->vsync) { xf86CrtcPtr crtc; if (pPriv->desired_crtc) @@ -907,10 +912,15 @@ FUNC_NAME(R200DisplayTexturedVideo)(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) FINISH_ACCEL(); } - BEGIN_ACCEL(2); - OUT_ACCEL_REG(RADEON_RE_TOP_LEFT, 0); - OUT_ACCEL_REG(RADEON_RE_WIDTH_HEIGHT, (((pPixmap->drawable.width) << RADEON_RE_WIDTH_SHIFT) | - ((pPixmap->drawable.height) << RADEON_RE_HEIGHT_SHIFT))); + { + int scissor_w, scissor_h; + scissor_w = MIN(pPixmap->drawable.width, 2047); + scissor_h = MIN(pPixmap->drawable.height, 2047); + BEGIN_ACCEL(2); + OUT_ACCEL_REG(RADEON_RE_TOP_LEFT, 0); + OUT_ACCEL_REG(RADEON_RE_WIDTH_HEIGHT, ((scissor_w << RADEON_RE_WIDTH_SHIFT) | + (scissor_h << RADEON_RE_HEIGHT_SHIFT))); + } FINISH_ACCEL(); if (pPriv->vsync) { |