Displaying 20 results from an estimated 25 matches for "get_vblank_count".
Did you mean:
get_vblank_counter
2020 Jan 12
2
[PATCH 23/23] drm: Cleanup VBLANK callbacks in struct drm_driver
...2 files changed, 17 insertions(+), 123 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 7cf436a4b908..ceff68474d4d 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -138,10 +138,9 @@ static u32 __get_vblank_counter(struct drm_device *dev, unsigned int pipe)
>
> if (crtc->funcs->get_vblank_counter)
> return crtc->funcs->get_vblank_counter(crtc);
> - }
> -
> - if (dev->driver->get_vblank_counter)
> + } else if (dev->driver->get_vblank_counter) {
> re...
2020 Jan 10
0
[PATCH 23/23] drm: Cleanup VBLANK callbacks in struct drm_driver
...----------------------------
2 files changed, 17 insertions(+), 123 deletions(-)
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 7cf436a4b908..ceff68474d4d 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -138,10 +138,9 @@ static u32 __get_vblank_counter(struct drm_device *dev, unsigned int pipe)
if (crtc->funcs->get_vblank_counter)
return crtc->funcs->get_vblank_counter(crtc);
- }
-
- if (dev->driver->get_vblank_counter)
+ } else if (dev->driver->get_vblank_counter) {
return dev->driver->get_vblank_count...
2020 Feb 25
0
[PATCH 2/3] drm: Move non-kms driver state into struct drm_legacy_state
...0,7 @@
#include <drm/drm_crtc.h>
#include <drm/drm_drv.h>
#include <drm/drm_framebuffer.h>
+#include <drm/drm_legacy.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_print.h>
#include <drm/drm_vblank.h>
@@ -144,8 +145,8 @@ static u32 __get_vblank_counter(struct drm_device *dev, unsigned int pipe)
if (crtc->funcs->get_vblank_counter)
return crtc->funcs->get_vblank_counter(crtc);
- } else if (dev->driver->get_vblank_counter) {
- return dev->driver->get_vblank_counter(dev, pipe);
+ } else if (dev->driver->lega...
2013 Aug 12
0
[RFC PATCH] drm/nv50-nvd0: implement precise vblank timing support on nv50/nvc0.
...engine/disp/nv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
index c168ae3..96268b7 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
@@ -1285,6 +1285,57 @@ nv50_disp_intr(struct nouveau_subdev *subdev)
}
}
+u32 nv50_disp_get_vblank_count(struct nouveau_disp *disp, int head)
+{
+ if (head < 0 || head >= 2)
+ return 0;
+
+ return nv_rd32(disp, 0x616340 + head * 0x800) >> 16;
+}
+
+int nv50_disp_get_scanoutpos(struct nouveau_disp *disp, int head, int *vpos, int *hpos)
+{
+ u32 reg, vbias, hbias, vbl_start, vbl_end, hline,...
2020 Jan 10
0
[PATCH 12/23] drm/amdgpu: Convert to CRTC VBLANK callbacks
...git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 81a531b652aa..c1262ab588c9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1197,6 +1197,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon);
u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe);
int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe);
void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe);
+u32 amdgpu_crtc_get_vblank_counter(struct drm_crtc *crtc);
+int amdgpu_crtc_enable_vblank(struct d...
2020 Jan 15
0
[PATCH v2 07/21] drm/i915: Convert to CRTC VBLANK callbacks
.../i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 59c375879186..c8f1da845e7d 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -16336,6 +16336,7 @@ static const struct drm_crtc_funcs bdw_crtc_funcs = {
.get_vblank_counter = g4x_get_vblank_counter,
.enable_vblank = bdw_enable_vblank,
.disable_vblank = bdw_disable_vblank,
+ .get_vblank_timestamp = i915_crtc_get_vblank_timestamp,
};
static const struct drm_crtc_funcs ilk_crtc_funcs = {
@@ -16344,6 +16345,7 @@ static const struct drm_crtc_funcs ilk_crtc_funcs...
2020 Jan 23
0
[PATCH v4 07/22] drm/i915: Convert to CRTC VBLANK callbacks
.../i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index dd03987cc24f..2f71360e3697 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -16323,6 +16323,7 @@ static const struct drm_crtc_funcs bdw_crtc_funcs = {
.get_vblank_counter = g4x_get_vblank_counter,
.enable_vblank = bdw_enable_vblank,
.disable_vblank = bdw_disable_vblank,
+ .get_vblank_timestamp = intel_crtc_get_vblank_timestamp,
};
static const struct drm_crtc_funcs ilk_crtc_funcs = {
@@ -16331,6 +16332,7 @@ static const struct drm_crtc_funcs ilk_crtc_funcs...
2020 Jan 10
0
[PATCH 17/23] drm/radeon: Convert to CRTC VBLANK callbacks
.../gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 7187158b9963..9116975b6eb9 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -45,6 +45,10 @@
#include "atom.h"
#include "radeon.h"
+u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
+int radeon_enable_vblank_kms(struct drm_crtc *crtc);
+void radeon_disable_vblank_kms(struct drm_crtc *crtc);
+
static void avivo_crtc_load_lut(struct drm_crtc *crtc)
{
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
@@ -458,7 +462,7 @@ static void radeon_f...
2020 Jan 23
0
[PATCH v4 11/22] drm/radeon: Convert to CRTC VBLANK callbacks
.../gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 2f641f3b39e7..fa722b7c8df3 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -45,6 +45,10 @@
#include "atom.h"
#include "radeon.h"
+u32 radeon_get_vblank_counter_kms(struct drm_crtc *crtc);
+int radeon_enable_vblank_kms(struct drm_crtc *crtc);
+void radeon_disable_vblank_kms(struct drm_crtc *crtc);
+
static void avivo_crtc_load_lut(struct drm_crtc *crtc)
{
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
@@ -458,7 +462,7 @@ static void radeon_f...
2020 Jan 15
0
[PATCH v2 05/21] drm/amdgpu: Convert to CRTC VBLANK callbacks
...rm/amd/amdgpu/amdgpu.h
@@ -1194,9 +1194,9 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
int amdgpu_device_ip_suspend(struct amdgpu_device *adev);
int amdgpu_device_suspend(struct drm_device *dev, bool fbcon);
int amdgpu_device_resume(struct drm_device *dev, bool fbcon);
-u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe);
-int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe);
-void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe);
+u32 amdgpu_get_vblank_counter_kms(struct drm_crtc *crtc);
+int amdgpu_enable_vblank_kms(struct drm...
2020 Jan 23
0
[PATCH v4 05/22] drm/amdgpu: Convert to CRTC VBLANK callbacks
...rm/amd/amdgpu/amdgpu.h
@@ -1191,9 +1191,9 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
int amdgpu_device_ip_suspend(struct amdgpu_device *adev);
int amdgpu_device_suspend(struct drm_device *dev, bool fbcon);
int amdgpu_device_resume(struct drm_device *dev, bool fbcon);
-u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe);
-int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe);
-void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe);
+u32 amdgpu_get_vblank_counter_kms(struct drm_crtc *crtc);
+int amdgpu_enable_vblank_kms(struct drm...
2020 Jan 10
36
[PATCH 00/23] drm: Clean up VBLANK callbacks in struct drm_driver
...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 Zimmerm...
2020 Jan 20
0
[PATCH v3 20/22] drm/vmwgfx: Convert to CRTC VBLANK callbacks
..._drv.c
index e962048f65d2..673d6920fc29 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -1393,9 +1393,6 @@ static struct drm_driver driver = {
DRIVER_MODESET | DRIVER_RENDER | DRIVER_ATOMIC,
.load = vmw_driver_load,
.unload = vmw_driver_unload,
- .get_vblank_counter = vmw_get_vblank_counter,
- .enable_vblank = vmw_enable_vblank,
- .disable_vblank = vmw_disable_vblank,
.ioctls = vmw_ioctls,
.num_ioctls = ARRAY_SIZE(vmw_ioctls),
.master_set = vmw_master_set,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index a31e...
2020 Jan 23
0
[PATCH v4 20/22] drm/vmwgfx: Convert to CRTC VBLANK callbacks
..._drv.c
index e962048f65d2..673d6920fc29 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -1393,9 +1393,6 @@ static struct drm_driver driver = {
DRIVER_MODESET | DRIVER_RENDER | DRIVER_ATOMIC,
.load = vmw_driver_load,
.unload = vmw_driver_unload,
- .get_vblank_counter = vmw_get_vblank_counter,
- .enable_vblank = vmw_enable_vblank,
- .disable_vblank = vmw_disable_vblank,
.ioctls = vmw_ioctls,
.num_ioctls = ARRAY_SIZE(vmw_ioctls),
.master_set = vmw_master_set,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index a31e...
2020 Jan 15
26
[PATCH v2 00/21] drm: Clean up VBLANK callbacks in struct drm_driver
...ANK 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, i91...
2020 Jan 20
0
[PATCH v3 06/22] drm/gma500: Convert to CRTC VBLANK callbacks
...drivers/gpu/drm/gma500/cdv_intel_display.c
@@ -977,6 +977,9 @@ const struct drm_crtc_funcs cdv_intel_crtc_funcs = {
.set_config = gma_crtc_set_config,
.destroy = gma_crtc_destroy,
.page_flip = gma_crtc_page_flip,
+ .enable_vblank = psb_enable_vblank,
+ .disable_vblank = psb_disable_vblank,
+ .get_vblank_counter = psb_get_vblank_counter,
};
const struct gma_clock_funcs cdv_clock_funcs = {
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 52591416f8fe..36cb292fdebe 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -363,7 +363,6...
2020 Jan 20
26
[PATCH v3 00/22] drm: Clean up VBLANK callbacks in struct drm_driver
...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.
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.
Finally, patch 22 removes an older version of get_scanout_position()
from the VBLANK interface.
To cover all affected d...
2020 Jan 23
30
[PATCH v4 00/22] drm: Clean up VBLANK callbacks in struct drm_driver
...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.
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.
Finally, patch 22 removes an older version of get_scanout_position()
from the VBLANK interface.
To cover all affected d...
2020 Feb 25
7
[PATCH 0/3] Add separate non-KMS state; constify struct drm_driver
This patchset moves legacy, non-KMS driver state from struct drm_driver
into struct drm_legacy_state. Only non-KMS drivers provide an instance
of the latter structure. One special case is nouveau, which supports
legacy interfaces. It also provides an instance of the legacy state if
the legacy interfaces have been enabled (i.e., defines the config option
CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT)
I
2020 Jan 10
0
[PATCH 15/23] drm/msm: Convert to CRTC VBLANK callbacks
.../gpu/drm/msm/disp/mdp5/mdp5_crtc.c
index 4decf19847a8..70c326d330f6 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
@@ -471,6 +471,17 @@ static bool mdp5_crtc_get_scanout_position(struct drm_crtc *crtc,
return true;
}
+static u32 mdp5_crtc_get_vblank_counter(struct drm_crtc *crtc)
+{
+ struct drm_encoder *encoder;
+
+ encoder = get_encoder_from_crtc(crtc);
+ if (!encoder)
+ return 0;
+
+ return mdp5_encoder_get_framecount(encoder);
+}
+
static void mdp5_crtc_atomic_disable(struct drm_crtc *crtc,
struct drm_crtc_state *old_state)
{
@@ -11...