Home | History | Annotate | Download | only in dev

Lines Matching defs:gv

672 	struct grfvideo_mode *gv;
687 gv = monitor_def + (vm->mode_num - 1);
688 if (gv->mode_num == 0)
691 memcpy(vm, gv, sizeof(struct grfvideo_mode));
1098 cl_setmonitor(struct grf_softc *gp, struct grfvideo_mode *gv)
1102 if (!cl_mondefok(gv))
1107 if (gv->mode_num == 255) {
1108 memcpy(&clconsole_mode.gv, gv, sizeof(struct grfvideo_mode));
1109 clconsole_mode.gv.hblank_start /= 8;
1110 clconsole_mode.gv.hsync_start /= 8;
1111 clconsole_mode.gv.hsync_stop /= 8;
1112 clconsole_mode.gv.htotal /= 8;
1113 clconsole_mode.rows = gv->disp_height / clconsole_mode.fy;
1114 clconsole_mode.cols = gv->disp_width / clconsole_mode.fx;
1124 md = monitor_def + (gv->mode_num - 1);
1125 memcpy(md, gv, sizeof(struct grfvideo_mode));
1348 cl_mondefok(struct grfvideo_mode *gv)
1352 if (gv->mode_num < 1 || gv->mode_num > monitor_def_max)
1353 if (gv->mode_num != 255 || gv->depth != 4)
1356 switch (gv->depth) {
1358 if (gv->mode_num != 255)
1392 (int) gv->mode_num);
1396 if (gv->pixel_clock > maxpix) {
1398 (int) gv->mode_num);
1402 if (gv->disp_flags & GRF_FLAGS_SYNC_ON_GREEN) {
1413 struct grfvideo_mode *gv;
1426 gv = &md->gv;
1427 TEXT = (gv->depth == 4);
1429 if (!cl_mondefok(gv)) {
1438 gp->g_data = (void *) gv;
1444 gi->gd_colors = 1 << gv->depth;
1445 gi->gd_planes = gv->depth;
1446 gi->gd_fbwidth = gv->disp_width;
1447 gi->gd_fbheight = gv->disp_height;
1454 gi->gd_dwidth = gv->disp_width;
1455 gi->gd_dheight = gv->disp_height;
1462 HBS = gv->hblank_start;
1463 HSS = gv->hsync_start;
1464 HSE = gv->hsync_stop;
1465 HBE = gv->htotal - 1;
1466 HT = gv->htotal;
1467 VBS = gv->vblank_start;
1468 VSS = gv->vsync_start;
1469 VSE = gv->vsync_stop;
1470 VBE = gv->vtotal - 1;
1471 VT = gv->vtotal;
1474 HDE = ((gv->disp_width + md->fx - 1) / md->fx) - 1;
1476 HDE = (gv->disp_width + 3) / 8 - 1; /* HBS; */
1477 VDE = gv->disp_height - 1;
1480 switch (gv->depth) {
1507 if ((VT > 1023) && (!(gv->disp_flags & GRF_FLAGS_LACE))) {
1513 if ((VT > 1023) || (gv->disp_flags & GRF_FLAGS_LACE))
1515 if (gv->disp_flags & GRF_FLAGS_DBLSCAN)
1525 WSeq(ba, SEQ_ID_MEMORY_MODE, (TEXT || (gv->depth == 1)) ? 0x06 : 0x0e);
1527 if (TEXT || (gv->depth == 1))
1533 sr15 = (TEXT || (gv->depth == 1)) ? 0xd0 : 0xb0;
1538 WSeq(ba, SEQ_ID_MAP_MASK, (gv->depth == 1) ? 0x01 : 0xff);
1543 cl_CompFQ(gv->pixel_clock * clkmul, &num0, &denom0, &clkdoub);
1547 if (gv->disp_flags & GRF_FLAGS_PHSYNC)
1551 if (gv->disp_flags & GRF_FLAGS_PVSYNC)
1593 ((gv->disp_flags & GRF_FLAGS_DBLSCAN) ? 0x80 : 0x00) |
1624 ((gv->disp_flags & GRF_FLAGS_LACE) ? 0x01 : 0x00) |
1631 ((TEXT || (gv->depth == 1)) ? 0x00 : 0x40));
1635 ((TEXT || (gv->depth == 1)) ? 0x00 : 0x01) |
1653 switch (gv->depth) {
1657 HDE = gv->disp_width / 16;
1664 HDE = gv->disp_width / 8;
1668 HDE = gv->disp_width / 4;
1672 HDE = gv->disp_width / 4;
1676 HDE = (gv->disp_width / 8) * 3;
1680 HDE = (gv->disp_width / 4);
1695 ((TEXT && gv->pixel_clock > 29000000) ? 0x40 : 0x00) |
1701 (gv->depth == 1) ? 0x01 : 0x0f);