diff options
author | Thierry Reding <treding@nvidia.com> | 2014-11-24 17:02:53 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-12-19 16:13:23 +0100 |
commit | b8661d775b99f0caf5c6adc95942b8f37a7efd98 (patch) | |
tree | 0ebb4b0e00801dc80e5dc9d4f6ba512e5b090d18 | |
parent | fab8d48bfda187773210784ec42e1b776dbaa91b (diff) |
WIP: drm/tegra: Atomic conversion, phase 2
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | drivers/gpu/drm/tegra/dc.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/tegra/drm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/tegra/dsi.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/tegra/hdmi.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/tegra/rgb.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/tegra/sor.c | 2 |
6 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 647c3218d84..2c9532bfab8 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -25,6 +25,7 @@ #include "drm.h" #include "gem.h" +#include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_plane_helper.h> @@ -406,6 +407,8 @@ static const struct drm_plane_funcs tegra_primary_plane_funcs = { .update_plane = drm_plane_helper_update, .disable_plane = drm_plane_helper_disable, .destroy = tegra_primary_plane_destroy, + .reset = drm_atomic_helper_plane_reset, + .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, }; @@ -690,6 +693,8 @@ static const struct drm_plane_funcs tegra_cursor_plane_funcs = { .update_plane = drm_plane_helper_update, .disable_plane = drm_plane_helper_disable, .destroy = tegra_plane_destroy, + .reset = drm_atomic_helper_plane_reset, + .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, }; @@ -738,6 +743,8 @@ static const struct drm_plane_funcs tegra_overlay_plane_funcs = { .update_plane = drm_plane_helper_update, .disable_plane = drm_plane_helper_disable, .destroy = tegra_overlay_plane_destroy, + .reset = drm_atomic_helper_plane_reset, + .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, }; @@ -990,6 +997,9 @@ static int tegra_dc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, drm_crtc_vblank_get(crtc); } + if (crtc->primary->state) + drm_atomic_set_fb_for_plane(crtc->primary->state, fb); + tegra_dc_set_base(dc, 0, 0, fb); crtc->primary->fb = fb; @@ -1005,6 +1015,8 @@ static const struct drm_crtc_funcs tegra_crtc_funcs = { .page_flip = tegra_dc_page_flip, .set_config = drm_crtc_helper_set_config, .destroy = tegra_dc_destroy, + .reset = drm_atomic_helper_crtc_reset, + .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, }; diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 3326df252c5..58a4ed192e6 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -77,6 +77,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags) if (err < 0) goto fbdev; + drm_mode_config_reset(drm); + /* * We don't use the drm_irq_install() helpers provided by the DRM * core, so we need to set this manually in order to allow the diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index 4bb06c119a1..9799f3edc3f 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -734,9 +734,11 @@ static void tegra_dsi_connector_dpms(struct drm_connector *connector, int mode) static const struct drm_connector_funcs tegra_dsi_connector_funcs = { .dpms = tegra_dsi_connector_dpms, + .reset = drm_atomic_helper_connector_reset, .detect = tegra_output_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = tegra_output_connector_destroy, + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index bf868d54ef7..728681a3f8c 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -779,9 +779,11 @@ static void tegra_hdmi_connector_dpms(struct drm_connector *connector, static const struct drm_connector_funcs tegra_hdmi_connector_funcs = { .dpms = tegra_hdmi_connector_dpms, + .reset = drm_atomic_helper_connector_reset, .detect = tegra_output_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = tegra_output_connector_destroy, + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; diff --git a/drivers/gpu/drm/tegra/rgb.c b/drivers/gpu/drm/tegra/rgb.c index 23ba40370eb..78e3cb1529d 100644 --- a/drivers/gpu/drm/tegra/rgb.c +++ b/drivers/gpu/drm/tegra/rgb.c @@ -95,9 +95,11 @@ static void tegra_rgb_connector_dpms(struct drm_connector *connector, static const struct drm_connector_funcs tegra_rgb_connector_funcs = { .dpms = tegra_rgb_connector_dpms, + .reset = drm_atomic_helper_connector_reset, .detect = tegra_output_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = tegra_output_connector_destroy, + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index e2f399363f0..2793e75c657 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -735,9 +735,11 @@ tegra_sor_connector_detect(struct drm_connector *connector, bool force) static const struct drm_connector_funcs tegra_sor_connector_funcs = { .dpms = tegra_sor_connector_dpms, + .reset = drm_atomic_helper_connector_reset, .detect = tegra_sor_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes, .destroy = tegra_output_connector_destroy, + .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; |