summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2016-04-10 09:40:13 +0300
committerDan McDonald <danmcd@joyent.com>2019-02-07 20:42:39 -0500
commit84a8796cdac4378079f720e0ca4d2ff15eb1b8b7 (patch)
treea44471db57c64e8b1fc11cae1da72949c34ed6f0 /usr
parente09cef950d257b6d3955013d461825bbc79322ef (diff)
downloadillumos-joyent-84a8796cdac4378079f720e0ca4d2ff15eb1b8b7.tar.gz
10353 uts: tem_safe_pix_clear_prom_output() fails to clear the first line
Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Andy Fiddaman <af@citrus-it.net> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr')
-rw-r--r--usr/src/uts/common/io/tem_safe.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/uts/common/io/tem_safe.c b/usr/src/uts/common/io/tem_safe.c
index a0e30ffa3f..85d8f14162 100644
--- a/usr/src/uts/common/io/tem_safe.c
+++ b/usr/src/uts/common/io/tem_safe.c
@@ -1665,19 +1665,21 @@ static void
tem_safe_pix_clear_prom_output(struct tem_vt_state *tem, cred_t *credp,
enum called_from called_from)
{
- int nrows, ncols, width, height;
+ int nrows, ncols, width, height, offset;
ASSERT((MUTEX_HELD(&tems.ts_lock) && MUTEX_HELD(&tem->tvs_lock)) ||
called_from == CALLED_FROM_STANDALONE);
width = tems.ts_font.width;
height = tems.ts_font.height;
+ offset = tems.ts_p_offset.y % height;
- nrows = (tems.ts_p_offset.y + (height - 1))/ height;
+ nrows = tems.ts_p_offset.y / height;
ncols = (tems.ts_p_dimension.width + (width - 1))/ width;
- tem_safe_pix_cls_range(tem, 0, nrows, 0, 0, ncols, 0,
- B_FALSE, credp, called_from);
+ if (nrows > 0)
+ tem_safe_pix_cls_range(tem, 0, nrows, offset, 0, ncols, 0,
+ B_FALSE, credp, called_from);
}
/*