Commit a626e64e authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[media] v4l: vsp1: Add SRU support



The Super Resolution Unit performs super resolution processing with
optional upscaling by a factor of two.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 5cdf5741
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
vsp1-y					:= vsp1_drv.o vsp1_entity.o vsp1_video.o
vsp1-y					+= vsp1_rpf.o vsp1_rwpf.o vsp1_wpf.o
vsp1-y					+= vsp1_hsit.o vsp1_lif.o vsp1_uds.o
vsp1-y					+= vsp1_hsit.o vsp1_lif.o vsp1_sru.o
vsp1-y					+= vsp1_uds.o

obj-$(CONFIG_VIDEO_RENESAS_VSP1)	+= vsp1.o
+2 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ struct vsp1_platform_data;
struct vsp1_hsit;
struct vsp1_lif;
struct vsp1_rwpf;
struct vsp1_sru;
struct vsp1_uds;

#define VPS1_MAX_RPF		5
@@ -52,6 +53,7 @@ struct vsp1_device {
	struct vsp1_hsit *hst;
	struct vsp1_lif *lif;
	struct vsp1_rwpf *rpf[VPS1_MAX_RPF];
	struct vsp1_sru *sru;
	struct vsp1_uds *uds[VPS1_MAX_UDS];
	struct vsp1_rwpf *wpf[VPS1_MAX_WPF];

+11 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include "vsp1_hsit.h"
#include "vsp1_lif.h"
#include "vsp1_rwpf.h"
#include "vsp1_sru.h"
#include "vsp1_uds.h"

/* -----------------------------------------------------------------------------
@@ -192,6 +193,16 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
		list_add_tail(&rpf->entity.list_dev, &vsp1->entities);
	}

	if (vsp1->pdata->features & VSP1_HAS_SRU) {
		vsp1->sru = vsp1_sru_create(vsp1);
		if (IS_ERR(vsp1->sru)) {
			ret = PTR_ERR(vsp1->sru);
			goto done;
		}

		list_add_tail(&vsp1->sru->entity.list_dev, &vsp1->entities);
	}

	for (i = 0; i < vsp1->pdata->uds_count; ++i) {
		struct vsp1_uds *uds;

+4 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include <linux/gfp.h>

#include <media/media-entity.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-subdev.h>

#include "vsp1.h"
@@ -130,6 +131,7 @@ int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
		{ VI6_DPR_NODE_RPF(2), VI6_DPR_RPF_ROUTE(2) },
		{ VI6_DPR_NODE_RPF(3), VI6_DPR_RPF_ROUTE(3) },
		{ VI6_DPR_NODE_RPF(4), VI6_DPR_RPF_ROUTE(4) },
		{ VI6_DPR_NODE_SRU, VI6_DPR_SRU_ROUTE },
		{ VI6_DPR_NODE_UDS(0), VI6_DPR_UDS_ROUTE(0) },
		{ VI6_DPR_NODE_UDS(1), VI6_DPR_UDS_ROUTE(1) },
		{ VI6_DPR_NODE_UDS(2), VI6_DPR_UDS_ROUTE(2) },
@@ -179,5 +181,7 @@ int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,

void vsp1_entity_destroy(struct vsp1_entity *entity)
{
	if (entity->subdev.ctrl_handler)
		v4l2_ctrl_handler_free(entity->subdev.ctrl_handler);
	media_entity_cleanup(&entity->subdev.entity);
}
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ enum vsp1_entity_type {
	VSP1_ENTITY_HST,
	VSP1_ENTITY_LIF,
	VSP1_ENTITY_RPF,
	VSP1_ENTITY_SRU,
	VSP1_ENTITY_UDS,
	VSP1_ENTITY_WPF,
};
Loading