• Home
  • Raw
  • Download

Lines Matching refs:from

166 int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to)  in fb_copy_cmap()  argument
171 if (to->start > from->start) in fb_copy_cmap()
172 fromoff = to->start - from->start; in fb_copy_cmap()
174 tooff = from->start - to->start; in fb_copy_cmap()
175 if (fromoff >= from->len || tooff >= to->len) in fb_copy_cmap()
178 size = min_t(size_t, to->len - tooff, from->len - fromoff); in fb_copy_cmap()
183 memcpy(to->red+tooff, from->red+fromoff, size); in fb_copy_cmap()
184 memcpy(to->green+tooff, from->green+fromoff, size); in fb_copy_cmap()
185 memcpy(to->blue+tooff, from->blue+fromoff, size); in fb_copy_cmap()
186 if (from->transp && to->transp) in fb_copy_cmap()
187 memcpy(to->transp+tooff, from->transp+fromoff, size); in fb_copy_cmap()
191 int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to) in fb_cmap_to_user() argument
196 if (to->start > from->start) in fb_cmap_to_user()
197 fromoff = to->start - from->start; in fb_cmap_to_user()
199 tooff = from->start - to->start; in fb_cmap_to_user()
200 if (fromoff >= from->len || tooff >= to->len) in fb_cmap_to_user()
203 size = min_t(size_t, to->len - tooff, from->len - fromoff); in fb_cmap_to_user()
208 if (copy_to_user(to->red+tooff, from->red+fromoff, size)) in fb_cmap_to_user()
210 if (copy_to_user(to->green+tooff, from->green+fromoff, size)) in fb_cmap_to_user()
212 if (copy_to_user(to->blue+tooff, from->blue+fromoff, size)) in fb_cmap_to_user()
214 if (from->transp && to->transp) in fb_cmap_to_user()
215 if (copy_to_user(to->transp+tooff, from->transp+fromoff, size)) in fb_cmap_to_user()