summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tegra/drm.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2017-11-13 11:08:13 +0100
committerThierry Reding <treding@nvidia.com>2017-12-13 14:16:37 +0100
commitc4755fb9064f64083fe559e92a46df817fc5e07b (patch)
tree4e5f79fbdeb8fa7bf9a886a30f5168a25186db14 /drivers/gpu/drm/tegra/drm.h
parent5acd351427361131c583dfb11c7bf4c364c98a9b (diff)
drm/tegra: Add Tegra186 display hub support
The display architecture has changed in several significant ways with the new Tegra186 SoC. Shared between all display controllers is a set of common resources referred to as the display hub. The hub generates accesses to memory and feeds them into various composition pipelines, each of which being a window that can be assigned to arbitrary heads. Atomic state is subclassed in order to track the global bandwidth requirements and select and adjust the hub clocks appropriately. The plane code is shared to a large degree with earlier SoC generations, except where the programming differs. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.h')
-rw-r--r--drivers/gpu/drm/tegra/drm.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index a3d84c4af357..d4dfd239e2a5 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -16,6 +16,7 @@
#include <linux/of_gpio.h>
#include <drm/drmP.h>
+#include <drm/drm_atomic.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_encoder.h>
@@ -23,6 +24,7 @@
#include <drm/drm_fixed.h>
#include "gem.h"
+#include "hub.h"
#include "trace.h"
struct reset_control;
@@ -40,6 +42,20 @@ struct tegra_fbdev {
};
#endif
+struct tegra_atomic_state {
+ struct drm_atomic_state base;
+
+ struct clk *clk_disp;
+ struct tegra_dc *dc;
+ unsigned long rate;
+};
+
+static inline struct tegra_atomic_state *
+to_tegra_atomic_state(struct drm_atomic_state *state)
+{
+ return container_of(state, struct tegra_atomic_state, base);
+}
+
struct tegra_drm {
struct drm_device *drm;
@@ -62,6 +78,8 @@ struct tegra_drm {
unsigned int pitch_align;
+ struct tegra_display_hub *hub;
+
struct drm_atomic_state *state;
};
@@ -187,6 +205,7 @@ void tegra_fbdev_restore_mode(struct tegra_fbdev *fbdev);
void tegra_fb_output_poll_changed(struct drm_device *drm);
#endif
+extern struct platform_driver tegra_display_hub_driver;
extern struct platform_driver tegra_dc_driver;
extern struct platform_driver tegra_hdmi_driver;
extern struct platform_driver tegra_dsi_driver;