From: John Hunter <zhjwpku@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 2/7] drm/cirrus: phase 2: wire up state reset, duplicate and destroy
Date: Thu, 30 Jul 2015 18:08:53 +0800 [thread overview]
Message-ID: <1438250938-59728-3-git-send-email-zhjwpku@gmail.com> (raw)
In-Reply-To: <1438250938-59728-1-git-send-email-zhjwpku@gmail.com>
From: Zhao Junwang <zhjwpku@gmail.com>
Set CRTC, planes and connectors to use the default implementations
from the atomic helper library.
Signed-off-by: Zhao Junwang <zhjwpku@gmail.com>
---
drivers/gpu/drm/cirrus/cirrus_mode.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
index 7a7c874..42a4d86 100644
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -17,6 +17,7 @@
#include <drm/drmP.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_plane_helper.h>
+#include <drm/drm_atomic_helper.h>
#include <video/cirrus.h>
@@ -304,6 +305,9 @@ static const struct drm_crtc_funcs cirrus_crtc_funcs = {
.gamma_set = cirrus_crtc_gamma_set,
.set_config = drm_crtc_helper_set_config,
.destroy = cirrus_crtc_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,
};
static const struct drm_crtc_helper_funcs cirrus_helper_funcs = {
@@ -429,6 +433,9 @@ static void cirrus_plane_atomic_disable(struct drm_plane *plane,
static const struct drm_plane_funcs cirrus_plane_funcs = {
.update_plane = drm_plane_helper_update,
.disable_plane = drm_plane_helper_disable,
+ .reset = drm_atomic_helper_plane_reset,
+ .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
+ .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
};
static const struct drm_plane_helper_funcs cirrus_plane_helper_funcs = {
@@ -593,6 +600,9 @@ struct drm_connector_funcs cirrus_vga_connector_funcs = {
.detect = cirrus_vga_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = cirrus_connector_destroy,
+ .reset = drm_atomic_helper_connector_reset,
+ .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
+ .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
};
static struct drm_connector *cirrus_vga_init(struct drm_device *dev)
@@ -648,6 +658,8 @@ int cirrus_modeset_init(struct cirrus_device *cdev)
return -1;
}
+ drm_mode_config_reset(cdev->dev);
+
drm_mode_connector_attach_encoder(connector, encoder);
ret = cirrus_fbdev_init(cdev);
--
1.7.10.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-07-30 10:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 10:08 [PATCH 0/7] drm/cirrus: convert cirrus to atomic mode-setting John Hunter
2015-07-30 10:08 ` [PATCH 1/7] drm/cirrus: phase 1 - use the transitional helpers John Hunter
2015-07-30 10:08 ` John Hunter [this message]
2015-07-30 10:08 ` [PATCH 3/7] drm/cirrus: phase 3: atomic updates of planes John Hunter
2015-07-30 10:08 ` [PATCH 4/7] drm/cirrus: add return 0 to make sure if (bo->pin_count) early_exit John Hunter
2015-07-30 10:08 ` [PATCH 5/7] drm/cirrus: phase 3: use atomic .set_config helper John Hunter
2015-07-30 10:08 ` [PATCH 6/7] drm/cirrus: atomic dpms support John Hunter
2015-07-30 10:08 ` [PATCH 7/7] drm/cirrus: add DRIVER_ATOMIC to .driver_features John Hunter
2016-03-02 10:18 ` [PATCH 0/7] drm/cirrus: convert cirrus to atomic mode-setting Emil Velikov
-- strict thread matches above, loose matches on Subject: below --
2015-08-05 7:22 John Hunter
2015-08-05 7:22 ` [PATCH 2/7] drm/cirrus: phase 2: wire up state reset, duplicate and destroy John Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438250938-59728-3-git-send-email-zhjwpku@gmail.com \
--to=zhjwpku@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox