search for: drm_crtc_from_index

Displaying 20 results from an estimated 28 matches for "drm_crtc_from_index".

2020 Jan 10
2
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
...; + unsigned int index, bool in_vblank_irq, > + int *vpos, int *hpos, > + ktime_t *stime, ktime_t *etime, > + const struct drm_display_mode *mode) > { > struct drm_i915_private *dev_priv = to_i915(dev); > struct intel_crtc *crtc = to_intel_crtc(drm_crtc_from_index(dev, index)); > @@ -879,6 +885,109 @@ bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int index, > return true; > } > > +bool i915_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, > + unsigned int pipe, > + int *max_error, > +...
2020 Jan 10
0
[PATCH 16/23] drm/nouveau: Convert to CRTC VBLANK callbacks
...u_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 pi...
2020 Jan 15
0
[PATCH v2 09/21] drm/nouveau: Convert to CRTC VBLANK callbacks
...u_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 pi...
2020 Jan 23
0
[PATCH v4 09/22] drm/nouveau: Convert to CRTC VBLANK callbacks
...u_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 pi...
2020 Jan 15
0
[PATCH v2 03/21] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
...handles standard video modes. For double scan * and interlaced modes the driver is supposed to adjust the hardware mode @@ -742,15 +745,22 @@ static bool drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe, ktime_t *tvblank, bool in_vblank_irq) { + struct drm_crtc *crtc = drm_crtc_from_index(dev, pipe); bool ret = false; /* Define requested maximum error on timestamps (nanoseconds). */ int max_error = (int) drm_timestamp_precision * 1000; /* Query driver if possible and precision timestamping enabled. */ - if (dev->driver->get_vblank_timestamp && (max_error &g...
2020 Jan 20
0
[PATCH v3 03/22] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
...* drm_get_last_vbltimestamp - retrieve raw timestamp for the most recent * vblank interval @@ -799,15 +844,22 @@ static bool drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe, ktime_t *tvblank, bool in_vblank_irq) { + struct drm_crtc *crtc = drm_crtc_from_index(dev, pipe); bool ret = false; /* Define requested maximum error on timestamps (nanoseconds). */ int max_error = (int) drm_timestamp_precision * 1000; /* Query driver if possible and precision timestamping enabled. */ - if (dev->driver->get_vblank_timestamp && (max_error &g...
2020 Jan 20
0
[Intel-gfx] [PATCH v3 03/22] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
...- retrieve raw timestamp for the most recent > * vblank interval > @@ -799,15 +844,22 @@ static bool > drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe, > ktime_t *tvblank, bool in_vblank_irq) > { > + struct drm_crtc *crtc = drm_crtc_from_index(dev, pipe); > bool ret = false; > > /* Define requested maximum error on timestamps (nanoseconds). */ > int max_error = (int) drm_timestamp_precision * 1000; > > /* Query driver if possible and precision timestamping enabled. */ > - if (dev->driver->get_vblank...
2020 Jan 15
2
[Intel-gfx] [PATCH v2 03/21] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
...For double scan > * and interlaced modes the driver is supposed to adjust the hardware mode > @@ -742,15 +745,22 @@ static bool > drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe, > ktime_t *tvblank, bool in_vblank_irq) > { > + struct drm_crtc *crtc = drm_crtc_from_index(dev, pipe); > bool ret = false; > > /* Define requested maximum error on timestamps (nanoseconds). */ > int max_error = (int) drm_timestamp_precision * 1000; > > /* Query driver if possible and precision timestamping enabled. */ > - if (dev->driver->get_vblank...
2020 Jan 16
0
[Intel-gfx] [PATCH v2 03/21] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
...; * and interlaced modes the driver is supposed to adjust the hardware mode >> @@ -742,15 +745,22 @@ static bool >> drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe, >> ktime_t *tvblank, bool in_vblank_irq) >> { >> + struct drm_crtc *crtc = drm_crtc_from_index(dev, pipe); >> bool ret = false; >> >> /* Define requested maximum error on timestamps (nanoseconds). */ >> int max_error = (int) drm_timestamp_precision * 1000; >> >> /* Query driver if possible and precision timestamping enabled. */ >> - if (d...
2020 Jan 10
0
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
...noutpos(struct drm_device *dev, + unsigned int index, bool in_vblank_irq, + int *vpos, int *hpos, + ktime_t *stime, ktime_t *etime, + const struct drm_display_mode *mode) { struct drm_i915_private *dev_priv = to_i915(dev); struct intel_crtc *crtc = to_intel_crtc(drm_crtc_from_index(dev, index)); @@ -879,6 +885,109 @@ bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int index, return true; } +bool i915_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, + unsigned int pipe, + int *max_error, + ktime_t *vblank_time, + boo...
2020 Jan 10
0
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
...index, bool in_vblank_irq, >> + int *vpos, int *hpos, >> + ktime_t *stime, ktime_t *etime, >> + const struct drm_display_mode *mode) >> { >> struct drm_i915_private *dev_priv = to_i915(dev); >> struct intel_crtc *crtc = to_intel_crtc(drm_crtc_from_index(dev, index)); >> @@ -879,6 +885,109 @@ bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int index, >> return true; >> } >> >> +bool i915_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, >> + unsigned int pipe, >> +...
2020 Jan 10
1
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
...rq, >>> + int *vpos, int *hpos, >>> + ktime_t *stime, ktime_t *etime, >>> + const struct drm_display_mode *mode) >>> { >>> struct drm_i915_private *dev_priv = to_i915(dev); >>> struct intel_crtc *crtc = to_intel_crtc(drm_crtc_from_index(dev, index)); >>> @@ -879,6 +885,109 @@ bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int index, >>> return true; >>> } >>> >>> +bool i915_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, >>> + unsigned int...
2018 Dec 10
2
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...+ b/include/drm/drm_crtc.h @@ -1149,8 +1149,6 @@ static inline uint32_t drm_crtc_mask(const struct drm_crtc *crtc) return 1 << drm_crtc_index(crtc); } -int drm_crtc_force_disable_all(struct drm_device *dev); - int drm_mode_set_config_internal(struct drm_mode_set *set); struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx); diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index d65f034843ce..0ee9a96b70da 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h @@ -56,6 +56,7 @@ bool drm_helper_encoder_in_use(struct drm_encoder *encoder...
2018 Dec 11
1
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...m_crtc_mask(const struct drm_crtc *crtc) > > return 1 << drm_crtc_index(crtc); > > } > > > > -int drm_crtc_force_disable_all(struct drm_device *dev); > > - > > int drm_mode_set_config_internal(struct drm_mode_set *set); > > struct drm_crtc *drm_crtc_from_index(struct drm_device *dev, int idx); > > > > diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h > > index d65f034843ce..0ee9a96b70da 100644 > > --- a/include/drm/drm_crtc_helper.h > > +++ b/include/drm/drm_crtc_helper.h > > @@ -56,6 +56,7 @@...
2020 Jan 10
0
[PATCH 07/23] drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
...c_get_scanout_position(struct drm_crtc *crtc, + bool in_vblank_irq, + int *vpos, int *hpos, + ktime_t *stime, ktime_t *etime, + const struct drm_display_mode *mode) { + struct drm_device *dev = crtc->dev; struct vc4_dev *vc4 = to_vc4_dev(dev); - struct drm_crtc *crtc = drm_crtc_from_index(dev, crtc_id); struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); u32 val; int fifo_lines; @@ -1039,6 +1040,7 @@ static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { .atomic_flush = vc4_crtc_atomic_flush, .atomic_enable = vc4_crtc_atomic_enable, .atomic_disable = vc4_crtc_ato...
2020 Jan 15
0
[PATCH v2 17/21] drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
...c_get_scanout_position(struct drm_crtc *crtc, + bool in_vblank_irq, + int *vpos, int *hpos, + ktime_t *stime, ktime_t *etime, + const struct drm_display_mode *mode) { + struct drm_device *dev = crtc->dev; struct vc4_dev *vc4 = to_vc4_dev(dev); - struct drm_crtc *crtc = drm_crtc_from_index(dev, crtc_id); struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc); u32 val; int fifo_lines; @@ -1039,6 +1040,7 @@ static const struct drm_crtc_helper_funcs vc4_crtc_helper_funcs = { .atomic_flush = vc4_crtc_atomic_flush, .atomic_enable = vc4_crtc_atomic_enable, .atomic_disable = vc4_crtc_ato...
2020 Jan 15
26
[PATCH v2 00/21] drm: Clean up VBLANK callbacks in struct drm_driver
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.
2020 Jan 12
2
[PATCH 23/23] drm: Cleanup VBLANK callbacks in struct drm_driver
...->enable_vblank(dev, pipe); > + return -EINVAL; > } > > static int drm_vblank_enable(struct drm_device *dev, unsigned int pipe) > @@ -1109,13 +1104,10 @@ static bool __vblank_disable_immediate(struct drm_device *dev, unsigned int pipe > return false; > > crtc = drm_crtc_from_index(dev, pipe); > - if (crtc && crtc->funcs->get_vblank_timestamp) > - return true; > - > - if (dev->driver->get_vblank_timestamp) > - return true; > + if (!crtc || !crtc->funcs->get_vblank_timestamp) > + return false; > > - return false; > +...
2020 Jan 15
0
[PATCH v2 07/21] drm/i915: Convert to CRTC VBLANK callbacks
...c *dcrtc, + bool in_vblank_irq, + int *vpos, int *hpos, + ktime_t *stime, ktime_t *etime, + const struct drm_display_mode *mode) { + struct drm_device *dev = dcrtc->dev; struct drm_i915_private *dev_priv = to_i915(dev); - struct intel_crtc *crtc = to_intel_crtc(drm_crtc_from_index(dev, index)); + struct intel_crtc *crtc = to_intel_crtc(dcrtc); enum pipe pipe = crtc->pipe; int position; int vbl_start, vbl_end, hsync_start, htotal, vtotal; @@ -879,6 +881,14 @@ bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int index, return true; } +bool i915_crtc...
2020 Jan 23
0
[PATCH v4 07/22] drm/i915: Convert to CRTC VBLANK callbacks
...c *_crtc, + bool in_vblank_irq, + int *vpos, int *hpos, + ktime_t *stime, ktime_t *etime, + const struct drm_display_mode *mode) { + struct drm_device *dev = _crtc->dev; struct drm_i915_private *dev_priv = to_i915(dev); - struct intel_crtc *crtc = to_intel_crtc(drm_crtc_from_index(dev, index)); + struct intel_crtc *crtc = to_intel_crtc(_crtc); enum pipe pipe = crtc->pipe; int position; int vbl_start, vbl_end, hsync_start, htotal, vtotal; @@ -879,6 +881,14 @@ bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int index, return true; } +bool intel_crt...