* [PATCH 0/2] OMAPDSS: DISPC: Update manager size limits for OMAP5
@ 2012-11-14 8:32 Archit Taneja
2012-11-14 8:32 ` [PATCH 1/2] OMAPDSS: Add overlay manager width and height limits as a dispc feature Archit Taneja
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Archit Taneja @ 2012-11-14 8:32 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: linux-fbdev, linux-omap, Archit Taneja
Manager width and height can go up to 4K on OMAP5. Make manager width and height
register field offsets and maximum limits as dispc_features. Create a new
dispc_feature struct for OMAP5 which highlights this difference.
Archit Taneja (2):
OMAPDSS: Add overlay manager width and height limits as a dispc
feature
OMAPDSS: Add a dispc_features struct for OMAP5
drivers/video/omap2/dss/dispc.c | 47 +++++++++++++++++++++++++++++---
drivers/video/omap2/dss/dss_features.c | 8 ------
drivers/video/omap2/dss/dss_features.h | 2 --
3 files changed, 43 insertions(+), 14 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] OMAPDSS: Add overlay manager width and height limits as a dispc feature
2012-11-14 8:32 [PATCH 0/2] OMAPDSS: DISPC: Update manager size limits for OMAP5 Archit Taneja
@ 2012-11-14 8:32 ` Archit Taneja
2012-11-14 8:32 ` [PATCH 2/2] OMAPDSS: Add a dispc_features struct for OMAP5 Archit Taneja
2012-11-20 14:54 ` [PATCH 0/2] OMAPDSS: DISPC: Update manager size limits " Tomi Valkeinen
2 siblings, 0 replies; 4+ messages in thread
From: Archit Taneja @ 2012-11-14 8:32 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: linux-fbdev, linux-omap, Archit Taneja
The overlay manager width and height vary in OMAP5 vary from previous OMAPs in
terms of maximum limit and register field positions. Add parameters in
dispc_features for these. Remove params related to manager width and height from
dss_features. We do this because we want to maintain a feature list for
individual IPs.
Signed-off-by: Archit Taneja <archit@ti.com>
---
drivers/video/omap2/dss/dispc.c | 28 +++++++++++++++++++++++++---
drivers/video/omap2/dss/dss_features.c | 8 --------
drivers/video/omap2/dss/dss_features.h | 2 --
3 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index bab9d6b..29e6aa1 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -87,6 +87,10 @@ struct dispc_features {
u16 sw_max;
u16 vp_max;
u16 hp_max;
+ u8 mgr_width_start;
+ u8 mgr_height_start;
+ u16 mgr_width_max;
+ u16 mgr_height_max;
int (*calc_scaling) (enum omap_plane plane,
const struct omap_video_timings *mgr_timings,
u16 width, u16 height, u16 out_width, u16 out_height,
@@ -1128,7 +1132,9 @@ static void dispc_mgr_set_size(enum omap_channel channel, u16 width,
{
u32 val;
- val = FLD_VAL(height - 1, 26, 16) | FLD_VAL(width - 1, 10, 0);
+ val = FLD_VAL(height - 1, dispc.feat->mgr_height_start, 16) |
+ FLD_VAL(width - 1, dispc.feat->mgr_width_start, 0);
+
dispc_write_reg(DISPC_SIZE_MGR(channel), val);
}
@@ -2985,8 +2991,8 @@ void dispc_mgr_set_lcd_config(enum omap_channel channel,
static bool _dispc_mgr_size_ok(u16 width, u16 height)
{
- return width <= dss_feat_get_param_max(FEAT_PARAM_MGR_WIDTH) &&
- height <= dss_feat_get_param_max(FEAT_PARAM_MGR_HEIGHT);
+ return width <= dispc.feat->mgr_width_max &&
+ height <= dispc.feat->mgr_height_max;
}
static bool _dispc_lcd_timings_ok(int hsw, int hfp, int hbp,
@@ -4067,6 +4073,10 @@ static const struct dispc_features omap24xx_dispc_feats __initconst = {
.sw_max = 64,
.vp_max = 255,
.hp_max = 256,
+ .mgr_width_start = 10,
+ .mgr_height_start = 26,
+ .mgr_width_max = 2048,
+ .mgr_height_max = 2048,
.calc_scaling = dispc_ovl_calc_scaling_24xx,
.calc_core_clk = calc_core_clk_24xx,
.num_fifos = 3,
@@ -4079,6 +4089,10 @@ static const struct dispc_features omap34xx_rev1_0_dispc_feats __initconst = {
.sw_max = 64,
.vp_max = 255,
.hp_max = 256,
+ .mgr_width_start = 10,
+ .mgr_height_start = 26,
+ .mgr_width_max = 2048,
+ .mgr_height_max = 2048,
.calc_scaling = dispc_ovl_calc_scaling_34xx,
.calc_core_clk = calc_core_clk_34xx,
.num_fifos = 3,
@@ -4091,6 +4105,10 @@ static const struct dispc_features omap34xx_rev3_0_dispc_feats __initconst = {
.sw_max = 256,
.vp_max = 4095,
.hp_max = 4096,
+ .mgr_width_start = 10,
+ .mgr_height_start = 26,
+ .mgr_width_max = 2048,
+ .mgr_height_max = 2048,
.calc_scaling = dispc_ovl_calc_scaling_34xx,
.calc_core_clk = calc_core_clk_34xx,
.num_fifos = 3,
@@ -4103,6 +4121,10 @@ static const struct dispc_features omap44xx_dispc_feats __initconst = {
.sw_max = 256,
.vp_max = 4095,
.hp_max = 4096,
+ .mgr_width_start = 10,
+ .mgr_height_start = 26,
+ .mgr_width_max = 2048,
+ .mgr_height_max = 2048,
.calc_scaling = dispc_ovl_calc_scaling_44xx,
.calc_core_clk = calc_core_clk_44xx,
.num_fifos = 5,
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c
index 8dcecbc..1d125c6 100644
--- a/drivers/video/omap2/dss/dss_features.c
+++ b/drivers/video/omap2/dss/dss_features.c
@@ -429,8 +429,6 @@ static const struct dss_param_range omap2_dss_param_range[] = {
* scaler cannot scale a image with width more than 768.
*/
[FEAT_PARAM_LINEWIDTH] = { 1, 768 },
- [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 },
- [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 },
};
static const struct dss_param_range omap3_dss_param_range[] = {
@@ -445,8 +443,6 @@ static const struct dss_param_range omap3_dss_param_range[] = {
[FEAT_PARAM_DSI_FCK] = { 0, 173000000 },
[FEAT_PARAM_DOWNSCALE] = { 1, 4 },
[FEAT_PARAM_LINEWIDTH] = { 1, 1024 },
- [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 },
- [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 },
};
static const struct dss_param_range omap4_dss_param_range[] = {
@@ -461,8 +457,6 @@ static const struct dss_param_range omap4_dss_param_range[] = {
[FEAT_PARAM_DSI_FCK] = { 0, 170000000 },
[FEAT_PARAM_DOWNSCALE] = { 1, 4 },
[FEAT_PARAM_LINEWIDTH] = { 1, 2048 },
- [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 },
- [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 },
};
static const struct dss_param_range omap5_dss_param_range[] = {
@@ -477,8 +471,6 @@ static const struct dss_param_range omap5_dss_param_range[] = {
[FEAT_PARAM_DSI_FCK] = { 0, 170000000 },
[FEAT_PARAM_DOWNSCALE] = { 1, 4 },
[FEAT_PARAM_LINEWIDTH] = { 1, 2048 },
- [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 },
- [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 },
};
static const enum dss_feat_id omap2_dss_feat_list[] = {
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h
index fc492ef..385b0af 100644
--- a/drivers/video/omap2/dss/dss_features.h
+++ b/drivers/video/omap2/dss/dss_features.h
@@ -98,8 +98,6 @@ enum dss_range_param {
FEAT_PARAM_DSI_FCK,
FEAT_PARAM_DOWNSCALE,
FEAT_PARAM_LINEWIDTH,
- FEAT_PARAM_MGR_WIDTH,
- FEAT_PARAM_MGR_HEIGHT,
};
/* DSS Feature Functions */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] OMAPDSS: Add a dispc_features struct for OMAP5
2012-11-14 8:32 [PATCH 0/2] OMAPDSS: DISPC: Update manager size limits for OMAP5 Archit Taneja
2012-11-14 8:32 ` [PATCH 1/2] OMAPDSS: Add overlay manager width and height limits as a dispc feature Archit Taneja
@ 2012-11-14 8:32 ` Archit Taneja
2012-11-20 14:54 ` [PATCH 0/2] OMAPDSS: DISPC: Update manager size limits " Tomi Valkeinen
2 siblings, 0 replies; 4+ messages in thread
From: Archit Taneja @ 2012-11-14 8:32 UTC (permalink / raw)
To: tomi.valkeinen; +Cc: linux-fbdev, linux-omap, Archit Taneja
Add a dispc_features struct for OMAP5. Previously, OMAP5 used the same struct
as OMAP4. The new struct for OMAP5 contains the updated register field offset
and maximum limit for overlay manager width and height.
Signed-off-by: Archit Taneja <archit@ti.com>
---
drivers/video/omap2/dss/dispc.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 29e6aa1..c681460 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -4131,6 +4131,23 @@ static const struct dispc_features omap44xx_dispc_feats __initconst = {
.gfx_fifo_workaround = true,
};
+static const struct dispc_features omap54xx_dispc_feats __initconst = {
+ .sw_start = 7,
+ .fp_start = 19,
+ .bp_start = 31,
+ .sw_max = 256,
+ .vp_max = 4095,
+ .hp_max = 4096,
+ .mgr_width_start = 11,
+ .mgr_height_start = 27,
+ .mgr_width_max = 4096,
+ .mgr_height_max = 4096,
+ .calc_scaling = dispc_ovl_calc_scaling_44xx,
+ .calc_core_clk = calc_core_clk_44xx,
+ .num_fifos = 5,
+ .gfx_fifo_workaround = true,
+};
+
static int __init dispc_init_features(struct platform_device *pdev)
{
const struct dispc_features *src;
@@ -4164,7 +4181,7 @@ static int __init dispc_init_features(struct platform_device *pdev)
break;
case OMAPDSS_VER_OMAP5:
- src = &omap44xx_dispc_feats;
+ src = &omap54xx_dispc_feats;
break;
default:
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] OMAPDSS: DISPC: Update manager size limits for OMAP5
2012-11-14 8:32 [PATCH 0/2] OMAPDSS: DISPC: Update manager size limits for OMAP5 Archit Taneja
2012-11-14 8:32 ` [PATCH 1/2] OMAPDSS: Add overlay manager width and height limits as a dispc feature Archit Taneja
2012-11-14 8:32 ` [PATCH 2/2] OMAPDSS: Add a dispc_features struct for OMAP5 Archit Taneja
@ 2012-11-20 14:54 ` Tomi Valkeinen
2 siblings, 0 replies; 4+ messages in thread
From: Tomi Valkeinen @ 2012-11-20 14:54 UTC (permalink / raw)
To: Archit Taneja; +Cc: linux-fbdev, linux-omap
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
On 2012-11-14 10:20, Archit Taneja wrote:
> Manager width and height can go up to 4K on OMAP5. Make manager width and height
> register field offsets and maximum limits as dispc_features. Create a new
> dispc_feature struct for OMAP5 which highlights this difference.
>
> Archit Taneja (2):
> OMAPDSS: Add overlay manager width and height limits as a dispc
> feature
> OMAPDSS: Add a dispc_features struct for OMAP5
>
> drivers/video/omap2/dss/dispc.c | 47 +++++++++++++++++++++++++++++---
> drivers/video/omap2/dss/dss_features.c | 8 ------
> drivers/video/omap2/dss/dss_features.h | 2 --
> 3 files changed, 43 insertions(+), 14 deletions(-)
>
Thanks, looks fine. I'll apply to omapdss tree.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 897 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-20 14:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 8:32 [PATCH 0/2] OMAPDSS: DISPC: Update manager size limits for OMAP5 Archit Taneja
2012-11-14 8:32 ` [PATCH 1/2] OMAPDSS: Add overlay manager width and height limits as a dispc feature Archit Taneja
2012-11-14 8:32 ` [PATCH 2/2] OMAPDSS: Add a dispc_features struct for OMAP5 Archit Taneja
2012-11-20 14:54 ` [PATCH 0/2] OMAPDSS: DISPC: Update manager size limits " Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).