From: Varad Gautam <varadgautam@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Varad Gautam <varad.gautam@collabora.com>
Subject: [PATCH 12/14] drm/cirrus: use atomic handlers for plane and crtc
Date: Fri, 18 Aug 2017 21:19:17 +0530 [thread overview]
Message-ID: <20170818154919.18607-13-varadgautam@gmail.com> (raw)
In-Reply-To: <20170818154919.18607-1-varadgautam@gmail.com>
From: Varad Gautam <varad.gautam@collabora.com>
move from transition helpers to actual atomic handlers.
Signed-off-by: Varad Gautam <varad.gautam@collabora.com>
---
drivers/gpu/drm/cirrus/cirrus_mode.c | 31 ++++---------------------------
1 file changed, 4 insertions(+), 27 deletions(-)
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
index e777157fe474..39bea39a565e 100644
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -179,15 +179,6 @@ static void cirrus_mode_set_nofb(struct drm_crtc *crtc)
}
/*
- * This is called before a mode is programmed. A typical use might be to
- * enable DPMS during the programming to avoid seeing intermediate stages,
- * but that's not relevant to us
- */
-static void cirrus_crtc_prepare(struct drm_crtc *crtc)
-{
-}
-
-/*
* This is called after a mode is programmed. It should reverse anything done
* by the prepare function
*/
@@ -246,8 +237,10 @@ static void cirrus_crtc_atomic_flush(struct drm_crtc *crtc,
/* These provide the minimum set of functions required to handle a CRTC */
static const struct drm_crtc_funcs cirrus_crtc_funcs = {
.gamma_set = cirrus_crtc_gamma_set,
- .set_config = drm_crtc_helper_set_config,
+ .set_config = drm_atomic_helper_set_config,
+ .set_property = drm_atomic_helper_crtc_set_property,
.destroy = cirrus_crtc_destroy,
+ .page_flip = drm_atomic_helper_page_flip,
.reset = drm_atomic_helper_crtc_reset,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
@@ -255,28 +248,12 @@ static const struct drm_crtc_funcs cirrus_crtc_funcs = {
static const struct drm_crtc_helper_funcs cirrus_helper_funcs = {
.dpms = cirrus_crtc_dpms,
- .mode_set = drm_helper_crtc_mode_set,
- .mode_set_base = drm_helper_crtc_mode_set_base,
.mode_set_nofb = cirrus_mode_set_nofb,
- .prepare = cirrus_crtc_prepare,
.commit = cirrus_crtc_commit,
.load_lut = cirrus_crtc_load_lut,
.atomic_flush = cirrus_crtc_atomic_flush,
};
-static int cirrus_plane_update(struct drm_plane *plane,
- struct drm_crtc *crtc,
- struct drm_framebuffer *fb, int crtc_x,
- int crtc_y, unsigned int crtc_w,
- unsigned int crtc_h, uint32_t src_x,
- uint32_t src_y, uint32_t src_w, uint32_t src_h,
- struct drm_modeset_acquire_ctx *ctx)
-{
- return drm_plane_helper_update(plane, crtc, fb,
- crtc_x, crtc_y, crtc_w,
- crtc_h, src_x, src_y, src_w, src_h);
-}
-
static const uint32_t cirrus_plane_formats[] = {
DRM_FORMAT_XRGB8888,
DRM_FORMAT_ARGB8888,
@@ -285,7 +262,7 @@ static const uint32_t cirrus_plane_formats[] = {
};
static const struct drm_plane_funcs cirrus_plane_funcs = {
- .update_plane = cirrus_plane_update,
+ .update_plane = drm_atomic_helper_update_plane,
.disable_plane = drm_primary_helper_disable,
.destroy = drm_primary_helper_destroy,
.reset = drm_atomic_helper_plane_reset,
--
2.13.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-08-18 15:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 15:49 [PATCH 00/14] atomic modesetting for cirrus Varad Gautam
2017-08-18 15:49 ` [PATCH 01/14] drm/cirrus: split out bo unpinning from cirrus_bo_push_sysram Varad Gautam
2017-09-04 10:41 ` Gabriel Krisman Bertazi
2017-09-05 13:04 ` Varad Gautam
2017-08-18 15:49 ` [PATCH 02/14] drm/cirrus: unregister connector on destroy Varad Gautam
2017-08-19 6:10 ` Varad Gautam
2017-08-18 15:49 ` [PATCH 03/14] drm/cirrus: add drm_read to cirrus_driver_fops Varad Gautam
2017-08-18 15:49 ` [PATCH 04/14] drm/cirrus: do not disable outputs on fbdev init for atomic Varad Gautam
2017-08-18 15:49 ` [PATCH 05/14] drm/cirrus: initialize start and size fields Varad Gautam
2017-08-18 15:49 ` [PATCH 06/14] drm/cirrus: Use 32bpp by default Varad Gautam
2017-08-19 8:32 ` Matthew Garrett
2017-08-23 15:40 ` Varad Gautam
2017-08-23 17:38 ` Matthew Garrett
2017-08-18 15:49 ` [PATCH 07/14] drm/cirrus: hardcode vram size Varad Gautam
2017-08-18 15:49 ` [PATCH 08/14] drm/cirrus: implement PRIME export for cirrus Varad Gautam
2017-08-18 15:49 ` [PATCH 09/14] drm/cirrus: use universal plane interfaces for primary plane Varad Gautam
2017-09-04 11:14 ` Gabriel Krisman Bertazi
2017-08-18 15:49 ` [PATCH 10/14] drm/cirrus: use atomic transition helpers for plane and crtc Varad Gautam
2017-08-18 15:49 ` [PATCH 11/14] drm/cirrus: send vblank on crtc atomic_flush Varad Gautam
2017-08-18 15:49 ` Varad Gautam [this message]
2017-08-18 15:49 ` [PATCH 13/14] drm/cirrus: implement atomic hardware cursor support Varad Gautam
2017-08-18 15:49 ` [PATCH 14/14] drm/cirrus: advertise DRIVER_ATOMIC Varad Gautam
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=20170818154919.18607-13-varadgautam@gmail.com \
--to=varadgautam@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=varad.gautam@collabora.com \
/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