Lines Matching refs:cm
364 xafb_getcmap(struct xafb_softc *sc, struct wsdisplay_cmap *cm)
366 u_int index = cm->index;
367 u_int count = cm->count;
373 error = copyout(&sc->sc_cmap_red[index], cm->red, count);
376 error = copyout(&sc->sc_cmap_green[index], cm->green, count);
379 error = copyout(&sc->sc_cmap_blue[index], cm->blue, count);
387 xafb_putcmap(struct xafb_softc *sc, struct wsdisplay_cmap *cm)
389 u_int index = cm->index;
390 u_int count = cm->count;
395 if (cm->index >= 256 || cm->count > 256 ||
396 (cm->index + cm->count) > 256)
398 error = copyin(cm->red, &rbuf[index], count);
401 error = copyin(cm->green, &gbuf[index], count);
404 error = copyin(cm->blue, &bbuf[index], count);