From: Jyri Sarha <jsarha@ti.com>
To: dri-devel@lists.freedesktop.org
Cc: tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH RFC 09/11] drm/tilcdc: Set DRIVER_ATOMIC and use atomic crtc helpers
Date: Tue, 12 Apr 2016 10:41:23 +0300 [thread overview]
Message-ID: <570CA6A3.1050508@ti.com> (raw)
In-Reply-To: <fbc737884549ec867cd8c4c89fcc55c1a314a233.1460380199.git.jsarha@ti.com>
On 04/11/16 19:46, Jyri Sarha wrote:
> Set DRIVER_ATOMIC and use atomic helpers and rename commit and prepare
> crtc helpers to enable and disable. This makes the final jump to mode
> setting, but there is lot of obsolete code to clean up.
>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
> drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 16 +++++++++++-----
> drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +-
> 2 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> index 69045d8..e8e309e 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
> @@ -17,6 +17,7 @@
>
> #include "drm_flip_work.h"
> #include <drm/drm_plane_helper.h>
> +#include <drm/drm_atomic_helper.h>
>
> #include "tilcdc_drv.h"
> #include "tilcdc_regs.h"
> @@ -300,12 +301,12 @@ static bool tilcdc_crtc_mode_fixup(struct drm_crtc *crtc,
> return true;
> }
>
> -static void tilcdc_crtc_prepare(struct drm_crtc *crtc)
> +static void tilcdc_crtc_disable(struct drm_crtc *crtc)
> {
> tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
> }
>
> -static void tilcdc_crtc_commit(struct drm_crtc *crtc)
> +static void tilcdc_crtc_enable(struct drm_crtc *crtc)
> {
> tilcdc_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
> }
> @@ -713,9 +714,12 @@ static int tilcdc_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
> }
>
> static const struct drm_crtc_funcs tilcdc_crtc_funcs = {
> - .destroy = tilcdc_crtc_destroy,
> - .set_config = drm_crtc_helper_set_config,
> - .page_flip = tilcdc_crtc_page_flip,
> + .destroy = tilcdc_crtc_destroy,
> + .set_config = drm_atomic_helper_set_config,
> + .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,
> };
>
> static const struct drm_crtc_helper_funcs tilcdc_crtc_helper_funcs = {
> @@ -725,6 +729,8 @@ static const struct drm_crtc_helper_funcs tilcdc_crtc_helper_funcs = {
> .commit = tilcdc_crtc_commit,
Oops, I made a compile breakage here in the last phase. The
tilcdc_crtc_commit () and tilcdc_crtc_preapre() above were renamed to
*enable() and *disable(). I'll fix that in the next round.
> .mode_set = tilcdc_crtc_mode_set,
> .mode_set_base = tilcdc_crtc_mode_set_base,
> + .enable = tilcdc_crtc_enable,
> + .disable = tilcdc_crtc_disable,
> .atomic_check = tilcdc_crtc_atomic_check,
> .mode_set_nofb = tilcdc_crtc_mode_set_nofb,
> };
> diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> index dc0d1e9..6569d3a 100644
> --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
> @@ -587,7 +587,7 @@ static const struct file_operations fops = {
>
> static struct drm_driver tilcdc_driver = {
> .driver_features = (DRIVER_HAVE_IRQ | DRIVER_GEM | DRIVER_MODESET |
> - DRIVER_PRIME),
> + DRIVER_PRIME | DRIVER_ATOMIC),
> .load = tilcdc_load,
> .unload = tilcdc_unload,
> .lastclose = tilcdc_lastclose,
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-04-12 7:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 16:46 [PATCH RFC 00/11] drm/tilcdc: Atomic modeset support Jyri Sarha
2016-04-11 16:46 ` [PATCH RFC 01/11] drm/tilcdc: Make tilcdc_crtc_page_flip() public Jyri Sarha
2016-04-11 16:46 ` [PATCH RFC 02/11] drm/tilcdc: Add dummy primary plane implementation Jyri Sarha
2016-04-11 16:46 ` [PATCH RFC 03/11] drm/tilcdc: Initialize dummy primary plane from crtc init Jyri Sarha
2016-04-11 16:46 ` [PATCH RFC 04/11] drm/tilcdc: Add tilcdc_crtc_mode_set_nofb() Jyri Sarha
2016-04-12 16:13 ` Daniel Vetter
2016-04-11 16:46 ` [PATCH RFC 05/11] drm/tilcdc: Add tilcdc_crtc_atomic_check() Jyri Sarha
2016-04-11 16:46 ` [PATCH RFC 06/11] drm/tilcdc: Add atomic mode config funcs Jyri Sarha
2016-04-11 16:46 ` [PATCH RFC 07/11] drm/tilcdc: Add drm_mode_config_reset() call to tilcdc_load() Jyri Sarha
2016-04-11 16:46 ` [PATCH RFC 08/11] drm/tilcdc: Call drm_crtc_vblank_off() in tilcdc_crtc_destroy() Jyri Sarha
2016-04-11 16:46 ` [PATCH RFC 09/11] drm/tilcdc: Set DRIVER_ATOMIC and use atomic crtc helpers Jyri Sarha
2016-04-12 7:41 ` Jyri Sarha [this message]
2016-04-11 16:46 ` [PATCH RFC 10/11] drm/tilcdc: Remove obsolete crtc helper functions Jyri Sarha
2016-04-11 16:46 ` [PATCH RFC 11/11] drm/tilcdc: Remove tilcdc_verify_fb() Jyri Sarha
2016-05-09 14:10 ` [PATCH RFC 00/11] drm/tilcdc: Atomic modeset support Tomi Valkeinen
2016-05-09 14:42 ` Daniel Vetter
2016-05-09 21:29 ` Jyri Sarha
2016-05-10 6:34 ` Daniel Vetter
2016-05-10 9:14 ` Jyri Sarha
2016-05-10 14:04 ` Noralf Trønnes
2016-05-10 14:18 ` Daniel Vetter
2016-05-10 15:11 ` Laurent Pinchart
2016-05-10 16:08 ` Daniel Vetter
2016-05-10 17:30 ` Noralf Trønnes
2016-05-10 22:31 ` Daniel Vetter
2016-05-10 6:36 ` Daniel Vetter
2016-05-09 21:16 ` Jyri Sarha
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=570CA6A3.1050508@ti.com \
--to=jsarha@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=tomi.valkeinen@ti.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