Skip to content

Commit 1aa8ea0

Browse files
slongerbeampH5
authored andcommitted
gpu: ipu-v3: Add Image Converter unit
Adds the Image Converter (IC) unit. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Condensed the three CSC setup functions into a single one that uses static tables to set up the CSC task parameters. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent 2ffd48f commit 1aa8ea0

5 files changed

Lines changed: 848 additions & 2 deletions

File tree

‎drivers/gpu/ipu-v3/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o
22

33
imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \
4-
ipu-dp.o ipu-dmfc.o ipu-smfc.o
4+
ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-smfc.o

‎drivers/gpu/ipu-v3/ipu-common.c‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ struct ipu_devtype {
429429
unsigned long tpm_ofs;
430430
unsigned long csi0_ofs;
431431
unsigned long csi1_ofs;
432+
unsigned long ic_ofs;
432433
unsigned long disp0_ofs;
433434
unsigned long disp1_ofs;
434435
unsigned long dc_tmpl_ofs;
@@ -444,6 +445,7 @@ static struct ipu_devtype ipu_type_imx51 = {
444445
.tpm_ofs = 0x1f060000,
445446
.csi0_ofs = 0x1f030000,
446447
.csi1_ofs = 0x1f038000,
448+
.ic_ofs = 0x1f020000,
447449
.disp0_ofs = 0x1e040000,
448450
.disp1_ofs = 0x1e048000,
449451
.dc_tmpl_ofs = 0x1f080000,
@@ -459,6 +461,7 @@ static struct ipu_devtype ipu_type_imx53 = {
459461
.tpm_ofs = 0x07060000,
460462
.csi0_ofs = 0x07030000,
461463
.csi1_ofs = 0x07038000,
464+
.ic_ofs = 0x07020000,
462465
.disp0_ofs = 0x06040000,
463466
.disp1_ofs = 0x06048000,
464467
.dc_tmpl_ofs = 0x07080000,
@@ -474,6 +477,7 @@ static struct ipu_devtype ipu_type_imx6q = {
474477
.tpm_ofs = 0x00360000,
475478
.csi0_ofs = 0x00230000,
476479
.csi1_ofs = 0x00238000,
480+
.ic_ofs = 0x00220000,
477481
.disp0_ofs = 0x00240000,
478482
.disp1_ofs = 0x00248000,
479483
.dc_tmpl_ofs = 0x00380000,
@@ -518,8 +522,16 @@ static int ipu_submodules_init(struct ipu_soc *ipu,
518522
goto err_csi_1;
519523
}
520524

525+
ret = ipu_ic_init(ipu, dev,
526+
ipu_base + devtype->ic_ofs,
527+
ipu_base + devtype->tpm_ofs);
528+
if (ret) {
529+
unit = "ic";
530+
goto err_ic;
531+
}
532+
521533
ret = ipu_di_init(ipu, dev, 0, ipu_base + devtype->disp0_ofs,
522-
IPU_CONF_DI0_EN, ipu_clk);
534+
IPU_CONF_DI0_EN, ipu_clk);
523535
if (ret) {
524536
unit = "di0";
525537
goto err_di_0;
@@ -572,6 +584,8 @@ static int ipu_submodules_init(struct ipu_soc *ipu,
572584
err_di_1:
573585
ipu_di_exit(ipu, 0);
574586
err_di_0:
587+
ipu_ic_exit(ipu);
588+
err_ic:
575589
ipu_csi_exit(ipu, 1);
576590
err_csi_1:
577591
ipu_csi_exit(ipu, 0);
@@ -654,6 +668,7 @@ static void ipu_submodules_exit(struct ipu_soc *ipu)
654668
ipu_dc_exit(ipu);
655669
ipu_di_exit(ipu, 1);
656670
ipu_di_exit(ipu, 0);
671+
ipu_ic_exit(ipu);
657672
ipu_csi_exit(ipu, 1);
658673
ipu_csi_exit(ipu, 0);
659674
ipu_cpmem_exit(ipu);
@@ -879,6 +894,8 @@ static int ipu_probe(struct platform_device *pdev)
879894
ipu_base + devtype->csi0_ofs);
880895
dev_dbg(&pdev->dev, "csi1: 0x%08lx\n",
881896
ipu_base + devtype->csi1_ofs);
897+
dev_dbg(&pdev->dev, "ic: 0x%08lx\n",
898+
ipu_base + devtype->ic_ofs);
882899
dev_dbg(&pdev->dev, "disp0: 0x%08lx\n",
883900
ipu_base + devtype->disp0_ofs);
884901
dev_dbg(&pdev->dev, "disp1: 0x%08lx\n",

0 commit comments

Comments
 (0)