Lines Matching refs:cm
369 ofb_getcmap(struct ofb_softc *sc, struct wsdisplay_cmap *cm)
371 u_int index = cm->index;
372 u_int count = cm->count;
378 error = copyout(&sc->sc_cmap_red[index], cm->red, count);
381 error = copyout(&sc->sc_cmap_green[index], cm->green, count);
384 error = copyout(&sc->sc_cmap_blue[index], cm->blue, count);
392 ofb_putcmap(struct ofb_softc *sc, struct wsdisplay_cmap *cm)
394 u_int index = cm->index;
395 u_int count = cm->count;
400 if (cm->index >= 256 || cm->count > 256 ||
401 (cm->index + cm->count) > 256)
403 error = copyin(cm->red, &rbuf[index], count);
406 error = copyin(cm->green, &gbuf[index], count);
409 error = copyin(cm->blue, &bbuf[index], count);