mali-c55-params.c
Removes an entry from a linked listCopies bytes with native memcpy
SHA-256dea90b5d9ac7d8ee652a580841cbfde70b45b662b3790cb6c941798911096e5e
MaleculeO(Er)H(Db₂)
Evidence
⋯4 lines
5 * Copyright (C) 2025 Ideas on Board Oy
6 */
7#include <linux/media/arm/mali-c55-config.h>
8#include <linux/pm_runtime.h>
9
10#include <media/media-entity.h>
11#include <media/v4l2-dev.h>
12#include <media/v4l2-event.h>
13#include <media/v4l2-fh.h>
14#include <media/v4l2-ioctl.h>
15#include <media/v4l2-isp.h>
16#include <media/videobuf2-core.h>
17#include <media/videobuf2-dma-contig.h>
18
19#include "mali-c55-common.h"
20#include "mali-c55-registers.h"
21
22/**
23 * union mali_c55_params_block - Generalisation of a parameter block
24 *
25 * This union allows the driver to treat a block as a generic pointer to this
26 * union and safely access the header and block-specific struct without having
27 * to resort to casting. The …
471:64… void *fh,
472 struct v4l2_fmtdesc *f)
473{
474 if (f->index)
475 return -EINVAL;
476
477 if (f->mbus_code && f->mbus_code != MEDIA_BUS_FMT_METADATA_FIXED)
478 return -EINVAL;
479
480 f->pixelformat = V4L2_META_FMT_MALI_C5 …
523:19… be_event = v4l2_event_unsubscribe,
524};
525
526static const struct v4l2_file_operations mali_c55_params_v4l2_fops = {
527 .owner = THIS_MODULE,
528 .unlocked_ioctl = video_ioctl2,
529 .open = v4l2_fh_open,
530 .release = vb2_fop_release,
531 .poll = …
593:10… ed to the buffer content whilst the driver processes it.
594 */
595
596 memcpy(buf->config, config, v4l2_isp_params_buffer_size(MALI_C55_PARAMS_MAX_SIZE));
597
598 return v4l2_isp_params_validate_buffer(mali_c55- …
617:4… ruct mali_c55_params_buf *buf, *tmp;
618
619 guard(spinlock)(¶ms->buffers.lock);
620
621 list_for_each_entry_safe(buf, tmp, ¶ms->buffers.queue, queue) {
622 list_del(&buf->queue);
623 vb2_buffer_done(&buf->vb.vb2_buf, state);
624 }
625}
626
627static int mali_c55_params_start_streaming(struct vb2_queue *q, …