* [PATCH v2] ARM: multi_v7_defconfig: Enable some drivers for LS1021A
From: Alison Wang @ 2015-12-09 8:41 UTC (permalink / raw)
To: linux-arm-kernel
This patch enables some drivers for LS1021A, such as
GIANFAR, WATCHDOG, AUDIO, QSPI, I2C, ESDHC, EDMA, FTM.
QorIQ Clock Framework and Ramdisk support is also enabled.
Signed-off-by: Alison Wang <alison.wang@freescale.com>
---
Changes since v1:
- Make some drivers as loadable modules.
arch/arm/configs/multi_v7_defconfig | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index f6a2557..fb2159d 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -128,6 +128,7 @@ CONFIG_KEXEC=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+CONFIG_QORIQ_CPUFREQ=y
CONFIG_CPU_IDLE=y
CONFIG_ARM_CPUIDLE=y
CONFIG_NEON=y
@@ -182,8 +183,11 @@ CONFIG_MTD_NAND_ATMEL=y
CONFIG_MTD_NAND_BRCMNAND=y
CONFIG_MTD_NAND_DAVINCI=y
CONFIG_MTD_SPI_NOR=y
+CONFIG_SPI_FSL_QUADSPI=m
CONFIG_MTD_UBI=y
CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZEe536
CONFIG_AD525X_DPOT=y
CONFIG_AD525X_DPOT_I2C=y
CONFIG_ATMEL_TCLIB=y
@@ -210,6 +214,7 @@ CONFIG_HIX5HD2_GMAC=y
CONFIG_SUN4I_EMAC=y
CONFIG_MACB=y
CONFIG_NET_CALXEDA_XGMAC=y
+CONFIG_GIANFAR=y
CONFIG_IGB=y
CONFIG_MV643XX_ETH=y
CONFIG_MVNETA=y
@@ -226,6 +231,7 @@ CONFIG_MARVELL_PHY=y
CONFIG_SMSC_PHY=y
CONFIG_BROADCOM_PHY=y
CONFIG_ICPLUS_PHY=y
+CONFIG_REALTEK_PHY=y
CONFIG_MICREL_PHY=y
CONFIG_FIXED_PHY=y
CONFIG_USB_PEGASUS=y
@@ -312,6 +318,7 @@ CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_I2C_DIGICOLOR=m
CONFIG_I2C_GPIO=m
CONFIG_I2C_EXYNOS5=y
+CONFIG_I2C_IMX=m
CONFIG_I2C_MV64XXX=y
CONFIG_I2C_RIIC=y
CONFIG_I2C_RK3X=y
@@ -330,6 +337,7 @@ CONFIG_SPI=y
CONFIG_SPI_ATMEL=m
CONFIG_SPI_CADENCE=y
CONFIG_SPI_DAVINCI=y
+CONFIG_SPI_FSL_DSPI=m
CONFIG_SPI_OMAP24XX=y
CONFIG_SPI_ORION=y
CONFIG_SPI_PL022=y
@@ -405,6 +413,7 @@ CONFIG_ARM_SP805_WATCHDOG=y
CONFIG_ORION_WATCHDOG=y
CONFIG_ST_LPC_WATCHDOG=y
CONFIG_SUNXI_WATCHDOG=y
+CONFIG_IMX2_WDT=y
CONFIG_TEGRA_WATCHDOG=m
CONFIG_MESON_WATCHDOG=y
CONFIG_DIGICOLOR_WATCHDOG=y
@@ -525,6 +534,7 @@ CONFIG_SND_USB_AUDIO=y
CONFIG_SND_SOC=m
CONFIG_SND_ATMEL_SOC=m
CONFIG_SND_ATMEL_SOC_WM8904=m
+CONFIG_SND_SOC_FSL_SAI=m
CONFIG_SND_SOC_SH4_FSI=m
CONFIG_SND_SOC_RCAR=m
CONFIG_SND_SOC_RSRC_CARD=m
@@ -537,6 +547,7 @@ CONFIG_SND_SOC_TEGRA_TRIMSLICE=m
CONFIG_SND_SOC_TEGRA_ALC5632=m
CONFIG_SND_SOC_TEGRA_MAX98090=m
CONFIG_SND_SOC_AK4642=m
+CONFIG_SND_SOC_SGTL5000=m
CONFIG_SND_SOC_WM8978=m
CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
@@ -577,6 +588,7 @@ CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_OF_ARASAN=y
CONFIG_MMC_SDHCI_OF_AT91=y
+CONFIG_MMC_SDHCI_OF_ESDHC=m
CONFIG_MMC_SDHCI_ESDHC_IMX=y
CONFIG_MMC_SDHCI_DOVE=y
CONFIG_MMC_SDHCI_TEGRA=y
@@ -653,6 +665,7 @@ CONFIG_DMADEVICES=y
CONFIG_DW_DMAC=y
CONFIG_AT_HDMAC=y
CONFIG_AT_XDMAC=y
+CONFIG_FSL_EDMA=m
CONFIG_MV_XOR=y
CONFIG_TEGRA20_APB_DMA=y
CONFIG_SH_DMAE=y
@@ -712,6 +725,7 @@ CONFIG_AK8975=y
CONFIG_PWM=y
CONFIG_PWM_ATMEL=m
CONFIG_PWM_ATMEL_TCB=m
+CONFIG_PWM_FSL_FTM=m
CONFIG_PWM_RENESAS_TPU=y
CONFIG_PWM_ROCKCHIP=m
CONFIG_PWM_SAMSUNG=m
--
2.1.0.27.g96db324
^ permalink raw reply related
* Re: [PATCH v2] ARM: multi_v7_defconfig: Enable some drivers for LS1021A
From: Arnd Bergmann @ 2015-12-09 8:57 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1449650499-28660-1-git-send-email-b18965@freescale.com>
On Wednesday 09 December 2015 16:41:39 Alison Wang wrote:
> This patch enables some drivers for LS1021A, such as
> GIANFAR, WATCHDOG, AUDIO, QSPI, I2C, ESDHC, EDMA, FTM.
> QorIQ Clock Framework and Ramdisk support is also enabled.
>
> Signed-off-by: Alison Wang <alison.wang@freescale.com>
> ---
> Changes since v1:
> - Make some drivers as loadable modules.
>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Shawn, do you want to pick this up and send it back through the
imx tree?
If you have no other defconfig changes for 4.5, we can also just
add it to arm-soc.
Arnd
^ permalink raw reply
* Warning Mailbox Exceeded Quota Limit
From: System Administrator @ 2015-12-09 9:23 UTC (permalink / raw)
To: linux-fbdev
Dear user,
Your mailbox has Exceeded the quota limit set by the administrator, you will not be able to send or receive mail until you revalidates your account.
Please click the link below or copy paste to your browser to validate your mailbox.
http://www.jiffy1.com/limit-update
Failure to do this will result limited access to your mailbox and failure to update your account within 48-hours, of this update notification, your account will be closed permanently.
Thanks
System Administrator.
^ permalink raw reply
* Re: [PATCH] [media] hdmi: added functions for MPEG InfoFrames
From: Enric Balletbo Serra @ 2015-12-09 12:10 UTC (permalink / raw)
To: Thierry Reding
Cc: linux-fbdev, Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
Hans Verkuil, Mauro Carvalho Chehab, Martin Bugge, linux-kernel,
dri-devel
In-Reply-To: <CAFqH_53iGQQ0-wX3cYFjNbZx2TBWibDK5nBPjoeOynrXLQt_Jg@mail.gmail.com>
Hello Thierry,
2015-11-19 13:29 GMT+01:00 Enric Balletbo Serra <eballetbo@gmail.com>:
> Hello Thierry,
>
> 2015-11-19 12:51 GMT+01:00 Thierry Reding <treding@nvidia.com>:
>> On Tue, Nov 17, 2015 at 11:55:53PM +0100, Enric Balletbo Serra wrote:
>>> Hello Thierry,
>>>
>>> 2015-11-17 13:55 GMT+01:00 Thierry Reding <treding@nvidia.com>:
>>> > On Mon, Nov 16, 2015 at 05:28:24PM +0100, Enric Balletbo Serra wrote:
>>> >> Hello Thierry,
>>> >>
>>> >> Many thanks for your comments.
>>> >>
>>> >> 2015-11-16 12:50 GMT+01:00 Thierry Reding <treding@nvidia.com>:
>>> >> > On Sat, Nov 14, 2015 at 07:38:19PM +0100, Enric Balletbo i Serra wrote:
>>> >> >> The MPEG Source (MS) InfoFrame is in EIA/CEA-861B. It describes aspects of
>>> >> >> the compressed video stream that were used to produce the uncompressed
>>> >> >> video.
>>> >> >>
>>> >> >> The patch adds functions to work with MPEG InfoFrames.
>>> >> >>
>>> >> >> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>>> >> >> ---
>>> >> >> drivers/video/hdmi.c | 156 +++++++++++++++++++++++++++++++++++++++++++++++++++
>>> >> >> include/linux/hdmi.h | 24 ++++++++
>>> >> >> 2 files changed, 180 insertions(+)
>>> >> >
>>> >> > According to the CEA specification a source is expected to send this
>>> >> > type of infoframe once per video frame. I'm curious how you envision
>>> >> > this to be ensured. Would hardware provide a mechanism to store this
>>> >> > data and send the infoframe automatically? How would you ensure that
>>> >> > updates sent to the hardware match the upcoming frame?
>>> >> >
>>> >>
>>> >> To be honest I'm not sure if I have the full picture. In the use case
>>> >> I'm trying there is a hardware mechanism to store the data and send
>>> >> the infoframe through a "Packet Send Control Register".
>>> >
>>> > Okay, sounds like the hardware will automatically send out packets at
>>> > the right time. That still leaves open the issue of how to ensure this
>>> > is synchronized with userspace. Perhaps this could be done by attaching
>>> > a property to a framebuffer, so that we'd know what exact frame the meta
>>> > data is attached to and when to update the FIFOs for the infoframe.
>>> >
>>> > Usually it's a good idea to send this type of patch as part of a larger
>>> > series precisely so that people can see how it is used. That should make
>>> > it easier to see if this is good enough or needs some more thought on
>>> > how to synchronize. Do you have any code that you could post that makes
>>> > use of this new infoframe?
>>> >
>>>
>>> I was thinking use this and other helpers in the anx7814 bridge
>>> driver[1], I thought that this patch should go through another tree,
>>> this is the reason why I send it separately, but If you want or you
>>> prefer I can send as part of these patch series.
>>>
>>> [1] https://lkml.org/lkml/2015/11/13/284
>>
>> I haven't seen those patches yet. I should've been Cc'ed on those
>> patches since I'm technically the maintainer of drm/bridge. Did the
>> get_maintainer.pl script not list me?
>>
>
> Mmm, just checked and yes, get_maintainer list you, so probably I did
> something getting the maintainers.
> Sorry.
>
>> In my opinion, it's usually a good idea to keep all dependencies in a
>> single series, just so people get a better picture of what you're
>> submitting. Of course that's just my opinion, somebody else may yell at
>> you because they get Cc'ed on patches that they're not interested in...
>>
>> As for merging patches, it's usually best to let maintainers figure that
>> out once the series is in good shape.
>>
>> Thierry
As you suggested I included this patch series with anx7814 bridge
driver series. So you can see the context. Please feel free to comment
anything.
https://lkml.org/lkml/2015/12/4/66
Regards,
Enric
^ permalink raw reply
* [PATCH 00/23] OMAPDSS: misc patches
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
Hi,
Here is a pile of smallish patches for omapdss, forward ported from TI's
product kernel (which means they have had some testing).
Many of these patches prepare the omapdss driver for writeback by cleaning up
writeback related code, and adding bits here and there for register level
writeback support. The patch to add writeback support itself is missing, as
it's still not in a stable state.
Tomi
Dave Gerlach (1):
OMAPDSS: adopt pinctrl support
Manisha Agrawal (3):
OMAPDSS: tpd12s015: remove platform data support
OMAPDSS: tpd12s015: gpio descriptor API
OMAPDSS: tpd12s015: CT_CP_HPD as optional gpio
Tomi Valkeinen (19):
OMAPDSS: DISPC: always set ALIGN when available
OMAPDSS: fix DISPC_MFLAG_THRESHOLD_OFFSET for WB
OMAPDSS: add WB to register dump
OMAPDSS: add num_wbs=1 to omap5 dss features
OMAPDSS: add 'has_writeback' flag
OMAPDSS: add OMAP_DSS_CHANNEL_WB to 'enum omap_channel'
OMAPDSS: refactor dispc_ovl_get_channel_out
OMAPDSS: handle WB channel in dispc_set/get_channel_out
OMAPDSS: configure burst size for WB
OMAPDSS: configure WB fifo thresholds
OMAPDSS: configure WB mflag threshold
OMAPDSS: skip pclk check for WB mem2mem
OMAPDSS: fix rgb-to-yuv color conv coefs
OMAPDSS: set WB capturemode for m2m mode
OMAPDSS: add setup for WB capture mode in dispc_wb_setup()
OMAPDSS: remove extra EXPORT_SYMBOLs
OMAPDSS: make a two dss feat funcs internal to omapdss
OMAPDSS: change internal dispc functions to static
OMAPDSS: remove extra out = NULL checks
.../fbdev/omap2/displays-new/encoder-tpd12s015.c | 119 +++++-----------
drivers/video/fbdev/omap2/dss/dispc.c | 157 +++++++++++++++++----
drivers/video/fbdev/omap2/dss/dispc.h | 2 +
drivers/video/fbdev/omap2/dss/dpi.c | 2 +-
drivers/video/fbdev/omap2/dss/dsi.c | 2 +-
drivers/video/fbdev/omap2/dss/dss.c | 6 +
drivers/video/fbdev/omap2/dss/dss.h | 5 -
drivers/video/fbdev/omap2/dss/dss_features.c | 11 --
drivers/video/fbdev/omap2/dss/dss_features.h | 5 +-
drivers/video/fbdev/omap2/dss/hdmi4.c | 2 +-
drivers/video/fbdev/omap2/dss/hdmi5.c | 2 +-
drivers/video/fbdev/omap2/dss/rfbi.c | 2 +-
drivers/video/fbdev/omap2/dss/sdi.c | 2 +-
drivers/video/fbdev/omap2/dss/venc.c | 2 +-
include/video/omap-panel-data.h | 15 --
include/video/omapdss.h | 3 +-
16 files changed, 184 insertions(+), 153 deletions(-)
--
2.5.0
^ permalink raw reply
* [PATCH 01/23] OMAPDSS: adopt pinctrl support
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
From: Dave Gerlach <d-gerlach@ti.com>
Update omapdss driver to set the state of the pins to:
- "default on resume
- "sleep" on suspend
By optionally putting the pins into sleep state in the suspend callback
we can accomplish two things.
- minimize current leakage from pins and thus save power,
- prevent the IP from driving pins output in an uncontrolled manner,
which may happen if the power domain drops the domain regulator.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dss.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dss.c b/drivers/video/fbdev/omap2/dss/dss.c
index 9200a8668b49..f95ff319e68e 100644
--- a/drivers/video/fbdev/omap2/dss/dss.c
+++ b/drivers/video/fbdev/omap2/dss/dss.c
@@ -1264,12 +1264,18 @@ static int dss_runtime_suspend(struct device *dev)
{
dss_save_context();
dss_set_min_bus_tput(dev, 0);
+
+ pinctrl_pm_select_sleep_state(dev);
+
return 0;
}
static int dss_runtime_resume(struct device *dev)
{
int r;
+
+ pinctrl_pm_select_default_state(dev);
+
/*
* Set an arbitrarily high tput request to ensure OPP100.
* What we should really do is to make a request to stay in OPP100,
--
2.5.0
^ permalink raw reply related
* [PATCH 02/23] OMAPDSS: DISPC: always set ALIGN when available
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
By default DISPC asserts hsync and vsync sequentially, i.e. there's
first hsync and that is immediately followed by vsync. This is the only
available behaviour on OMAP2/3, and default behaviour on OMAP4+.
OMAP4+ has ALIGN bit in POL_FREQ register, which makes DISPC assert both
syncs at the same time.
It has been observed that some panels don't like sequential syncs (AM5
EVM's panel). After studying the datasheets for multiple panels and
encoders, and MIPI DPI spec, it looks like there is no standard way to
handle this.
Sometimes the datasheets don't mention the required syncs behaviour at
all, sometimes the datasheets have images that hint towards simultaneous
syncs, and sometimes it is explicitly mentioned that simultaneous syncs
are needed. No panels or encoders requiring sequential sync was found.
It thus seems to be safe to default to simultaneous syncs when the ALIGN
bit is available. This fixed AM5 EVM's panel, and no side effects have
been observed on other panels or encoders.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index be716c9ffb88..ced6050666cc 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -99,6 +99,9 @@ struct dispc_features {
/* PIXEL_INC is not added to the last pixel of a line */
bool last_pixel_inc_missing:1;
+
+ /* POL_FREQ has ALIGN bit */
+ bool supports_sync_align:1;
};
#define DISPC_MAX_NR_FIFOS 5
@@ -3163,6 +3166,10 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw,
FLD_VAL(hs, 13, 13) |
FLD_VAL(vs, 12, 12);
+ /* always set ALIGN bit when available */
+ if (dispc.feat->supports_sync_align)
+ l |= (1 << 18);
+
dispc_write_reg(DISPC_POL_FREQ(channel), l);
if (dispc.syscon_pol) {
@@ -3854,6 +3861,7 @@ static const struct dispc_features omap44xx_dispc_feats = {
.num_fifos = 5,
.gfx_fifo_workaround = true,
.set_max_preload = true,
+ .supports_sync_align = true,
};
static const struct dispc_features omap54xx_dispc_feats = {
@@ -3875,6 +3883,7 @@ static const struct dispc_features omap54xx_dispc_feats = {
.gfx_fifo_workaround = true,
.mstandby_workaround = true,
.set_max_preload = true,
+ .supports_sync_align = true,
};
static int dispc_init_features(struct platform_device *pdev)
--
2.5.0
^ permalink raw reply related
* [PATCH 03/23] OMAPDSS: tpd12s015: remove platform data support
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
From: Manisha Agrawal <manisha.agrawal@ti.com>
All devices using tpd12s015 driver are doing DT boot. No need of further
supporting the platform data. This patch removes support for platform
data.
Signed-off-by: Manisha Agrawal <manisha.agrawal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
.../fbdev/omap2/displays-new/encoder-tpd12s015.c | 31 +---------------------
include/video/omap-panel-data.h | 15 -----------
2 files changed, 1 insertion(+), 45 deletions(-)
diff --git a/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
index 990af6baeb0f..6f5e27a4fe63 100644
--- a/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
+++ b/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
@@ -201,31 +201,6 @@ static const struct omapdss_hdmi_ops tpd_hdmi_ops = {
.set_hdmi_mode = tpd_set_hdmi_mode,
};
-static int tpd_probe_pdata(struct platform_device *pdev)
-{
- struct panel_drv_data *ddata = platform_get_drvdata(pdev);
- struct encoder_tpd12s015_platform_data *pdata;
- struct omap_dss_device *dssdev, *in;
-
- pdata = dev_get_platdata(&pdev->dev);
-
- ddata->ct_cp_hpd_gpio = pdata->ct_cp_hpd_gpio;
- ddata->ls_oe_gpio = pdata->ls_oe_gpio;
- ddata->hpd_gpio = pdata->hpd_gpio;
-
- in = omap_dss_find_output(pdata->source);
- if (in = NULL) {
- dev_err(&pdev->dev, "Failed to find video source\n");
- return -ENODEV;
- }
-
- ddata->in = in;
-
- dssdev = &ddata->dssdev;
- dssdev->name = pdata->name;
-
- return 0;
-}
static int tpd_probe_of(struct platform_device *pdev)
{
@@ -282,11 +257,7 @@ static int tpd_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ddata);
- if (dev_get_platdata(&pdev->dev)) {
- r = tpd_probe_pdata(pdev);
- if (r)
- return r;
- } else if (pdev->dev.of_node) {
+ if (pdev->dev.of_node) {
r = tpd_probe_of(pdev);
if (r)
return r;
diff --git a/include/video/omap-panel-data.h b/include/video/omap-panel-data.h
index 69279c013ac4..56830d1dc762 100644
--- a/include/video/omap-panel-data.h
+++ b/include/video/omap-panel-data.h
@@ -45,21 +45,6 @@ struct encoder_tfp410_platform_data {
int data_lines;
};
-/**
- * encoder_tpd12s015 platform data
- * @name: name for this display entity
- * @ct_cp_hpd_gpio: CT_CP_HPD gpio number
- * @ls_oe_gpio: LS_OE gpio number
- * @hpd_gpio: HPD gpio number
- */
-struct encoder_tpd12s015_platform_data {
- const char *name;
- const char *source;
-
- int ct_cp_hpd_gpio;
- int ls_oe_gpio;
- int hpd_gpio;
-};
/**
* connector_dvi platform data
--
2.5.0
^ permalink raw reply related
* [PATCH 04/23] OMAPDSS: tpd12s015: gpio descriptor API
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
From: Manisha Agrawal <manisha.agrawal@ti.com>
Migrated the gpio APIs to descriptor-interface based.
Signed-off-by: Manisha Agrawal <manisha.agrawal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
.../fbdev/omap2/displays-new/encoder-tpd12s015.c | 81 ++++++++--------------
1 file changed, 30 insertions(+), 51 deletions(-)
diff --git a/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
index 6f5e27a4fe63..93f95eaeadad 100644
--- a/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
+++ b/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
@@ -13,9 +13,8 @@
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/slab.h>
-#include <linux/gpio.h>
#include <linux/platform_device.h>
-#include <linux/of_gpio.h>
+#include <linux/gpio/consumer.h>
#include <video/omapdss.h>
#include <video/omap-panel-data.h>
@@ -24,9 +23,9 @@ struct panel_drv_data {
struct omap_dss_device dssdev;
struct omap_dss_device *in;
- int ct_cp_hpd_gpio;
- int ls_oe_gpio;
- int hpd_gpio;
+ struct gpio_desc *ct_cp_hpd_gpio;
+ struct gpio_desc *ls_oe_gpio;
+ struct gpio_desc *hpd_gpio;
struct omap_video_timings timings;
};
@@ -47,7 +46,7 @@ static int tpd_connect(struct omap_dss_device *dssdev,
dst->src = dssdev;
dssdev->dst = dst;
- gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1);
+ gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1);
/* DC-DC converter needs at max 300us to get to 90% of 5V */
udelay(300);
@@ -65,7 +64,7 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
if (dst != dssdev->dst)
return;
- gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
+ gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
dst->src = NULL;
dssdev->dst = NULL;
@@ -145,16 +144,16 @@ static int tpd_read_edid(struct omap_dss_device *dssdev,
struct omap_dss_device *in = ddata->in;
int r;
- if (!gpio_get_value_cansleep(ddata->hpd_gpio))
+ if (!gpiod_get_value_cansleep(ddata->hpd_gpio))
return -ENODEV;
- if (gpio_is_valid(ddata->ls_oe_gpio))
- gpio_set_value_cansleep(ddata->ls_oe_gpio, 1);
+ if (ddata->ls_oe_gpio)
+ gpiod_set_value_cansleep(ddata->ls_oe_gpio, 1);
r = in->ops.hdmi->read_edid(in, edid, len);
- if (gpio_is_valid(ddata->ls_oe_gpio))
- gpio_set_value_cansleep(ddata->ls_oe_gpio, 0);
+ if (ddata->ls_oe_gpio)
+ gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);
return r;
}
@@ -163,7 +162,7 @@ static bool tpd_detect(struct omap_dss_device *dssdev)
{
struct panel_drv_data *ddata = to_panel_data(dssdev);
- return gpio_get_value_cansleep(ddata->hpd_gpio);
+ return gpiod_get_value_cansleep(ddata->hpd_gpio);
}
static int tpd_set_infoframe(struct omap_dss_device *dssdev,
@@ -207,32 +206,6 @@ static int tpd_probe_of(struct platform_device *pdev)
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct device_node *node = pdev->dev.of_node;
struct omap_dss_device *in;
- int gpio;
-
- /* CT CP HPD GPIO */
- gpio = of_get_gpio(node, 0);
- if (!gpio_is_valid(gpio)) {
- dev_err(&pdev->dev, "failed to parse CT CP HPD gpio\n");
- return gpio;
- }
- ddata->ct_cp_hpd_gpio = gpio;
-
- /* LS OE GPIO */
- gpio = of_get_gpio(node, 1);
- if (gpio_is_valid(gpio) || gpio = -ENOENT) {
- ddata->ls_oe_gpio = gpio;
- } else {
- dev_err(&pdev->dev, "failed to parse LS OE gpio\n");
- return gpio;
- }
-
- /* HPD GPIO */
- gpio = of_get_gpio(node, 2);
- if (!gpio_is_valid(gpio)) {
- dev_err(&pdev->dev, "failed to parse HPD gpio\n");
- return gpio;
- }
- ddata->hpd_gpio = gpio;
in = omapdss_of_find_source_for_first_ep(node);
if (IS_ERR(in)) {
@@ -250,6 +223,7 @@ static int tpd_probe(struct platform_device *pdev)
struct omap_dss_device *in, *dssdev;
struct panel_drv_data *ddata;
int r;
+ struct gpio_desc *gpio;
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
if (!ddata)
@@ -265,23 +239,28 @@ static int tpd_probe(struct platform_device *pdev)
return -ENODEV;
}
- r = devm_gpio_request_one(&pdev->dev, ddata->ct_cp_hpd_gpio,
- GPIOF_OUT_INIT_LOW, "hdmi_ct_cp_hpd");
- if (r)
+
+ gpio = devm_gpiod_get_index(&pdev->dev, NULL, 0,
+ GPIOD_OUT_LOW);
+ if (IS_ERR(gpio))
goto err_gpio;
- if (gpio_is_valid(ddata->ls_oe_gpio)) {
- r = devm_gpio_request_one(&pdev->dev, ddata->ls_oe_gpio,
- GPIOF_OUT_INIT_LOW, "hdmi_ls_oe");
- if (r)
- goto err_gpio;
- }
+ ddata->ct_cp_hpd_gpio = gpio;
- r = devm_gpio_request_one(&pdev->dev, ddata->hpd_gpio,
- GPIOF_DIR_IN, "hdmi_hpd");
- if (r)
+ gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 1,
+ GPIOD_OUT_LOW);
+ if (IS_ERR(gpio))
goto err_gpio;
+ ddata->ls_oe_gpio = gpio;
+
+ gpio = devm_gpiod_get_index(&pdev->dev, NULL, 2,
+ GPIOD_IN);
+ if (IS_ERR(gpio))
+ goto err_gpio;
+
+ ddata->hpd_gpio = gpio;
+
dssdev = &ddata->dssdev;
dssdev->ops.hdmi = &tpd_hdmi_ops;
dssdev->dev = &pdev->dev;
--
2.5.0
^ permalink raw reply related
* [PATCH 05/23] OMAPDSS: tpd12s015: CT_CP_HPD as optional gpio
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
From: Manisha Agrawal <manisha.agrawal@ti.com>
tpd12s015 HW has LS_OE, CT_CP_HPD and HPD gpios. Out of these gpios,
driver only handled LS_OE as optional. The CT_CP_HPD gpio should also
be treated as optional gpio as it is just a power saving feature. Some
boards hardwire this gpio to be always enable. In this patch, all access
to CT_CP_HPD gpio is made optional.
Signed-off-by: Manisha Agrawal <manisha.agrawal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c b/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
index 93f95eaeadad..45a0b8e8d320 100644
--- a/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
+++ b/drivers/video/fbdev/omap2/displays-new/encoder-tpd12s015.c
@@ -46,9 +46,11 @@ static int tpd_connect(struct omap_dss_device *dssdev,
dst->src = dssdev;
dssdev->dst = dst;
- gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1);
- /* DC-DC converter needs at max 300us to get to 90% of 5V */
- udelay(300);
+ if (ddata->ct_cp_hpd_gpio) {
+ gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1);
+ /* DC-DC converter needs at max 300us to get to 90% of 5V */
+ udelay(300);
+ }
return 0;
}
@@ -64,7 +66,8 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
if (dst != dssdev->dst)
return;
- gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
+ if (ddata->ct_cp_hpd_gpio)
+ gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
dst->src = NULL;
dssdev->dst = NULL;
@@ -240,7 +243,7 @@ static int tpd_probe(struct platform_device *pdev)
}
- gpio = devm_gpiod_get_index(&pdev->dev, NULL, 0,
+ gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 0,
GPIOD_OUT_LOW);
if (IS_ERR(gpio))
goto err_gpio;
--
2.5.0
^ permalink raw reply related
* [PATCH 06/23] OMAPDSS: fix DISPC_MFLAG_THRESHOLD_OFFSET for WB
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
DISPC_MFLAG_THRESHOLD_OFFSET() is missing the offset for WB. Add the
offset.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.h b/drivers/video/fbdev/omap2/dss/dispc.h
index 3043d6e0a5f9..483744223dd1 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.h
+++ b/drivers/video/fbdev/omap2/dss/dispc.h
@@ -908,6 +908,8 @@ static inline u16 DISPC_MFLAG_THRESHOLD_OFFSET(enum omap_plane plane)
return 0x0868;
case OMAP_DSS_VIDEO3:
return 0x086c;
+ case OMAP_DSS_WB:
+ return 0x0870;
default:
BUG();
return 0;
--
2.5.0
^ permalink raw reply related
* [PATCH 07/23] OMAPDSS: add WB to register dump
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
Add dumping of the writeback registers to the register dump function.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index ced6050666cc..0cccff2ffd4e 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -3455,6 +3455,7 @@ static void dispc_dump_regs(struct seq_file *s)
[OMAP_DSS_VIDEO1] = "VID1",
[OMAP_DSS_VIDEO2] = "VID2",
[OMAP_DSS_VIDEO3] = "VID3",
+ [OMAP_DSS_WB] = "WB",
};
const char **p_names;
@@ -3561,6 +3562,35 @@ static void dispc_dump_regs(struct seq_file *s)
DUMPREG(i, DISPC_OVL_ATTRIBUTES2);
}
+ if (dss_feat_get_num_wbs()) {
+ i = OMAP_DSS_WB;
+ DUMPREG(i, DISPC_OVL_BA0);
+ DUMPREG(i, DISPC_OVL_BA1);
+ DUMPREG(i, DISPC_OVL_SIZE);
+ DUMPREG(i, DISPC_OVL_ATTRIBUTES);
+ DUMPREG(i, DISPC_OVL_FIFO_THRESHOLD);
+ DUMPREG(i, DISPC_OVL_FIFO_SIZE_STATUS);
+ DUMPREG(i, DISPC_OVL_ROW_INC);
+ DUMPREG(i, DISPC_OVL_PIXEL_INC);
+
+ if (dss_has_feature(FEAT_MFLAG))
+ DUMPREG(i, DISPC_OVL_MFLAG_THRESHOLD);
+
+ DUMPREG(i, DISPC_OVL_FIR);
+ DUMPREG(i, DISPC_OVL_PICTURE_SIZE);
+ DUMPREG(i, DISPC_OVL_ACCU0);
+ DUMPREG(i, DISPC_OVL_ACCU1);
+ if (dss_has_feature(FEAT_HANDLE_UV_SEPARATE)) {
+ DUMPREG(i, DISPC_OVL_BA0_UV);
+ DUMPREG(i, DISPC_OVL_BA1_UV);
+ DUMPREG(i, DISPC_OVL_FIR2);
+ DUMPREG(i, DISPC_OVL_ACCU2_0);
+ DUMPREG(i, DISPC_OVL_ACCU2_1);
+ }
+ if (dss_has_feature(FEAT_ATTR2))
+ DUMPREG(i, DISPC_OVL_ATTRIBUTES2);
+ }
+
#undef DISPC_REG
#undef DUMPREG
--
2.5.0
^ permalink raw reply related
* [PATCH 08/23] OMAPDSS: add num_wbs=1 to omap5 dss features
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
OMAP5+ DSS has a writeback pipeline, but this was not specified in the
features list for OMAP5 DSS.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dss_features.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/fbdev/omap2/dss/dss_features.c b/drivers/video/fbdev/omap2/dss/dss_features.c
index b0b6dfd657bf..28fe9a3ca1fa 100644
--- a/drivers/video/fbdev/omap2/dss/dss_features.c
+++ b/drivers/video/fbdev/omap2/dss/dss_features.c
@@ -801,6 +801,7 @@ static const struct omap_dss_features omap5_dss_features = {
.num_mgrs = 4,
.num_ovls = 4,
+ .num_wbs = 1,
.supported_displays = omap5_dss_supported_displays,
.supported_outputs = omap5_dss_supported_outputs,
.supported_color_modes = omap4_dss_supported_color_modes,
--
2.5.0
^ permalink raw reply related
* [PATCH 09/23] OMAPDSS: add 'has_writeback' flag
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
At the moment we have a function to get the number of writeback
pipelines supported. However, the function is used in a wrong way,
causing a wrong pipeline to get configured when trying to use WB. Also,
we only have a single writeback pipeline on any of the DSS versions.
To fix and simplify this, create a 'has_writeback' flag into the dispc
driver, and after checking the flag, use OMAP_DSS_WB pipeline
explicitly when calling the configuration functions.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 11 +++++++----
drivers/video/fbdev/omap2/dss/dss_features.c | 10 ----------
drivers/video/fbdev/omap2/dss/dss_features.h | 1 -
3 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 0cccff2ffd4e..aa74b3da3718 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -102,6 +102,8 @@ struct dispc_features {
/* POL_FREQ has ALIGN bit */
bool supports_sync_align:1;
+
+ bool has_writeback:1;
};
#define DISPC_MAX_NR_FIFOS 5
@@ -710,7 +712,6 @@ static void dispc_setup_color_conv_coef(void)
{
int i;
int num_ovl = dss_feat_get_num_ovls();
- int num_wb = dss_feat_get_num_wbs();
const struct color_conv_coef ctbl_bt601_5_ovl = {
298, 409, 0, 298, -208, -100, 298, 0, 517, 0,
};
@@ -721,8 +722,8 @@ static void dispc_setup_color_conv_coef(void)
for (i = 1; i < num_ovl; i++)
dispc_ovl_write_color_conv_coef(i, &ctbl_bt601_5_ovl);
- for (; i < num_wb; i++)
- dispc_ovl_write_color_conv_coef(i, &ctbl_bt601_5_wb);
+ if (dispc.feat->has_writeback)
+ dispc_ovl_write_color_conv_coef(OMAP_DSS_WB, &ctbl_bt601_5_wb);
}
static void dispc_ovl_set_ba0(enum omap_plane plane, u32 paddr)
@@ -3562,7 +3563,7 @@ static void dispc_dump_regs(struct seq_file *s)
DUMPREG(i, DISPC_OVL_ATTRIBUTES2);
}
- if (dss_feat_get_num_wbs()) {
+ if (dispc.feat->has_writeback) {
i = OMAP_DSS_WB;
DUMPREG(i, DISPC_OVL_BA0);
DUMPREG(i, DISPC_OVL_BA1);
@@ -3892,6 +3893,7 @@ static const struct dispc_features omap44xx_dispc_feats = {
.gfx_fifo_workaround = true,
.set_max_preload = true,
.supports_sync_align = true,
+ .has_writeback = true,
};
static const struct dispc_features omap54xx_dispc_feats = {
@@ -3914,6 +3916,7 @@ static const struct dispc_features omap54xx_dispc_feats = {
.mstandby_workaround = true,
.set_max_preload = true,
.supports_sync_align = true,
+ .has_writeback = true,
};
static int dispc_init_features(struct platform_device *pdev)
diff --git a/drivers/video/fbdev/omap2/dss/dss_features.c b/drivers/video/fbdev/omap2/dss/dss_features.c
index 28fe9a3ca1fa..48951c5cb352 100644
--- a/drivers/video/fbdev/omap2/dss/dss_features.c
+++ b/drivers/video/fbdev/omap2/dss/dss_features.c
@@ -46,7 +46,6 @@ struct omap_dss_features {
const int num_mgrs;
const int num_ovls;
- const int num_wbs;
const enum omap_display_type *supported_displays;
const enum omap_dss_output_id *supported_outputs;
const enum omap_color_mode *supported_color_modes;
@@ -735,7 +734,6 @@ static const struct omap_dss_features omap4430_es1_0_dss_features = {
.num_mgrs = 3,
.num_ovls = 4,
- .num_wbs = 1,
.supported_displays = omap4_dss_supported_displays,
.supported_outputs = omap4_dss_supported_outputs,
.supported_color_modes = omap4_dss_supported_color_modes,
@@ -757,7 +755,6 @@ static const struct omap_dss_features omap4430_es2_0_1_2_dss_features = {
.num_mgrs = 3,
.num_ovls = 4,
- .num_wbs = 1,
.supported_displays = omap4_dss_supported_displays,
.supported_outputs = omap4_dss_supported_outputs,
.supported_color_modes = omap4_dss_supported_color_modes,
@@ -779,7 +776,6 @@ static const struct omap_dss_features omap4_dss_features = {
.num_mgrs = 3,
.num_ovls = 4,
- .num_wbs = 1,
.supported_displays = omap4_dss_supported_displays,
.supported_outputs = omap4_dss_supported_outputs,
.supported_color_modes = omap4_dss_supported_color_modes,
@@ -801,7 +797,6 @@ static const struct omap_dss_features omap5_dss_features = {
.num_mgrs = 4,
.num_ovls = 4,
- .num_wbs = 1,
.supported_displays = omap5_dss_supported_displays,
.supported_outputs = omap5_dss_supported_outputs,
.supported_color_modes = omap4_dss_supported_color_modes,
@@ -826,11 +821,6 @@ int dss_feat_get_num_ovls(void)
}
EXPORT_SYMBOL(dss_feat_get_num_ovls);
-int dss_feat_get_num_wbs(void)
-{
- return omap_current_dss_features->num_wbs;
-}
-
unsigned long dss_feat_get_param_min(enum dss_range_param param)
{
return omap_current_dss_features->dss_params[param].min;
diff --git a/drivers/video/fbdev/omap2/dss/dss_features.h b/drivers/video/fbdev/omap2/dss/dss_features.h
index 100f7a2d0638..0e75927339c7 100644
--- a/drivers/video/fbdev/omap2/dss/dss_features.h
+++ b/drivers/video/fbdev/omap2/dss/dss_features.h
@@ -86,7 +86,6 @@ enum dss_range_param {
};
/* DSS Feature Functions */
-int dss_feat_get_num_wbs(void);
unsigned long dss_feat_get_param_min(enum dss_range_param param);
unsigned long dss_feat_get_param_max(enum dss_range_param param);
enum omap_overlay_caps dss_feat_get_overlay_caps(enum omap_plane plane);
--
2.5.0
^ permalink raw reply related
* [PATCH 10/23] OMAPDSS: add OMAP_DSS_CHANNEL_WB to 'enum omap_channel'
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
'enum omap_channel' is missing the channel for writeback. Add that.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
include/video/omapdss.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index f001a356fd98..0fedd93a639d 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -87,6 +87,7 @@ enum omap_channel {
OMAP_DSS_CHANNEL_DIGIT = 1,
OMAP_DSS_CHANNEL_LCD2 = 2,
OMAP_DSS_CHANNEL_LCD3 = 3,
+ OMAP_DSS_CHANNEL_WB = 4,
};
enum omap_color_mode {
--
2.5.0
^ permalink raw reply related
* [PATCH 11/23] OMAPDSS: refactor dispc_ovl_get_channel_out
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
Refactor dispc_ovl_get_channel_out() to a bit cleaner form, which makes
it easier to add support for writeback in the following patch.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index aa74b3da3718..678a1928a9b5 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -992,7 +992,6 @@ static enum omap_channel dispc_ovl_get_channel_out(enum omap_plane plane)
{
int shift;
u32 val;
- enum omap_channel channel;
switch (plane) {
case OMAP_DSS_GFX:
@@ -1010,23 +1009,21 @@ static enum omap_channel dispc_ovl_get_channel_out(enum omap_plane plane)
val = dispc_read_reg(DISPC_OVL_ATTRIBUTES(plane));
- if (dss_has_feature(FEAT_MGR_LCD3)) {
- if (FLD_GET(val, 31, 30) = 0)
- channel = FLD_GET(val, shift, shift);
- else if (FLD_GET(val, 31, 30) = 1)
- channel = OMAP_DSS_CHANNEL_LCD2;
- else
- channel = OMAP_DSS_CHANNEL_LCD3;
- } else if (dss_has_feature(FEAT_MGR_LCD2)) {
- if (FLD_GET(val, 31, 30) = 0)
- channel = FLD_GET(val, shift, shift);
- else
- channel = OMAP_DSS_CHANNEL_LCD2;
- } else {
- channel = FLD_GET(val, shift, shift);
- }
+ if (FLD_GET(val, shift, shift) = 1)
+ return OMAP_DSS_CHANNEL_DIGIT;
+
+ if (!dss_has_feature(FEAT_MGR_LCD2))
+ return OMAP_DSS_CHANNEL_LCD;
- return channel;
+ switch (FLD_GET(val, 31, 30)) {
+ case 0:
+ default:
+ return OMAP_DSS_CHANNEL_LCD;
+ case 1:
+ return OMAP_DSS_CHANNEL_LCD2;
+ case 2:
+ return OMAP_DSS_CHANNEL_LCD3;
+ }
}
void dispc_wb_set_channel_in(enum dss_writeback_channel channel)
--
2.5.0
^ permalink raw reply related
* [PATCH 12/23] OMAPDSS: handle WB channel in dispc_set/get_channel_out
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
Add handling of OMAP_DSS_CHANNEL_WB to dispc_ovl_set_channel_out() and
dispc_ovl_get_channel_out().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 678a1928a9b5..4126d6225faf 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -974,6 +974,10 @@ void dispc_ovl_set_channel_out(enum omap_plane plane, enum omap_channel channel)
return;
}
break;
+ case OMAP_DSS_CHANNEL_WB:
+ chan = 0;
+ chan2 = 3;
+ break;
default:
BUG();
return;
@@ -1023,6 +1027,8 @@ static enum omap_channel dispc_ovl_get_channel_out(enum omap_plane plane)
return OMAP_DSS_CHANNEL_LCD2;
case 2:
return OMAP_DSS_CHANNEL_LCD3;
+ case 3:
+ return OMAP_DSS_CHANNEL_WB;
}
}
--
2.5.0
^ permalink raw reply related
* [PATCH 13/23] OMAPDSS: configure burst size for WB
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
Burst size for all pipelines is set in dispc_configure_burst_sizes(),
but we are missing WB pipe. So add that.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 4126d6225faf..0ebfef9ae07f 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -1057,6 +1057,8 @@ static void dispc_configure_burst_sizes(void)
/* Configure burst size always to maximum size */
for (i = 0; i < dss_feat_get_num_ovls(); ++i)
dispc_ovl_set_burst_size(i, burst_size);
+ if (dispc.feat->has_writeback)
+ dispc_ovl_set_burst_size(OMAP_DSS_WB, burst_size);
}
static u32 dispc_ovl_get_burst_size(enum omap_plane plane)
--
2.5.0
^ permalink raw reply related
* [PATCH 14/23] OMAPDSS: configure WB fifo thresholds
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
Fifo thresholds for all pipelines are set in dispc_init_fifos(), but we
are missing it for WB pipeline. Add that.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 0ebfef9ae07f..22b6e0f3e657 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -1205,6 +1205,17 @@ static void dispc_init_fifos(void)
dispc_ovl_set_fifo_threshold(i, low, high);
}
+
+ if (dispc.feat->has_writeback) {
+ u32 low, high;
+ const bool use_fifomerge = false;
+ const bool manual_update = false;
+
+ dispc_ovl_compute_fifo_thresholds(OMAP_DSS_WB, &low, &high,
+ use_fifomerge, manual_update);
+
+ dispc_ovl_set_fifo_threshold(OMAP_DSS_WB, low, high);
+ }
}
static u32 dispc_ovl_get_fifo_size(enum omap_plane plane)
--
2.5.0
^ permalink raw reply related
* [PATCH 15/23] OMAPDSS: configure WB mflag threshold
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
Mflag thresholds for all pipelines are set in dispc_init_mflag(), but we
are missing that for WB pipeline. Add WB configuration.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 22b6e0f3e657..3cd78dcfefc5 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -1384,6 +1384,25 @@ static void dispc_init_mflag(void)
dispc_ovl_set_mflag_threshold(i, low, high);
}
+
+ if (dispc.feat->has_writeback) {
+ u32 size = dispc_ovl_get_fifo_size(OMAP_DSS_WB);
+ u32 unit = dss_feat_get_buffer_size_unit();
+ u32 low, high;
+
+ dispc_ovl_set_mflag(OMAP_DSS_WB, true);
+
+ /*
+ * Simulation team suggests below thesholds:
+ * HT = fifosize * 5 / 8;
+ * LT = fifosize * 4 / 8;
+ */
+
+ low = size * 4 / 8 / unit;
+ high = size * 5 / 8 / unit;
+
+ dispc_ovl_set_mflag_threshold(OMAP_DSS_WB, low, high);
+ }
}
static void dispc_ovl_set_fir(enum omap_plane plane,
--
2.5.0
^ permalink raw reply related
* [PATCH 16/23] OMAPDSS: skip pclk check for WB mem2mem
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
When doing mem-to-mem writeback, there's no pixelclock. However, the
code that calculates scaling factors check that there is a pixel clock.
We can just skip the check when doing mem-to-mem writeback.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 3cd78dcfefc5..837b1f508d79 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -2477,7 +2477,7 @@ static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk,
if (width = out_width && height = out_height)
return 0;
- if (pclk = 0 || mgr_timings->pixelclock = 0) {
+ if (!mem_to_mem && (pclk = 0 || mgr_timings->pixelclock = 0)) {
DSSERR("cannot calculate scaling settings: pclk is zero\n");
return -EINVAL;
}
--
2.5.0
^ permalink raw reply related
* [PATCH 17/23] OMAPDSS: fix rgb-to-yuv color conv coefs
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
The color conversion coefficients for RGB to YUV conversion (used with
writeback) don't result in the correct result. This patch sets the
correct coefficients.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 837b1f508d79..c50bb0124d87 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -713,10 +713,12 @@ static void dispc_setup_color_conv_coef(void)
int i;
int num_ovl = dss_feat_get_num_ovls();
const struct color_conv_coef ctbl_bt601_5_ovl = {
+ /* YUV -> RGB */
298, 409, 0, 298, -208, -100, 298, 0, 517, 0,
};
const struct color_conv_coef ctbl_bt601_5_wb = {
- 66, 112, -38, 129, -94, -74, 25, -18, 112, 0,
+ /* RGB -> YUV */
+ 66, 129, 25, 112, -94, -18, -38, -74, 112, 0,
};
for (i = 1; i < num_ovl; i++)
--
2.5.0
^ permalink raw reply related
* [PATCH 18/23] OMAPDSS: set WB capturemode for m2m mode
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
In mem-to-mem mode WB CAPTUREMODE needs to be set to 1 (capture one
frame).
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index c50bb0124d87..6018518c1b25 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -2857,6 +2857,8 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
l = dispc_read_reg(DISPC_OVL_ATTRIBUTES(plane));
l = FLD_MOD(l, truncation, 10, 10); /* TRUNCATIONENABLE */
l = FLD_MOD(l, mem_to_mem, 19, 19); /* WRITEBACKMODE */
+ if (mem_to_mem)
+ l = FLD_MOD(l, 1, 26, 24); /* CAPTUREMODE */
dispc_write_reg(DISPC_OVL_ATTRIBUTES(plane), l);
return r;
--
2.5.0
^ permalink raw reply related
* [PATCH 19/23] OMAPDSS: add setup for WB capture mode in dispc_wb_setup()
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
dispc_wb_setup() handles configuration only for mem-to-mem case. This
patch adds the necessary configuration to handle also display capture
mode.
We need to set CAPTUREMODE to 0 (continuous capture), and WBDELAYCOUNT
according to the vertical timings of the display, so that the WB FIFO
has time to flush before the next frame starts.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index 6018518c1b25..c3ba555737b8 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -2859,8 +2859,23 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi,
l = FLD_MOD(l, mem_to_mem, 19, 19); /* WRITEBACKMODE */
if (mem_to_mem)
l = FLD_MOD(l, 1, 26, 24); /* CAPTUREMODE */
+ else
+ l = FLD_MOD(l, 0, 26, 24); /* CAPTUREMODE */
dispc_write_reg(DISPC_OVL_ATTRIBUTES(plane), l);
+ if (mem_to_mem) {
+ /* WBDELAYCOUNT */
+ REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), 0, 7, 0);
+ } else {
+ int wbdelay;
+
+ wbdelay = min(mgr_timings->vfp + mgr_timings->vsw +
+ mgr_timings->vbp, 255);
+
+ /* WBDELAYCOUNT */
+ REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0);
+ }
+
return r;
}
--
2.5.0
^ permalink raw reply related
* [PATCH 20/23] OMAPDSS: remove extra EXPORT_SYMBOLs
From: Tomi Valkeinen @ 2015-12-09 15:59 UTC (permalink / raw)
To: linux-fbdev
The functions dispc_ovl_set_fifo_threshold and
dispc_ovl_compute_fifo_thresholds are exported, but not declared in
public headers, and thus are not used outside omapdss. So we can remove
the EXPORT_SYMBOL()s.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/omap2/dss/dispc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/video/fbdev/omap2/dss/dispc.c b/drivers/video/fbdev/omap2/dss/dispc.c
index c3ba555737b8..822add50f92e 100644
--- a/drivers/video/fbdev/omap2/dss/dispc.c
+++ b/drivers/video/fbdev/omap2/dss/dispc.c
@@ -1270,7 +1270,6 @@ void dispc_ovl_set_fifo_threshold(enum omap_plane plane, u32 low, u32 high)
plane != OMAP_DSS_WB)
dispc_write_reg(DISPC_OVL_PRELOAD(plane), min(high, 0xfffu));
}
-EXPORT_SYMBOL(dispc_ovl_set_fifo_threshold);
void dispc_enable_fifomerge(bool enable)
{
@@ -1329,7 +1328,6 @@ void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
*fifo_high = total_fifo_size - buf_unit;
}
}
-EXPORT_SYMBOL(dispc_ovl_compute_fifo_thresholds);
static void dispc_ovl_set_mflag(enum omap_plane plane, bool enable)
{
--
2.5.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox