summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/dc.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-11-13 11:20:48 +0100
committerThierry Reding <treding@nvidia.com>2017-12-13 13:42:09 +0100
commit7116e9a8022cd468a6a952e1d0d662da73f75ce5 (patch)
tree43cdeb873e4172c58e5c30c19ee8469317a99f42 /drivers/gpu/drm/tegra/dc.h
parentdrm/tegra: vic: Properly align arguments (diff)
downloadlinux-7116e9a8022cd468a6a952e1d0d662da73f75ce5.tar.xz
linux-7116e9a8022cd468a6a952e1d0d662da73f75ce5.zip
drm/tegra: dc: Support background color
Starting with Tegra124, the interface to set the background color (the value generated for pixels that are not sourced from any window) is via a different register. Earlier generations called this the border color. Reverse the feature flag and assume that IP revisions that don't have support for background color will support border color instead. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/dc.h')
-rw-r--r--drivers/gpu/drm/tegra/dc.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/dc.h b/drivers/gpu/drm/tegra/dc.h
index 032c734dd470..571a6c78619f 100644
--- a/drivers/gpu/drm/tegra/dc.h
+++ b/drivers/gpu/drm/tegra/dc.h
@@ -26,7 +26,7 @@ struct tegra_dc_stats {
};
struct tegra_dc_soc_info {
- bool supports_border_color;
+ bool supports_background_color;
bool supports_interlacing;
bool supports_cursor;
bool supports_block_linear;
@@ -447,6 +447,12 @@ int tegra_dc_rgb_exit(struct tegra_dc *dc);
#define DC_DISP_SD_HW_K_VALUES 0x4dd
#define DC_DISP_SD_MAN_K_VALUES 0x4de
+#define DC_DISP_BLEND_BACKGROUND_COLOR 0x4e4
+#define BACKGROUND_COLOR_ALPHA(x) (((x) & 0xff) << 24)
+#define BACKGROUND_COLOR_BLUE(x) (((x) & 0xff) << 16)
+#define BACKGROUND_COLOR_GREEN(x) (((x) & 0xff) << 8)
+#define BACKGROUND_COLOR_RED(x) (((x) & 0xff) << 0)
+
#define DC_DISP_INTERLACE_CONTROL 0x4e5
#define INTERLACE_STATUS (1 << 2)
#define INTERLACE_START (1 << 1)