histo 149 drivers/media/platform/vsp1/vsp1_drv.c ret = media_create_pad_link(&vsp1->hgo->histo.entity.subdev.entity, histo 151 drivers/media/platform/vsp1/vsp1_drv.c &vsp1->hgo->histo.video.entity, 0, histo 159 drivers/media/platform/vsp1/vsp1_drv.c ret = media_create_pad_link(&vsp1->hgt->histo.entity.subdev.entity, histo 161 drivers/media/platform/vsp1/vsp1_drv.c &vsp1->hgt->histo.video.entity, 0, histo 321 drivers/media/platform/vsp1/vsp1_drv.c list_add_tail(&vsp1->hgo->histo.entity.list_dev, histo 332 drivers/media/platform/vsp1/vsp1_drv.c list_add_tail(&vsp1->hgt->histo.entity.list_dev, histo 28 drivers/media/platform/vsp1/vsp1_hgo.c return vsp1_read(hgo->histo.entity.vsp1, reg); histo 49 drivers/media/platform/vsp1/vsp1_hgo.c buf = vsp1_histogram_buffer_get(&hgo->histo); histo 60 drivers/media/platform/vsp1/vsp1_hgo.c vsp1_write(hgo->histo.entity.vsp1, histo 92 drivers/media/platform/vsp1/vsp1_hgo.c vsp1_histogram_buffer_complete(&hgo->histo, buf, size); histo 210 drivers/media/platform/vsp1/vsp1_hgo.c hgo->histo.entity.subdev.ctrl_handler = &hgo->ctrls.handler; histo 213 drivers/media/platform/vsp1/vsp1_hgo.c ret = vsp1_histogram_init(vsp1, &hgo->histo, VSP1_ENTITY_HGO, "hgo", histo 218 drivers/media/platform/vsp1/vsp1_hgo.c vsp1_entity_destroy(&hgo->histo.entity); histo 21 drivers/media/platform/vsp1/vsp1_hgo.h struct vsp1_histogram histo; histo 35 drivers/media/platform/vsp1/vsp1_hgo.h return container_of(subdev, struct vsp1_hgo, histo.entity.subdev); histo 28 drivers/media/platform/vsp1/vsp1_hgt.c return vsp1_read(hgt->histo.entity.vsp1, reg); histo 49 drivers/media/platform/vsp1/vsp1_hgt.c buf = vsp1_histogram_buffer_get(&hgt->histo); histo 62 drivers/media/platform/vsp1/vsp1_hgt.c vsp1_histogram_buffer_complete(&hgt->histo, buf, HGT_DATA_SIZE); histo 200 drivers/media/platform/vsp1/vsp1_hgt.c hgt->histo.entity.subdev.ctrl_handler = &hgt->ctrls; histo 203 drivers/media/platform/vsp1/vsp1_hgt.c ret = vsp1_histogram_init(vsp1, &hgt->histo, VSP1_ENTITY_HGT, "hgt", histo 208 drivers/media/platform/vsp1/vsp1_hgt.c vsp1_entity_destroy(&hgt->histo.entity); histo 23 drivers/media/platform/vsp1/vsp1_hgt.h struct vsp1_histogram histo; histo 32 drivers/media/platform/vsp1/vsp1_hgt.h return container_of(subdev, struct vsp1_hgt, histo.entity.subdev); histo 36 drivers/media/platform/vsp1/vsp1_histo.c vsp1_histogram_buffer_get(struct vsp1_histogram *histo) histo 41 drivers/media/platform/vsp1/vsp1_histo.c spin_lock_irqsave(&histo->irqlock, flags); histo 43 drivers/media/platform/vsp1/vsp1_histo.c if (list_empty(&histo->irqqueue)) histo 46 drivers/media/platform/vsp1/vsp1_histo.c buf = list_first_entry(&histo->irqqueue, struct vsp1_histogram_buffer, histo 49 drivers/media/platform/vsp1/vsp1_histo.c histo->readout = true; histo 52 drivers/media/platform/vsp1/vsp1_histo.c spin_unlock_irqrestore(&histo->irqlock, flags); histo 56 drivers/media/platform/vsp1/vsp1_histo.c void vsp1_histogram_buffer_complete(struct vsp1_histogram *histo, histo 60 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_pipeline *pipe = histo->entity.pipe; histo 73 drivers/media/platform/vsp1/vsp1_histo.c spin_lock_irqsave(&histo->irqlock, flags); histo 74 drivers/media/platform/vsp1/vsp1_histo.c histo->readout = false; histo 75 drivers/media/platform/vsp1/vsp1_histo.c wake_up(&histo->wait_queue); histo 76 drivers/media/platform/vsp1/vsp1_histo.c spin_unlock_irqrestore(&histo->irqlock, flags); histo 87 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = vb2_get_drv_priv(vq); histo 93 drivers/media/platform/vsp1/vsp1_histo.c if (sizes[0] < histo->data_size) histo 100 drivers/media/platform/vsp1/vsp1_histo.c sizes[0] = histo->data_size; histo 108 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = vb2_get_drv_priv(vb->vb2_queue); histo 114 drivers/media/platform/vsp1/vsp1_histo.c if (vb2_plane_size(vb, 0) < histo->data_size) histo 125 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = vb2_get_drv_priv(vb->vb2_queue); histo 129 drivers/media/platform/vsp1/vsp1_histo.c spin_lock_irqsave(&histo->irqlock, flags); histo 130 drivers/media/platform/vsp1/vsp1_histo.c list_add_tail(&buf->queue, &histo->irqqueue); histo 131 drivers/media/platform/vsp1/vsp1_histo.c spin_unlock_irqrestore(&histo->irqlock, flags); histo 141 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = vb2_get_drv_priv(vq); histo 145 drivers/media/platform/vsp1/vsp1_histo.c spin_lock_irqsave(&histo->irqlock, flags); histo 148 drivers/media/platform/vsp1/vsp1_histo.c list_for_each_entry(buffer, &histo->irqqueue, queue) histo 150 drivers/media/platform/vsp1/vsp1_histo.c INIT_LIST_HEAD(&histo->irqqueue); histo 153 drivers/media/platform/vsp1/vsp1_histo.c wait_event_lock_irq(histo->wait_queue, !histo->readout, histo->irqlock); histo 155 drivers/media/platform/vsp1/vsp1_histo.c spin_unlock_irqrestore(&histo->irqlock, flags); histo 176 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = subdev_to_histo(subdev); histo 183 drivers/media/platform/vsp1/vsp1_histo.c return vsp1_subdev_enum_mbus_code(subdev, cfg, code, histo->formats, histo 184 drivers/media/platform/vsp1/vsp1_histo.c histo->num_formats); histo 203 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = subdev_to_histo(subdev); histo 212 drivers/media/platform/vsp1/vsp1_histo.c mutex_lock(&histo->entity.lock); histo 214 drivers/media/platform/vsp1/vsp1_histo.c config = vsp1_entity_get_pad_config(&histo->entity, cfg, sel->which); histo 223 drivers/media/platform/vsp1/vsp1_histo.c crop = vsp1_entity_get_pad_selection(&histo->entity, config, histo 234 drivers/media/platform/vsp1/vsp1_histo.c format = vsp1_entity_get_pad_format(&histo->entity, config, histo 244 drivers/media/platform/vsp1/vsp1_histo.c sel->r = *vsp1_entity_get_pad_selection(&histo->entity, config, histo 254 drivers/media/platform/vsp1/vsp1_histo.c mutex_unlock(&histo->entity.lock); histo 262 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = subdev_to_histo(subdev); histo 267 drivers/media/platform/vsp1/vsp1_histo.c format = vsp1_entity_get_pad_format(&histo->entity, config, histo 277 drivers/media/platform/vsp1/vsp1_histo.c selection = vsp1_entity_get_pad_selection(&histo->entity, config, histo 281 drivers/media/platform/vsp1/vsp1_histo.c selection = vsp1_entity_get_pad_selection(&histo->entity, config, histo 293 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = subdev_to_histo(subdev); histo 306 drivers/media/platform/vsp1/vsp1_histo.c crop = vsp1_entity_get_pad_selection(&histo->entity, config, sel->pad, histo 332 drivers/media/platform/vsp1/vsp1_histo.c compose = vsp1_entity_get_pad_selection(&histo->entity, config, histo 344 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = subdev_to_histo(subdev); histo 351 drivers/media/platform/vsp1/vsp1_histo.c mutex_lock(&histo->entity.lock); histo 353 drivers/media/platform/vsp1/vsp1_histo.c config = vsp1_entity_get_pad_config(&histo->entity, cfg, sel->which); histo 367 drivers/media/platform/vsp1/vsp1_histo.c mutex_unlock(&histo->entity.lock); histo 391 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = subdev_to_histo(subdev); histo 397 drivers/media/platform/vsp1/vsp1_histo.c histo->formats, histo->num_formats, histo 423 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = vdev_to_histo(vfh->vdev); histo 431 drivers/media/platform/vsp1/vsp1_histo.c strscpy(cap->card, histo->video.name, sizeof(cap->card)); histo 433 drivers/media/platform/vsp1/vsp1_histo.c dev_name(histo->entity.vsp1->dev)); histo 442 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = vdev_to_histo(vfh->vdev); histo 444 drivers/media/platform/vsp1/vsp1_histo.c if (f->index > 0 || f->type != histo->queue.type) histo 447 drivers/media/platform/vsp1/vsp1_histo.c f->pixelformat = histo->meta_format; histo 456 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = vdev_to_histo(vfh->vdev); histo 459 drivers/media/platform/vsp1/vsp1_histo.c if (format->type != histo->queue.type) histo 464 drivers/media/platform/vsp1/vsp1_histo.c meta->dataformat = histo->meta_format; histo 465 drivers/media/platform/vsp1/vsp1_histo.c meta->buffersize = histo->data_size; histo 499 drivers/media/platform/vsp1/vsp1_histo.c static void vsp1_histogram_cleanup(struct vsp1_histogram *histo) histo 501 drivers/media/platform/vsp1/vsp1_histo.c if (video_is_registered(&histo->video)) histo 502 drivers/media/platform/vsp1/vsp1_histo.c video_unregister_device(&histo->video); histo 504 drivers/media/platform/vsp1/vsp1_histo.c media_entity_cleanup(&histo->video.entity); histo 509 drivers/media/platform/vsp1/vsp1_histo.c struct vsp1_histogram *histo = subdev_to_histo(&entity->subdev); histo 511 drivers/media/platform/vsp1/vsp1_histo.c vsp1_histogram_cleanup(histo); histo 514 drivers/media/platform/vsp1/vsp1_histo.c int vsp1_histogram_init(struct vsp1_device *vsp1, struct vsp1_histogram *histo, histo 522 drivers/media/platform/vsp1/vsp1_histo.c histo->formats = formats; histo 523 drivers/media/platform/vsp1/vsp1_histo.c histo->num_formats = num_formats; histo 524 drivers/media/platform/vsp1/vsp1_histo.c histo->data_size = data_size; histo 525 drivers/media/platform/vsp1/vsp1_histo.c histo->meta_format = meta_format; histo 527 drivers/media/platform/vsp1/vsp1_histo.c histo->pad.flags = MEDIA_PAD_FL_SINK; histo 528 drivers/media/platform/vsp1/vsp1_histo.c histo->video.vfl_dir = VFL_DIR_RX; histo 530 drivers/media/platform/vsp1/vsp1_histo.c mutex_init(&histo->lock); histo 531 drivers/media/platform/vsp1/vsp1_histo.c spin_lock_init(&histo->irqlock); histo 532 drivers/media/platform/vsp1/vsp1_histo.c INIT_LIST_HEAD(&histo->irqqueue); histo 533 drivers/media/platform/vsp1/vsp1_histo.c init_waitqueue_head(&histo->wait_queue); histo 536 drivers/media/platform/vsp1/vsp1_histo.c histo->entity.ops = ops; histo 537 drivers/media/platform/vsp1/vsp1_histo.c histo->entity.type = type; histo 539 drivers/media/platform/vsp1/vsp1_histo.c ret = vsp1_entity_init(vsp1, &histo->entity, name, 2, &histo_ops, histo 545 drivers/media/platform/vsp1/vsp1_histo.c ret = media_entity_pads_init(&histo->video.entity, 1, &histo->pad); histo 550 drivers/media/platform/vsp1/vsp1_histo.c histo->video.v4l2_dev = &vsp1->v4l2_dev; histo 551 drivers/media/platform/vsp1/vsp1_histo.c histo->video.fops = &histo_v4l2_fops; histo 552 drivers/media/platform/vsp1/vsp1_histo.c snprintf(histo->video.name, sizeof(histo->video.name), histo 553 drivers/media/platform/vsp1/vsp1_histo.c "%s histo", histo->entity.subdev.name); histo 554 drivers/media/platform/vsp1/vsp1_histo.c histo->video.vfl_type = VFL_TYPE_GRABBER; histo 555 drivers/media/platform/vsp1/vsp1_histo.c histo->video.release = video_device_release_empty; histo 556 drivers/media/platform/vsp1/vsp1_histo.c histo->video.ioctl_ops = &histo_v4l2_ioctl_ops; histo 557 drivers/media/platform/vsp1/vsp1_histo.c histo->video.device_caps = V4L2_CAP_META_CAPTURE | V4L2_CAP_STREAMING; histo 559 drivers/media/platform/vsp1/vsp1_histo.c video_set_drvdata(&histo->video, histo); histo 562 drivers/media/platform/vsp1/vsp1_histo.c histo->queue.type = V4L2_BUF_TYPE_META_CAPTURE; histo 563 drivers/media/platform/vsp1/vsp1_histo.c histo->queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF; histo 564 drivers/media/platform/vsp1/vsp1_histo.c histo->queue.lock = &histo->lock; histo 565 drivers/media/platform/vsp1/vsp1_histo.c histo->queue.drv_priv = histo; histo 566 drivers/media/platform/vsp1/vsp1_histo.c histo->queue.buf_struct_size = sizeof(struct vsp1_histogram_buffer); histo 567 drivers/media/platform/vsp1/vsp1_histo.c histo->queue.ops = &histo_video_queue_qops; histo 568 drivers/media/platform/vsp1/vsp1_histo.c histo->queue.mem_ops = &vb2_vmalloc_memops; histo 569 drivers/media/platform/vsp1/vsp1_histo.c histo->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; histo 570 drivers/media/platform/vsp1/vsp1_histo.c histo->queue.dev = vsp1->dev; histo 571 drivers/media/platform/vsp1/vsp1_histo.c ret = vb2_queue_init(&histo->queue); histo 578 drivers/media/platform/vsp1/vsp1_histo.c histo->video.queue = &histo->queue; histo 579 drivers/media/platform/vsp1/vsp1_histo.c ret = video_register_device(&histo->video, VFL_TYPE_GRABBER, -1); histo 588 drivers/media/platform/vsp1/vsp1_histo.c vsp1_histogram_cleanup(histo); histo 64 drivers/media/platform/vsp1/vsp1_histo.h int vsp1_histogram_init(struct vsp1_device *vsp1, struct vsp1_histogram *histo, histo 72 drivers/media/platform/vsp1/vsp1_histo.h vsp1_histogram_buffer_get(struct vsp1_histogram *histo); histo 73 drivers/media/platform/vsp1/vsp1_histo.h void vsp1_histogram_buffer_complete(struct vsp1_histogram *histo, histo 309 fs/jffs2/compr_rubin.c unsigned char histo[256]; histo 320 fs/jffs2/compr_rubin.c memset(histo, 0, 256); histo 322 fs/jffs2/compr_rubin.c histo[data_in[i]]++; histo 326 fs/jffs2/compr_rubin.c bits[7] += histo[i]; histo 328 fs/jffs2/compr_rubin.c bits[6] += histo[i]; histo 330 fs/jffs2/compr_rubin.c bits[5] += histo[i]; histo 332 fs/jffs2/compr_rubin.c bits[4] += histo[i]; histo 334 fs/jffs2/compr_rubin.c bits[3] += histo[i]; histo 336 fs/jffs2/compr_rubin.c bits[2] += histo[i]; histo 338 fs/jffs2/compr_rubin.c bits[1] += histo[i]; histo 340 fs/jffs2/compr_rubin.c bits[0] += histo[i];