* [PATCH 1/9] sh_mobile_meram: Rename operations to cache_[alloc|free|update]
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
The MERAM operations meram_register, meram_unregister and meram_update
handle LCDC cache. In preparation for "raw" MERAM allocation, rename
them to more appropriate names.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_lcdcfb.c | 32 +++----
drivers/video/sh_mobile_lcdcfb.h | 2 +-
drivers/video/sh_mobile_meram.c | 176 ++++++++++++++++++-------------------
include/video/sh_mobile_meram.h | 21 ++---
4 files changed, 110 insertions(+), 121 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 98e81b3..e593e81 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1104,7 +1104,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
/* Compute frame buffer base address and pitch for each channel. */
for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
int pixelformat;
- void *meram;
+ void *cache;
ch = &priv->ch[k];
if (!ch->enabled)
@@ -1119,12 +1119,10 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
ch->cfg->meram_cfg = NULL)
continue;
- /* we need to de-init configured ICBs before we can
- * re-initialize them.
- */
- if (ch->meram) {
- mdev->ops->meram_unregister(mdev, ch->meram);
- ch->meram = NULL;
+ /* Free the allocated MERAM cache. */
+ if (ch->cache) {
+ mdev->ops->cache_free(mdev, ch->cache);
+ ch->cache = NULL;
}
switch (ch->format->fourcc) {
@@ -1146,14 +1144,14 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
break;
}
- meram = mdev->ops->meram_register(mdev, ch->cfg->meram_cfg,
+ cache = mdev->ops->cache_alloc(mdev, ch->cfg->meram_cfg,
ch->pitch, ch->yres, pixelformat,
&ch->line_size);
- if (!IS_ERR(meram)) {
- mdev->ops->meram_update(mdev, meram,
+ if (!IS_ERR(cache)) {
+ mdev->ops->cache_update(mdev, cache,
ch->base_addr_y, ch->base_addr_c,
&ch->base_addr_y, &ch->base_addr_c);
- ch->meram = meram;
+ ch->cache = cache;
}
}
@@ -1223,12 +1221,12 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
sh_mobile_lcdc_display_off(ch);
- /* disable the meram */
- if (ch->meram) {
+ /* Free the MERAM cache. */
+ if (ch->cache) {
struct sh_mobile_meram_info *mdev;
mdev = priv->meram_dev;
- mdev->ops->meram_unregister(mdev, ch->meram);
- ch->meram = 0;
+ mdev->ops->cache_free(mdev, ch->cache);
+ ch->cache = 0;
}
}
@@ -1839,11 +1837,11 @@ static int sh_mobile_lcdc_pan(struct fb_var_screeninfo *var,
base_addr_c += var->xoffset;
}
- if (ch->meram) {
+ if (ch->cache) {
struct sh_mobile_meram_info *mdev;
mdev = priv->meram_dev;
- mdev->ops->meram_update(mdev, ch->meram,
+ mdev->ops->cache_update(mdev, ch->cache,
base_addr_y, base_addr_c,
&base_addr_y, &base_addr_c);
}
diff --git a/drivers/video/sh_mobile_lcdcfb.h b/drivers/video/sh_mobile_lcdcfb.h
index 5c3bddd..e53cd11 100644
--- a/drivers/video/sh_mobile_lcdcfb.h
+++ b/drivers/video/sh_mobile_lcdcfb.h
@@ -59,7 +59,7 @@ struct sh_mobile_lcdc_chan {
unsigned long *reg_offs;
unsigned long ldmt1r_value;
unsigned long enabled; /* ME and SE in LDCNT2R */
- void *meram;
+ void *cache;
struct mutex open_lock; /* protects the use counter */
int use_count;
diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c
index 82ba830..4aa3fcb 100644
--- a/drivers/video/sh_mobile_meram.c
+++ b/drivers/video/sh_mobile_meram.c
@@ -194,13 +194,13 @@ static inline unsigned long meram_read_reg(void __iomem *base, unsigned int off)
}
/* -----------------------------------------------------------------------------
- * Allocation
+ * LCDC cache planes allocation, init, cleanup and free
*/
/* Allocate ICBs and MERAM for a plane. */
-static int __meram_alloc(struct sh_mobile_meram_priv *priv,
- struct sh_mobile_meram_fb_plane *plane,
- size_t size)
+static int meram_plane_alloc(struct sh_mobile_meram_priv *priv,
+ struct sh_mobile_meram_fb_plane *plane,
+ size_t size)
{
unsigned long mem;
unsigned long idx;
@@ -229,8 +229,8 @@ static int __meram_alloc(struct sh_mobile_meram_priv *priv,
}
/* Free ICBs and MERAM for a plane. */
-static void __meram_free(struct sh_mobile_meram_priv *priv,
- struct sh_mobile_meram_fb_plane *plane)
+static void meram_plane_free(struct sh_mobile_meram_priv *priv,
+ struct sh_mobile_meram_fb_plane *plane)
{
gen_pool_free(priv->pool, priv->meram + plane->marker->offset,
plane->marker->size * 1024);
@@ -248,62 +248,6 @@ static int is_nvcolor(int cspace)
return 0;
}
-/* Allocate memory for the ICBs and mark them as used. */
-static struct sh_mobile_meram_fb_cache *
-meram_alloc(struct sh_mobile_meram_priv *priv,
- const struct sh_mobile_meram_cfg *cfg,
- int pixelformat)
-{
- struct sh_mobile_meram_fb_cache *cache;
- unsigned int nplanes = is_nvcolor(pixelformat) ? 2 : 1;
- int ret;
-
- if (cfg->icb[0].meram_size = 0)
- return ERR_PTR(-EINVAL);
-
- if (nplanes = 2 && cfg->icb[1].meram_size = 0)
- return ERR_PTR(-EINVAL);
-
- cache = kzalloc(sizeof(*cache), GFP_KERNEL);
- if (cache = NULL)
- return ERR_PTR(-ENOMEM);
-
- cache->nplanes = nplanes;
-
- ret = __meram_alloc(priv, &cache->planes[0], cfg->icb[0].meram_size);
- if (ret < 0)
- goto error;
-
- cache->planes[0].marker->current_reg = 1;
- cache->planes[0].marker->pixelformat = pixelformat;
-
- if (cache->nplanes = 1)
- return cache;
-
- ret = __meram_alloc(priv, &cache->planes[1], cfg->icb[1].meram_size);
- if (ret < 0) {
- __meram_free(priv, &cache->planes[0]);
- goto error;
- }
-
- return cache;
-
-error:
- kfree(cache);
- return ERR_PTR(-ENOMEM);
-}
-
-/* Unmark the specified ICB as used. */
-static void meram_free(struct sh_mobile_meram_priv *priv,
- struct sh_mobile_meram_fb_cache *cache)
-{
- __meram_free(priv, &cache->planes[0]);
- if (cache->nplanes = 2)
- __meram_free(priv, &cache->planes[1]);
-
- kfree(cache);
-}
-
/* Set the next address to fetch. */
static void meram_set_next_addr(struct sh_mobile_meram_priv *priv,
struct sh_mobile_meram_fb_cache *cache,
@@ -355,10 +299,10 @@ meram_get_next_icb_addr(struct sh_mobile_meram_info *pdata,
(((x) * (y) + (MERAM_LINE_WIDTH - 1)) & ~(MERAM_LINE_WIDTH - 1))
/* Initialize MERAM. */
-static int meram_init(struct sh_mobile_meram_priv *priv,
- struct sh_mobile_meram_fb_plane *plane,
- unsigned int xres, unsigned int yres,
- unsigned int *out_pitch)
+static int meram_plane_init(struct sh_mobile_meram_priv *priv,
+ struct sh_mobile_meram_fb_plane *plane,
+ unsigned int xres, unsigned int yres,
+ unsigned int *out_pitch)
{
struct sh_mobile_meram_icb *marker = plane->marker;
unsigned long total_byte_count = MERAM_CALC_BYTECOUNT(xres, yres);
@@ -427,8 +371,8 @@ static int meram_init(struct sh_mobile_meram_priv *priv,
return 0;
}
-static void meram_deinit(struct sh_mobile_meram_priv *priv,
- struct sh_mobile_meram_fb_plane *plane)
+static void meram_plane_cleanup(struct sh_mobile_meram_priv *priv,
+ struct sh_mobile_meram_fb_plane *plane)
{
/* disable ICB */
meram_write_icb(priv->base, plane->cache->index, MExxCTL,
@@ -441,18 +385,60 @@ static void meram_deinit(struct sh_mobile_meram_priv *priv,
}
/* -----------------------------------------------------------------------------
- * Registration/unregistration
+ * LCDC cache operations
*/
-static void *sh_mobile_meram_register(struct sh_mobile_meram_info *pdata,
- const struct sh_mobile_meram_cfg *cfg,
- unsigned int xres, unsigned int yres,
- unsigned int pixelformat,
- unsigned int *pitch)
+/* Allocate memory for the ICBs and mark them as used. */
+static struct sh_mobile_meram_fb_cache *
+meram_cache_alloc(struct sh_mobile_meram_priv *priv,
+ const struct sh_mobile_meram_cfg *cfg,
+ int pixelformat)
+{
+ unsigned int nplanes = is_nvcolor(pixelformat) ? 2 : 1;
+ struct sh_mobile_meram_fb_cache *cache;
+ int ret;
+
+ cache = kzalloc(sizeof(*cache), GFP_KERNEL);
+ if (cache = NULL)
+ return ERR_PTR(-ENOMEM);
+
+ cache->nplanes = nplanes;
+
+ ret = meram_plane_alloc(priv, &cache->planes[0],
+ cfg->icb[0].meram_size);
+ if (ret < 0)
+ goto error;
+
+ cache->planes[0].marker->current_reg = 1;
+ cache->planes[0].marker->pixelformat = pixelformat;
+
+ if (cache->nplanes = 1)
+ return cache;
+
+ ret = meram_plane_alloc(priv, &cache->planes[1],
+ cfg->icb[1].meram_size);
+ if (ret < 0) {
+ meram_plane_free(priv, &cache->planes[0]);
+ goto error;
+ }
+
+ return cache;
+
+error:
+ kfree(cache);
+ return ERR_PTR(-ENOMEM);
+}
+
+static void *sh_mobile_cache_alloc(struct sh_mobile_meram_info *pdata,
+ const struct sh_mobile_meram_cfg *cfg,
+ unsigned int xres, unsigned int yres,
+ unsigned int pixelformat,
+ unsigned int *pitch)
{
struct sh_mobile_meram_fb_cache *cache;
struct sh_mobile_meram_priv *priv = pdata->priv;
struct platform_device *pdev = pdata->pdev;
+ unsigned int nplanes = is_nvcolor(pixelformat) ? 2 : 1;
unsigned int out_pitch;
if (pixelformat != SH_MOBILE_MERAM_PF_NV &&
@@ -469,10 +455,16 @@ static void *sh_mobile_meram_register(struct sh_mobile_meram_info *pdata,
return ERR_PTR(-EINVAL);
}
+ if (cfg->icb[0].meram_size = 0)
+ return ERR_PTR(-EINVAL);
+
+ if (nplanes = 2 && cfg->icb[1].meram_size = 0)
+ return ERR_PTR(-EINVAL);
+
mutex_lock(&priv->lock);
/* We now register the ICBs and allocate the MERAM regions. */
- cache = meram_alloc(priv, cfg, pixelformat);
+ cache = meram_cache_alloc(priv, cfg, pixelformat);
if (IS_ERR(cache)) {
dev_err(&pdev->dev, "MERAM allocation failed (%ld).",
PTR_ERR(cache));
@@ -480,14 +472,14 @@ static void *sh_mobile_meram_register(struct sh_mobile_meram_info *pdata,
}
/* initialize MERAM */
- meram_init(priv, &cache->planes[0], xres, yres, &out_pitch);
+ meram_plane_init(priv, &cache->planes[0], xres, yres, &out_pitch);
*pitch = out_pitch;
if (pixelformat = SH_MOBILE_MERAM_PF_NV)
- meram_init(priv, &cache->planes[1], xres, (yres + 1) / 2,
- &out_pitch);
+ meram_plane_init(priv, &cache->planes[1],
+ xres, (yres + 1) / 2, &out_pitch);
else if (pixelformat = SH_MOBILE_MERAM_PF_NV24)
- meram_init(priv, &cache->planes[1], 2 * xres, (yres + 1) / 2,
- &out_pitch);
+ meram_plane_init(priv, &cache->planes[1],
+ 2 * xres, (yres + 1) / 2, &out_pitch);
err:
mutex_unlock(&priv->lock);
@@ -495,25 +487,29 @@ err:
}
static void
-sh_mobile_meram_unregister(struct sh_mobile_meram_info *pdata, void *data)
+sh_mobile_cache_free(struct sh_mobile_meram_info *pdata, void *data)
{
struct sh_mobile_meram_fb_cache *cache = data;
struct sh_mobile_meram_priv *priv = pdata->priv;
mutex_lock(&priv->lock);
- /* deinit & free */
- meram_deinit(priv, &cache->planes[0]);
- if (cache->nplanes = 2)
- meram_deinit(priv, &cache->planes[1]);
+ /* Cleanup and free. */
+ meram_plane_cleanup(priv, &cache->planes[0]);
+ meram_plane_free(priv, &cache->planes[0]);
- meram_free(priv, cache);
+ if (cache->nplanes = 2) {
+ meram_plane_cleanup(priv, &cache->planes[1]);
+ meram_plane_free(priv, &cache->planes[1]);
+ }
+
+ kfree(cache);
mutex_unlock(&priv->lock);
}
static void
-sh_mobile_meram_update(struct sh_mobile_meram_info *pdata, void *data,
+sh_mobile_cache_update(struct sh_mobile_meram_info *pdata, void *data,
unsigned long base_addr_y, unsigned long base_addr_c,
unsigned long *icb_addr_y, unsigned long *icb_addr_c)
{
@@ -530,9 +526,9 @@ sh_mobile_meram_update(struct sh_mobile_meram_info *pdata, void *data,
static struct sh_mobile_meram_ops sh_mobile_meram_ops = {
.module = THIS_MODULE,
- .meram_register = sh_mobile_meram_register,
- .meram_unregister = sh_mobile_meram_unregister,
- .meram_update = sh_mobile_meram_update,
+ .cache_alloc = sh_mobile_cache_alloc,
+ .cache_free = sh_mobile_cache_free,
+ .cache_update = sh_mobile_cache_update,
};
/* -----------------------------------------------------------------------------
diff --git a/include/video/sh_mobile_meram.h b/include/video/sh_mobile_meram.h
index 29b2fd3..8a5afaf 100644
--- a/include/video/sh_mobile_meram.h
+++ b/include/video/sh_mobile_meram.h
@@ -41,19 +41,14 @@ struct sh_mobile_meram_cfg {
struct module;
struct sh_mobile_meram_ops {
struct module *module;
- /* register usage of meram */
- void *(*meram_register)(struct sh_mobile_meram_info *meram_dev,
- const struct sh_mobile_meram_cfg *cfg,
- unsigned int xres, unsigned int yres,
- unsigned int pixelformat,
- unsigned int *pitch);
-
- /* unregister usage of meram */
- void (*meram_unregister)(struct sh_mobile_meram_info *meram_dev,
- void *data);
-
- /* update meram settings */
- void (*meram_update)(struct sh_mobile_meram_info *meram_dev, void *data,
+
+ /* LCDC cache management */
+ void *(*cache_alloc)(struct sh_mobile_meram_info *meram_dev,
+ const struct sh_mobile_meram_cfg *cfg,
+ unsigned int xres, unsigned int yres,
+ unsigned int pixelformat, unsigned int *pitch);
+ void (*cache_free)(struct sh_mobile_meram_info *meram_dev, void *data);
+ void (*cache_update)(struct sh_mobile_meram_info *meram_dev, void *data,
unsigned long base_addr_y,
unsigned long base_addr_c,
unsigned long *icb_addr_y,
--
1.7.8.6
^ permalink raw reply related
* [PATCH 2/9] sh_mobile_meram: Use direct function calls for the public API
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
There's no reason to use abstract operation pointers to implement the
MERAM API. Replace them by direct function calls.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_lcdcfb.c | 27 +++++++-------------
drivers/video/sh_mobile_meram.c | 40 +++++++++++++++---------------
include/video/sh_mobile_meram.h | 50 ++++++++++++++++++++++++++-----------
3 files changed, 65 insertions(+), 52 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index e593e81..9da4b1b6 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1115,13 +1115,12 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
ch->line_size = ch->pitch;
/* Enable MERAM if possible. */
- if (mdev = NULL || mdev->ops = NULL ||
- ch->cfg->meram_cfg = NULL)
+ if (mdev = NULL || ch->cfg->meram_cfg = NULL)
continue;
/* Free the allocated MERAM cache. */
if (ch->cache) {
- mdev->ops->cache_free(mdev, ch->cache);
+ sh_mobile_meram_cache_free(mdev, ch->cache);
ch->cache = NULL;
}
@@ -1144,11 +1143,11 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
break;
}
- cache = mdev->ops->cache_alloc(mdev, ch->cfg->meram_cfg,
+ cache = sh_mobile_meram_cache_alloc(mdev, ch->cfg->meram_cfg,
ch->pitch, ch->yres, pixelformat,
&ch->line_size);
if (!IS_ERR(cache)) {
- mdev->ops->cache_update(mdev, cache,
+ sh_mobile_meram_cache_update(mdev, cache,
ch->base_addr_y, ch->base_addr_c,
&ch->base_addr_y, &ch->base_addr_c);
ch->cache = cache;
@@ -1223,9 +1222,7 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
/* Free the MERAM cache. */
if (ch->cache) {
- struct sh_mobile_meram_info *mdev;
- mdev = priv->meram_dev;
- mdev->ops->cache_free(mdev, ch->cache);
+ sh_mobile_meram_cache_free(priv->meram_dev, ch->cache);
ch->cache = 0;
}
@@ -1808,7 +1805,7 @@ static int sh_mobile_lcdc_pan(struct fb_var_screeninfo *var,
struct sh_mobile_lcdc_priv *priv = ch->lcdc;
unsigned long ldrcntr;
unsigned long new_pan_offset;
- unsigned long base_addr_y, base_addr_c;
+ unsigned long base_addr_y, base_addr_c = 0;
unsigned long c_offset;
if (!ch->format->yuv)
@@ -1837,14 +1834,10 @@ static int sh_mobile_lcdc_pan(struct fb_var_screeninfo *var,
base_addr_c += var->xoffset;
}
- if (ch->cache) {
- struct sh_mobile_meram_info *mdev;
-
- mdev = priv->meram_dev;
- mdev->ops->cache_update(mdev, ch->cache,
- base_addr_y, base_addr_c,
- &base_addr_y, &base_addr_c);
- }
+ if (ch->cache)
+ sh_mobile_meram_cache_update(priv->meram_dev, ch->cache,
+ base_addr_y, base_addr_c,
+ &base_addr_y, &base_addr_c);
ch->base_addr_y = base_addr_y;
ch->base_addr_c = base_addr_c;
diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c
index 4aa3fcb..fdb6fc1 100644
--- a/drivers/video/sh_mobile_meram.c
+++ b/drivers/video/sh_mobile_meram.c
@@ -11,6 +11,7 @@
#include <linux/device.h>
#include <linux/err.h>
+#include <linux/export.h>
#include <linux/genalloc.h>
#include <linux/io.h>
#include <linux/kernel.h>
@@ -429,11 +430,10 @@ error:
return ERR_PTR(-ENOMEM);
}
-static void *sh_mobile_cache_alloc(struct sh_mobile_meram_info *pdata,
- const struct sh_mobile_meram_cfg *cfg,
- unsigned int xres, unsigned int yres,
- unsigned int pixelformat,
- unsigned int *pitch)
+void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *pdata,
+ const struct sh_mobile_meram_cfg *cfg,
+ unsigned int xres, unsigned int yres,
+ unsigned int pixelformat, unsigned int *pitch)
{
struct sh_mobile_meram_fb_cache *cache;
struct sh_mobile_meram_priv *priv = pdata->priv;
@@ -441,6 +441,9 @@ static void *sh_mobile_cache_alloc(struct sh_mobile_meram_info *pdata,
unsigned int nplanes = is_nvcolor(pixelformat) ? 2 : 1;
unsigned int out_pitch;
+ if (priv = NULL)
+ return ERR_PTR(-ENODEV);
+
if (pixelformat != SH_MOBILE_MERAM_PF_NV &&
pixelformat != SH_MOBILE_MERAM_PF_NV24 &&
pixelformat != SH_MOBILE_MERAM_PF_RGB)
@@ -485,9 +488,10 @@ err:
mutex_unlock(&priv->lock);
return cache;
}
+EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_alloc);
-static void
-sh_mobile_cache_free(struct sh_mobile_meram_info *pdata, void *data)
+void
+sh_mobile_meram_cache_free(struct sh_mobile_meram_info *pdata, void *data)
{
struct sh_mobile_meram_fb_cache *cache = data;
struct sh_mobile_meram_priv *priv = pdata->priv;
@@ -507,11 +511,14 @@ sh_mobile_cache_free(struct sh_mobile_meram_info *pdata, void *data)
mutex_unlock(&priv->lock);
}
-
-static void
-sh_mobile_cache_update(struct sh_mobile_meram_info *pdata, void *data,
- unsigned long base_addr_y, unsigned long base_addr_c,
- unsigned long *icb_addr_y, unsigned long *icb_addr_c)
+EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_free);
+
+void
+sh_mobile_meram_cache_update(struct sh_mobile_meram_info *pdata, void *data,
+ unsigned long base_addr_y,
+ unsigned long base_addr_c,
+ unsigned long *icb_addr_y,
+ unsigned long *icb_addr_c)
{
struct sh_mobile_meram_fb_cache *cache = data;
struct sh_mobile_meram_priv *priv = pdata->priv;
@@ -523,13 +530,7 @@ sh_mobile_cache_update(struct sh_mobile_meram_info *pdata, void *data,
mutex_unlock(&priv->lock);
}
-
-static struct sh_mobile_meram_ops sh_mobile_meram_ops = {
- .module = THIS_MODULE,
- .cache_alloc = sh_mobile_cache_alloc,
- .cache_free = sh_mobile_cache_free,
- .cache_update = sh_mobile_cache_update,
-};
+EXPORT_SYMBOL_GPL(sh_mobile_meram_cache_update);
/* -----------------------------------------------------------------------------
* Power management
@@ -620,7 +621,6 @@ static int __devinit sh_mobile_meram_probe(struct platform_device *pdev)
for (i = 0; i < MERAM_ICB_NUM; ++i)
priv->icbs[i].index = i;
- pdata->ops = &sh_mobile_meram_ops;
pdata->priv = priv;
pdata->pdev = pdev;
diff --git a/include/video/sh_mobile_meram.h b/include/video/sh_mobile_meram.h
index 8a5afaf..1134837 100644
--- a/include/video/sh_mobile_meram.h
+++ b/include/video/sh_mobile_meram.h
@@ -15,7 +15,6 @@ enum {
struct sh_mobile_meram_priv;
-struct sh_mobile_meram_ops;
/*
* struct sh_mobile_meram_info - MERAM platform data
@@ -24,7 +23,6 @@ struct sh_mobile_meram_ops;
struct sh_mobile_meram_info {
int addr_mode;
u32 reserved_icbs;
- struct sh_mobile_meram_ops *ops;
struct sh_mobile_meram_priv *priv;
struct platform_device *pdev;
};
@@ -38,21 +36,43 @@ struct sh_mobile_meram_cfg {
struct sh_mobile_meram_icb_cfg icb[2];
};
-struct module;
-struct sh_mobile_meram_ops {
- struct module *module;
-
- /* LCDC cache management */
- void *(*cache_alloc)(struct sh_mobile_meram_info *meram_dev,
- const struct sh_mobile_meram_cfg *cfg,
- unsigned int xres, unsigned int yres,
- unsigned int pixelformat, unsigned int *pitch);
- void (*cache_free)(struct sh_mobile_meram_info *meram_dev, void *data);
- void (*cache_update)(struct sh_mobile_meram_info *meram_dev, void *data,
+#if defined(CONFIG_FB_SH_MOBILE_MERAM) || \
+ defined(CONFIG_FB_SH_MOBILE_MERAM_MODULE)
+void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
+ const struct sh_mobile_meram_cfg *cfg,
+ unsigned int xres, unsigned int yres,
+ unsigned int pixelformat,
+ unsigned int *pitch);
+void sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data);
+void sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data,
+ unsigned long base_addr_y,
+ unsigned long base_addr_c,
+ unsigned long *icb_addr_y,
+ unsigned long *icb_addr_c);
+#else
+static inline void *
+sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
+ const struct sh_mobile_meram_cfg *cfg,
+ unsigned int xres, unsigned int yres,
+ unsigned int pixelformat,
+ unsigned int *pitch)
+{
+ return ERR_PTR(-ENODEV);
+}
+
+static inline void
+sh_mobile_meram_cache_free(struct sh_mobile_meram_info *dev, void *data)
+{
+}
+
+static inline void
+sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data,
unsigned long base_addr_y,
unsigned long base_addr_c,
unsigned long *icb_addr_y,
- unsigned long *icb_addr_c);
-};
+ unsigned long *icb_addr_c)
+{
+}
+#endif
#endif /* __VIDEO_SH_MOBILE_MERAM_H__ */
--
1.7.8.6
^ permalink raw reply related
* [PATCH 3/9] sh_mobile_meram: Add direct MERAM allocation API
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
The API can be used to allocate and free MERAM blocks directly, without
going through ICBs.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_meram.c | 41 +++++++++++++++++++++++++++++++++++---
include/video/sh_mobile_meram.h | 16 +++++++++++++++
2 files changed, 53 insertions(+), 4 deletions(-)
diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c
index fdb6fc1..7a0ba8b 100644
--- a/drivers/video/sh_mobile_meram.c
+++ b/drivers/video/sh_mobile_meram.c
@@ -195,6 +195,21 @@ static inline unsigned long meram_read_reg(void __iomem *base, unsigned int off)
}
/* -----------------------------------------------------------------------------
+ * MERAM allocation and free
+ */
+
+static unsigned long meram_alloc(struct sh_mobile_meram_priv *priv, size_t size)
+{
+ return gen_pool_alloc(priv->pool, size);
+}
+
+static void meram_free(struct sh_mobile_meram_priv *priv, unsigned long mem,
+ size_t size)
+{
+ gen_pool_free(priv->pool, mem, size);
+}
+
+/* -----------------------------------------------------------------------------
* LCDC cache planes allocation, init, cleanup and free
*/
@@ -216,7 +231,7 @@ static int meram_plane_alloc(struct sh_mobile_meram_priv *priv,
return -ENOMEM;
plane->marker = &priv->icbs[idx];
- mem = gen_pool_alloc(priv->pool, size * 1024);
+ mem = meram_alloc(priv, size * 1024);
if (mem = 0)
return -ENOMEM;
@@ -233,8 +248,8 @@ static int meram_plane_alloc(struct sh_mobile_meram_priv *priv,
static void meram_plane_free(struct sh_mobile_meram_priv *priv,
struct sh_mobile_meram_fb_plane *plane)
{
- gen_pool_free(priv->pool, priv->meram + plane->marker->offset,
- plane->marker->size * 1024);
+ meram_free(priv, priv->meram + plane->marker->offset,
+ plane->marker->size * 1024);
__clear_bit(plane->marker->index, &priv->used_icb);
__clear_bit(plane->cache->index, &priv->used_icb);
@@ -386,9 +401,27 @@ static void meram_plane_cleanup(struct sh_mobile_meram_priv *priv,
}
/* -----------------------------------------------------------------------------
- * LCDC cache operations
+ * MERAM operations
*/
+unsigned long sh_mobile_meram_alloc(struct sh_mobile_meram_info *pdata,
+ size_t size)
+{
+ struct sh_mobile_meram_priv *priv = pdata->priv;
+
+ return meram_alloc(priv, size);
+}
+EXPORT_SYMBOL_GPL(sh_mobile_meram_alloc);
+
+void sh_mobile_meram_free(struct sh_mobile_meram_info *pdata, unsigned long mem,
+ size_t size)
+{
+ struct sh_mobile_meram_priv *priv = pdata->priv;
+
+ meram_free(priv, mem, size);
+}
+EXPORT_SYMBOL_GPL(sh_mobile_meram_free);
+
/* Allocate memory for the ICBs and mark them as used. */
static struct sh_mobile_meram_fb_cache *
meram_cache_alloc(struct sh_mobile_meram_priv *priv,
diff --git a/include/video/sh_mobile_meram.h b/include/video/sh_mobile_meram.h
index 1134837..062e6e7 100644
--- a/include/video/sh_mobile_meram.h
+++ b/include/video/sh_mobile_meram.h
@@ -38,6 +38,10 @@ struct sh_mobile_meram_cfg {
#if defined(CONFIG_FB_SH_MOBILE_MERAM) || \
defined(CONFIG_FB_SH_MOBILE_MERAM_MODULE)
+unsigned long sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev,
+ size_t size);
+void sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev,
+ unsigned long mem, size_t size);
void *sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
const struct sh_mobile_meram_cfg *cfg,
unsigned int xres, unsigned int yres,
@@ -50,6 +54,18 @@ void sh_mobile_meram_cache_update(struct sh_mobile_meram_info *dev, void *data,
unsigned long *icb_addr_y,
unsigned long *icb_addr_c);
#else
+static inline unsigned long
+sh_mobile_meram_alloc(struct sh_mobile_meram_info *meram_dev, size_t size)
+{
+ return 0;
+}
+
+static inline void
+sh_mobile_meram_free(struct sh_mobile_meram_info *meram_dev,
+ unsigned long mem, size_t size)
+{
+}
+
static inline void *
sh_mobile_meram_cache_alloc(struct sh_mobile_meram_info *dev,
const struct sh_mobile_meram_cfg *cfg,
--
1.7.8.6
^ permalink raw reply related
* [PATCH 4/9] fbdev: sh_mobile_lcdc: Destroy mutex at remove time
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
Add a missing mutex_destroy() call when the driver is unbound from the
device.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_lcdcfb.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 9da4b1b6..644c230 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -2444,8 +2444,11 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
}
for (i = 0; i < ARRAY_SIZE(priv->ch); i++) {
- if (priv->ch[i].bl)
- sh_mobile_lcdc_bl_remove(priv->ch[i].bl);
+ struct sh_mobile_lcdc_chan *ch = &priv->ch[i];
+
+ if (ch->bl)
+ sh_mobile_lcdc_bl_remove(ch->bl);
+ mutex_destroy(&ch->open_lock);
}
if (priv->dot_clk) {
--
1.7.8.6
^ permalink raw reply related
* [PATCH 5/9] fbdev: sh_mobile_lcdc: Fix line pitch computation
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
Line pitch depends on the virtual horizontal resolution, compute it
accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_lcdcfb.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 644c230..67877cc 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1580,9 +1580,9 @@ static int sh_mobile_lcdc_overlay_set_par(struct fb_info *info)
ovl->yres_virtual = info->var.yres_virtual;
if (ovl->format->yuv)
- ovl->pitch = info->var.xres;
+ ovl->pitch = info->var.xres_virtual;
else
- ovl->pitch = info->var.xres * ovl->format->bpp / 8;
+ ovl->pitch = info->var.xres_virtual * ovl->format->bpp / 8;
sh_mobile_lcdc_overlay_setup(ovl);
@@ -2024,9 +2024,9 @@ static int sh_mobile_lcdc_set_par(struct fb_info *info)
ch->yres_virtual = info->var.yres_virtual;
if (ch->format->yuv)
- ch->pitch = info->var.xres;
+ ch->pitch = info->var.xres_virtual;
else
- ch->pitch = info->var.xres * ch->format->bpp / 8;
+ ch->pitch = info->var.xres_virtual * ch->format->bpp / 8;
ret = sh_mobile_lcdc_start(ch->lcdc);
if (ret < 0)
@@ -2539,9 +2539,9 @@ sh_mobile_lcdc_overlay_init(struct sh_mobile_lcdc_priv *priv,
ovl->yres_virtual = ovl->yres * 2;
if (!format->yuv)
- ovl->pitch = ovl->xres * format->bpp / 8;
+ ovl->pitch = ovl->xres_virtual * format->bpp / 8;
else
- ovl->pitch = ovl->xres;
+ ovl->pitch = ovl->xres_virtual;
/* Allocate frame buffer memory. */
ovl->fb_size = ovl->cfg->max_xres * ovl->cfg->max_yres
@@ -2628,10 +2628,10 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv,
if (!format->yuv) {
ch->colorspace = V4L2_COLORSPACE_SRGB;
- ch->pitch = ch->xres * format->bpp / 8;
+ ch->pitch = ch->xres_virtual * format->bpp / 8;
} else {
ch->colorspace = V4L2_COLORSPACE_REC709;
- ch->pitch = ch->xres;
+ ch->pitch = ch->xres_virtual;
}
ch->display.width = cfg->panel_cfg.width;
--
1.7.8.6
^ permalink raw reply related
* [PATCH 6/9] fbdev: sh_mobile_lcdc: Use channel configuration to initialize fb device
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
Copy the x and y virtual resolutions from the channel information
instead of recomputing them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_lcdcfb.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 67877cc..68011b5 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -2214,14 +2214,14 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
info->fix.ypanstep = 2;
/* Initialize variable screen information using the first mode as
- * default. The default Y virtual resolution is twice the panel size to
- * allow for double-buffering.
+ * default.
*/
var = &info->var;
fb_videomode_to_var(var, mode);
var->width = ch->cfg->panel_cfg.width;
var->height = ch->cfg->panel_cfg.height;
- var->yres_virtual = var->yres * 2;
+ var->xres_virtual = ch->xres_virtual;
+ var->yres_virtual = ch->yres_virtual;
var->activate = FB_ACTIVATE_NOW;
/* Use the legacy API by default for RGB formats, and the FOURCC API
@@ -2619,7 +2619,9 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv,
num_modes = cfg->num_modes;
}
- /* Use the first mode as default. */
+ /* Use the first mode as default. The default Y virtual resolution is
+ * twice the panel size to allow for double-buffering.
+ */
ch->format = format;
ch->xres = mode->xres;
ch->xres_virtual = mode->xres;
--
1.7.8.6
^ permalink raw reply related
* [PATCH 7/9] fbdev: sh_mobile_lcdc: Support horizontal panning
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_lcdcfb.c | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 68011b5..aeb7585 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1493,7 +1493,7 @@ static const struct fb_fix_screeninfo sh_mobile_lcdc_overlay_fix = {
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR,
.accel = FB_ACCEL_NONE,
- .xpanstep = 0,
+ .xpanstep = 1,
.ypanstep = 1,
.ywrapstep = 0,
.capabilities = FB_CAP_FOURCC,
@@ -1714,9 +1714,14 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
else
info->fix.visual = FB_VISUAL_TRUECOLOR;
- if (ovl->format->fourcc = V4L2_PIX_FMT_NV12 ||
- ovl->format->fourcc = V4L2_PIX_FMT_NV21)
+ switch (ovl->format->fourcc) {
+ case V4L2_PIX_FMT_NV16:
+ case V4L2_PIX_FMT_NV61:
+ info->fix.xpanstep = 2;
+ case V4L2_PIX_FMT_NV12:
+ case V4L2_PIX_FMT_NV21:
info->fix.ypanstep = 2;
+ }
/* Initialize variable screen information. */
var = &info->var;
@@ -1771,7 +1776,7 @@ static const struct fb_fix_screeninfo sh_mobile_lcdc_fix = {
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_TRUECOLOR,
.accel = FB_ACCEL_NONE,
- .xpanstep = 0,
+ .xpanstep = 1,
.ypanstep = 1,
.ywrapstep = 0,
.capabilities = FB_CAP_FOURCC,
@@ -2209,9 +2214,14 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
else
info->fix.visual = FB_VISUAL_TRUECOLOR;
- if (ch->format->fourcc = V4L2_PIX_FMT_NV12 ||
- ch->format->fourcc = V4L2_PIX_FMT_NV21)
+ switch (ch->format->fourcc) {
+ case V4L2_PIX_FMT_NV16:
+ case V4L2_PIX_FMT_NV61:
+ info->fix.xpanstep = 2;
+ case V4L2_PIX_FMT_NV12:
+ case V4L2_PIX_FMT_NV21:
info->fix.ypanstep = 2;
+ }
/* Initialize variable screen information using the first mode as
* default.
--
1.7.8.6
^ permalink raw reply related
* [PATCH 8/9] fbdev: sh_mobile_lcdc: Fix overlay registers update during pan operation
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
Updating overlay registers require switching to overlay update mode.
This was correctly done when configuring the overlay format and size,
but not when updating the base address registers during pan operation.
Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_lcdcfb.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index aeb7585..5c26c44 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -1539,9 +1539,14 @@ static int sh_mobile_lcdc_overlay_pan(struct fb_var_screeninfo *var,
ovl->base_addr_c = base_addr_c;
}
+ lcdc_write(ovl->channel->lcdc, LDBCR, LDBCR_UPC(ovl->index));
+
lcdc_write_overlay(ovl, LDBnBSAYR(ovl->index), ovl->base_addr_y);
lcdc_write_overlay(ovl, LDBnBSACR(ovl->index), ovl->base_addr_c);
+ lcdc_write(ovl->channel->lcdc, LDBCR,
+ LDBCR_UPF(ovl->index) | LDBCR_UPD(ovl->index));
+
ovl->pan_offset = pan_offset;
return 0;
--
1.7.8.6
^ permalink raw reply related
* [PATCH 9/9] fbdev: sh_mobile_lcdc: Fix pan offset computation in YUV mode
From: Laurent Pinchart @ 2012-07-19 0:39 UTC (permalink / raw)
To: linux-fbdev
The chroma plane offset in memory is equal to the luma plane maximum
size. Fix offset computations.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/video/sh_mobile_lcdcfb.c | 110 ++++++++++++++++++--------------------
drivers/video/sh_mobile_lcdcfb.h | 3 +-
2 files changed, 54 insertions(+), 59 deletions(-)
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 5c26c44..1b95822 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -161,7 +161,7 @@ enum sh_mobile_lcdc_overlay_mode {
* @dma_handle: Frame buffer DMA address
* @base_addr_y: Overlay base address (RGB or luma component)
* @base_addr_c: Overlay base address (chroma component)
- * @pan_offset: Current pan offset in bytes
+ * @pan_y_offset: Panning linear offset in bytes (luma component)
* @format: Current pixelf format
* @xres: Horizontal visible resolution
* @xres_virtual: Horizontal total resolution
@@ -191,7 +191,7 @@ struct sh_mobile_lcdc_overlay {
dma_addr_t dma_handle;
unsigned long base_addr_y;
unsigned long base_addr_c;
- unsigned long pan_offset;
+ unsigned long pan_y_offset;
const struct sh_mobile_lcdc_format_info *format;
unsigned int xres;
@@ -873,8 +873,8 @@ static void sh_mobile_lcdc_overlay_setup(struct sh_mobile_lcdc_overlay *ovl)
}
ovl->base_addr_y = ovl->dma_handle;
- ovl->base_addr_c = ovl->base_addr_y + ovl->xres
- * ovl->yres_virtual;
+ ovl->base_addr_c = ovl->dma_handle
+ + ovl->xres_virtual * ovl->yres_virtual;
switch (ovl->mode) {
case LCDC_OVERLAY_BLEND:
@@ -1111,7 +1111,8 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
continue;
ch->base_addr_y = ch->dma_handle;
- ch->base_addr_c = ch->base_addr_y + ch->xres * ch->yres_virtual;
+ ch->base_addr_c = ch->dma_handle
+ + ch->xres_virtual * ch->yres_virtual;
ch->line_size = ch->pitch;
/* Enable MERAM if possible. */
@@ -1505,39 +1506,36 @@ static int sh_mobile_lcdc_overlay_pan(struct fb_var_screeninfo *var,
struct sh_mobile_lcdc_overlay *ovl = info->par;
unsigned long base_addr_y;
unsigned long base_addr_c;
- unsigned long pan_offset;
+ unsigned long y_offset;
unsigned long c_offset;
- if (!ovl->format->yuv)
- pan_offset = var->yoffset * ovl->pitch
- + var->xoffset * (ovl->format->bpp / 8);
- else
- pan_offset = var->yoffset * ovl->pitch + var->xoffset;
+ if (!ovl->format->yuv) {
+ y_offset = (var->yoffset * ovl->xres_virtual + var->xoffset)
+ * ovl->format->bpp / 8;
+ c_offset = 0;
+ } else {
+ unsigned int xsub = ovl->format->bpp < 24 ? 2 : 1;
+ unsigned int ysub = ovl->format->bpp < 16 ? 2 : 1;
+
+ y_offset = var->yoffset * ovl->xres_virtual + var->xoffset;
+ c_offset = var->yoffset / ysub * ovl->xres_virtual * 2 / xsub
+ + var->xoffset * 2 / xsub;
+ }
- if (pan_offset = ovl->pan_offset)
- return 0; /* No change, do nothing */
+ /* If the Y offset hasn't changed, the C offset hasn't either. There's
+ * nothing to do in that case.
+ */
+ if (y_offset = ovl->pan_y_offset)
+ return 0;
/* Set the source address for the next refresh */
- base_addr_y = ovl->dma_handle + pan_offset;
+ base_addr_y = ovl->dma_handle + y_offset;
+ base_addr_c = ovl->dma_handle + ovl->xres_virtual * ovl->yres_virtual
+ + c_offset;
ovl->base_addr_y = base_addr_y;
- ovl->base_addr_c = base_addr_y;
-
- if (ovl->format->yuv) {
- /* Set Y offset */
- c_offset = var->yoffset * ovl->pitch
- * (ovl->format->bpp - 8) / 8;
- base_addr_c = ovl->dma_handle
- + ovl->xres * ovl->yres_virtual
- + c_offset;
- /* Set X offset */
- if (ovl->format->fourcc = V4L2_PIX_FMT_NV24)
- base_addr_c += 2 * var->xoffset;
- else
- base_addr_c += var->xoffset;
-
- ovl->base_addr_c = base_addr_c;
- }
+ ovl->base_addr_c = base_addr_c;
+ ovl->pan_y_offset = y_offset;
lcdc_write(ovl->channel->lcdc, LDBCR, LDBCR_UPC(ovl->index));
@@ -1547,8 +1545,6 @@ static int sh_mobile_lcdc_overlay_pan(struct fb_var_screeninfo *var,
lcdc_write(ovl->channel->lcdc, LDBCR,
LDBCR_UPF(ovl->index) | LDBCR_UPD(ovl->index));
- ovl->pan_offset = pan_offset;
-
return 0;
}
@@ -1814,35 +1810,33 @@ static int sh_mobile_lcdc_pan(struct fb_var_screeninfo *var,
struct sh_mobile_lcdc_chan *ch = info->par;
struct sh_mobile_lcdc_priv *priv = ch->lcdc;
unsigned long ldrcntr;
- unsigned long new_pan_offset;
- unsigned long base_addr_y, base_addr_c = 0;
+ unsigned long base_addr_y, base_addr_c;
+ unsigned long y_offset;
unsigned long c_offset;
- if (!ch->format->yuv)
- new_pan_offset = var->yoffset * ch->pitch
- + var->xoffset * (ch->format->bpp / 8);
- else
- new_pan_offset = var->yoffset * ch->pitch + var->xoffset;
+ if (!ch->format->yuv) {
+ y_offset = (var->yoffset * ch->xres_virtual + var->xoffset)
+ * ch->format->bpp / 8;
+ c_offset = 0;
+ } else {
+ unsigned int xsub = ch->format->bpp < 24 ? 2 : 1;
+ unsigned int ysub = ch->format->bpp < 16 ? 2 : 1;
- if (new_pan_offset = ch->pan_offset)
- return 0; /* No change, do nothing */
+ y_offset = var->yoffset * ch->xres_virtual + var->xoffset;
+ c_offset = var->yoffset / ysub * ch->xres_virtual * 2 / xsub
+ + var->xoffset * 2 / xsub;
+ }
- ldrcntr = lcdc_read(priv, _LDRCNTR);
+ /* If the Y offset hasn't changed, the C offset hasn't either. There's
+ * nothing to do in that case.
+ */
+ if (y_offset = ch->pan_y_offset)
+ return 0;
/* Set the source address for the next refresh */
- base_addr_y = ch->dma_handle + new_pan_offset;
- if (ch->format->yuv) {
- /* Set y offset */
- c_offset = var->yoffset * ch->pitch
- * (ch->format->bpp - 8) / 8;
- base_addr_c = ch->dma_handle + ch->xres * ch->yres_virtual
- + c_offset;
- /* Set x offset */
- if (ch->format->fourcc = V4L2_PIX_FMT_NV24)
- base_addr_c += 2 * var->xoffset;
- else
- base_addr_c += var->xoffset;
- }
+ base_addr_y = ch->dma_handle + y_offset;
+ base_addr_c = ch->dma_handle + ch->xres_virtual * ch->yres_virtual
+ + c_offset;
if (ch->cache)
sh_mobile_meram_cache_update(priv->meram_dev, ch->cache,
@@ -1851,17 +1845,18 @@ static int sh_mobile_lcdc_pan(struct fb_var_screeninfo *var,
ch->base_addr_y = base_addr_y;
ch->base_addr_c = base_addr_c;
+ ch->pan_y_offset = y_offset;
lcdc_write_chan_mirror(ch, LDSA1R, base_addr_y);
if (ch->format->yuv)
lcdc_write_chan_mirror(ch, LDSA2R, base_addr_c);
+ ldrcntr = lcdc_read(priv, _LDRCNTR);
if (lcdc_chan_is_sublcd(ch))
lcdc_write(ch->lcdc, _LDRCNTR, ldrcntr ^ LDRCNTR_SRS);
else
lcdc_write(ch->lcdc, _LDRCNTR, ldrcntr ^ LDRCNTR_MRS);
- ch->pan_offset = new_pan_offset;
sh_mobile_lcdc_deferred_io_touch(info);
@@ -2734,7 +2729,6 @@ static int __devinit sh_mobile_lcdc_probe(struct platform_device *pdev)
}
init_waitqueue_head(&ch->frame_end_wait);
init_completion(&ch->vsync_completion);
- ch->pan_offset = 0;
/* probe the backlight is there is one defined */
if (ch->cfg->bl_info.max_brightness)
diff --git a/drivers/video/sh_mobile_lcdcfb.h b/drivers/video/sh_mobile_lcdcfb.h
index e53cd11..0f92f65 100644
--- a/drivers/video/sh_mobile_lcdcfb.h
+++ b/drivers/video/sh_mobile_lcdcfb.h
@@ -47,6 +47,7 @@ struct sh_mobile_lcdc_entity {
/*
* struct sh_mobile_lcdc_chan - LCDC display channel
*
+ * @pan_y_offset: Panning linear offset in bytes (luma component)
* @base_addr_y: Frame buffer viewport base address (luma component)
* @base_addr_c: Frame buffer viewport base address (chroma component)
* @pitch: Frame buffer line pitch
@@ -68,7 +69,7 @@ struct sh_mobile_lcdc_chan {
unsigned long fb_size;
dma_addr_t dma_handle;
- unsigned long pan_offset;
+ unsigned long pan_y_offset;
unsigned long frame_end;
wait_queue_head_t frame_end_wait;
--
1.7.8.6
^ permalink raw reply related
* [PATCH] video: ld9040: support early fb event of fb_blank()
From: Donghwa Lee @ 2012-07-19 0:43 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <500757AE.3010202@samsung.com>
This patch supports early fb event of fb_blank().
- In case of lcd power off : call early_set_power() interface and lcd
power is off. And then framebuffer is blanked.
- In case of lcd power on : First, framebuffer is unblanked, and then
call set_power() interface to turn lcd on.
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/video/backlight/ld9040.c | 36 +++++++++++++++++++++++++++++++++++-
1 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/drivers/video/backlight/ld9040.c b/drivers/video/backlight/ld9040.c
index efd352b..221c843 100644
--- a/drivers/video/backlight/ld9040.c
+++ b/drivers/video/backlight/ld9040.c
@@ -642,17 +642,50 @@ static int ld9040_power(struct ld9040 *lcd, int power)
return ret;
}
+static int ld9040_early_set_power(struct lcd_device *ld, int power)
+{
+ struct ld9040 *lcd = lcd_get_data(ld);
+ int ret = 0;
+
+ if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN &&
+ power != FB_BLANK_NORMAL) {
+ dev_err(lcd->dev, "power value should be 0, 1 or 4.\n");
+
+ return -EINVAL;
+ }
+
+ if (!power_is_on(power) && power_is_on(lcd->power)) {
+ ret = ld9040_power(lcd, power);
+ if (!ret)
+ lcd->power = power;
+ }
+
+ return ret;
+}
+
static int ld9040_set_power(struct lcd_device *ld, int power)
{
struct ld9040 *lcd = lcd_get_data(ld);
+ struct backlight_device *bd = lcd->bd;
+ int ret = 0;
if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN &&
power != FB_BLANK_NORMAL) {
dev_err(lcd->dev, "power value should be 0, 1 or 4.\n");
+
return -EINVAL;
}
- return ld9040_power(lcd, power);
+ if (power_is_on(power) && !power_is_on(lcd->power)) {
+ ret = ld9040_power(lcd, power);
+ if (!ret)
+ lcd->power = power;
+
+ ld9040_gamma_ctl(lcd, bd->props.brightness);
+ } else
+ ld9040_early_set_power(ld, power);
+
+ return ret;
}
static int ld9040_get_power(struct lcd_device *ld)
@@ -689,6 +722,7 @@ static int ld9040_set_brightness(struct backlight_device *bd)
}
static struct lcd_ops ld9040_lcd_ops = {
+ .early_set_power = ld9040_early_set_power,
.set_power = ld9040_set_power,
.get_power = ld9040_get_power,
};
--
1.7.4.1
^ permalink raw reply related
* Re: [PATCH 7/9] fbdev: sh_mobile_lcdc: Support horizontal panning
From: Damian Hobson-Garcia @ 2012-07-19 1:40 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1342658362-19491-8-git-send-email-laurent.pinchart@ideasonboard.com>
Hi Laurent,
On 2012/07/19 9:39, Laurent Pinchart wrote:
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/video/sh_mobile_lcdcfb.c | 22 ++++++++++++++++------
> 1 files changed, 16 insertions(+), 6 deletions(-)
>
> - if (ovl->format->fourcc = V4L2_PIX_FMT_NV12 ||
> - ovl->format->fourcc = V4L2_PIX_FMT_NV21)
> + switch (ovl->format->fourcc) {
> + case V4L2_PIX_FMT_NV16:
> + case V4L2_PIX_FMT_NV61:
> + info->fix.xpanstep = 2;
> + case V4L2_PIX_FMT_NV12:
> + case V4L2_PIX_FMT_NV21:
> info->fix.ypanstep = 2;
> + }
>
> - if (ch->format->fourcc = V4L2_PIX_FMT_NV12 ||
> - ch->format->fourcc = V4L2_PIX_FMT_NV21)
> + switch (ch->format->fourcc) {
> + case V4L2_PIX_FMT_NV16:
> + case V4L2_PIX_FMT_NV61:
> + info->fix.xpanstep = 2;
> + case V4L2_PIX_FMT_NV12:
> + case V4L2_PIX_FMT_NV21:
> info->fix.ypanstep = 2;
> + }
>
I think that the panstep settings are backwards. The pansteps should be
NV16: x = 2, y = 1; NV12: x = 2, y = 2.
Cheers,
--
Damian Hobson-Garcia
IGEL Co.,Ltd
http://www.igel.co.jp
^ permalink raw reply
* [PATCH] video: exynos_dp: adjust voltage swing and pre-emphasis during Link Training
From: Jingoo Han @ 2012-07-19 4:52 UTC (permalink / raw)
To: linux-fbdev
This patch adds adjustement for voltage swing and pre-emphasis during
Link Training procedure. According to the DP specification, unless all
the LANEx_CR_DONE bits are set, the transmitter must read
the ADJUST_REQUEST_LANEx_x, increase the voltage swing according to
the request, and update the TRAINING_LANEx_SET bytes to match the new
voltage swing setting.
Refer to the DP specification v1.1a, Section 3.5.1.3 Link Training.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/video/exynos/exynos_dp_core.c | 282 +++++++++++++++++----------------
drivers/video/exynos/exynos_dp_core.h | 2 +-
2 files changed, 144 insertions(+), 140 deletions(-)
diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
index c6c016a..9c0140f 100644
--- a/drivers/video/exynos/exynos_dp_core.c
+++ b/drivers/video/exynos/exynos_dp_core.c
@@ -260,7 +260,7 @@ static void exynos_dp_set_lane_lane_pre_emphasis(struct exynos_dp_device *dp,
static void exynos_dp_link_start(struct exynos_dp_device *dp)
{
- u8 buf[5];
+ u8 buf[4];
int lane;
int lane_count;
@@ -295,10 +295,10 @@ static void exynos_dp_link_start(struct exynos_dp_device *dp)
exynos_dp_set_training_pattern(dp, TRAINING_PTN1);
/* Set RX training pattern */
- buf[0] = DPCD_SCRAMBLING_DISABLED |
- DPCD_TRAINING_PATTERN_1;
exynos_dp_write_byte_to_dpcd(dp,
- DPCD_ADDR_TRAINING_PATTERN_SET, buf[0]);
+ DPCD_ADDR_TRAINING_PATTERN_SET,
+ DPCD_SCRAMBLING_DISABLED |
+ DPCD_TRAINING_PATTERN_1);
for (lane = 0; lane < lane_count; lane++)
buf[lane] = DPCD_PRE_EMPHASIS_PATTERN2_LEVEL0 |
@@ -308,7 +308,7 @@ static void exynos_dp_link_start(struct exynos_dp_device *dp)
lane_count, buf);
}
-static unsigned char exynos_dp_get_lane_status(u8 link_status[6], int lane)
+static unsigned char exynos_dp_get_lane_status(u8 link_status[2], int lane)
{
int shift = (lane & 1) * 4;
u8 link_value = link_status[lane>>1];
@@ -316,7 +316,7 @@ static unsigned char exynos_dp_get_lane_status(u8 link_status[6], int lane)
return (link_value >> shift) & 0xf;
}
-static int exynos_dp_clock_recovery_ok(u8 link_status[6], int lane_count)
+static int exynos_dp_clock_recovery_ok(u8 link_status[2], int lane_count)
{
int lane;
u8 lane_status;
@@ -329,22 +329,23 @@ static int exynos_dp_clock_recovery_ok(u8 link_status[6], int lane_count)
return 0;
}
-static int exynos_dp_channel_eq_ok(u8 link_status[6], int lane_count)
+static int exynos_dp_channel_eq_ok(u8 link_align[3], int lane_count)
{
int lane;
u8 lane_align;
u8 lane_status;
- lane_align = link_status[2];
+ lane_align = link_align[2];
if ((lane_align & DPCD_INTERLANE_ALIGN_DONE) = 0)
return -EINVAL;
for (lane = 0; lane < lane_count; lane++) {
- lane_status = exynos_dp_get_lane_status(link_status, lane);
+ lane_status = exynos_dp_get_lane_status(link_align, lane);
lane_status &= DPCD_CHANNEL_EQ_BITS;
if (lane_status != DPCD_CHANNEL_EQ_BITS)
return -EINVAL;
}
+
return 0;
}
@@ -417,69 +418,17 @@ static unsigned int exynos_dp_get_lane_link_training(
static void exynos_dp_reduce_link_rate(struct exynos_dp_device *dp)
{
- if (dp->link_train.link_rate = LINK_RATE_2_70GBPS) {
- /* set to reduced bit rate */
- dp->link_train.link_rate = LINK_RATE_1_62GBPS;
- dev_err(dp->dev, "set to bandwidth %.2x\n",
- dp->link_train.link_rate);
- dp->link_train.lt_state = START;
- } else {
- exynos_dp_training_pattern_dis(dp);
- /* set enhanced mode if available */
- exynos_dp_set_enhanced_mode(dp);
- dp->link_train.lt_state = FAILED;
- }
-}
-
-static void exynos_dp_get_adjust_train(struct exynos_dp_device *dp,
- u8 adjust_request[2])
-{
- int lane;
- int lane_count;
- u8 voltage_swing;
- u8 pre_emphasis;
- u8 training_lane;
+ exynos_dp_training_pattern_dis(dp);
+ exynos_dp_set_enhanced_mode(dp);
- lane_count = dp->link_train.lane_count;
- for (lane = 0; lane < lane_count; lane++) {
- voltage_swing = exynos_dp_get_adjust_request_voltage(
- adjust_request, lane);
- pre_emphasis = exynos_dp_get_adjust_request_pre_emphasis(
- adjust_request, lane);
- training_lane = DPCD_VOLTAGE_SWING_SET(voltage_swing) |
- DPCD_PRE_EMPHASIS_SET(pre_emphasis);
-
- if (voltage_swing = VOLTAGE_LEVEL_3 ||
- pre_emphasis = PRE_EMPHASIS_LEVEL_3) {
- training_lane |= DPCD_MAX_SWING_REACHED;
- training_lane |= DPCD_MAX_PRE_EMPHASIS_REACHED;
- }
- dp->link_train.training_lane[lane] = training_lane;
- }
-}
-
-static int exynos_dp_check_max_cr_loop(struct exynos_dp_device *dp,
- u8 voltage_swing)
-{
- int lane;
- int lane_count;
-
- lane_count = dp->link_train.lane_count;
- for (lane = 0; lane < lane_count; lane++) {
- if (voltage_swing = VOLTAGE_LEVEL_3 ||
- dp->link_train.cr_loop[lane] = MAX_CR_LOOP)
- return -EINVAL;
- }
- return 0;
+ dp->link_train.lt_state = FAILED;
}
static int exynos_dp_process_clock_recovery(struct exynos_dp_device *dp)
{
- u8 data;
- u8 link_status[6];
+ u8 link_status[2];
int lane;
int lane_count;
- u8 buf[5];
u8 adjust_request[2];
u8 voltage_swing;
@@ -488,98 +437,152 @@ static int exynos_dp_process_clock_recovery(struct exynos_dp_device *dp)
usleep_range(100, 101);
- exynos_dp_read_bytes_from_dpcd(dp, DPCD_ADDR_LANE0_1_STATUS,
- 6, link_status);
lane_count = dp->link_train.lane_count;
+ exynos_dp_read_bytes_from_dpcd(dp, DPCD_ADDR_LANE0_1_STATUS,
+ 2, link_status);
+
if (exynos_dp_clock_recovery_ok(link_status, lane_count) = 0) {
/* set training pattern 2 for EQ */
exynos_dp_set_training_pattern(dp, TRAINING_PTN2);
- adjust_request[0] = link_status[4];
- adjust_request[1] = link_status[5];
+ for (lane = 0; lane < lane_count; lane++) {
+ exynos_dp_read_bytes_from_dpcd(dp,
+ DPCD_ADDR_ADJUST_REQUEST_LANE0_1,
+ 2, adjust_request);
+ voltage_swing = exynos_dp_get_adjust_request_voltage(
+ adjust_request, lane);
+ pre_emphasis = exynos_dp_get_adjust_request_pre_emphasis(
+ adjust_request, lane);
+ training_lane = DPCD_VOLTAGE_SWING_SET(voltage_swing) |
+ DPCD_PRE_EMPHASIS_SET(pre_emphasis);
- exynos_dp_get_adjust_train(dp, adjust_request);
+ if (voltage_swing = VOLTAGE_LEVEL_3)
+ training_lane |= DPCD_MAX_SWING_REACHED;
+ if (pre_emphasis = PRE_EMPHASIS_LEVEL_3)
+ training_lane |= DPCD_MAX_PRE_EMPHASIS_REACHED;
- buf[0] = DPCD_SCRAMBLING_DISABLED |
- DPCD_TRAINING_PATTERN_2;
- exynos_dp_write_byte_to_dpcd(dp,
- DPCD_ADDR_TRAINING_PATTERN_SET,
- buf[0]);
+ dp->link_train.training_lane[lane] = training_lane;
- for (lane = 0; lane < lane_count; lane++) {
exynos_dp_set_lane_link_training(dp,
dp->link_train.training_lane[lane],
lane);
- buf[lane] = dp->link_train.training_lane[lane];
- exynos_dp_write_byte_to_dpcd(dp,
- DPCD_ADDR_TRAINING_LANE0_SET + lane,
- buf[lane]);
}
- dp->link_train.lt_state = EQUALIZER_TRAINING;
- } else {
- exynos_dp_read_byte_from_dpcd(dp,
- DPCD_ADDR_ADJUST_REQUEST_LANE0_1,
- &data);
- adjust_request[0] = data;
- exynos_dp_read_byte_from_dpcd(dp,
- DPCD_ADDR_ADJUST_REQUEST_LANE2_3,
- &data);
- adjust_request[1] = data;
+ exynos_dp_write_byte_to_dpcd(dp,
+ DPCD_ADDR_TRAINING_PATTERN_SET,
+ DPCD_SCRAMBLING_DISABLED |
+ DPCD_TRAINING_PATTERN_2);
+
+ exynos_dp_write_bytes_to_dpcd(dp,
+ DPCD_ADDR_TRAINING_LANE0_SET,
+ lane_count,
+ dp->link_train.training_lane);
+ dev_info(dp->dev, "Link Training Clock Recovery success\n");
+ dp->link_train.lt_state = EQUALIZER_TRAINING;
+ } else {
for (lane = 0; lane < lane_count; lane++) {
training_lane = exynos_dp_get_lane_link_training(
dp, lane);
+ exynos_dp_read_bytes_from_dpcd(dp,
+ DPCD_ADDR_ADJUST_REQUEST_LANE0_1,
+ 2, adjust_request);
voltage_swing = exynos_dp_get_adjust_request_voltage(
adjust_request, lane);
pre_emphasis = exynos_dp_get_adjust_request_pre_emphasis(
adjust_request, lane);
- if ((DPCD_VOLTAGE_SWING_GET(training_lane) = voltage_swing) &&
- (DPCD_PRE_EMPHASIS_GET(training_lane) = pre_emphasis))
- dp->link_train.cr_loop[lane]++;
- dp->link_train.training_lane[lane] = training_lane;
- }
- if (exynos_dp_check_max_cr_loop(dp, voltage_swing) != 0) {
- exynos_dp_reduce_link_rate(dp);
- } else {
- exynos_dp_get_adjust_train(dp, adjust_request);
+ if (voltage_swing = VOLTAGE_LEVEL_3 ||
+ pre_emphasis = PRE_EMPHASIS_LEVEL_3) {
+ dev_err(dp->dev, "voltage or pre emphasis reached max level\n");
+ goto reduce_link_rate;
+ }
- for (lane = 0; lane < lane_count; lane++) {
- exynos_dp_set_lane_link_training(dp,
- dp->link_train.training_lane[lane],
- lane);
- buf[lane] = dp->link_train.training_lane[lane];
- exynos_dp_write_byte_to_dpcd(dp,
- DPCD_ADDR_TRAINING_LANE0_SET + lane,
- buf[lane]);
+ if ((DPCD_VOLTAGE_SWING_GET(training_lane) =
+ voltage_swing) &&
+ (DPCD_PRE_EMPHASIS_GET(training_lane) =
+ pre_emphasis)) {
+ dp->link_train.cr_loop[lane]++;
+ if (dp->link_train.cr_loop[lane] = MAX_CR_LOOP) {
+ dev_err(dp->dev, "CR Max loop\n");
+ goto reduce_link_rate;
+ }
}
+
+ training_lane = DPCD_VOLTAGE_SWING_SET(voltage_swing) |
+ DPCD_PRE_EMPHASIS_SET(pre_emphasis);
+
+ if (voltage_swing = VOLTAGE_LEVEL_3)
+ training_lane |= DPCD_MAX_SWING_REACHED;
+ if (pre_emphasis = PRE_EMPHASIS_LEVEL_3)
+ training_lane |= DPCD_MAX_PRE_EMPHASIS_REACHED;
+
+ dp->link_train.training_lane[lane] = training_lane;
+
+ exynos_dp_set_lane_link_training(dp,
+ dp->link_train.training_lane[lane], lane);
}
+
+ exynos_dp_write_bytes_to_dpcd(dp,
+ DPCD_ADDR_TRAINING_LANE0_SET,
+ lane_count,
+ dp->link_train.training_lane);
}
return 0;
+
+reduce_link_rate:
+ exynos_dp_reduce_link_rate(dp);
+ return -EIO;
}
static int exynos_dp_process_equalizer_training(struct exynos_dp_device *dp)
{
- u8 link_status[6];
+ u8 link_status[2];
+ u8 link_align[3];
int lane;
int lane_count;
- u8 buf[5];
u32 reg;
u8 adjust_request[2];
+ u8 voltage_swing;
+ u8 pre_emphasis;
+ u8 training_lane;
usleep_range(400, 401);
- exynos_dp_read_bytes_from_dpcd(dp, DPCD_ADDR_LANE0_1_STATUS,
- 6, link_status);
lane_count = dp->link_train.lane_count;
+ exynos_dp_read_bytes_from_dpcd(dp, DPCD_ADDR_LANE0_1_STATUS,
+ 2, link_status);
+
if (exynos_dp_clock_recovery_ok(link_status, lane_count) = 0) {
- adjust_request[0] = link_status[4];
- adjust_request[1] = link_status[5];
+ link_align[0] = link_status[0];
+ link_align[1] = link_status[1];
+
+ exynos_dp_read_byte_from_dpcd(dp,
+ DPCD_ADDR_LANE_ALIGN_STATUS_UPDATED,
+ &link_align[2]);
+
+ for (lane = 0; lane < lane_count; lane++) {
+ exynos_dp_read_bytes_from_dpcd(dp,
+ DPCD_ADDR_ADJUST_REQUEST_LANE0_1,
+ 2, adjust_request);
+ voltage_swing = exynos_dp_get_adjust_request_voltage(
+ adjust_request, lane);
+ pre_emphasis = exynos_dp_get_adjust_request_pre_emphasis(
+ adjust_request, lane);
+ training_lane = DPCD_VOLTAGE_SWING_SET(voltage_swing) |
+ DPCD_PRE_EMPHASIS_SET(pre_emphasis);
+
+ if (voltage_swing = VOLTAGE_LEVEL_3)
+ training_lane |= DPCD_MAX_SWING_REACHED;
+ if (pre_emphasis = PRE_EMPHASIS_LEVEL_3)
+ training_lane |= DPCD_MAX_PRE_EMPHASIS_REACHED;
+
+ dp->link_train.training_lane[lane] = training_lane;
+ }
if (exynos_dp_channel_eq_ok(link_status, lane_count) = 0) {
/* traing pattern Set to Normal */
@@ -596,39 +599,42 @@ static int exynos_dp_process_equalizer_training(struct exynos_dp_device *dp)
dp->link_train.lane_count = reg;
dev_dbg(dp->dev, "final lane count = %.2x\n",
dp->link_train.lane_count);
+
/* set enhanced mode if available */
exynos_dp_set_enhanced_mode(dp);
-
dp->link_train.lt_state = FINISHED;
} else {
/* not all locked */
dp->link_train.eq_loop++;
if (dp->link_train.eq_loop > MAX_EQ_LOOP) {
- exynos_dp_reduce_link_rate(dp);
- } else {
- exynos_dp_get_adjust_train(dp, adjust_request);
-
- for (lane = 0; lane < lane_count; lane++) {
- exynos_dp_set_lane_link_training(dp,
- dp->link_train.training_lane[lane],
- lane);
- buf[lane] = dp->link_train.training_lane[lane];
- exynos_dp_write_byte_to_dpcd(dp,
- DPCD_ADDR_TRAINING_LANE0_SET + lane,
- buf[lane]);
- }
+ dev_err(dp->dev, "EQ Max loop\n");
+ goto reduce_link_rate;
}
+
+ for (lane = 0; lane < lane_count; lane++)
+ exynos_dp_set_lane_link_training(dp,
+ dp->link_train.training_lane[lane],
+ lane);
+
+ exynos_dp_write_bytes_to_dpcd(dp,
+ DPCD_ADDR_TRAINING_LANE0_SET,
+ lane_count,
+ dp->link_train.training_lane);
}
} else {
- exynos_dp_reduce_link_rate(dp);
+ goto reduce_link_rate;
}
return 0;
+
+reduce_link_rate:
+ exynos_dp_reduce_link_rate(dp);
+ return -EIO;
}
static void exynos_dp_get_max_rx_bandwidth(struct exynos_dp_device *dp,
- u8 *bandwidth)
+ u8 *bandwidth)
{
u8 data;
@@ -641,7 +647,7 @@ static void exynos_dp_get_max_rx_bandwidth(struct exynos_dp_device *dp,
}
static void exynos_dp_get_max_rx_lane_count(struct exynos_dp_device *dp,
- u8 *lane_count)
+ u8 *lane_count)
{
u8 data;
@@ -693,13 +699,7 @@ static void exynos_dp_init_training(struct exynos_dp_device *dp,
static int exynos_dp_sw_link_training(struct exynos_dp_device *dp)
{
int retval = 0;
- int training_finished;
-
- /* Turn off unnecessary lane */
- if (dp->link_train.lane_count = 1)
- exynos_dp_set_analog_power_down(dp, CH1_BLOCK, 1);
-
- training_finished = 0;
+ int training_finished = 0;
dp->link_train.lt_state = START;
@@ -710,10 +710,14 @@ static int exynos_dp_sw_link_training(struct exynos_dp_device *dp)
exynos_dp_link_start(dp);
break;
case CLOCK_RECOVERY:
- exynos_dp_process_clock_recovery(dp);
+ retval = exynos_dp_process_clock_recovery(dp);
+ if (retval)
+ dev_err(dp->dev, "LT CR failed!\n");
break;
case EQUALIZER_TRAINING:
- exynos_dp_process_equalizer_training(dp);
+ retval = exynos_dp_process_equalizer_training(dp);
+ if (retval)
+ dev_err(dp->dev, "LT EQ failed!\n");
break;
case FINISHED:
training_finished = 1;
diff --git a/drivers/video/exynos/exynos_dp_core.h b/drivers/video/exynos/exynos_dp_core.h
index 8526e54..44c11e1 100644
--- a/drivers/video/exynos/exynos_dp_core.h
+++ b/drivers/video/exynos/exynos_dp_core.h
@@ -144,7 +144,7 @@ void exynos_dp_disable_scrambling(struct exynos_dp_device *dp);
#define DPCD_ADDR_TRAINING_PATTERN_SET 0x0102
#define DPCD_ADDR_TRAINING_LANE0_SET 0x0103
#define DPCD_ADDR_LANE0_1_STATUS 0x0202
-#define DPCD_ADDR_LANE_ALIGN__STATUS_UPDATED 0x0204
+#define DPCD_ADDR_LANE_ALIGN_STATUS_UPDATED 0x0204
#define DPCD_ADDR_ADJUST_REQUEST_LANE0_1 0x0206
#define DPCD_ADDR_ADJUST_REQUEST_LANE2_3 0x0207
#define DPCD_ADDR_TEST_REQUEST 0x0218
--
1.7.1
^ permalink raw reply related
* RE: [PATCH] radeonfb: Add quirk for the graphics adapter in some JSxx
From: Jingoo Han @ 2012-07-19 5:02 UTC (permalink / raw)
To: olaf, 'Benjamin Herrenschmidt'; +Cc: linuxppc-dev, linux-fbdev
In-Reply-To: <1342630144-16350-1-git-send-email-olaf@aepfle.de>
On Thursday, July 19, 2012 1:49 AM, olaf@aepfle.de wrote:
> From: Tony Breeds <tony@bakeyournoodle.com>
>
> These devices are set to 640x480 by firmware, switch them to 800x600@60
> so that the graphical installer can run on remote console.
>
> Reported by IBM during SLES10 SP2 beta testing:
>
> https://bugzilla.novell.com/show_bug.cgi?idF1002
> LTC50817
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
If the author is Tony Breeds, please add 'Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>'.
Best regards,
Jingoo Han
>
> diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c
> index 9261c91..5c23eac 100644
> --- a/drivers/video/aty/radeon_monitor.c
> +++ b/drivers/video/aty/radeon_monitor.c
> @@ -730,6 +730,25 @@ static void radeon_videomode_to_var(struct fb_var_screeninfo *var,
> var->vmode = mode->vmode;
> }
>
> +#ifdef CONFIG_PPC_PSERIES
> +static int is_powerblade(const char *model)
> +{
> + struct device_node *root;
> + const char* cp;
> + int len, l, rc = 0;
> +
> + root = of_find_node_by_path("/");
> + if (root && model) {
> + l = strlen(model);
> + cp = of_get_property(root, "model", &len);
> + if (cp)
> + rc = memcmp(model, cp, min(len, l)) = 0;
> + of_node_put(root);
> + }
> + return rc;
> +}
> +#endif
> +
> /*
> * Build the modedb for head 1 (head 2 will come later), check panel infos
> * from either BIOS or EDID, and pick up the default mode
> @@ -865,6 +884,22 @@ void __devinit radeon_check_modes(struct radeonfb_info *rinfo, const char *mode_
> has_default_mode = 1;
> }
>
> +#ifdef CONFIG_PPC_PSERIES
> + if (!has_default_mode && (
> + is_powerblade("IBM,8842") || /* JS20 */
> + is_powerblade("IBM,8844") || /* JS21 */
> + is_powerblade("IBM,7998") || /* JS12/JS21/JS22 */
> + is_powerblade("IBM,0792") || /* QS21 */
> + is_powerblade("IBM,0793") /* QS22 */
> + )) {
> + printk("Falling back to 800x600 on JSxx hardware\n");
> + if (fb_find_mode(&info->var, info, "800x600@60",
> + info->monspecs.modedb,
> + info->monspecs.modedb_len, NULL, 8) != 0)
> + has_default_mode = 1;
> + }
> +#endif
> +
> /*
> * Still no mode, let's pick up a default from the db
> */
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* RE: [PATCH RESEND] video: da8xx-fb: enable sync lost interrupt
From: Manjunathappa, Prakash @ 2012-07-19 5:19 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1342625417-6974-1-git-send-email-prakash.pm@ti.com>
Hi Sergei,
On Wed, Jul 18, 2012 at 21:26:32, Sergei Shtylyov wrote:
> Hello.
>
> On 07/18/2012 07:30 PM, Manjunathappa, Prakash wrote:
>
> > Patch enables sync lost interrupt and interrupt handler already
> > takes care to handle it.
>
> > Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
> > ---
> > Resending as my earlier patch seems like not reached fbdev mailing list.
>
> > drivers/video/da8xx-fb.c | 5 +++--
> > 1 files changed, 3 insertions(+), 2 deletions(-)
>
> > diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
> > index 88e98ea..e9d2f6e 100644
> > --- a/drivers/video/da8xx-fb.c
> > +++ b/drivers/video/da8xx-fb.c
> > @@ -54,6 +54,7 @@
> > #define LCD_DMA_BURST_8 0x3
> > #define LCD_DMA_BURST_16 0x4
> > #define LCD_V1_END_OF_FRAME_INT_ENA BIT(2)
> > +#define LCD_V1_SYNC_LOST_ENA BIT(5)
>
> Please indent the value with tabs, as the others.
>
Agree, I will replace with tabs.
Thanks,
Prakash
> > #define LCD_V2_END_OF_FRAME0_INT_ENA BIT(8)
> > #define LCD_V2_END_OF_FRAME1_INT_ENA BIT(9)
> > #define LCD_DUAL_FRAME_BUFFER_ENABLE BIT(0)
>
> WBR, Sergei
>
^ permalink raw reply
* Re: [PATCH] radeonfb: Add quirk for the graphics adapter in some JSxx
From: Olaf Hering @ 2012-07-19 5:20 UTC (permalink / raw)
To: Jingoo Han, 'Tony Breeds'; +Cc: linux-fbdev, linuxppc-dev
In-Reply-To: <001201cd656b$b2794350$176bc9f0$%han@samsung.com>
On Thu, Jul 19, Jingoo Han wrote:
> On Thursday, July 19, 2012 1:49 AM, olaf@aepfle.de wrote:
> > From: Tony Breeds <tony@bakeyournoodle.com>
> >
> > These devices are set to 640x480 by firmware, switch them to 800x600@60
> > so that the graphical installer can run on remote console.
> >
> > Reported by IBM during SLES10 SP2 beta testing:
> >
> > https://bugzilla.novell.com/show_bug.cgi?idF1002
> > LTC50817
> >
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
> If the author is Tony Breeds, please add 'Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>'.
He provided the initial version of the change, but did not add his tag
back in 2009. Tony, perhaps you can do that now?
Olaf
^ permalink raw reply
* Re: [PATCH] radeonfb: Add quirk for the graphics adapter in some JSxx
From: Tony Breeds @ 2012-07-19 5:48 UTC (permalink / raw)
To: olaf; +Cc: linux-fbdev, linuxppc-dev
In-Reply-To: <1342630144-16350-1-git-send-email-olaf@aepfle.de>
[-- Attachment #1: Type: text/plain, Size: 534 bytes --]
On Wed, Jul 18, 2012 at 06:49:04PM +0200, olaf@aepfle.de wrote:
Thanks for following this up.
> From: Tony Breeds <tony@bakeyournoodle.com>
>
> These devices are set to 640x480 by firmware, switch them to 800x600@60
> so that the graphical installer can run on remote console.
>
> Reported by IBM during SLES10 SP2 beta testing:
>
> https://bugzilla.novell.com/show_bug.cgi?id=461002
> LTC50817
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Yours Tony
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 7/9] fbdev: sh_mobile_lcdc: Support horizontal panning
From: Laurent Pinchart @ 2012-07-19 10:20 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1342658362-19491-8-git-send-email-laurent.pinchart@ideasonboard.com>
Hi Damian,
Thank you for the review.
On Thursday 19 July 2012 10:40:03 Damian Hobson-Garcia wrote:
> On 2012/07/19 9:39, Laurent Pinchart wrote:
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >
> > drivers/video/sh_mobile_lcdcfb.c | 22 ++++++++++++++++------
> > 1 files changed, 16 insertions(+), 6 deletions(-)
> >
> > - if (ovl->format->fourcc = V4L2_PIX_FMT_NV12 ||
> > - ovl->format->fourcc = V4L2_PIX_FMT_NV21)
> > + switch (ovl->format->fourcc) {
> > + case V4L2_PIX_FMT_NV16:
> > + case V4L2_PIX_FMT_NV61:
> > + info->fix.xpanstep = 2;
> > + case V4L2_PIX_FMT_NV12:
> > + case V4L2_PIX_FMT_NV21:
> > info->fix.ypanstep = 2;
> > + }
> >
> >
> > - if (ch->format->fourcc = V4L2_PIX_FMT_NV12 ||
> > - ch->format->fourcc = V4L2_PIX_FMT_NV21)
> > + switch (ch->format->fourcc) {
> > + case V4L2_PIX_FMT_NV16:
> > + case V4L2_PIX_FMT_NV61:
> > + info->fix.xpanstep = 2;
> > + case V4L2_PIX_FMT_NV12:
> > + case V4L2_PIX_FMT_NV21:
> > info->fix.ypanstep = 2;
> > + }
>
> I think that the panstep settings are backwards. The pansteps should be
> NV16: x = 2, y = 1; NV12: x = 2, y = 2.
Good catch, thanks. I've fixed that.
--
Regards,
Laurent Pinchart
^ permalink raw reply
* [PATCH v3] video: da8xx-fb: add 24bpp LCD configuration support
From: Manjunathappa, Prakash @ 2012-07-19 15:49 UTC (permalink / raw)
To: linux-fbdev
LCD controller on am335x supports 24bpp raster configuration in addition
to ones on da850. LCDC also supports 24bpp in unpacked format having
ARGB:8888 32bpp format data in DDR, but it doesn't interpret alpha
component of the data.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
---
Since v2:
Fixed additional configurations for 24bpp support.
Since v1:
Simplified calculation of pseudopalette for FB_VISUAL_TRUECOLOR type.
drivers/video/da8xx-fb.c | 127 ++++++++++++++++++++++++++++++++++------------
1 files changed, 94 insertions(+), 33 deletions(-)
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 47118c7..3d2d0d1 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -83,6 +83,8 @@
#define LCD_V2_LIDD_CLK_EN BIT(1)
#define LCD_V2_CORE_CLK_EN BIT(0)
#define LCD_V2_LPP_B10 26
+#define LCD_V2_TFT_24BPP_MODE BIT(25)
+#define LCD_V2_TFT_24BPP_UNPACK BIT(26)
/* LCD Raster Timing 2 Register */
#define LCD_AC_BIAS_TRANSITIONS_PER_INT(x) ((x) << 16)
@@ -153,7 +155,7 @@ struct da8xx_fb_par {
unsigned int dma_end;
struct clk *lcdc_clk;
int irq;
- unsigned short pseudo_palette[16];
+ unsigned long pseudo_palette[16];
unsigned int palette_sz;
unsigned int pxl_clk;
int blank;
@@ -482,6 +484,9 @@ static int lcd_cfg_frame_buffer(struct da8xx_fb_par *par, u32 width, u32 height,
{
u32 reg;
+ if ((bpp > 16) && (lcd_revision = LCD_VERSION_1))
+ return -EINVAL;
+
/* Set the Panel Width */
/* Pixels per line = (PPL + 1)*16 */
if (lcd_revision = LCD_VERSION_1) {
@@ -525,6 +530,12 @@ static int lcd_cfg_frame_buffer(struct da8xx_fb_par *par, u32 width, u32 height,
reg = lcdc_read(LCD_RASTER_CTRL_REG) & ~(1 << 8);
if (raster_order)
reg |= LCD_RASTER_ORDER;
+
+ if (bpp = 24)
+ reg |= LCD_V2_TFT_24BPP_MODE;
+ else if (bpp = 32)
+ reg |= (LCD_V2_TFT_24BPP_MODE | LCD_V2_TFT_24BPP_UNPACK);
+
lcdc_write(reg, LCD_RASTER_CTRL_REG);
switch (bpp) {
@@ -532,6 +543,8 @@ static int lcd_cfg_frame_buffer(struct da8xx_fb_par *par, u32 width, u32 height,
case 2:
case 4:
case 16:
+ case 24:
+ case 32:
par->palette_sz = 16 * 2;
break;
@@ -546,6 +559,8 @@ static int lcd_cfg_frame_buffer(struct da8xx_fb_par *par, u32 width, u32 height,
return 0;
}
+
+#define CNVT_TOHW(val, width) ((((val)<<(width))+0x7FFF-(val))>>16)
static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
unsigned blue, unsigned transp,
struct fb_info *info)
@@ -561,13 +576,36 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
if (info->fix.visual = FB_VISUAL_DIRECTCOLOR)
return 1;
- if (info->var.bits_per_pixel = 4) {
- if (regno > 15)
- return 1;
+ if ((info->var.bits_per_pixel > 16) && (lcd_revision = LCD_VERSION_1))
+ return 1;
- if (info->var.grayscale) {
- pal = regno;
- } else {
+ switch (info->fix.visual) {
+ case FB_VISUAL_TRUECOLOR:
+ red = CNVT_TOHW(red, info->var.red.length);
+ green = CNVT_TOHW(green, info->var.green.length);
+ blue = CNVT_TOHW(blue, info->var.blue.length);
+ break;
+ case FB_VISUAL_PSEUDOCOLOR:
+ if (info->var.bits_per_pixel = 4) {
+ if (regno > 15)
+ return 1;
+
+ if (info->var.grayscale) {
+ pal = regno;
+ } else {
+ red >>= 4;
+ green >>= 8;
+ blue >>= 12;
+
+ pal = (red & 0x0f00);
+ pal |= (green & 0x00f0);
+ pal |= (blue & 0x000f);
+ }
+ if (regno = 0)
+ pal |= 0x2000;
+ palette[regno] = pal;
+
+ } else if (info->var.bits_per_pixel = 8) {
red >>= 4;
green >>= 8;
blue >>= 12;
@@ -575,36 +613,35 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
pal = (red & 0x0f00);
pal |= (green & 0x00f0);
pal |= (blue & 0x000f);
- }
- if (regno = 0)
- pal |= 0x2000;
- palette[regno] = pal;
-
- } else if (info->var.bits_per_pixel = 8) {
- red >>= 4;
- green >>= 8;
- blue >>= 12;
-
- pal = (red & 0x0f00);
- pal |= (green & 0x00f0);
- pal |= (blue & 0x000f);
- if (palette[regno] != pal) {
- update_hw = 1;
- palette[regno] = pal;
+ if (palette[regno] != pal) {
+ update_hw = 1;
+ palette[regno] = pal;
+ }
}
- } else if ((info->var.bits_per_pixel = 16) && regno < 16) {
- red >>= (16 - info->var.red.length);
- red <<= info->var.red.offset;
+ break;
+ }
- green >>= (16 - info->var.green.length);
- green <<= info->var.green.offset;
+ /* Truecolor has hardware independent palette */
+ if (info->fix.visual = FB_VISUAL_TRUECOLOR) {
+ u32 v;
- blue >>= (16 - info->var.blue.length);
- blue <<= info->var.blue.offset;
+ if (regno > 15)
+ return -EINVAL;
- par->pseudo_palette[regno] = red | green | blue;
+ v = (red << info->var.red.offset) |
+ (green << info->var.green.offset) |
+ (blue << info->var.blue.offset);
+ switch (info->var.bits_per_pixel) {
+ case 16:
+ ((u16 *) (info->pseudo_palette))[regno] = v;
+ break;
+ case 24:
+ case 32:
+ ((u32 *) (info->pseudo_palette))[regno] = v;
+ break;
+ }
if (palette[0] != 0x4000) {
update_hw = 1;
palette[0] = 0x4000;
@@ -617,6 +654,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
return 0;
}
+#undef CNVT_TOHW
static void lcd_reset(struct da8xx_fb_par *par)
{
@@ -824,6 +862,9 @@ static int fb_check_var(struct fb_var_screeninfo *var,
{
int err = 0;
+ if ((var->bits_per_pixel > 16) && (lcd_revision = LCD_VERSION_1))
+ return -EINVAL;
+
switch (var->bits_per_pixel) {
case 1:
case 8:
@@ -859,6 +900,26 @@ static int fb_check_var(struct fb_var_screeninfo *var,
var->transp.length = 0;
var->nonstd = 0;
break;
+ case 24:
+ var->red.offset = 16;
+ var->red.length = 8;
+ var->green.offset = 8;
+ var->green.length = 8;
+ var->blue.offset = 0;
+ var->blue.length = 8;
+ var->nonstd = 0;
+ break;
+ case 32:
+ var->transp.offset = 24;
+ var->transp.length = 8;
+ var->red.offset = 16;
+ var->red.length = 8;
+ var->green.offset = 8;
+ var->green.length = 8;
+ var->blue.offset = 0;
+ var->blue.length = 8;
+ var->nonstd = 0;
+ break;
default:
err = -EINVAL;
}
--
1.7.1
^ permalink raw reply related
* [PATCH] OMAPDSS: Do not require a VDDS_DSI regulator on am35xx
From: Raphael Assenat @ 2012-07-19 20:04 UTC (permalink / raw)
To: linux-omap; +Cc: tomi.valkeinen, linux-fbdev
On our AM3505 based board, dpi.c complains that there is no VDSS_DSI regulator
and the framebuffer cannot be enabled. However, this check does not seem to
apply to AM3505/17 chips.
I am not the first facing this issue, see this thread from Nov. 2011:
http://marc.info/?l=linux-omap&m\x132147745930213&w=2
The string 'vdds_dsi' does appear once in the technical reference manual[1]
but there is no corresponding power pin on the package[2]. I failed to
locate any signal that could be an equivalent. I am trying to obtain some
clarifications on TI's forum[3]...
In any case, I am currently running with the patch below. In order to keep
cpu_is_xx uses to a minimum, I check for am35xx once at init time and allow
dpi.vdds_dsi_reg to be NULL from then on, getting rid of all the other
cpu_is_omap34xx uses in the process.
Your comments would be appreciated. Please also consider for merging.
[1] http://www.ti.com/litv/pdf/sprugr0b
[2] http://www.ti.com/lit/gpn/am3505
[3] http://e2e.ti.com/support/dsp/sitara_arm174_microprocessors/f/416/t/202586.aspx
Signed-off-by: Raphael Assenat <raph@8d.com>
diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
index 8c2056c..d3b428d 100644
--- a/drivers/video/omap2/dss/dpi.c
+++ b/drivers/video/omap2/dss/dpi.c
@@ -180,11 +180,6 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
{
int r;
- if (cpu_is_omap34xx() && !dpi.vdds_dsi_reg) {
- DSSERR("no VDSS_DSI regulator\n");
- return -ENODEV;
- }
-
if (dssdev->manager = NULL) {
DSSERR("failed to enable display: no manager\n");
return -ENODEV;
@@ -196,7 +191,7 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
goto err_start_dev;
}
- if (cpu_is_omap34xx()) {
+ if (dpi.vdds_dsi_reg) {
r = regulator_enable(dpi.vdds_dsi_reg);
if (r)
goto err_reg_enable;
@@ -240,7 +235,7 @@ err_dsi_pll_init:
err_get_dsi:
dispc_runtime_put();
err_get_dispc:
- if (cpu_is_omap34xx())
+ if (dpi.vdds_dsi_reg)
regulator_disable(dpi.vdds_dsi_reg);
err_reg_enable:
omap_dss_stop_device(dssdev);
@@ -261,7 +256,7 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev)
dispc_runtime_put();
- if (cpu_is_omap34xx())
+ if (dpi.vdds_dsi_reg)
regulator_disable(dpi.vdds_dsi_reg);
omap_dss_stop_device(dssdev);
@@ -343,7 +338,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
{
DSSDBG("init_display\n");
- if (cpu_is_omap34xx() && dpi.vdds_dsi_reg = NULL) {
+ if (cpu_is_omap34xx() && dpi.vdds_dsi_reg = NULL && !soc_is_am35xx()) {
struct regulator *vdds_dsi;
vdds_dsi = dss_get_vdds_dsi();
^ permalink raw reply related
* Re: [PATCH v2] da8xx-fb: add missing FB_BLANK operations
From: Yegor Yefremov @ 2012-07-20 12:20 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1341583288-30281-1-git-send-email-yegorslists@googlemail.com>
On Fri, Jul 6, 2012 at 4:01 PM, <yegorslists@googlemail.com> wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> add FB_BLANK_NORMAL, FB_BLANK_VSYNC_SUSPEND and FB_BLANK_HSYNC_SUSPEND
> modes (copy drivers/video/omap2/omapfb/omapfb-main.c implementation).
> Otherwise X-server will complain about invalid parameter.
>
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
> ---
> v2: add linux-fbdev as recipient
>
> drivers/video/da8xx-fb.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
> index 47118c7..8d745bf 100644
> --- a/drivers/video/da8xx-fb.c
> +++ b/drivers/video/da8xx-fb.c
> @@ -1026,6 +1026,9 @@ static int cfb_blank(int blank, struct fb_info *info)
>
> lcd_enable_raster();
> break;
> + case FB_BLANK_NORMAL:
> + case FB_BLANK_VSYNC_SUSPEND:
> + case FB_BLANK_HSYNC_SUSPEND:
> case FB_BLANK_POWERDOWN:
> if (par->panel_power_ctrl)
> par->panel_power_ctrl(0);
> --
> 1.7.7
>
Were is possible to get this patch into 3.6?
Thanks.
Yegor
^ permalink raw reply
* [PATCH] OMAPDSS: DPI: Get panel configuration from platform data
From: Jassi Brar @ 2012-07-20 15:42 UTC (permalink / raw)
To: tomi.valkeinen, a0393947; +Cc: linux-omap, linux-fbdev, Jassi Brar
Instead of harcoding in the driver some of potentially countless sets
of parameters that could define a panel, have the board provide the
parameters to the panel driver.
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
---
arch/arm/mach-omap2/board-2430sdp.c | 4 +-
arch/arm/mach-omap2/board-am3517evm.c | 5 +-
arch/arm/mach-omap2/board-apollon.c | 4 +-
arch/arm/mach-omap2/board-cm-t35.c | 5 +-
arch/arm/mach-omap2/board-devkit8000.c | 4 +-
arch/arm/mach-omap2/board-h4.c | 3 +-
arch/arm/mach-omap2/board-ldp.c | 4 +-
arch/arm/mach-omap2/board-overo.c | 4 +-
drivers/video/omap2/displays/panel-generic-dpi.c | 467 +---------------------
include/video/omap-panel-generic-dpi.h | 15 +-
10 files changed, 44 insertions(+), 471 deletions(-)
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 99ca6ba..0cc58c3 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -125,7 +125,9 @@ static void sdp2430_panel_disable_lcd(struct omap_dss_device *dssdev)
}
static struct panel_generic_dpi_data sdp2430_panel_data = {
- .name = "nec_nl2432dr22-11b",
+ .pcfg = {{240, 320, 5400, 3, 3, 39, 1, 2, 7,}, 0, 0,
+ (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS),
+ 0, 0,},
.platform_enable = sdp2430_panel_enable_lcd,
.platform_disable = sdp2430_panel_disable_lcd,
};
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 18f6010..afd87b5 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -176,7 +176,10 @@ static void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev)
}
static struct panel_generic_dpi_data lcd_panel = {
- .name = "sharp_lq",
+ .pcfg = {{480, 272, 9000, 42, 3, 2, 11, 3, 2,}, 0, 0,
+ (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+ OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO),
+ 50, 100,},
.platform_enable = am3517_evm_panel_enable_lcd,
.platform_disable = am3517_evm_panel_disable_lcd,
};
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 502c31e..e9c6f5a 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -261,7 +261,9 @@ static struct omap_usb_config apollon_usb_config __initdata = {
};
static struct panel_generic_dpi_data apollon_panel_data = {
- .name = "apollon",
+ .pcfg = {{480, 272, 6250, 41, 2, 2, 10, 2, 2,}, 0, 0,
+ (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS),
+ 0, 0,},
};
static struct omap_dss_device apollon_lcd_device = {
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index ded100c..f5a8ce4 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -228,7 +228,10 @@ static void cm_t35_panel_disable_tv(struct omap_dss_device *dssdev)
}
static struct panel_generic_dpi_data lcd_panel = {
- .name = "toppoly_tdo35s",
+ .pcfg = {{480, 640, 26000, 8, 104, 8, 2, 4, 2,}, 0, 0,
+ (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS |
+ OMAP_DSS_LCD_IPC | OMAP_DSS_LCD_ONOFF),
+ 0, 0,},
.platform_enable = cm_t35_panel_enable_lcd,
.platform_disable = cm_t35_panel_disable_lcd,
};
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 6567c1c..397f52d 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -128,7 +128,9 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = {
};
static struct panel_generic_dpi_data lcd_panel = {
- .name = "innolux_at070tn83",
+ .pcfg = {{800, 480, 40000, 48, 1, 1, 3, 12, 25,}, 0, 0x28,
+ (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS),
+ 0, 0,},
.platform_enable = devkit8000_panel_enable_lcd,
.platform_disable = devkit8000_panel_disable_lcd,
};
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 876becf..4f62bad 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -205,7 +205,8 @@ static struct platform_device *h4_devices[] __initdata = {
};
static struct panel_generic_dpi_data h4_panel_data = {
- .name = "h4",
+ .pcfg = {{240, 320, 6250, 15, 15, 60, 1, 1, 1,}, 0, 0,
+ OMAP_DSS_LCD_TFT, 0, 0,},
};
static struct omap_dss_device h4_lcd_device = {
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index ef9e829..de797920 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -210,7 +210,9 @@ static void ldp_panel_disable_lcd(struct omap_dss_device *dssdev)
}
static struct panel_generic_dpi_data ldp_panel_data = {
- .name = "nec_nl2432dr22-11b",
+ .pcfg = {{240, 320, 5400, 3, 3, 39, 1, 2, 7,}, 0, 0,
+ (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS),
+ 0, 0,},
.platform_enable = ldp_panel_enable_lcd,
.platform_disable = ldp_panel_disable_lcd,
};
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 779734d..4f7a9fb5 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -208,7 +208,9 @@ static void overo_panel_disable_lcd(struct omap_dss_device *dssdev)
}
static struct panel_generic_dpi_data lcd43_panel = {
- .name = "samsung_lte430wq_f0c",
+ .pcfg = {{480, 272, 9200, 41, 8, 4, 10, 4, 2,}, 0, 0,
+ (OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS | OMAP_DSS_LCD_IHS),
+ 0, 0,},
.platform_enable = overo_panel_enable_lcd,
.platform_disable = overo_panel_disable_lcd,
};
diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c
index e42f9dc..6fa5e22 100644
--- a/drivers/video/omap2/displays/panel-generic-dpi.c
+++ b/drivers/video/omap2/displays/panel-generic-dpi.c
@@ -37,457 +37,6 @@
#include <video/omap-panel-generic-dpi.h>
-struct panel_config {
- struct omap_video_timings timings;
-
- int acbi; /* ac-bias pin transitions per interrupt */
- /* Unit: line clocks */
- int acb; /* ac-bias pin frequency */
-
- enum omap_panel_config config;
-
- int power_on_delay;
- int power_off_delay;
-
- /*
- * Used to match device to panel configuration
- * when use generic panel driver
- */
- const char *name;
-};
-
-/* Panel configurations */
-static struct panel_config generic_dpi_panels[] = {
- /* Sharp LQ043T1DG01 */
- {
- {
- .x_res = 480,
- .y_res = 272,
-
- .pixel_clock = 9000,
-
- .hsw = 42,
- .hfp = 3,
- .hbp = 2,
-
- .vsw = 11,
- .vfp = 3,
- .vbp = 2,
- },
- .acbi = 0x0,
- .acb = 0x0,
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO,
- .power_on_delay = 50,
- .power_off_delay = 100,
- .name = "sharp_lq",
- },
-
- /* Sharp LS037V7DW01 */
- {
- {
- .x_res = 480,
- .y_res = 640,
-
- .pixel_clock = 19200,
-
- .hsw = 2,
- .hfp = 1,
- .hbp = 28,
-
- .vsw = 1,
- .vfp = 1,
- .vbp = 1,
- },
- .acbi = 0x0,
- .acb = 0x28,
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS,
- .power_on_delay = 50,
- .power_off_delay = 100,
- .name = "sharp_ls",
- },
-
- /* Toppoly TDO35S */
- {
- {
- .x_res = 480,
- .y_res = 640,
-
- .pixel_clock = 26000,
-
- .hfp = 104,
- .hsw = 8,
- .hbp = 8,
-
- .vfp = 4,
- .vsw = 2,
- .vbp = 2,
- },
- .acbi = 0x0,
- .acb = 0x0,
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC |
- OMAP_DSS_LCD_ONOFF,
- .power_on_delay = 0,
- .power_off_delay = 0,
- .name = "toppoly_tdo35s",
- },
-
- /* Samsung LTE430WQ-F0C */
- {
- {
- .x_res = 480,
- .y_res = 272,
-
- .pixel_clock = 9200,
-
- .hfp = 8,
- .hsw = 41,
- .hbp = 45 - 41,
-
- .vfp = 4,
- .vsw = 10,
- .vbp = 12 - 10,
- },
- .acbi = 0x0,
- .acb = 0x0,
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS,
- .power_on_delay = 0,
- .power_off_delay = 0,
- .name = "samsung_lte430wq_f0c",
- },
-
- /* Seiko 70WVW1TZ3Z3 */
- {
- {
- .x_res = 800,
- .y_res = 480,
-
- .pixel_clock = 33000,
-
- .hsw = 128,
- .hfp = 10,
- .hbp = 10,
-
- .vsw = 2,
- .vfp = 4,
- .vbp = 11,
- },
- .acbi = 0x0,
- .acb = 0x0,
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS,
- .power_on_delay = 0,
- .power_off_delay = 0,
- .name = "seiko_70wvw1tz3",
- },
-
- /* Powertip PH480272T */
- {
- {
- .x_res = 480,
- .y_res = 272,
-
- .pixel_clock = 9000,
-
- .hsw = 40,
- .hfp = 2,
- .hbp = 2,
-
- .vsw = 10,
- .vfp = 2,
- .vbp = 2,
- },
- .acbi = 0x0,
- .acb = 0x0,
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO,
- .power_on_delay = 0,
- .power_off_delay = 0,
- .name = "powertip_ph480272t",
- },
-
- /* Innolux AT070TN83 */
- {
- {
- .x_res = 800,
- .y_res = 480,
-
- .pixel_clock = 40000,
-
- .hsw = 48,
- .hfp = 1,
- .hbp = 1,
-
- .vsw = 3,
- .vfp = 12,
- .vbp = 25,
- },
- .acbi = 0x0,
- .acb = 0x28,
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS,
- .power_on_delay = 0,
- .power_off_delay = 0,
- .name = "innolux_at070tn83",
- },
-
- /* NEC NL2432DR22-11B */
- {
- {
- .x_res = 240,
- .y_res = 320,
-
- .pixel_clock = 5400,
-
- .hsw = 3,
- .hfp = 3,
- .hbp = 39,
-
- .vsw = 1,
- .vfp = 2,
- .vbp = 7,
- },
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS,
- .name = "nec_nl2432dr22-11b",
- },
-
- /* Unknown panel used in OMAP H4 */
- {
- {
- .x_res = 240,
- .y_res = 320,
-
- .pixel_clock = 6250,
-
- .hsw = 15,
- .hfp = 15,
- .hbp = 60,
-
- .vsw = 1,
- .vfp = 1,
- .vbp = 1,
- },
- .config = OMAP_DSS_LCD_TFT,
-
- .name = "h4",
- },
-
- /* Unknown panel used in Samsung OMAP2 Apollon */
- {
- {
- .x_res = 480,
- .y_res = 272,
-
- .pixel_clock = 6250,
-
- .hsw = 41,
- .hfp = 2,
- .hbp = 2,
-
- .vsw = 10,
- .vfp = 2,
- .vbp = 2,
- },
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS,
-
- .name = "apollon",
- },
- /* FocalTech ETM070003DH6 */
- {
- {
- .x_res = 800,
- .y_res = 480,
-
- .pixel_clock = 28000,
-
- .hsw = 48,
- .hfp = 40,
- .hbp = 40,
-
- .vsw = 3,
- .vfp = 13,
- .vbp = 29,
- },
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS,
- .name = "focaltech_etm070003dh6",
- },
-
- /* Microtips Technologies - UMSH-8173MD */
- {
- {
- .x_res = 800,
- .y_res = 480,
-
- .pixel_clock = 34560,
-
- .hsw = 13,
- .hfp = 101,
- .hbp = 101,
-
- .vsw = 23,
- .vfp = 1,
- .vbp = 1,
- },
- .acbi = 0x0,
- .acb = 0x0,
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
- .power_on_delay = 0,
- .power_off_delay = 0,
- .name = "microtips_umsh_8173md",
- },
-
- /* OrtusTech COM43H4M10XTC */
- {
- {
- .x_res = 480,
- .y_res = 272,
-
- .pixel_clock = 8000,
-
- .hsw = 41,
- .hfp = 8,
- .hbp = 4,
-
- .vsw = 10,
- .vfp = 4,
- .vbp = 2,
- },
- .config = OMAP_DSS_LCD_TFT,
-
- .name = "ortustech_com43h4m10xtc",
- },
-
- /* Innolux AT080TN52 */
- {
- {
- .x_res = 800,
- .y_res = 600,
-
- .pixel_clock = 41142,
-
- .hsw = 20,
- .hfp = 210,
- .hbp = 46,
-
- .vsw = 10,
- .vfp = 12,
- .vbp = 23,
- },
- .acb = 0x0,
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO,
-
- .name = "innolux_at080tn52",
- },
-
- /* Mitsubishi AA084SB01 */
- {
- {
- .x_res = 800,
- .y_res = 600,
- .pixel_clock = 40000,
-
- .hsw = 1,
- .hfp = 254,
- .hbp = 1,
-
- .vsw = 1,
- .vfp = 26,
- .vbp = 1,
- },
- .config = OMAP_DSS_LCD_TFT,
- .name = "mitsubishi_aa084sb01",
- },
- /* EDT ET0500G0DH6 */
- {
- {
- .x_res = 800,
- .y_res = 480,
- .pixel_clock = 33260,
-
- .hsw = 128,
- .hfp = 216,
- .hbp = 40,
-
- .vsw = 2,
- .vfp = 35,
- .vbp = 10,
- },
- .config = OMAP_DSS_LCD_TFT,
- .name = "edt_et0500g0dh6",
- },
-
- /* Prime-View PD050VL1 */
- {
- {
- .x_res = 640,
- .y_res = 480,
-
- .pixel_clock = 25000,
-
- .hsw = 96,
- .hfp = 18,
- .hbp = 46,
-
- .vsw = 2,
- .vfp = 10,
- .vbp = 33,
- },
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
- .name = "primeview_pd050vl1",
- },
-
- /* Prime-View PM070WL4 */
- {
- {
- .x_res = 800,
- .y_res = 480,
-
- .pixel_clock = 32000,
-
- .hsw = 128,
- .hfp = 42,
- .hbp = 86,
-
- .vsw = 2,
- .vfp = 10,
- .vbp = 33,
- },
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
- .name = "primeview_pm070wl4",
- },
-
- /* Prime-View PD104SLF */
- {
- {
- .x_res = 800,
- .y_res = 600,
-
- .pixel_clock = 40000,
-
- .hsw = 128,
- .hfp = 42,
- .hbp = 86,
-
- .vsw = 4,
- .vfp = 1,
- .vbp = 23,
- },
- .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
- OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IPC,
- .name = "primeview_pd104slf",
- },
-};
-
struct panel_drv_data {
struct omap_dss_device *dssdev;
@@ -554,23 +103,17 @@ static void generic_dpi_panel_power_off(struct omap_dss_device *dssdev)
static int generic_dpi_panel_probe(struct omap_dss_device *dssdev)
{
struct panel_generic_dpi_data *panel_data = get_panel_data(dssdev);
- struct panel_config *panel_config = NULL;
struct panel_drv_data *drv_data = NULL;
- int i;
+ struct panel_config *panel_config;
dev_dbg(&dssdev->dev, "probe\n");
- if (!panel_data || !panel_data->name)
+ if (!panel_data)
return -EINVAL;
- for (i = 0; i < ARRAY_SIZE(generic_dpi_panels); i++) {
- if (strcmp(panel_data->name, generic_dpi_panels[i].name) = 0) {
- panel_config = &generic_dpi_panels[i];
- break;
- }
- }
-
- if (!panel_config)
+ panel_config = &panel_data->pcfg;
+ /* Basic check for config availability */
+ if (!panel_config->timings.x_res)
return -EINVAL;
dssdev->panel.config = panel_config->config;
diff --git a/include/video/omap-panel-generic-dpi.h b/include/video/omap-panel-generic-dpi.h
index 127e3f2..ca5206f 100644
--- a/include/video/omap-panel-generic-dpi.h
+++ b/include/video/omap-panel-generic-dpi.h
@@ -22,6 +22,19 @@
struct omap_dss_device;
+struct panel_config {
+ struct omap_video_timings timings;
+
+ int acbi; /* ac-bias pin transitions per interrupt */
+ /* Unit: line clocks */
+ int acb; /* ac-bias pin frequency */
+
+ enum omap_panel_config config;
+
+ int power_on_delay;
+ int power_off_delay;
+};
+
/**
* struct panel_generic_dpi_data - panel driver configuration data
* @name: panel name
@@ -29,7 +42,7 @@ struct omap_dss_device;
* @platform_disable: platform specific panel disable function
*/
struct panel_generic_dpi_data {
- const char *name;
+ struct panel_config pcfg;
int (*platform_enable)(struct omap_dss_device *dssdev);
void (*platform_disable)(struct omap_dss_device *dssdev);
};
--
1.7.4.1
^ permalink raw reply related
* [PATCH] video: da8xx-fb: do clock reset of revision 2 LCDC before enabling
From: Manjunathappa, Prakash @ 2012-07-20 16:03 UTC (permalink / raw)
To: linux-fbdev
As in specification software reset should be applied for several
cycles before bringing it out of reset. Without this patch
particularly during suspend and resume clock reset is not guaranteed
to happen.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
---
drivers/video/da8xx-fb.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 3d2d0d1..4440292 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -262,10 +262,18 @@ static inline void lcd_enable_raster(void)
{
u32 reg;
+ /* Put LCDC in reset for several cycles */
+ if (lcd_revision = LCD_VERSION_2)
+ /* Write 1 to reset LCDC */
+ lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
+ mdelay(1);
+
/* Bring LCDC out of reset */
if (lcd_revision = LCD_VERSION_2)
lcdc_write(0, LCD_CLK_RESET_REG);
+ mdelay(1);
+ /* Above reset sequence doesnot reset register context */
reg = lcdc_read(LCD_RASTER_CTRL_REG);
if (!(reg & LCD_RASTER_ENABLE))
lcdc_write(reg | LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
@@ -279,10 +287,6 @@ static inline void lcd_disable_raster(void)
reg = lcdc_read(LCD_RASTER_CTRL_REG);
if (reg & LCD_RASTER_ENABLE)
lcdc_write(reg & ~LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
-
- if (lcd_revision = LCD_VERSION_2)
- /* Write 1 to reset LCDC */
- lcdc_write(LCD_CLK_MAIN_RESET, LCD_CLK_RESET_REG);
}
static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
--
1.7.1
^ permalink raw reply related
* [PATCH] video: da8xx-fb: allow frame to complete before disabling LCDC
From: Manjunathappa, Prakash @ 2012-07-20 16:03 UTC (permalink / raw)
To: linux-fbdev
Wait for active frame transfer to complete before disabling LCDC.
At the same this wait is not be required when there are sync and
underflow errors.
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
---
drivers/video/da8xx-fb.c | 58 ++++++++++++++++++++++++++++++++++++---------
1 files changed, 46 insertions(+), 12 deletions(-)
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 4440292..c178592 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -31,6 +31,7 @@
#include <linux/cpufreq.h>
#include <linux/console.h>
#include <linux/slab.h>
+#include <linux/delay.h>
#include <video/da8xx-fb.h>
#include <asm/div64.h>
@@ -45,6 +46,7 @@
#define LCD_PL_LOAD_DONE BIT(6)
#define LCD_FIFO_UNDERFLOW BIT(5)
#define LCD_SYNC_LOST BIT(2)
+#define LCD_FRAME_DONE BIT(0)
/* LCD DMA Control Register */
#define LCD_DMA_BURST_SIZE(x) ((x) << 4)
@@ -129,6 +131,8 @@
#define RIGHT_MARGIN 64
#define UPPER_MARGIN 32
#define LOWER_MARGIN 32
+#define WAIT_FOR_FRAME_DONE true
+#define NO_WAIT_FOR_FRAME_DONE false
static resource_size_t da8xx_fb_reg_base;
static struct resource *lcdc_regs;
@@ -280,13 +284,39 @@ static inline void lcd_enable_raster(void)
}
/* Disable the Raster Engine of the LCD Controller */
-static inline void lcd_disable_raster(void)
+static inline void lcd_disable_raster(bool wait_for_frame_done)
{
u32 reg;
+ u32 loop_cnt = 0;
+ u32 stat;
+ u32 i = 0;
+
+ /* 50 milli seconds should be sufficient for a frame to complete */
+ if (wait_for_frame_done)
+ loop_cnt = 50;
reg = lcdc_read(LCD_RASTER_CTRL_REG);
if (reg & LCD_RASTER_ENABLE)
lcdc_write(reg & ~LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
+
+ /* Wait for the current frame to complete */
+ do {
+ if (lcd_revision = LCD_VERSION_1)
+ stat = lcdc_read(LCD_STAT_REG);
+ else
+ stat = lcdc_read(LCD_RAW_STAT_REG);
+ mdelay(1);
+ } while (!(stat & LCD_FRAME_DONE) && (i++ < loop_cnt));
+
+ if (lcd_revision = LCD_VERSION_1)
+ lcdc_write(stat, LCD_STAT_REG);
+ else
+ lcdc_write(stat, LCD_MASKED_STAT_REG);
+
+ if ((loop_cnt != 0) && (i >= loop_cnt)) {
+ pr_err("LCD Controller timed out\n");
+ return;
+ }
}
static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
@@ -663,7 +693,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
static void lcd_reset(struct da8xx_fb_par *par)
{
/* Disable the Raster if previously Enabled */
- lcd_disable_raster();
+ lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
/* DMA has to be disabled */
lcdc_write(0, LCD_DMA_CTRL_REG);
@@ -760,7 +790,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
u32 reg_int;
if ((stat & LCD_SYNC_LOST) && (stat & LCD_FIFO_UNDERFLOW)) {
- lcd_disable_raster();
+ pr_err("LCDC sync lost or underflow error occured\n");
+ lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
lcdc_write(stat, LCD_MASKED_STAT_REG);
lcd_enable_raster();
} else if (stat & LCD_PL_LOAD_DONE) {
@@ -770,7 +801,7 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
* interrupt via the following write to the status register. If
* this is done after then one gets multiple PL done interrupts.
*/
- lcd_disable_raster();
+ lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
lcdc_write(stat, LCD_MASKED_STAT_REG);
@@ -815,7 +846,8 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg)
u32 reg_ras;
if ((stat & LCD_SYNC_LOST) && (stat & LCD_FIFO_UNDERFLOW)) {
- lcd_disable_raster();
+ pr_err("LCDC sync lost or underflow error occured\n");
+ lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
lcdc_write(stat, LCD_STAT_REG);
lcd_enable_raster();
} else if (stat & LCD_PL_LOAD_DONE) {
@@ -825,7 +857,7 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg)
* interrupt via the following write to the status register. If
* this is done after then one gets multiple PL done interrupts.
*/
- lcd_disable_raster();
+ lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
lcdc_write(stat, LCD_STAT_REG);
@@ -945,7 +977,7 @@ static int lcd_da8xx_cpufreq_transition(struct notifier_block *nb,
if (val = CPUFREQ_POSTCHANGE) {
if (par->lcd_fck_rate != clk_get_rate(par->lcdc_clk)) {
par->lcd_fck_rate = clk_get_rate(par->lcdc_clk);
- lcd_disable_raster();
+ lcd_disable_raster(WAIT_FOR_FRAME_DONE);
lcd_calc_clk_divider(par);
lcd_enable_raster();
}
@@ -982,7 +1014,7 @@ static int __devexit fb_remove(struct platform_device *dev)
if (par->panel_power_ctrl)
par->panel_power_ctrl(0);
- lcd_disable_raster();
+ lcd_disable_raster(WAIT_FOR_FRAME_DONE);
lcdc_write(0, LCD_RASTER_CTRL_REG);
/* disable DMA */
@@ -1095,7 +1127,7 @@ static int cfb_blank(int blank, struct fb_info *info)
if (par->panel_power_ctrl)
par->panel_power_ctrl(0);
- lcd_disable_raster();
+ lcd_disable_raster(WAIT_FOR_FRAME_DONE);
break;
default:
ret = -EINVAL;
@@ -1435,7 +1467,7 @@ static int fb_suspend(struct platform_device *dev, pm_message_t state)
par->panel_power_ctrl(0);
fb_set_suspend(info, 1);
- lcd_disable_raster();
+ lcd_disable_raster(WAIT_FOR_FRAME_DONE);
clk_disable(par->lcdc_clk);
console_unlock();
@@ -1447,11 +1479,13 @@ static int fb_resume(struct platform_device *dev)
struct da8xx_fb_par *par = info->par;
console_lock();
- if (par->panel_power_ctrl)
- par->panel_power_ctrl(1);
clk_enable(par->lcdc_clk);
+ usleep_range(1000, 2000);
lcd_enable_raster();
+ if (par->panel_power_ctrl)
+ par->panel_power_ctrl(1);
+
fb_set_suspend(info, 0);
console_unlock();
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] video: da8xx-fb: allow frame to complete before disabling LCDC
From: Florian Tobias Schandinat @ 2012-07-22 11:50 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1342799516-10842-1-git-send-email-prakash.pm@ti.com>
Hi,
On 07/20/2012 03:51 PM, Manjunathappa, Prakash wrote:
> Wait for active frame transfer to complete before disabling LCDC.
> At the same this wait is not be required when there are sync and
> underflow errors.
>
> Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
> ---
> drivers/video/da8xx-fb.c | 58 ++++++++++++++++++++++++++++++++++++---------
> 1 files changed, 46 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
> index 4440292..c178592 100644
> --- a/drivers/video/da8xx-fb.c
> +++ b/drivers/video/da8xx-fb.c
> @@ -31,6 +31,7 @@
> #include <linux/cpufreq.h>
> #include <linux/console.h>
> #include <linux/slab.h>
> +#include <linux/delay.h>
> #include <video/da8xx-fb.h>
> #include <asm/div64.h>
>
> @@ -45,6 +46,7 @@
> #define LCD_PL_LOAD_DONE BIT(6)
> #define LCD_FIFO_UNDERFLOW BIT(5)
> #define LCD_SYNC_LOST BIT(2)
> +#define LCD_FRAME_DONE BIT(0)
>
> /* LCD DMA Control Register */
> #define LCD_DMA_BURST_SIZE(x) ((x) << 4)
> @@ -129,6 +131,8 @@
> #define RIGHT_MARGIN 64
> #define UPPER_MARGIN 32
> #define LOWER_MARGIN 32
> +#define WAIT_FOR_FRAME_DONE true
> +#define NO_WAIT_FOR_FRAME_DONE false
These defines look a bit strange. While I consider it acceptable, one
really should know the arguments of a function and hence it doesn't make
sense to add an extra abstraction to bool (in contrast to flags where
such defines are really helpful).
>
> static resource_size_t da8xx_fb_reg_base;
> static struct resource *lcdc_regs;
> @@ -280,13 +284,39 @@ static inline void lcd_enable_raster(void)
> }
>
> /* Disable the Raster Engine of the LCD Controller */
> -static inline void lcd_disable_raster(void)
> +static inline void lcd_disable_raster(bool wait_for_frame_done)
> {
> u32 reg;
> + u32 loop_cnt = 0;
> + u32 stat;
> + u32 i = 0;
> +
> + /* 50 milli seconds should be sufficient for a frame to complete */
> + if (wait_for_frame_done)
> + loop_cnt = 50;
>
> reg = lcdc_read(LCD_RASTER_CTRL_REG);
> if (reg & LCD_RASTER_ENABLE)
> lcdc_write(reg & ~LCD_RASTER_ENABLE, LCD_RASTER_CTRL_REG);
> +
> + /* Wait for the current frame to complete */
> + do {
> + if (lcd_revision = LCD_VERSION_1)
> + stat = lcdc_read(LCD_STAT_REG);
> + else
> + stat = lcdc_read(LCD_RAW_STAT_REG);
> + mdelay(1);
> + } while (!(stat & LCD_FRAME_DONE) && (i++ < loop_cnt));
I don't know the documentation of your hardware but this really looks
like you are waiting after you disabled it.
> +
> + if (lcd_revision = LCD_VERSION_1)
> + lcdc_write(stat, LCD_STAT_REG);
> + else
> + lcdc_write(stat, LCD_MASKED_STAT_REG);
> +
> + if ((loop_cnt != 0) && (i >= loop_cnt)) {
> + pr_err("LCD Controller timed out\n");
> + return;
> + }
> }
>
> static void lcd_blit(int load_mode, struct da8xx_fb_par *par)
> @@ -663,7 +693,7 @@ static int fb_setcolreg(unsigned regno, unsigned red, unsigned green,
> static void lcd_reset(struct da8xx_fb_par *par)
> {
> /* Disable the Raster if previously Enabled */
> - lcd_disable_raster();
> + lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
>
> /* DMA has to be disabled */
> lcdc_write(0, LCD_DMA_CTRL_REG);
> @@ -760,7 +790,8 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
> u32 reg_int;
>
> if ((stat & LCD_SYNC_LOST) && (stat & LCD_FIFO_UNDERFLOW)) {
> - lcd_disable_raster();
> + pr_err("LCDC sync lost or underflow error occured\n");
> + lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
> lcdc_write(stat, LCD_MASKED_STAT_REG);
> lcd_enable_raster();
> } else if (stat & LCD_PL_LOAD_DONE) {
> @@ -770,7 +801,7 @@ static irqreturn_t lcdc_irq_handler_rev02(int irq, void *arg)
> * interrupt via the following write to the status register. If
> * this is done after then one gets multiple PL done interrupts.
> */
> - lcd_disable_raster();
> + lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
>
> lcdc_write(stat, LCD_MASKED_STAT_REG);
>
> @@ -815,7 +846,8 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg)
> u32 reg_ras;
>
> if ((stat & LCD_SYNC_LOST) && (stat & LCD_FIFO_UNDERFLOW)) {
> - lcd_disable_raster();
> + pr_err("LCDC sync lost or underflow error occured\n");
> + lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
> lcdc_write(stat, LCD_STAT_REG);
> lcd_enable_raster();
> } else if (stat & LCD_PL_LOAD_DONE) {
> @@ -825,7 +857,7 @@ static irqreturn_t lcdc_irq_handler_rev01(int irq, void *arg)
> * interrupt via the following write to the status register. If
> * this is done after then one gets multiple PL done interrupts.
> */
> - lcd_disable_raster();
> + lcd_disable_raster(NO_WAIT_FOR_FRAME_DONE);
>
> lcdc_write(stat, LCD_STAT_REG);
>
> @@ -945,7 +977,7 @@ static int lcd_da8xx_cpufreq_transition(struct notifier_block *nb,
> if (val = CPUFREQ_POSTCHANGE) {
> if (par->lcd_fck_rate != clk_get_rate(par->lcdc_clk)) {
> par->lcd_fck_rate = clk_get_rate(par->lcdc_clk);
> - lcd_disable_raster();
> + lcd_disable_raster(WAIT_FOR_FRAME_DONE);
> lcd_calc_clk_divider(par);
> lcd_enable_raster();
> }
> @@ -982,7 +1014,7 @@ static int __devexit fb_remove(struct platform_device *dev)
> if (par->panel_power_ctrl)
> par->panel_power_ctrl(0);
>
> - lcd_disable_raster();
> + lcd_disable_raster(WAIT_FOR_FRAME_DONE);
> lcdc_write(0, LCD_RASTER_CTRL_REG);
>
> /* disable DMA */
> @@ -1095,7 +1127,7 @@ static int cfb_blank(int blank, struct fb_info *info)
> if (par->panel_power_ctrl)
> par->panel_power_ctrl(0);
>
> - lcd_disable_raster();
> + lcd_disable_raster(WAIT_FOR_FRAME_DONE);
> break;
> default:
> ret = -EINVAL;
> @@ -1435,7 +1467,7 @@ static int fb_suspend(struct platform_device *dev, pm_message_t state)
> par->panel_power_ctrl(0);
>
> fb_set_suspend(info, 1);
> - lcd_disable_raster();
> + lcd_disable_raster(WAIT_FOR_FRAME_DONE);
> clk_disable(par->lcdc_clk);
> console_unlock();
>
> @@ -1447,11 +1479,13 @@ static int fb_resume(struct platform_device *dev)
> struct da8xx_fb_par *par = info->par;
>
> console_lock();
> - if (par->panel_power_ctrl)
> - par->panel_power_ctrl(1);
>
> clk_enable(par->lcdc_clk);
> + usleep_range(1000, 2000);
> lcd_enable_raster();
> + if (par->panel_power_ctrl)
> + par->panel_power_ctrl(1);
> +
This change looks unrelated and should go in a separate patch?
> fb_set_suspend(info, 0);
> console_unlock();
>
Best regards,
Florian Tobias Schandinat
^ permalink raw reply
* [GIT PULL] OMAP DSS for v3.6
From: Tomi Valkeinen @ 2012-07-22 18:13 UTC (permalink / raw)
To: Florian Tobias Schandinat
Cc: linux-omap, linux-fbdev, Tony Lindgren, Archit Taneja
[-- Attachment #1: Type: text/plain, Size: 6956 bytes --]
Hi Florian,
Here are OMAP DSS changes for 3.6. The main changes are:
- Patches from Archit, which reorganize the output side of omapdss. This
is much cleaner in itself, but will also help us in the future to
implement the missing omap4 features and omap5+ features.
- LCD3 patches from Chandrabhanu, which implement the support for LCD3
overlay manager (for omap5). His patches also generalize the code which
accesses the overlay manager related registers.
There hasn't been new patches applied to the DSS tree for 3 weeks, as
I'm on vacation. The tree has been in linux-next for that period, and I
haven't received any complaints so I hope the stuff works quite well.
Archit also reported that he has tested the linux-next, and it seems to
work fine.
There is a small conflict, though. This was caused by the two fixes
"OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n" and "OMAPDSS: Use PM
notifiers for system suspend", as I had already applied them into my
master branch before Archit sent them for you. And as you fixed the code
formatting issue (sorry about that), we have a small conflict there.
The conflict is trivial to resolve, and I also pushed for-florian-merged
branch to the same git tree below, which has the conflict resolved.
I'm still on vacation for the next week, but I'll check my email every
now and then to see if there are any issues.
Tomi
The following changes since commit cfaf025112d3856637ff34a767ef785ef5cf2ca9:
Linux 3.5-rc2 (2012-06-08 18:40:09 -0700)
are available in the git repository at:
git://gitorious.org/linux-omap-dss2/linux.git for-florian
for you to fetch changes up to 974a65825e0b5fbda49605f0416a2c975d66e9e6:
Merge "Apply LCD manager related parameters" from Archit (2012-06-29 14:13:07 +0300)
----------------------------------------------------------------
Archit Taneja (27):
OMAPDSS: Remove passive matrix LCD support (part 1)
OMAPDSS: Remove passive matrix LCD support (part 2)
OMAPDSS: Remove passive matrix LCD support (part 3)
OMAPDSS: Remove passive matrix LCD support (part 4)
OMAPDSS: Add some new fields to omap_video_timings
OMAPDSS: DISPLAY: Ignore newly added omap_video_timings fields for display timings sysfs file
OMAPDSS: DISPC: Configure newly added omap_video_timing fields
OMAPDSS: DISPC: Remove dispc_mgr_set_pol_freq()
OMAPFB: Map the newly added omap_video_timings fields with fb sync flags
OMAPDSS: Remove omap_panel_config enum from omap_dss_device
OMAPDSS: Add interlace parameter to omap_video_timings
OMAPDSS: DISPC/APPLY: Use interlace info in manager timings for dispc_ovl_setup()
OMAPFB: Map interlace field in omap_video_timings with fb vmode flags
OMAPDSS: HDMI: Remove custom hdmi_video_timings struct
OMAPDSS: DSI: Fix HSYNC, VSYNC and DE polarities between DISPC and DSI
OMAPDSS: DISPC: Change return type of dispc_mgr_set_clock_div()
OMAPDSS: Add struct to hold LCD overlay manager configuration
OMAPDSS: DPI: Configure dss_lcd_mgr_config struct with lcd manager parameters
OMAPDSS: RFBI: Configure dss_lcd_mgr_config struct with lcd manager parameters
OMAPDSS: DSI: Configure dss_lcd_mgr_config struct with lcd manager parameters
OMAPDSS: SDI: Configure dss_lcd_mgr_config struct with lcd manager parameters
OMAPDSS: APPLY: Remove DISPC writes to manager's lcd parameters in interface drivers
OMAPDSS: MANAGER: Check LCD related overlay manager parameters
OMAPDSS: APPLY: Remove usage of omap_dss_device from manual/auto update checks
OMAPDSS: DISPC: Remove a redundant function
OMAPDSS: RFBI: Use dss_mgr_enable to enable the overlay manager
OMAPDSS: OVERLAY: Clean up replication checking
Chandrabhanu Mahapatra (5):
OMAPDSS: Cleanup implementation of LCD channels
OMAPDSS: Add support for LCD3 channel
OMAPDSS: Add LCD3 overlay manager and Clock and IRQ support
OMAPDSS: Add dump and debug support for LCD3
ARM: OMAP2PLUS: DSS: Disable LCD3 output when resetting DSS
Jassi Brar (2):
OMAPDSS: HDMI: Discard phy_tx_enabled member
OMAPDSS: HDMI: Replace spinlock with mutex in hdmi_check_hpd_state
Peter Meerwald (1):
OMAPDSS: fix specification spelling in Kconfig
Rajendra Nayak (1):
OMAPDSS: add clk_prepare_enable and clk_disable_unprepare
Tomi Valkeinen (6):
Merge tag 'v3.5-rc2'
OMAPDSS: remove enum omap_dss_overlay_managers
OMAPDSS: Use PM notifiers for system suspend
OMAPDSS: fix warnings if CONFIG_PM_RUNTIME=n
Merge Misc DSS clean ups from Archit
Merge "Apply LCD manager related parameters" from Archit
arch/arm/mach-omap2/display.c | 29 +-
drivers/video/omap2/displays/panel-acx565akm.c | 10 +-
drivers/video/omap2/displays/panel-generic-dpi.c | 179 ++++---
.../omap2/displays/panel-lgphilips-lb035q02.c | 8 +-
drivers/video/omap2/displays/panel-n8x0.c | 1 -
.../omap2/displays/panel-nec-nl8048hl11-01b.c | 9 +-
drivers/video/omap2/displays/panel-picodlp.c | 9 +-
.../video/omap2/displays/panel-sharp-ls037v7dw01.c | 9 +-
drivers/video/omap2/displays/panel-taal.c | 3 +-
drivers/video/omap2/displays/panel-tfp410.c | 7 +-
.../video/omap2/displays/panel-tpo-td043mtea1.c | 8 +-
drivers/video/omap2/dss/Kconfig | 4 +-
drivers/video/omap2/dss/apply.c | 91 +++-
drivers/video/omap2/dss/core.c | 48 +-
drivers/video/omap2/dss/dispc.c | 496 ++++++++++----------
drivers/video/omap2/dss/dispc.h | 28 ++
drivers/video/omap2/dss/display.c | 40 +-
drivers/video/omap2/dss/dpi.c | 64 +--
drivers/video/omap2/dss/dsi.c | 156 +++---
drivers/video/omap2/dss/dss.c | 21 +-
drivers/video/omap2/dss/dss.h | 54 ++-
drivers/video/omap2/dss/dss_features.h | 5 +-
drivers/video/omap2/dss/hdmi.c | 248 ++++++++--
drivers/video/omap2/dss/hdmi_panel.c | 9 +-
drivers/video/omap2/dss/manager.c | 51 +-
drivers/video/omap2/dss/overlay.c | 33 +-
drivers/video/omap2/dss/rfbi.c | 42 +-
drivers/video/omap2/dss/sdi.c | 42 +-
drivers/video/omap2/dss/ti_hdmi.h | 21 +-
drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 26 +-
drivers/video/omap2/dss/venc.c | 10 +-
drivers/video/omap2/omapfb/omapfb-main.c | 51 +-
include/video/omapdss.h | 51 +-
33 files changed, 1172 insertions(+), 691 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
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