From: Ben Skeggs <skeggsb@gmail.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: "Dave Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
David1.Zhou@amd.com, maarten.lankhorst@linux.intel.com,
patrik.r.jakobsson@gmail.com, "Rob Clark" <robdclark@gmail.com>,
sean@poorly.run, benjamin.gaignard@linaro.org,
vincent.abriou@st.com, yannick.fertre@st.com,
philippe.cornu@st.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@st.com, eric@anholt.net,
rodrigosiqueiramelo@gmail.com, hamohammed.sa@gmail.com,
linux-graphics-maintainer@vmware.com, thellstrom@vmware.com,
"Ben Skeggs" <bskeggs@redhat.com>,
"Harry Wentland" <harry.wentland@amd.com>,
sunpeng.li@amd.com, "Jani Nikula" <jani.nikula@linux.intel.com>,
joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com,
linux-arm-msm@vger.kernel.org,
intel-gfx <intel-gfx@lists.freedesktop.org>,
"amd-gfx mailing list" <amd-gfx@lists.freedesktop.org>,
"ML dri-devel" <dri-devel@lists.freedesktop.org>,
"ML nouveau" <nouveau@lists.freedesktop.org>,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH v4 09/22] drm/nouveau: Convert to CRTC VBLANK callbacks
Date: Wed, 29 Jan 2020 18:25:49 +1000 [thread overview]
Message-ID: <CACAvsv4Yp99w845A8kERpnx+mSax16PLzEBx-uEpZyfAoLu_Qg@mail.gmail.com> (raw)
In-Reply-To: <20200123135943.24140-10-tzimmermann@suse.de>
On Fri, 24 Jan 2020 at 00:00, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
> VBLANK callbacks in struct drm_driver are deprecated in favor of
> their equivalents in struct drm_crtc_funcs. Convert nouvean over.
>
> v4:
> * add argument names in function declaration
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
> ---
> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 3 +++
> drivers/gpu/drm/nouveau/dispnv50/head.c | 4 ++++
> drivers/gpu/drm/nouveau/nouveau_display.c | 14 ++------------
> drivers/gpu/drm/nouveau/nouveau_display.h | 4 ++--
> drivers/gpu/drm/nouveau/nouveau_drm.c | 4 ----
> 5 files changed, 11 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> index 17e9d1c078a0..1f08de4241e0 100644
> --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> @@ -1248,6 +1248,9 @@ static const struct drm_crtc_funcs nv04_crtc_funcs = {
> .set_config = drm_crtc_helper_set_config,
> .page_flip = nv04_crtc_page_flip,
> .destroy = nv_crtc_destroy,
> + .enable_vblank = nouveau_display_vblank_enable,
> + .disable_vblank = nouveau_display_vblank_disable,
> + .get_vblank_timestamp = drm_crtc_vblank_helper_get_vblank_timestamp,
> };
>
> static const struct drm_crtc_helper_funcs nv04_crtc_helper_funcs = {
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c
> index 41852dd8fdbd..8f6455697ba7 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/head.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/head.c
> @@ -29,6 +29,7 @@
>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc_helper.h>
> +#include <drm/drm_vblank.h>
> #include "nouveau_connector.h"
> void
> nv50_head_flush_clr(struct nv50_head *head,
> @@ -482,6 +483,9 @@ nv50_head_func = {
> .page_flip = drm_atomic_helper_page_flip,
> .atomic_duplicate_state = nv50_head_atomic_duplicate_state,
> .atomic_destroy_state = nv50_head_atomic_destroy_state,
> + .enable_vblank = nouveau_display_vblank_enable,
> + .disable_vblank = nouveau_display_vblank_disable,
> + .get_vblank_timestamp = drm_crtc_vblank_helper_get_vblank_timestamp,
> };
>
> struct nv50_head *
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> index 86f99dc8fcef..700817dc4fa0 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> @@ -54,15 +54,10 @@ nouveau_display_vblank_handler(struct nvif_notify *notify)
> }
>
> int
> -nouveau_display_vblank_enable(struct drm_device *dev, unsigned int pipe)
> +nouveau_display_vblank_enable(struct drm_crtc *crtc)
> {
> - struct drm_crtc *crtc;
> struct nouveau_crtc *nv_crtc;
>
> - crtc = drm_crtc_from_index(dev, pipe);
> - if (!crtc)
> - return -EINVAL;
> -
> nv_crtc = nouveau_crtc(crtc);
> nvif_notify_get(&nv_crtc->vblank);
>
> @@ -70,15 +65,10 @@ nouveau_display_vblank_enable(struct drm_device *dev, unsigned int pipe)
> }
>
> void
> -nouveau_display_vblank_disable(struct drm_device *dev, unsigned int pipe)
> +nouveau_display_vblank_disable(struct drm_crtc *crtc)
> {
> - struct drm_crtc *crtc;
> struct nouveau_crtc *nv_crtc;
>
> - crtc = drm_crtc_from_index(dev, pipe);
> - if (!crtc)
> - return;
> -
> nv_crtc = nouveau_crtc(crtc);
> nvif_notify_put(&nv_crtc->vblank);
> }
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
> index 26d34f1a77da..de004018ab5c 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.h
> @@ -61,8 +61,8 @@ int nouveau_display_init(struct drm_device *dev, bool resume, bool runtime);
> void nouveau_display_fini(struct drm_device *dev, bool suspend, bool runtime);
> int nouveau_display_suspend(struct drm_device *dev, bool runtime);
> void nouveau_display_resume(struct drm_device *dev, bool runtime);
> -int nouveau_display_vblank_enable(struct drm_device *, unsigned int);
> -void nouveau_display_vblank_disable(struct drm_device *, unsigned int);
> +int nouveau_display_vblank_enable(struct drm_crtc *crtc);
> +void nouveau_display_vblank_disable(struct drm_crtc *crtc);
> bool nouveau_display_scanoutpos(struct drm_crtc *crtc,
> bool in_vblank_irq, int *vpos, int *hpos,
> ktime_t *stime, ktime_t *etime,
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
> index fcc036a08965..6b1629c14dd7 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
> @@ -1120,10 +1120,6 @@ driver_stub = {
> .debugfs_init = nouveau_drm_debugfs_init,
> #endif
>
> - .enable_vblank = nouveau_display_vblank_enable,
> - .disable_vblank = nouveau_display_vblank_disable,
> - .get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
> -
> .ioctls = nouveau_ioctls,
> .num_ioctls = ARRAY_SIZE(nouveau_ioctls),
> .fops = &nouveau_driver_fops,
> --
> 2.24.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-01-29 8:26 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 13:59 [PATCH v4 00/22] drm: Clean up VBLANK callbacks in struct drm_driver Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 01/22] drm: Remove internal setup of struct drm_device.vblank_disable_immediate Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 02/22] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs Thomas Zimmermann
2020-03-02 21:55 ` Daniel Vetter
2020-01-23 13:59 ` [PATCH v4 03/22] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 04/22] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-02-03 20:41 ` Alex Deucher
2020-01-23 13:59 ` [PATCH v4 05/22] drm/amdgpu: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-02-03 20:42 ` Alex Deucher
2020-01-23 13:59 ` [PATCH v4 06/22] drm/gma500: " Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 07/22] drm/i915: " Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 08/22] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-29 8:25 ` Ben Skeggs
2020-01-23 13:59 ` [PATCH v4 09/22] drm/nouveau: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-29 8:25 ` Ben Skeggs [this message]
2020-01-23 13:59 ` [PATCH v4 10/22] drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-02-03 20:39 ` Alex Deucher
2020-01-23 13:59 ` [PATCH v4 11/22] drm/radeon: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 12/22] drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 13/22] drm/msm: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 14/22] drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-24 10:42 ` Philippe CORNU
2020-01-23 13:59 ` [PATCH v4 15/22] drm/stm: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-24 10:43 ` Philippe CORNU
2020-01-23 13:59 ` [PATCH v4 16/22] drm/sti: " Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 17/22] drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 18/22] drm/vc4: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 19/22] drm/vkms: " Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 20/22] drm/vmwgfx: " Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 21/22] drm: Clean-up VBLANK-related callbacks in struct drm_driver Thomas Zimmermann
2020-01-23 13:59 ` [PATCH v4 22/22] drm: Remove legacy version of get_scanout_position() Thomas Zimmermann
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=CACAvsv4Yp99w845A8kERpnx+mSax16PLzEBx-uEpZyfAoLu_Qg@mail.gmail.com \
--to=skeggsb@gmail.com \
--cc=David1.Zhou@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=alexandre.torgue@st.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=benjamin.gaignard@linaro.org \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=freedreno@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=harry.wentland@amd.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-graphics-maintainer@vmware.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=nouveau@lists.freedesktop.org \
--cc=patrik.r.jakobsson@gmail.com \
--cc=philippe.cornu@st.com \
--cc=robdclark@gmail.com \
--cc=rodrigo.vivi@intel.com \
--cc=rodrigosiqueiramelo@gmail.com \
--cc=sean@poorly.run \
--cc=sunpeng.li@amd.com \
--cc=thellstrom@vmware.com \
--cc=tzimmermann@suse.de \
--cc=vincent.abriou@st.com \
--cc=yannick.fertre@st.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;
as well as URLs for NNTP newsgroup(s).