Skip to content

Commit c90876a

Browse files
AngeloGioacchino Del RegnoChun-Kuang Hu
authored andcommitted
drm/mediatek: mtk_dpi: Move the input_2p_en bit to platform data
In preparation for adding support for MT8195's HDMI reserved DPI instance, move the input_2p_en bit for DP_INTF to platform data. While at it, remove the input_2pixel member from platform data as having this bit implies that the 2pixel feature must be enabled. Reviewed-by: CK Hu <[email protected]> Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent 8c9da7c commit c90876a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/gpu/drm/mediatek/mtk_dpi.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ struct mtk_dpi_factor {
135135
* @is_ck_de_pol: Support CK/DE polarity.
136136
* @swap_input_support: Support input swap function.
137137
* @support_direct_pin: IP supports direct connection to dpi panels.
138-
* @input_2pixel: Input pixel of dp_intf is 2 pixel per round, so enable this
139-
* config to enable this feature.
140138
* @dimension_mask: Mask used for HWIDTH, HPORCH, VSYNC_WIDTH and VSYNC_PORCH
141139
* (no shift).
142140
* @hvsize_mask: Mask of HSIZE and VSIZE mask (no shift).
143141
* @channel_swap_shift: Shift value of channel swap.
144142
* @yuv422_en_bit: Enable bit of yuv422.
145143
* @csc_enable_bit: Enable bit of CSC.
144+
* @input_2p_en_bit: Enable bit for input two pixel per round feature.
145+
* If present, implies that the feature must be enabled.
146146
* @pixels_per_iter: Quantity of transferred pixels per iteration.
147147
* @edge_cfg_in_mmsys: If the edge configuration for DPI's output needs to be set in MMSYS.
148148
*/
@@ -157,12 +157,12 @@ struct mtk_dpi_conf {
157157
bool is_ck_de_pol;
158158
bool swap_input_support;
159159
bool support_direct_pin;
160-
bool input_2pixel;
161160
u32 dimension_mask;
162161
u32 hvsize_mask;
163162
u32 channel_swap_shift;
164163
u32 yuv422_en_bit;
165164
u32 csc_enable_bit;
165+
u32 input_2p_en_bit;
166166
u32 pixels_per_iter;
167167
bool edge_cfg_in_mmsys;
168168
};
@@ -651,9 +651,9 @@ static int mtk_dpi_set_display_mode(struct mtk_dpi *dpi,
651651
mtk_dpi_dual_edge(dpi);
652652
mtk_dpi_config_disable_edge(dpi);
653653
}
654-
if (dpi->conf->input_2pixel) {
655-
mtk_dpi_mask(dpi, DPI_CON, DPINTF_INPUT_2P_EN,
656-
DPINTF_INPUT_2P_EN);
654+
if (dpi->conf->input_2p_en_bit) {
655+
mtk_dpi_mask(dpi, DPI_CON, dpi->conf->input_2p_en_bit,
656+
dpi->conf->input_2p_en_bit);
657657
}
658658
mtk_dpi_sw_reset(dpi, false);
659659

@@ -1121,12 +1121,12 @@ static const struct mtk_dpi_conf mt8195_dpintf_conf = {
11211121
.output_fmts = mt8195_output_fmts,
11221122
.num_output_fmts = ARRAY_SIZE(mt8195_output_fmts),
11231123
.pixels_per_iter = 4,
1124-
.input_2pixel = true,
11251124
.dimension_mask = DPINTF_HPW_MASK,
11261125
.hvsize_mask = DPINTF_HSIZE_MASK,
11271126
.channel_swap_shift = DPINTF_CH_SWAP,
11281127
.yuv422_en_bit = DPINTF_YUV422_EN,
11291128
.csc_enable_bit = DPINTF_CSC_ENABLE,
1129+
.input_2p_en_bit = DPINTF_INPUT_2P_EN,
11301130
};
11311131

11321132
static int mtk_dpi_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)