drm/sun4i: Add scaler configuration to DE2 mixers
authorJernej Skrabec <jernej.skrabec@siol.net>
Fri, 1 Dec 2017 06:05:43 +0000 (07:05 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 5 Dec 2017 12:22:43 +0000 (13:22 +0100)
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
drivers/gpu/drm/sun4i/sun8i_mixer.c
drivers/gpu/drm/sun4i/sun8i_mixer.h

index 888620b1d3f1961cafae6731b00418a752673b61..e3296a060352b7b11d63966b97f9e649ea033845 100644 (file)
@@ -336,6 +336,7 @@ static int sun8i_mixer_remove(struct platform_device *pdev)
 static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
        .vi_num = 2,
        .ui_num = 1,
+       .scaler_mask = 0x3,
 };
 
 static const struct of_device_id sun8i_mixer_of_table[] = {
index bad0969ac105ed3885b68c3a56dfd6287c6b82fd..a6270b307ae52ec294265200eb7b367ac978a615 100644 (file)
@@ -94,9 +94,19 @@ struct de2_fmt_info {
        u32 de2_fmt;
 };
 
+/**
+ * struct sun8i_mixer_cfg - mixer HW configuration
+ * @vi_num: number of VI channels
+ * @ui_num: number of UI channels
+ * @scaler_mask: bitmask which tells which channel supports scaling
+ *     First, scaler supports for VI channels is defined and after that, scaler
+ *     support for UI channels. For example, if mixer has 2 VI channels without
+ *     scaler and 2 UI channels with scaler, bitmask would be 0xC.
+ */
 struct sun8i_mixer_cfg {
        int             vi_num;
        int             ui_num;
+       int             scaler_mask;
 };
 
 struct sun8i_mixer {