diff options
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 28 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 8 | ||||
-rw-r--r-- | 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 170c98c17a80..98e754b4a4d3 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -87,6 +87,10 @@ struct dispc_features { | |||
87 | u16 sw_max; | 87 | u16 sw_max; |
88 | u16 vp_max; | 88 | u16 vp_max; |
89 | u16 hp_max; | 89 | u16 hp_max; |
90 | u8 mgr_width_start; | ||
91 | u8 mgr_height_start; | ||
92 | u16 mgr_width_max; | ||
93 | u16 mgr_height_max; | ||
90 | int (*calc_scaling) (enum omap_plane plane, | 94 | int (*calc_scaling) (enum omap_plane plane, |
91 | const struct omap_video_timings *mgr_timings, | 95 | const struct omap_video_timings *mgr_timings, |
92 | u16 width, u16 height, u16 out_width, u16 out_height, | 96 | 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, | |||
1128 | { | 1132 | { |
1129 | u32 val; | 1133 | u32 val; |
1130 | 1134 | ||
1131 | val = FLD_VAL(height - 1, 26, 16) | FLD_VAL(width - 1, 10, 0); | 1135 | val = FLD_VAL(height - 1, dispc.feat->mgr_height_start, 16) | |
1136 | FLD_VAL(width - 1, dispc.feat->mgr_width_start, 0); | ||
1137 | |||
1132 | dispc_write_reg(DISPC_SIZE_MGR(channel), val); | 1138 | dispc_write_reg(DISPC_SIZE_MGR(channel), val); |
1133 | } | 1139 | } |
1134 | 1140 | ||
@@ -3000,8 +3006,8 @@ void dispc_mgr_set_lcd_config(enum omap_channel channel, | |||
3000 | 3006 | ||
3001 | static bool _dispc_mgr_size_ok(u16 width, u16 height) | 3007 | static bool _dispc_mgr_size_ok(u16 width, u16 height) |
3002 | { | 3008 | { |
3003 | return width <= dss_feat_get_param_max(FEAT_PARAM_MGR_WIDTH) && | 3009 | return width <= dispc.feat->mgr_width_max && |
3004 | height <= dss_feat_get_param_max(FEAT_PARAM_MGR_HEIGHT); | 3010 | height <= dispc.feat->mgr_height_max; |
3005 | } | 3011 | } |
3006 | 3012 | ||
3007 | static bool _dispc_lcd_timings_ok(int hsw, int hfp, int hbp, | 3013 | static bool _dispc_lcd_timings_ok(int hsw, int hfp, int hbp, |
@@ -4082,6 +4088,10 @@ static const struct dispc_features omap24xx_dispc_feats __initconst = { | |||
4082 | .sw_max = 64, | 4088 | .sw_max = 64, |
4083 | .vp_max = 255, | 4089 | .vp_max = 255, |
4084 | .hp_max = 256, | 4090 | .hp_max = 256, |
4091 | .mgr_width_start = 10, | ||
4092 | .mgr_height_start = 26, | ||
4093 | .mgr_width_max = 2048, | ||
4094 | .mgr_height_max = 2048, | ||
4085 | .calc_scaling = dispc_ovl_calc_scaling_24xx, | 4095 | .calc_scaling = dispc_ovl_calc_scaling_24xx, |
4086 | .calc_core_clk = calc_core_clk_24xx, | 4096 | .calc_core_clk = calc_core_clk_24xx, |
4087 | .num_fifos = 3, | 4097 | .num_fifos = 3, |
@@ -4094,6 +4104,10 @@ static const struct dispc_features omap34xx_rev1_0_dispc_feats __initconst = { | |||
4094 | .sw_max = 64, | 4104 | .sw_max = 64, |
4095 | .vp_max = 255, | 4105 | .vp_max = 255, |
4096 | .hp_max = 256, | 4106 | .hp_max = 256, |
4107 | .mgr_width_start = 10, | ||
4108 | .mgr_height_start = 26, | ||
4109 | .mgr_width_max = 2048, | ||
4110 | .mgr_height_max = 2048, | ||
4097 | .calc_scaling = dispc_ovl_calc_scaling_34xx, | 4111 | .calc_scaling = dispc_ovl_calc_scaling_34xx, |
4098 | .calc_core_clk = calc_core_clk_34xx, | 4112 | .calc_core_clk = calc_core_clk_34xx, |
4099 | .num_fifos = 3, | 4113 | .num_fifos = 3, |
@@ -4106,6 +4120,10 @@ static const struct dispc_features omap34xx_rev3_0_dispc_feats __initconst = { | |||
4106 | .sw_max = 256, | 4120 | .sw_max = 256, |
4107 | .vp_max = 4095, | 4121 | .vp_max = 4095, |
4108 | .hp_max = 4096, | 4122 | .hp_max = 4096, |
4123 | .mgr_width_start = 10, | ||
4124 | .mgr_height_start = 26, | ||
4125 | .mgr_width_max = 2048, | ||
4126 | .mgr_height_max = 2048, | ||
4109 | .calc_scaling = dispc_ovl_calc_scaling_34xx, | 4127 | .calc_scaling = dispc_ovl_calc_scaling_34xx, |
4110 | .calc_core_clk = calc_core_clk_34xx, | 4128 | .calc_core_clk = calc_core_clk_34xx, |
4111 | .num_fifos = 3, | 4129 | .num_fifos = 3, |
@@ -4118,6 +4136,10 @@ static const struct dispc_features omap44xx_dispc_feats __initconst = { | |||
4118 | .sw_max = 256, | 4136 | .sw_max = 256, |
4119 | .vp_max = 4095, | 4137 | .vp_max = 4095, |
4120 | .hp_max = 4096, | 4138 | .hp_max = 4096, |
4139 | .mgr_width_start = 10, | ||
4140 | .mgr_height_start = 26, | ||
4141 | .mgr_width_max = 2048, | ||
4142 | .mgr_height_max = 2048, | ||
4121 | .calc_scaling = dispc_ovl_calc_scaling_44xx, | 4143 | .calc_scaling = dispc_ovl_calc_scaling_44xx, |
4122 | .calc_core_clk = calc_core_clk_44xx, | 4144 | .calc_core_clk = calc_core_clk_44xx, |
4123 | .num_fifos = 5, | 4145 | .num_fifos = 5, |
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 8dcecbca46a5..1d125c6bfd19 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[] = { | |||
429 | * scaler cannot scale a image with width more than 768. | 429 | * scaler cannot scale a image with width more than 768. |
430 | */ | 430 | */ |
431 | [FEAT_PARAM_LINEWIDTH] = { 1, 768 }, | 431 | [FEAT_PARAM_LINEWIDTH] = { 1, 768 }, |
432 | [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 }, | ||
433 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, | ||
434 | }; | 432 | }; |
435 | 433 | ||
436 | static const struct dss_param_range omap3_dss_param_range[] = { | 434 | static const struct dss_param_range omap3_dss_param_range[] = { |
@@ -445,8 +443,6 @@ static const struct dss_param_range omap3_dss_param_range[] = { | |||
445 | [FEAT_PARAM_DSI_FCK] = { 0, 173000000 }, | 443 | [FEAT_PARAM_DSI_FCK] = { 0, 173000000 }, |
446 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, | 444 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, |
447 | [FEAT_PARAM_LINEWIDTH] = { 1, 1024 }, | 445 | [FEAT_PARAM_LINEWIDTH] = { 1, 1024 }, |
448 | [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 }, | ||
449 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, | ||
450 | }; | 446 | }; |
451 | 447 | ||
452 | static const struct dss_param_range omap4_dss_param_range[] = { | 448 | static const struct dss_param_range omap4_dss_param_range[] = { |
@@ -461,8 +457,6 @@ static const struct dss_param_range omap4_dss_param_range[] = { | |||
461 | [FEAT_PARAM_DSI_FCK] = { 0, 170000000 }, | 457 | [FEAT_PARAM_DSI_FCK] = { 0, 170000000 }, |
462 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, | 458 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, |
463 | [FEAT_PARAM_LINEWIDTH] = { 1, 2048 }, | 459 | [FEAT_PARAM_LINEWIDTH] = { 1, 2048 }, |
464 | [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 }, | ||
465 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, | ||
466 | }; | 460 | }; |
467 | 461 | ||
468 | static const struct dss_param_range omap5_dss_param_range[] = { | 462 | static const struct dss_param_range omap5_dss_param_range[] = { |
@@ -477,8 +471,6 @@ static const struct dss_param_range omap5_dss_param_range[] = { | |||
477 | [FEAT_PARAM_DSI_FCK] = { 0, 170000000 }, | 471 | [FEAT_PARAM_DSI_FCK] = { 0, 170000000 }, |
478 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, | 472 | [FEAT_PARAM_DOWNSCALE] = { 1, 4 }, |
479 | [FEAT_PARAM_LINEWIDTH] = { 1, 2048 }, | 473 | [FEAT_PARAM_LINEWIDTH] = { 1, 2048 }, |
480 | [FEAT_PARAM_MGR_WIDTH] = { 1, 2048 }, | ||
481 | [FEAT_PARAM_MGR_HEIGHT] = { 1, 2048 }, | ||
482 | }; | 474 | }; |
483 | 475 | ||
484 | static const enum dss_feat_id omap2_dss_feat_list[] = { | 476 | 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 fc492ef72a51..385b0afe63c2 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 { | |||
98 | FEAT_PARAM_DSI_FCK, | 98 | FEAT_PARAM_DSI_FCK, |
99 | FEAT_PARAM_DOWNSCALE, | 99 | FEAT_PARAM_DOWNSCALE, |
100 | FEAT_PARAM_LINEWIDTH, | 100 | FEAT_PARAM_LINEWIDTH, |
101 | FEAT_PARAM_MGR_WIDTH, | ||
102 | FEAT_PARAM_MGR_HEIGHT, | ||
103 | }; | 101 | }; |
104 | 102 | ||
105 | /* DSS Feature Functions */ | 103 | /* DSS Feature Functions */ |