diff options
author | Jerome Glisse <glisse@freedesktop.org> | 2007-06-18 00:26:01 +0200 |
---|---|---|
committer | Jerome Glisse <glisse@freedesktop.org> | 2007-06-18 00:26:01 +0200 |
commit | ab39bf4513a99a4ecd5dd2a2eccb03432e24da51 (patch) | |
tree | 51693ef226ed71f855534da24b0a268669f98e9c /xorg | |
parent | 052d51671716eb5a1909136bb87ab9cb1d9829cd (diff) |
avivo: make scan out buffer witdh * bpp 256 bytes aligned
X_LENGHT & Y_LENGHT is display buffer dimension (virtual dimension
if they are bigger than display mode dimension) and pitch should be
256 bytes aligned.
Diffstat (limited to 'xorg')
-rw-r--r-- | xorg/avivo.c | 3 | ||||
-rw-r--r-- | xorg/avivo_crtc.c | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/xorg/avivo.c b/xorg/avivo.c index f66853a..322a53d 100644 --- a/xorg/avivo.c +++ b/xorg/avivo.c @@ -741,6 +741,9 @@ avivo_screen_init(int index, ScreenPtr screen, int argc, char **argv) if (screen_info->virtualX > screen_info->displayWidth) screen_info->displayWidth = screen_info->virtualX; + screen_info->displayWidth = ceil(screen_info->displayWidth * avivo->bpp + / 256.0) * 256 / avivo->bpp; + /* mi layer */ miClearVisualTypes(); if (!xf86SetDefaultVisual(screen_info, -1)) { diff --git a/xorg/avivo_crtc.c b/xorg/avivo_crtc.c index 6f93dc6..612aeab 100644 --- a/xorg/avivo_crtc.c +++ b/xorg/avivo_crtc.c @@ -252,10 +252,11 @@ avivo_crtc_mode_set(xf86CrtcPtr crtc, OUTREG(AVIVO_CRTC1_65C0 + avivo_crtc->crtc_offset, AVIVO_CRTC1_65C0_VALUE); OUTREG(AVIVO_CRTC1_X_LENGTH + avivo_crtc->crtc_offset, - avivo_crtc->fb_width); + crtc->scrn->virtualX); OUTREG(AVIVO_CRTC1_Y_LENGTH + avivo_crtc->crtc_offset, - avivo_crtc->fb_height); - OUTREG(AVIVO_CRTC1_PITCH + avivo_crtc->crtc_offset, avivo_crtc->fb_pitch); + crtc->scrn->virtualY); + OUTREG(AVIVO_CRTC1_PITCH + avivo_crtc->crtc_offset, + crtc->scrn->displayWidth); OUTREG(AVIVO_CRTC1_H_TOTAL + avivo_crtc->crtc_offset, avivo_crtc->h_total); OUTREG(AVIVO_CRTC1_H_BLANK + avivo_crtc->crtc_offset, avivo_crtc->h_blank); OUTREG(AVIVO_CRTC1_H_SYNC_WID + avivo_crtc->crtc_offset, |