From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@linux.ie, daniel@ffwll.ch, alexander.deucher@amd.com,
christian.koenig@amd.com, David1.Zhou@amd.com,
maarten.lankhorst@linux.intel.com, patrik.r.jakobsson@gmail.com,
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, bskeggs@redhat.com,
harry.wentland@amd.com, sunpeng.li@amd.com,
jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
rodrigo.vivi@intel.com
Cc: linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>,
nouveau@lists.freedesktop.org, freedreno@lists.freedesktop.org
Subject: [PATCH v2 00/21] drm: Clean up VBLANK callbacks in struct drm_driver
Date: Wed, 15 Jan 2020 13:16:31 +0100 [thread overview]
Message-ID: <20200115121652.7050-1-tzimmermann@suse.de> (raw)
VBLANK handlers in struct drm_driver are deprecated. Only legacy,
non-KMS drivers are supposed to used them. DRM drivers with kernel
modesetting are supposed to use VBLANK callbacks of the CRTC
infrastructure.
This patchset converts all DRM drivers to CRTC VBLANK callbacks and
cleans up struct drm_driver. The remaining VBLANK callbacks in struct
drm_driver are only used by legacy drivers.
Patches 1 and 3 prepare the DRM infrastructure. These patches add
get_scanout_position() to struct drm_crtc_helper_funcs, get_vblank_timestamp()
to struct drm_crtc_funcs, and add helpers for the new interfaces. Patch 2
changes the VBLANK code to evaluate vblank_disable_immediate in struct
drm_device. This simplifies the integration of CRTC VBLANK callbacks in
patch 3. If necessary, a future patch could move vblank_disable_immedate
to struct drm_crtc, so that high-precision VBLANKs could be enabled on a
per-CRTC basis.
Patches 4 to 20 convert drivers over.
In patch 21, all VBLANK callbacks are removed from struct drm_driver, except
for get_vblank_counter(), enable_vblank(), and disable_vblank(). These
interfaces are moved to the legacy section at the end of the structure. Old
helper code is now unused and being removed as well.
To cover all affected drivers, I build the patchset in x86, x86-64,
arm and aarch64. I smoke-tested amdgpu, gma500, i915, radeon and vc4 on
respective hardware.
v2:
* reorder patches so the i915 can be converted without duplicating
helper code.
* merged cleanup patches
* changed VBLANK function signatures in amdgpu
Thomas Zimmermann (21):
drm: Add get_scanout_position() to struct drm_crtc_helper_funcs
drm: Evaluate struct drm_device.vblank_disable_immediate on each use
drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
drm/amdgpu: Convert to struct
drm_crtc_helper_funcs.get_scanout_position()
drm/amdgpu: Convert to CRTC VBLANK callbacks
drm/gma500: Convert to CRTC VBLANK callbacks
drm/i915: Convert to CRTC VBLANK callbacks
drm/nouveau: Convert to struct
drm_crtc_helper_funcs.get_scanout_position()
drm/nouveau: Convert to CRTC VBLANK callbacks
drm/radeon: Convert to struct
drm_crtc_helper_funcs.get_scanout_position()
drm/radeon: Convert to CRTC VBLANK callbacks
drm/msm: Convert to struct
drm_crtc_helper_funcs.get_scanout_position()
drm/msm: Convert to CRTC VBLANK callbacks
drm/stm: Convert to struct
drm_crtc_helper_funcs.get_scanout_position()
drm/stm: Convert to CRTC VBLANK callbacks
drm/sti: Convert to CRTC VBLANK callbacks
drm/vc4: Convert to struct
drm_crtc_helper_funcs.get_scanout_position()
drm/vc4: Convert to CRTC VBLANK callbacks
drm/vkms: Convert to CRTC VBLANK callbacks
drm/vmwgfx: Convert to CRTC VBLANK callbacks
drm: Clean-up VBLANK-related callbacks in struct drm_driver
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 16 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 15 -
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 21 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 5 +
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 5 +
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 5 +
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 5 +
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 5 +
drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 +-
drivers/gpu/drm/drm_vblank.c | 411 ++++++++++--------
drivers/gpu/drm/gma500/cdv_intel_display.c | 3 +
drivers/gpu/drm/gma500/psb_drv.c | 4 -
drivers/gpu/drm/gma500/psb_drv.h | 6 +-
drivers/gpu/drm/gma500/psb_intel_display.c | 3 +
drivers/gpu/drm/gma500/psb_irq.c | 12 +-
drivers/gpu/drm/gma500/psb_irq.h | 7 +-
drivers/gpu/drm/i915/display/intel_display.c | 7 +
drivers/gpu/drm/i915/i915_drv.c | 3 -
drivers/gpu/drm/i915/i915_irq.c | 20 +-
drivers/gpu/drm/i915/i915_irq.h | 6 +-
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +
drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 2 +
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 82 ++++
drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 95 ----
drivers/gpu/drm/msm/msm_drv.c | 10 +-
drivers/gpu/drm/msm/msm_drv.h | 3 +
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 +
drivers/gpu/drm/nouveau/dispnv50/head.c | 5 +
drivers/gpu/drm/nouveau/nouveau_display.c | 28 +-
drivers/gpu/drm/nouveau/nouveau_display.h | 6 +-
drivers/gpu/drm/nouveau/nouveau_drm.c | 5 -
drivers/gpu/drm/radeon/atombios_crtc.c | 1 +
drivers/gpu/drm/radeon/radeon_display.c | 25 +-
drivers/gpu/drm/radeon/radeon_drv.c | 18 -
drivers/gpu/drm/radeon/radeon_kms.c | 29 +-
drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 3 +-
drivers/gpu/drm/radeon/radeon_mode.h | 6 +
drivers/gpu/drm/sti/sti_crtc.c | 11 +-
drivers/gpu/drm/sti/sti_crtc.h | 2 -
drivers/gpu/drm/sti/sti_drv.c | 4 -
drivers/gpu/drm/stm/drv.c | 2 -
drivers/gpu/drm/stm/ltdc.c | 66 +--
drivers/gpu/drm/stm/ltdc.h | 5 -
drivers/gpu/drm/vc4/vc4_crtc.c | 13 +-
drivers/gpu/drm/vc4/vc4_drv.c | 3 -
drivers/gpu/drm/vc4/vc4_drv.h | 4 -
drivers/gpu/drm/vkms/vkms_crtc.c | 9 +-
drivers/gpu/drm/vkms/vkms_drv.c | 1 -
drivers/gpu/drm/vkms/vkms_drv.h | 4 -
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 3 -
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 +-
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 +-
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 3 +
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 3 +
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 3 +
include/drm/drm_crtc.h | 46 +-
include/drm/drm_drv.h | 156 +------
include/drm/drm_modeset_helper_vtables.h | 47 ++
include/drm/drm_vblank.h | 30 +-
61 files changed, 692 insertions(+), 642 deletions(-)
--
2.24.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2020-01-15 12:17 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 12:16 Thomas Zimmermann [this message]
2020-01-15 12:16 ` [PATCH v2 01/21] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 02/21] drm: Evaluate struct drm_device.vblank_disable_immediate on each use Thomas Zimmermann
2020-01-15 14:37 ` [Intel-gfx] " Ville Syrjälä
2020-01-16 8:03 ` Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 03/21] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs Thomas Zimmermann
2020-01-15 14:49 ` [Intel-gfx] " Ville Syrjälä
2020-01-16 8:44 ` Thomas Zimmermann
2020-01-16 11:21 ` Ville Syrjälä
2020-01-15 12:16 ` [PATCH v2 04/21] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 05/21] drm/amdgpu: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 06/21] drm/gma500: " Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 07/21] drm/i915: " Thomas Zimmermann
2020-01-15 12:38 ` Jani Nikula
2020-01-15 15:11 ` Ville Syrjälä
2020-01-15 12:16 ` [PATCH v2 08/21] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 09/21] drm/nouveau: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 10/21] drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 11/21] drm/radeon: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 12/21] drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 13/21] drm/msm: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 14/21] drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 15/21] drm/stm: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 16/21] drm/sti: " Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 17/21] drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 18/21] drm/vc4: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 19/21] drm/vkms: " Thomas Zimmermann
2020-01-15 23:18 ` Rodrigo Siqueira
2020-01-17 13:22 ` Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 20/21] drm/vmwgfx: " Thomas Zimmermann
2020-01-15 12:16 ` [PATCH v2 21/21] drm: Clean-up VBLANK-related callbacks in struct drm_driver 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=20200115121652.7050-1-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--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=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).