Skip to content

Commit 5b1f836

Browse files
jernejskmripard
authored andcommitted
drm/sun4i: Add scaler configuration to DE2 mixers
No all SoCs support scaling on all channels. For example, V3s support scaling only on VI channels. Because of that, add additional configuration bitmask which tells which channel support scaler. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-21-jernej.skrabec@siol.net
1 parent 7480ba4 commit 5b1f836

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎drivers/gpu/drm/sun4i/sun8i_mixer.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ static int sun8i_mixer_remove(struct platform_device *pdev)
336336
static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
337337
.vi_num = 2,
338338
.ui_num = 1,
339+
.scaler_mask = 0x3,
339340
};
340341

341342
static const struct of_device_id sun8i_mixer_of_table[] = {

‎drivers/gpu/drm/sun4i/sun8i_mixer.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,19 @@ struct de2_fmt_info {
9494
u32 de2_fmt;
9595
};
9696

97+
/**
98+
* struct sun8i_mixer_cfg - mixer HW configuration
99+
* @vi_num: number of VI channels
100+
* @ui_num: number of UI channels
101+
* @scaler_mask: bitmask which tells which channel supports scaling
102+
* First, scaler supports for VI channels is defined and after that, scaler
103+
* support for UI channels. For example, if mixer has 2 VI channels without
104+
* scaler and 2 UI channels with scaler, bitmask would be 0xC.
105+
*/
97106
struct sun8i_mixer_cfg {
98107
int vi_num;
99108
int ui_num;
109+
int scaler_mask;
100110
};
101111

102112
struct sun8i_mixer {

0 commit comments

Comments
 (0)