drm/tegra: plane: Add generic colorkey properties for older Tegra's
[linux] / drivers / gpu / drm / tegra / dc.h
index e96f582..1ae8956 100644 (file)
 
 struct tegra_output;
 
+struct tegra_dc_color_key_state {
+       u32 min;
+       u32 max;
+};
+
 struct tegra_dc_state {
        struct drm_crtc_state base;
 
@@ -26,6 +31,8 @@ struct tegra_dc_state {
        unsigned int div;
 
        u32 planes;
+
+       struct tegra_dc_color_key_state ckey;
 };
 
 static inline struct tegra_dc_state *to_dc_state(struct drm_crtc_state *state)
@@ -300,7 +307,7 @@ int tegra_dc_rgb_exit(struct tegra_dc *dc);
 #define SOR1_TIMING_CYA        (1 << 27)
 #define CURSOR_ENABLE  (1 << 16)
 
-#define SOR_ENABLE(x)  (1 << (25 + (x)))
+#define SOR_ENABLE(x)  (1 << (25 + (((x) > 1) ? ((x) + 1) : (x))))
 
 #define DC_DISP_DISP_MEM_HIGH_PRIORITY         0x403
 #define CURSOR_THRESHOLD(x)   (((x) & 0x03) << 24)