-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/ipu-destaging' of git://git.pengutronix.de/git/pz…
…a/linux into drm-next Destage IPUv3 * 'topic/ipu-destaging' of git://git.pengutronix.de/git/pza/linux: gpu: ipu-v3: Register the CSI modules gpu: ipu-v3: Add CSI and SMFC module enable wrappers gpu: ipu-v3: Add ipu_idmac_get_current_buffer function gpu: ipu-v3: Add SMFC code gpu: ipu-v3: Move i.MX IPUv3 core driver out of staging
- Loading branch information
Showing
18 changed files
with
216 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
obj-y += drm/ vga/ | ||
obj-$(CONFIG_TEGRA_HOST1X) += host1x/ | ||
obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
config IMX_IPUV3_CORE | ||
tristate "IPUv3 core support" | ||
depends on SOC_IMX5 || SOC_IMX6Q || SOC_IMX6SL || ARCH_MULTIPLATFORM | ||
depends on RESET_CONTROLLER | ||
help | ||
Choose this if you have a i.MX5/6 system and want to use the Image | ||
Processing Unit. This option only enables IPU base support. |
4 changes: 2 additions & 2 deletions
4
drivers/staging/imx-drm/ipu-v3/Makefile → drivers/gpu/ipu-v3/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += imx-ipu-v3.o | ||
obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o | ||
|
||
imx-ipu-v3-objs := ipu-common.o ipu-dc.o ipu-di.o ipu-dp.o ipu-dmfc.o | ||
imx-ipu-v3-objs := ipu-common.o ipu-dc.o ipu-di.o ipu-dp.o ipu-dmfc.o ipu-smfc.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* | ||
* Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
* | ||
* The code contained herein is licensed under the GNU General Public | ||
* License. You may obtain a copy of the GNU General Public License | ||
* Version 2 or later at the following locations: | ||
* | ||
* http://www.opensource.org/licenses/gpl-license.html | ||
* http://www.gnu.org/copyleft/gpl.html | ||
*/ | ||
#define DEBUG | ||
#include <linux/export.h> | ||
#include <linux/types.h> | ||
#include <linux/init.h> | ||
#include <linux/io.h> | ||
#include <linux/errno.h> | ||
#include <linux/spinlock.h> | ||
#include <linux/delay.h> | ||
#include <linux/clk.h> | ||
#include <video/imx-ipu-v3.h> | ||
|
||
#include "ipu-prv.h" | ||
|
||
struct ipu_smfc_priv { | ||
void __iomem *base; | ||
spinlock_t lock; | ||
}; | ||
|
||
/*SMFC Registers */ | ||
#define SMFC_MAP 0x0000 | ||
#define SMFC_WMC 0x0004 | ||
#define SMFC_BS 0x0008 | ||
|
||
int ipu_smfc_set_burstsize(struct ipu_soc *ipu, int channel, int burstsize) | ||
{ | ||
struct ipu_smfc_priv *smfc = ipu->smfc_priv; | ||
unsigned long flags; | ||
u32 val, shift; | ||
|
||
spin_lock_irqsave(&smfc->lock, flags); | ||
|
||
shift = channel * 4; | ||
val = readl(smfc->base + SMFC_BS); | ||
val &= ~(0xf << shift); | ||
val |= burstsize << shift; | ||
writel(val, smfc->base + SMFC_BS); | ||
|
||
spin_unlock_irqrestore(&smfc->lock, flags); | ||
|
||
return 0; | ||
} | ||
EXPORT_SYMBOL_GPL(ipu_smfc_set_burstsize); | ||
|
||
int ipu_smfc_map_channel(struct ipu_soc *ipu, int channel, int csi_id, int mipi_id) | ||
{ | ||
struct ipu_smfc_priv *smfc = ipu->smfc_priv; | ||
unsigned long flags; | ||
u32 val, shift; | ||
|
||
spin_lock_irqsave(&smfc->lock, flags); | ||
|
||
shift = channel * 3; | ||
val = readl(smfc->base + SMFC_MAP); | ||
val &= ~(0x7 << shift); | ||
val |= ((csi_id << 2) | mipi_id) << shift; | ||
writel(val, smfc->base + SMFC_MAP); | ||
|
||
spin_unlock_irqrestore(&smfc->lock, flags); | ||
|
||
return 0; | ||
} | ||
EXPORT_SYMBOL_GPL(ipu_smfc_map_channel); | ||
|
||
int ipu_smfc_init(struct ipu_soc *ipu, struct device *dev, | ||
unsigned long base) | ||
{ | ||
struct ipu_smfc_priv *smfc; | ||
|
||
smfc = devm_kzalloc(dev, sizeof(*smfc), GFP_KERNEL); | ||
if (!smfc) | ||
return -ENOMEM; | ||
|
||
ipu->smfc_priv = smfc; | ||
spin_lock_init(&smfc->lock); | ||
|
||
smfc->base = devm_ioremap(dev, base, PAGE_SIZE); | ||
if (!smfc->base) | ||
return -ENOMEM; | ||
|
||
pr_debug("%s: ioremap 0x%08lx -> %p\n", __func__, base, smfc->base); | ||
|
||
return 0; | ||
} | ||
|
||
void ipu_smfc_exit(struct ipu_soc *ipu) | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.