[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190109100617.GR21184@phenom.ffwll.local>
Date: Wed, 9 Jan 2019 11:06:17 +0100
From: Daniel Vetter <daniel@...ll.ch>
To: Gerd Hoffmann <kraxel@...hat.com>
Cc: dri-devel@...ts.freedesktop.org, David Airlie <airlied@...hat.com>,
andr2000@...il.com, David Airlie <airlied@...ux.ie>,
open list <linux-kernel@...r.kernel.org>,
"open list:DRM DRIVER FOR BOCHS VIRTUAL GPU"
<virtualization@...ts.linux-foundation.org>
Subject: Re: [PATCH v2 03/15] drm/bochs: atomic: add
atomic_flush+atomic_enable callbacks.
On Tue, Jan 08, 2019 at 12:25:07PM +0100, Gerd Hoffmann wrote:
> Conversion to atomic modesetting, step one.
> Add atomic crtc helper callbacks.
>
> Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
> ---
> drivers/gpu/drm/bochs/bochs_kms.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
> index f7e6d1a9b3..2cbd406b1f 100644
> --- a/drivers/gpu/drm/bochs/bochs_kms.c
> +++ b/drivers/gpu/drm/bochs/bochs_kms.c
> @@ -115,6 +115,29 @@ static int bochs_crtc_page_flip(struct drm_crtc *crtc,
> return 0;
> }
>
> +static void bochs_crtc_atomic_enable(struct drm_crtc *crtc,
> + struct drm_crtc_state *old_crtc_state)
> +{
> +}
A patch to make this optional in the helpers would be neat.
-Daniel
> +
> +static void bochs_crtc_atomic_flush(struct drm_crtc *crtc,
> + struct drm_crtc_state *old_crtc_state)
> +{
> + struct drm_device *dev = crtc->dev;
> + struct drm_pending_vblank_event *event;
> +
> + if (crtc->state && crtc->state->event) {
> + unsigned long irqflags;
> +
> + spin_lock_irqsave(&dev->event_lock, irqflags);
> + event = crtc->state->event;
> + crtc->state->event = NULL;
> + drm_crtc_send_vblank_event(crtc, event);
> + spin_unlock_irqrestore(&dev->event_lock, irqflags);
> + }
> +}
> +
> +
> /* These provide the minimum set of functions required to handle a CRTC */
> static const struct drm_crtc_funcs bochs_crtc_funcs = {
> .set_config = drm_crtc_helper_set_config,
> @@ -128,6 +151,8 @@ static const struct drm_crtc_helper_funcs bochs_helper_funcs = {
> .mode_set_base = bochs_crtc_mode_set_base,
> .prepare = bochs_crtc_prepare,
> .commit = bochs_crtc_commit,
> + .atomic_enable = bochs_crtc_atomic_enable,
> + .atomic_flush = bochs_crtc_atomic_flush,
> };
>
> static const uint32_t bochs_formats[] = {
> --
> 2.9.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Powered by blists - more mailing lists