Commit 1ac0c894 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm: omapdrm: Move FEAT_* features to dispc driver

All the remaining FEAT_* features are specific to the DISPC, move them
from the omap_dss_features structure to the dispc driver.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 4569ab75
This diff is collapsed.
...@@ -33,9 +33,6 @@ struct dss_param_range { ...@@ -33,9 +33,6 @@ struct dss_param_range {
}; };
struct omap_dss_features { struct omap_dss_features {
const enum dss_feat_id *features;
const int num_features;
const enum omap_dss_output_id *supported_outputs; const enum omap_dss_output_id *supported_outputs;
const struct dss_param_range *dss_params; const struct dss_param_range *dss_params;
}; };
...@@ -148,146 +145,14 @@ static const struct dss_param_range omap5_dss_param_range[] = { ...@@ -148,146 +145,14 @@ static const struct dss_param_range omap5_dss_param_range[] = {
[FEAT_PARAM_LINEWIDTH] = { 1, 2048 }, [FEAT_PARAM_LINEWIDTH] = { 1, 2048 },
}; };
static const enum dss_feat_id omap2_dss_feat_list[] = {
FEAT_LCDENABLEPOL,
FEAT_LCDENABLESIGNAL,
FEAT_PCKFREEENABLE,
FEAT_FUNCGATED,
FEAT_ROWREPEATENABLE,
FEAT_RESIZECONF,
};
static const enum dss_feat_id omap3430_dss_feat_list[] = {
FEAT_LCDENABLEPOL,
FEAT_LCDENABLESIGNAL,
FEAT_PCKFREEENABLE,
FEAT_FUNCGATED,
FEAT_LINEBUFFERSPLIT,
FEAT_ROWREPEATENABLE,
FEAT_RESIZECONF,
FEAT_CPR,
FEAT_PRELOAD,
FEAT_FIR_COEF_V,
FEAT_ALPHA_FIXED_ZORDER,
FEAT_FIFO_MERGE,
FEAT_OMAP3_DSI_FIFO_BUG,
};
static const enum dss_feat_id am35xx_dss_feat_list[] = {
FEAT_LCDENABLEPOL,
FEAT_LCDENABLESIGNAL,
FEAT_PCKFREEENABLE,
FEAT_FUNCGATED,
FEAT_LINEBUFFERSPLIT,
FEAT_ROWREPEATENABLE,
FEAT_RESIZECONF,
FEAT_CPR,
FEAT_PRELOAD,
FEAT_FIR_COEF_V,
FEAT_ALPHA_FIXED_ZORDER,
FEAT_FIFO_MERGE,
FEAT_OMAP3_DSI_FIFO_BUG,
};
static const enum dss_feat_id am43xx_dss_feat_list[] = {
FEAT_LCDENABLEPOL,
FEAT_LCDENABLESIGNAL,
FEAT_PCKFREEENABLE,
FEAT_FUNCGATED,
FEAT_LINEBUFFERSPLIT,
FEAT_ROWREPEATENABLE,
FEAT_RESIZECONF,
FEAT_CPR,
FEAT_PRELOAD,
FEAT_FIR_COEF_V,
FEAT_ALPHA_FIXED_ZORDER,
FEAT_FIFO_MERGE,
};
static const enum dss_feat_id omap3630_dss_feat_list[] = {
FEAT_LCDENABLEPOL,
FEAT_LCDENABLESIGNAL,
FEAT_PCKFREEENABLE,
FEAT_FUNCGATED,
FEAT_LINEBUFFERSPLIT,
FEAT_ROWREPEATENABLE,
FEAT_RESIZECONF,
FEAT_CPR,
FEAT_PRELOAD,
FEAT_FIR_COEF_V,
FEAT_ALPHA_FIXED_ZORDER,
FEAT_FIFO_MERGE,
FEAT_OMAP3_DSI_FIFO_BUG,
};
static const enum dss_feat_id omap4430_es1_0_dss_feat_list[] = {
FEAT_MGR_LCD2,
FEAT_CORE_CLK_DIV,
FEAT_HANDLE_UV_SEPARATE,
FEAT_ATTR2,
FEAT_CPR,
FEAT_PRELOAD,
FEAT_FIR_COEF_V,
FEAT_ALPHA_FREE_ZORDER,
FEAT_FIFO_MERGE,
FEAT_BURST_2D,
};
static const enum dss_feat_id omap4430_es2_0_1_2_dss_feat_list[] = {
FEAT_MGR_LCD2,
FEAT_CORE_CLK_DIV,
FEAT_HANDLE_UV_SEPARATE,
FEAT_ATTR2,
FEAT_CPR,
FEAT_PRELOAD,
FEAT_FIR_COEF_V,
FEAT_ALPHA_FREE_ZORDER,
FEAT_FIFO_MERGE,
FEAT_BURST_2D,
};
static const enum dss_feat_id omap4_dss_feat_list[] = {
FEAT_MGR_LCD2,
FEAT_CORE_CLK_DIV,
FEAT_HANDLE_UV_SEPARATE,
FEAT_ATTR2,
FEAT_CPR,
FEAT_PRELOAD,
FEAT_FIR_COEF_V,
FEAT_ALPHA_FREE_ZORDER,
FEAT_FIFO_MERGE,
FEAT_BURST_2D,
};
static const enum dss_feat_id omap5_dss_feat_list[] = {
FEAT_MGR_LCD2,
FEAT_MGR_LCD3,
FEAT_CORE_CLK_DIV,
FEAT_HANDLE_UV_SEPARATE,
FEAT_ATTR2,
FEAT_CPR,
FEAT_PRELOAD,
FEAT_FIR_COEF_V,
FEAT_ALPHA_FREE_ZORDER,
FEAT_FIFO_MERGE,
FEAT_BURST_2D,
FEAT_MFLAG,
};
/* OMAP2 DSS Features */ /* OMAP2 DSS Features */
static const struct omap_dss_features omap2_dss_features = { static const struct omap_dss_features omap2_dss_features = {
.features = omap2_dss_feat_list,
.num_features = ARRAY_SIZE(omap2_dss_feat_list),
.supported_outputs = omap2_dss_supported_outputs, .supported_outputs = omap2_dss_supported_outputs,
.dss_params = omap2_dss_param_range, .dss_params = omap2_dss_param_range,
}; };
/* OMAP3 DSS Features */ /* OMAP3 DSS Features */
static const struct omap_dss_features omap3430_dss_features = { static const struct omap_dss_features omap3430_dss_features = {
.features = omap3430_dss_feat_list,
.num_features = ARRAY_SIZE(omap3430_dss_feat_list),
.supported_outputs = omap3430_dss_supported_outputs, .supported_outputs = omap3430_dss_supported_outputs,
.dss_params = omap3_dss_param_range, .dss_params = omap3_dss_param_range,
}; };
...@@ -297,25 +162,16 @@ static const struct omap_dss_features omap3430_dss_features = { ...@@ -297,25 +162,16 @@ static const struct omap_dss_features omap3430_dss_features = {
* vdds_dsi regulator. * vdds_dsi regulator.
*/ */
static const struct omap_dss_features am35xx_dss_features = { static const struct omap_dss_features am35xx_dss_features = {
.features = am35xx_dss_feat_list,
.num_features = ARRAY_SIZE(am35xx_dss_feat_list),
.supported_outputs = omap3430_dss_supported_outputs, .supported_outputs = omap3430_dss_supported_outputs,
.dss_params = omap3_dss_param_range, .dss_params = omap3_dss_param_range,
}; };
static const struct omap_dss_features am43xx_dss_features = { static const struct omap_dss_features am43xx_dss_features = {
.features = am43xx_dss_feat_list,
.num_features = ARRAY_SIZE(am43xx_dss_feat_list),
.supported_outputs = am43xx_dss_supported_outputs, .supported_outputs = am43xx_dss_supported_outputs,
.dss_params = am43xx_dss_param_range, .dss_params = am43xx_dss_param_range,
}; };
static const struct omap_dss_features omap3630_dss_features = { static const struct omap_dss_features omap3630_dss_features = {
.features = omap3630_dss_feat_list,
.num_features = ARRAY_SIZE(omap3630_dss_feat_list),
.supported_outputs = omap3630_dss_supported_outputs, .supported_outputs = omap3630_dss_supported_outputs,
.dss_params = omap3_dss_param_range, .dss_params = omap3_dss_param_range,
}; };
...@@ -323,36 +179,24 @@ static const struct omap_dss_features omap3630_dss_features = { ...@@ -323,36 +179,24 @@ static const struct omap_dss_features omap3630_dss_features = {
/* OMAP4 DSS Features */ /* OMAP4 DSS Features */
/* For OMAP4430 ES 1.0 revision */ /* For OMAP4430 ES 1.0 revision */
static const struct omap_dss_features omap4430_es1_0_dss_features = { static const struct omap_dss_features omap4430_es1_0_dss_features = {
.features = omap4430_es1_0_dss_feat_list,
.num_features = ARRAY_SIZE(omap4430_es1_0_dss_feat_list),
.supported_outputs = omap4_dss_supported_outputs, .supported_outputs = omap4_dss_supported_outputs,
.dss_params = omap4_dss_param_range, .dss_params = omap4_dss_param_range,
}; };
/* For OMAP4430 ES 2.0, 2.1 and 2.2 revisions */ /* For OMAP4430 ES 2.0, 2.1 and 2.2 revisions */
static const struct omap_dss_features omap4430_es2_0_1_2_dss_features = { static const struct omap_dss_features omap4430_es2_0_1_2_dss_features = {
.features = omap4430_es2_0_1_2_dss_feat_list,
.num_features = ARRAY_SIZE(omap4430_es2_0_1_2_dss_feat_list),
.supported_outputs = omap4_dss_supported_outputs, .supported_outputs = omap4_dss_supported_outputs,
.dss_params = omap4_dss_param_range, .dss_params = omap4_dss_param_range,
}; };
/* For all the other OMAP4 versions */ /* For all the other OMAP4 versions */
static const struct omap_dss_features omap4_dss_features = { static const struct omap_dss_features omap4_dss_features = {
.features = omap4_dss_feat_list,
.num_features = ARRAY_SIZE(omap4_dss_feat_list),
.supported_outputs = omap4_dss_supported_outputs, .supported_outputs = omap4_dss_supported_outputs,
.dss_params = omap4_dss_param_range, .dss_params = omap4_dss_param_range,
}; };
/* OMAP5 DSS Features */ /* OMAP5 DSS Features */
static const struct omap_dss_features omap5_dss_features = { static const struct omap_dss_features omap5_dss_features = {
.features = omap5_dss_feat_list,
.num_features = ARRAY_SIZE(omap5_dss_feat_list),
.supported_outputs = omap5_dss_supported_outputs, .supported_outputs = omap5_dss_supported_outputs,
.dss_params = omap5_dss_param_range, .dss_params = omap5_dss_param_range,
}; };
...@@ -373,21 +217,6 @@ enum omap_dss_output_id dss_feat_get_supported_outputs(enum omap_channel channel ...@@ -373,21 +217,6 @@ enum omap_dss_output_id dss_feat_get_supported_outputs(enum omap_channel channel
return omap_current_dss_features->supported_outputs[channel]; return omap_current_dss_features->supported_outputs[channel];
} }
/* DSS has_feature check */
bool dss_has_feature(enum dss_feat_id id)
{
int i;
const enum dss_feat_id *features = omap_current_dss_features->features;
const int num_features = omap_current_dss_features->num_features;
for (i = 0; i < num_features; i++) {
if (features[i] == id)
return true;
}
return false;
}
void dss_features_init(enum omapdss_version version) void dss_features_init(enum omapdss_version version)
{ {
switch (version) { switch (version) {
......
...@@ -25,33 +25,6 @@ ...@@ -25,33 +25,6 @@
#define MAX_DSS_LCD_MANAGERS 3 #define MAX_DSS_LCD_MANAGERS 3
#define MAX_NUM_DSI 2 #define MAX_NUM_DSI 2
/* DSS has feature id */
enum dss_feat_id {
FEAT_LCDENABLEPOL,
FEAT_LCDENABLESIGNAL,
FEAT_PCKFREEENABLE,
FEAT_FUNCGATED,
FEAT_MGR_LCD2,
FEAT_MGR_LCD3,
FEAT_LINEBUFFERSPLIT,
FEAT_ROWREPEATENABLE,
FEAT_RESIZECONF,
/* Independent core clk divider */
FEAT_CORE_CLK_DIV,
FEAT_HANDLE_UV_SEPARATE,
FEAT_ATTR2,
FEAT_CPR,
FEAT_PRELOAD,
FEAT_FIR_COEF_V,
FEAT_ALPHA_FIXED_ZORDER,
FEAT_ALPHA_FREE_ZORDER,
FEAT_FIFO_MERGE,
/* An unknown HW bug causing the normal FIFO thresholds not to work */
FEAT_OMAP3_DSI_FIFO_BUG,
FEAT_BURST_2D,
FEAT_MFLAG,
};
enum dss_range_param { enum dss_range_param {
FEAT_PARAM_DSS_FCK, FEAT_PARAM_DSS_FCK,
FEAT_PARAM_DSS_PCD, FEAT_PARAM_DSS_PCD,
...@@ -65,7 +38,6 @@ enum dss_range_param { ...@@ -65,7 +38,6 @@ enum dss_range_param {
unsigned long dss_feat_get_param_min(enum dss_range_param param); unsigned long dss_feat_get_param_min(enum dss_range_param param);
unsigned long dss_feat_get_param_max(enum dss_range_param param); unsigned long dss_feat_get_param_max(enum dss_range_param param);
bool dss_has_feature(enum dss_feat_id id);
void dss_features_init(enum omapdss_version version); void dss_features_init(enum omapdss_version version);
enum omap_dss_output_id dss_feat_get_supported_outputs(enum omap_channel channel); enum omap_dss_output_id dss_feat_get_supported_outputs(enum omap_channel channel);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment