From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8414FC33CA6 for ; Fri, 10 Jan 2020 09:21:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5BA9A20842 for ; Fri, 10 Jan 2020 09:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbgAJJVh (ORCPT ); Fri, 10 Jan 2020 04:21:37 -0500 Received: from mx2.suse.de ([195.135.220.15]:46824 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726823AbgAJJVh (ORCPT ); Fri, 10 Jan 2020 04:21:37 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2FA18B016; Fri, 10 Jan 2020 09:21:33 +0000 (UTC) From: Thomas Zimmermann 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: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH 00/23] drm: Clean up VBLANK callbacks in struct drm_driver Date: Fri, 10 Jan 2020 10:21:04 +0100 Message-Id: <20200110092127.27847-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 to 9 move get_scanout_position() to struct drm_crtc_helper_funcs and convert drivers over. The callback is a helper for the default implementation of get_vblank_timestamp() (i.e., drm_calc_vbltimestamp_from_scanoutpos()). The original callback is removed from struct drm_driver. Patch 10 changes the VBLANK code to evaluate vblank_disable_immediate in struct derm_device. This simplifies the later integration of CRTC VBLANK callbacks. 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 11 to 23 move get_vblank_timestamp() to struct drm_crtc_funcs and convert DRM drivers over. 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. 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. Thomas Zimmermann (23): drm: Add get_scanout_position() to struct drm_crtc_helper_funcs drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/i915: Don't use struct drm_driver.get_scanout_position() drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm: Remove struct drm_driver.get_scanout_position() 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 CRTC VBLANK callbacks drm/gma500: Convert to CRTC VBLANK callbacks drm/i915: Convert to CRTC VBLANK callbacks drm/msm: Convert to CRTC VBLANK callbacks drm/nouveau: Convert to CRTC VBLANK callbacks drm/radeon: Convert to CRTC VBLANK callbacks drm/sti: Convert to CRTC VBLANK callbacks drm/stm: Convert to CRTC VBLANK callbacks drm/vc4: Convert to CRTC VBLANK callbacks drm/vkms: Convert to CRTC VBLANK callbacks drm/vmwgfx: Convert to CRTC VBLANK callbacks drm: Cleanup VBLANK callbacks in struct drm_driver drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 15 -- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 24 +++ 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 | 5 +- drivers/gpu/drm/drm_vblank.c | 128 +++++++++----- 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 | 110 +++++++++++- drivers/gpu/drm/i915/i915_irq.h | 8 +- 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 | 3 - 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 | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 3 + drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 3 + include/drm/drm_crtc.h | 41 +++++ include/drm/drm_drv.h | 156 +----------------- include/drm/drm_modeset_helper_vtables.h | 47 ++++++ include/drm/drm_vblank.h | 4 + 61 files changed, 631 insertions(+), 474 deletions(-) -- 2.24.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Zimmermann Subject: [PATCH 00/23] drm: Clean up VBLANK callbacks in struct drm_driver Date: Fri, 10 Jan 2020 10:21:04 +0100 Message-ID: <20200110092127.27847-1-tzimmermann@suse.de> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Sender: linux-arm-msm-owner@vger.kernel.org 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: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org, Thomas Zimmermann List-Id: nouveau.vger.kernel.org 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 to 9 move get_scanout_position() to struct drm_crtc_helper_funcs and convert drivers over. The callback is a helper for the default implementation of get_vblank_timestamp() (i.e., drm_calc_vbltimestamp_from_scanoutpos()). The original callback is removed from struct drm_driver. Patch 10 changes the VBLANK code to evaluate vblank_disable_immediate in struct derm_device. This simplifies the later integration of CRTC VBLANK callbacks. 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 11 to 23 move get_vblank_timestamp() to struct drm_crtc_funcs and convert DRM drivers over. 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. 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. Thomas Zimmermann (23): drm: Add get_scanout_position() to struct drm_crtc_helper_funcs drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/i915: Don't use struct drm_driver.get_scanout_position() drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm: Remove struct drm_driver.get_scanout_position() 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 CRTC VBLANK callbacks drm/gma500: Convert to CRTC VBLANK callbacks drm/i915: Convert to CRTC VBLANK callbacks drm/msm: Convert to CRTC VBLANK callbacks drm/nouveau: Convert to CRTC VBLANK callbacks drm/radeon: Convert to CRTC VBLANK callbacks drm/sti: Convert to CRTC VBLANK callbacks drm/stm: Convert to CRTC VBLANK callbacks drm/vc4: Convert to CRTC VBLANK callbacks drm/vkms: Convert to CRTC VBLANK callbacks drm/vmwgfx: Convert to CRTC VBLANK callbacks drm: Cleanup VBLANK callbacks in struct drm_driver drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 15 -- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 24 +++ 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 | 5 +- drivers/gpu/drm/drm_vblank.c | 128 +++++++++----- 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 | 110 +++++++++++- drivers/gpu/drm/i915/i915_irq.h | 8 +- 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 | 3 - 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 | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 3 + drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 3 + include/drm/drm_crtc.h | 41 +++++ include/drm/drm_drv.h | 156 +----------------- include/drm/drm_modeset_helper_vtables.h | 47 ++++++ include/drm/drm_vblank.h | 4 + 61 files changed, 631 insertions(+), 474 deletions(-) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99EDDC33CA4 for ; Fri, 10 Jan 2020 09:22:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7608F20721 for ; Fri, 10 Jan 2020 09:22:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7608F20721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4066F6E9AE; Fri, 10 Jan 2020 09:21:38 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACF006E99E; Fri, 10 Jan 2020 09:21:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2FA18B016; Fri, 10 Jan 2020 09:21:33 +0000 (UTC) From: Thomas Zimmermann 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 Subject: [PATCH 00/23] drm: Clean up VBLANK callbacks in struct drm_driver Date: Fri, 10 Jan 2020 10:21:04 +0100 Message-Id: <20200110092127.27847-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , nouveau@lists.freedesktop.org, freedreno@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 to 9 move get_scanout_position() to struct drm_crtc_helper_funcs and convert drivers over. The callback is a helper for the default implementation of get_vblank_timestamp() (i.e., drm_calc_vbltimestamp_from_scanoutpos()). The original callback is removed from struct drm_driver. Patch 10 changes the VBLANK code to evaluate vblank_disable_immediate in struct derm_device. This simplifies the later integration of CRTC VBLANK callbacks. 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 11 to 23 move get_vblank_timestamp() to struct drm_crtc_funcs and convert DRM drivers over. 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. 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. Thomas Zimmermann (23): drm: Add get_scanout_position() to struct drm_crtc_helper_funcs drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/i915: Don't use struct drm_driver.get_scanout_position() drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm: Remove struct drm_driver.get_scanout_position() 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 CRTC VBLANK callbacks drm/gma500: Convert to CRTC VBLANK callbacks drm/i915: Convert to CRTC VBLANK callbacks drm/msm: Convert to CRTC VBLANK callbacks drm/nouveau: Convert to CRTC VBLANK callbacks drm/radeon: Convert to CRTC VBLANK callbacks drm/sti: Convert to CRTC VBLANK callbacks drm/stm: Convert to CRTC VBLANK callbacks drm/vc4: Convert to CRTC VBLANK callbacks drm/vkms: Convert to CRTC VBLANK callbacks drm/vmwgfx: Convert to CRTC VBLANK callbacks drm: Cleanup VBLANK callbacks in struct drm_driver drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 15 -- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 24 +++ 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 | 5 +- drivers/gpu/drm/drm_vblank.c | 128 +++++++++----- 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 | 110 +++++++++++- drivers/gpu/drm/i915/i915_irq.h | 8 +- 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 | 3 - 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 | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 3 + drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 3 + include/drm/drm_crtc.h | 41 +++++ include/drm/drm_drv.h | 156 +----------------- include/drm/drm_modeset_helper_vtables.h | 47 ++++++ include/drm/drm_vblank.h | 4 + 61 files changed, 631 insertions(+), 474 deletions(-) -- 2.24.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2169C33CA4 for ; Fri, 10 Jan 2020 09:21:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3A9720721 for ; Fri, 10 Jan 2020 09:21:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3A9720721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 04E0B6E9A1; Fri, 10 Jan 2020 09:21:37 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACF006E99E; Fri, 10 Jan 2020 09:21:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2FA18B016; Fri, 10 Jan 2020 09:21:33 +0000 (UTC) From: Thomas Zimmermann 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 Date: Fri, 10 Jan 2020 10:21:04 +0100 Message-Id: <20200110092127.27847-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 00/23] drm: Clean up VBLANK callbacks in struct drm_driver X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , nouveau@lists.freedesktop.org, freedreno@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 to 9 move get_scanout_position() to struct drm_crtc_helper_funcs and convert drivers over. The callback is a helper for the default implementation of get_vblank_timestamp() (i.e., drm_calc_vbltimestamp_from_scanoutpos()). The original callback is removed from struct drm_driver. Patch 10 changes the VBLANK code to evaluate vblank_disable_immediate in struct derm_device. This simplifies the later integration of CRTC VBLANK callbacks. 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 11 to 23 move get_vblank_timestamp() to struct drm_crtc_funcs and convert DRM drivers over. 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. 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. Thomas Zimmermann (23): drm: Add get_scanout_position() to struct drm_crtc_helper_funcs drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/i915: Don't use struct drm_driver.get_scanout_position() drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm: Remove struct drm_driver.get_scanout_position() 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 CRTC VBLANK callbacks drm/gma500: Convert to CRTC VBLANK callbacks drm/i915: Convert to CRTC VBLANK callbacks drm/msm: Convert to CRTC VBLANK callbacks drm/nouveau: Convert to CRTC VBLANK callbacks drm/radeon: Convert to CRTC VBLANK callbacks drm/sti: Convert to CRTC VBLANK callbacks drm/stm: Convert to CRTC VBLANK callbacks drm/vc4: Convert to CRTC VBLANK callbacks drm/vkms: Convert to CRTC VBLANK callbacks drm/vmwgfx: Convert to CRTC VBLANK callbacks drm: Cleanup VBLANK callbacks in struct drm_driver drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 15 -- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 24 +++ 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 | 5 +- drivers/gpu/drm/drm_vblank.c | 128 +++++++++----- 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 | 110 +++++++++++- drivers/gpu/drm/i915/i915_irq.h | 8 +- 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 | 3 - 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 | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 3 + drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 3 + include/drm/drm_crtc.h | 41 +++++ include/drm/drm_drv.h | 156 +----------------- include/drm/drm_modeset_helper_vtables.h | 47 ++++++ include/drm/drm_vblank.h | 4 + 61 files changed, 631 insertions(+), 474 deletions(-) -- 2.24.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB37CC33CA2 for ; Fri, 10 Jan 2020 09:22:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9978620721 for ; Fri, 10 Jan 2020 09:22:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9978620721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E23516E9A7; Fri, 10 Jan 2020 09:21:37 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACF006E99E; Fri, 10 Jan 2020 09:21:35 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2FA18B016; Fri, 10 Jan 2020 09:21:33 +0000 (UTC) From: Thomas Zimmermann 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 Subject: [PATCH 00/23] drm: Clean up VBLANK callbacks in struct drm_driver Date: Fri, 10 Jan 2020 10:21:04 +0100 Message-Id: <20200110092127.27847-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , nouveau@lists.freedesktop.org, freedreno@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" 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 to 9 move get_scanout_position() to struct drm_crtc_helper_funcs and convert drivers over. The callback is a helper for the default implementation of get_vblank_timestamp() (i.e., drm_calc_vbltimestamp_from_scanoutpos()). The original callback is removed from struct drm_driver. Patch 10 changes the VBLANK code to evaluate vblank_disable_immediate in struct derm_device. This simplifies the later integration of CRTC VBLANK callbacks. 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 11 to 23 move get_vblank_timestamp() to struct drm_crtc_funcs and convert DRM drivers over. 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. 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. Thomas Zimmermann (23): drm: Add get_scanout_position() to struct drm_crtc_helper_funcs drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/i915: Don't use struct drm_driver.get_scanout_position() drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() drm: Remove struct drm_driver.get_scanout_position() 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 CRTC VBLANK callbacks drm/gma500: Convert to CRTC VBLANK callbacks drm/i915: Convert to CRTC VBLANK callbacks drm/msm: Convert to CRTC VBLANK callbacks drm/nouveau: Convert to CRTC VBLANK callbacks drm/radeon: Convert to CRTC VBLANK callbacks drm/sti: Convert to CRTC VBLANK callbacks drm/stm: Convert to CRTC VBLANK callbacks drm/vc4: Convert to CRTC VBLANK callbacks drm/vkms: Convert to CRTC VBLANK callbacks drm/vmwgfx: Convert to CRTC VBLANK callbacks drm: Cleanup VBLANK callbacks in struct drm_driver drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 15 -- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 24 +++ 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 | 5 +- drivers/gpu/drm/drm_vblank.c | 128 +++++++++----- 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 | 110 +++++++++++- drivers/gpu/drm/i915/i915_irq.h | 8 +- 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 | 3 - 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 | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 3 + drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 5 +- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 3 + include/drm/drm_crtc.h | 41 +++++ include/drm/drm_drv.h | 156 +----------------- include/drm/drm_modeset_helper_vtables.h | 47 ++++++ include/drm/drm_vblank.h | 4 + 61 files changed, 631 insertions(+), 474 deletions(-) -- 2.24.1 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx