On Sun, Apr 29, 2018 at 09:42:00AM +0000, Miod Vallat wrote:
> 
> > Don't use attr uninitialised.  Avoids glitches seen when using
> > scrollback with radeondrm.
> 
> That's horrible. The bg attribute should be passed to the function,
> rather than computed here with possibly wrong values.
> 

You didn't include a diff so I guess you propose something like this?

Index: rasops.c
===================================================================
RCS file: /cvs/src/sys/dev/rasops/rasops.c,v
retrieving revision 1.53
diff -u -p -r1.53 rasops.c
--- rasops.c    27 Apr 2018 21:36:12 -0000      1.53
+++ rasops.c    30 Apr 2018 05:30:22 -0000
@@ -1906,7 +1906,6 @@ rasops_scrollback(void *v, void *cookie,
        struct rasops_info *ri = v;
        struct rasops_screen *scr = cookie;
        int row, col, oldvoff;
-       long attr;
 
        oldvoff = scr->rs_visibleoffset;
 
@@ -1927,7 +1926,8 @@ rasops_scrollback(void *v, void *cookie,
                return;
 
        rasops_cursor(ri, 0, 0, 0);
-       ri->ri_eraserows(ri, 0, ri->ri_rows, attr);
+       ri->ri_eraserows(ri, 0, ri->ri_rows,
+           scr->rs_bs[scr->rs_visibleoffset].attr);
        for (row = 0; row < ri->ri_rows; row++) {
                for (col = 0; col < ri->ri_cols; col++) {
                        int off = row * scr->rs_ri->ri_cols + col +

Reply via email to