From: Daniel Vetter <daniel@ffwll.ch>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: dri-devel@lists.freedesktop.org,
"open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS"
<nouveau@lists.freedesktop.org>,
open list <linux-kernel@vger.kernel.org>,
Ben Skeggs <bskeggs@redhat.com>,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: [PATCH 01/14] drm/nouveau: use drm_crtc_send_vblank_event() v2
Date: Mon, 6 Jun 2016 18:02:18 +0200 [thread overview]
Message-ID: <20160606160218.GB10110@phenom.ffwll.local> (raw)
In-Reply-To: <1465224105-21485-1-git-send-email-gustavo@padovan.org>
On Mon, Jun 06, 2016 at 11:41:32AM -0300, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> Replace the legacy drm_send_vblank_event() with the new helper function.
>
> v2: add crtc to nouveau_page_flip_state (comment from Mario Kleiner)
>
> Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Forgot to squash this into the main nouveau patch as fixup?
-Daniel
> ---
> drivers/gpu/drm/nouveau/nouveau_display.c | 19 ++++++++++---------
> drivers/gpu/drm/nouveau/nouveau_display.h | 3 ++-
> 2 files changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> index 7c77f96..9d72467 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> @@ -760,8 +760,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
>
> /* Initialize a page flip struct */
> *s = (struct nouveau_page_flip_state)
> - { { }, event, nouveau_crtc(crtc)->index,
> - fb->bits_per_pixel, fb->pitches[0], crtc->x, crtc->y,
> + { { }, event, crtc, fb->bits_per_pixel, fb->pitches[0],
> new_bo->bo.offset };
>
> /* Keep vblanks on during flip, for the target crtc of this flip */
> @@ -842,17 +841,18 @@ nouveau_finish_page_flip(struct nouveau_channel *chan,
> s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
> if (s->event) {
> if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
> - drm_arm_vblank_event(dev, s->crtc, s->event);
> + drm_arm_vblank_event(dev, drm_crtc_index(s->crtc),
> + s->event);
> } else {
> - drm_send_vblank_event(dev, s->crtc, s->event);
> + drm_crtc_send_vblank_event(s->crtc, s->event);
>
> /* Give up ownership of vblank for page-flipped crtc */
> - drm_vblank_put(dev, s->crtc);
> + drm_vblank_put(dev, drm_crtc_index(s->crtc));
> }
> }
> else {
> /* Give up ownership of vblank for page-flipped crtc */
> - drm_vblank_put(dev, s->crtc);
> + drm_vblank_put(dev, drm_crtc_index(state->crtc));
> }
>
> list_del(&s->head);
> @@ -873,9 +873,10 @@ nouveau_flip_complete(struct nvif_notify *notify)
>
> if (!nouveau_finish_page_flip(chan, &state)) {
> if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) {
> - nv_set_crtc_base(drm->dev, state.crtc, state.offset +
> - state.y * state.pitch +
> - state.x * state.bpp / 8);
> + nv_set_crtc_base(drm->dev, drm_crtc_index(state.crtc),
> + state.offset + state.crtc->y *
> + state.pitch + state.crtc->x *
> + state.bpp / 8);
> }
> }
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
> index 24273ba..0420ee8 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.h
> @@ -28,7 +28,8 @@ int nouveau_framebuffer_init(struct drm_device *, struct nouveau_framebuffer *,
> struct nouveau_page_flip_state {
> struct list_head head;
> struct drm_pending_vblank_event *event;
> - int crtc, bpp, pitch, x, y;
> + struct drm_crtc *crtc;
> + int bpp, pitch;
> u64 offset;
> };
>
> --
> 2.5.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2016-06-06 16:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 14:41 Gustavo Padovan
2016-06-06 14:41 ` [PATCH RESEND 02/14] drm/armada: use drm_crtc_send_vblank_event() Gustavo Padovan
2016-06-06 14:41 ` [PATCH RESEND 03/14] drm/atmel: " Gustavo Padovan
2016-06-07 11:08 ` Boris Brezillon
2016-06-06 14:41 ` [PATCH RESEND 04/14] drm/qxl: " Gustavo Padovan
2016-06-06 14:41 ` [PATCH RESEND 05/14] drm/udl: " Gustavo Padovan
2016-06-06 14:41 ` [PATCH RESEND 06/14] drm/virtio: " Gustavo Padovan
2016-06-07 8:39 ` Gerd Hoffmann
2016-06-06 14:41 ` [PATCH 07/14] drm: remove legacy drm_send_vblank_event() Gustavo Padovan
2016-06-06 14:41 ` [PATCH 08/14] drm/amdgpu: use drm_crtc_vblank_{get,put}() Gustavo Padovan
2016-06-06 15:26 ` Alex Deucher
2016-06-06 15:35 ` Gustavo Padovan
2016-06-06 16:06 ` Daniel Vetter
2016-06-07 3:43 ` Michel Dänzer
2016-06-06 14:41 ` [PATCH 09/14] drm/armada: " Gustavo Padovan
2016-06-06 14:41 ` [PATCH 10/14] drm/atmel: " Gustavo Padovan
2016-06-07 11:07 ` Boris Brezillon
2016-06-06 14:41 ` [PATCH 11/14] drm/nouveau: " Gustavo Padovan
2016-06-06 14:41 ` [PATCH 12/14] drm/qxl: " Gustavo Padovan
2016-06-06 14:41 ` [PATCH 13/14] drm/radeon: " Gustavo Padovan
2016-06-06 14:41 ` [PATCH 14/14] drm/shmobile: " Gustavo Padovan
2016-06-06 18:25 ` Laurent Pinchart
2016-06-06 16:02 ` Daniel Vetter [this message]
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=20160606160218.GB10110@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=gustavo@padovan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@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
all inboxes | Powered by JetHome®