search for: max_error

Displaying 20 results from an estimated 35 matches for "max_error".

2010 Jan 04
0
[RFC 03/12 RESEND PATCH] Btrfs: Reorder __btrfs_map_block to make code more efficient.
...rfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2625,26 +2625,12 @@ static int __btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, u64 offset; u64 stripe_offset; u64 stripe_nr; - int stripes_allocated = 8; - int stripes_required = 1; int stripe_index; int i; int num_stripes; - int max_errors = 0; + int max_errors; struct btrfs_multi_bio *multi = NULL; - if (multi_ret && !(rw & (1 << BIO_RW))) - stripes_allocated = 1; -again: - if (multi_ret) { - multi = kzalloc(btrfs_multi_bio_size(stripes_allocated), - GFP_NOFS); - if (!multi) - return -ENOMEM; - - atom...
2020 Jan 15
2
[Intel-gfx] [PATCH v2 03/21] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
...et_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 > 0)) > + if (crtc->funcs->get_vblank_timestamp && (max_error > 0)) { Could drop...
2020 Jan 15
0
[PATCH v2 03/21] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
...42,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 > 0)) + if (crtc->funcs->get_vblank_timestamp && (max_error > 0)) { + struct drm_crtc *crtc = drm_c...
2020 Jan 16
0
[Intel-gfx] [PATCH v2 03/21] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
...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 > 0)) >> + if (crtc->funcs->get_vblank_timestamp && (max_error > 0)...
2020 Jan 20
0
[PATCH v3 03/22] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
..._get_vblank_timestamp_internal( } EXPORT_SYMBOL(drm_crtc_vblank_helper_get_vblank_timestamp_internal); +/** + * drm_crtc_vblank_helper_get_vblank_timestamp - precise vblank timestamp + * helper + * @crtc: CRTC whose vblank timestamp to retrieve + * @max_error: Desired maximum allowable error in timestamps (nanosecs) + * On return contains true maximum error of timestamp + * @vblank_time: Pointer to time which should receive the timestamp + * @in_vblank_irq: + * True when called from drm_crtc_handle_vblank(). Some drivers + * need to...
2020 Jan 10
2
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
...c(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, > + bool in_vblank_irq) > +{ > + struct timespec64 ts_etime, ts_vblank_time; > + ktime_t stime, etime; > + bool vbl_status; > + struct drm_crtc *crtc; > + const struct drm_display_mode *mode; > + struct drm_vblank_crtc *vblank =...
2020 Jan 20
0
[Intel-gfx] [PATCH v3 03/22] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs
...> EXPORT_SYMBOL(drm_crtc_vblank_helper_get_vblank_timestamp_internal); > > +/** > + * drm_crtc_vblank_helper_get_vblank_timestamp - precise vblank timestamp > + * helper > + * @crtc: CRTC whose vblank timestamp to retrieve > + * @max_error: Desired maximum allowable error in timestamps (nanosecs) > + * On return contains true maximum error of timestamp > + * @vblank_time: Pointer to time which should receive the timestamp > + * @in_vblank_irq: > + * True when called from drm_crtc_handle_vblank(). Some dri...
2020 Jan 20
0
[PATCH v3 22/22] drm: Remove legacy version of get_scanout_position()
...@struct drm_driver.get_scanout_position. * * Implements calculation of exact vblank timestamps from given drm_display_mode * timings and current video scanout position of a CRTC. @@ -601,8 +598,7 @@ bool drm_crtc_vblank_helper_get_vblank_timestamp_internal( struct drm_crtc *crtc, int *max_error, ktime_t *vblank_time, bool in_vblank_irq, - drm_vblank_get_scanout_position_func get_scanout_position, - drm_vblank_get_scanout_position_legacy_func get_scanout_position_legacy) + drm_vblank_get_scanout_position_func get_scanout_position) { struct drm_device *dev = crtc->dev; unsigned in...
2020 Jan 12
2
[PATCH 23/23] drm: Cleanup VBLANK callbacks in struct drm_driver
...gt;driver->disable_vblank(dev, pipe); > } > - > - dev->driver->disable_vblank(dev, pipe); > } > > /* > @@ -791,9 +787,6 @@ drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe, > > ret = crtc->funcs->get_vblank_timestamp(crtc, &max_error, > tvblank, in_vblank_irq); > - } else if (dev->driver->get_vblank_timestamp && (max_error > 0)) { > - ret = dev->driver->get_vblank_timestamp(dev, pipe, &max_error, > - tvblank, in_vblank_irq); > } > > /* GPU high precision times...
2020 Jan 20
0
[PATCH v3 22/22] drm: Remove legacy version of get_scanout_position()
...anout_position. > * > * Implements calculation of exact vblank timestamps from given drm_display_mode > * timings and current video scanout position of a CRTC. > @@ -601,8 +598,7 @@ bool > drm_crtc_vblank_helper_get_vblank_timestamp_internal( > struct drm_crtc *crtc, int *max_error, ktime_t *vblank_time, > bool in_vblank_irq, > - drm_vblank_get_scanout_position_func get_scanout_position, > - drm_vblank_get_scanout_position_legacy_func get_scanout_position_legacy) > + drm_vblank_get_scanout_position_func get_scanout_position) > { > struct drm_device *dev...
2020 Jan 10
0
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
...uct 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, + bool in_vblank_irq) +{ + struct timespec64 ts_etime, ts_vblank_time; + ktime_t stime, etime; + bool vbl_status; + struct drm_crtc *crtc; + const struct drm_display_mode *mode; + struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; + int vpos, hpos,...
2020 Jan 10
0
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
...ndex)); >> @@ -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, >> + bool in_vblank_irq) >> +{ >> + struct timespec64 ts_etime, ts_vblank_time; >> + ktime_t stime, etime; >> + bool vbl_status; >> + struct drm_crtc *crtc; >> + const struct drm_display_mode *mode; >>...
2020 Jan 15
1
[PATCH v2 19/21] drm/vkms: Convert to CRTC VBLANK callbacks
...644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -76,10 +76,12 @@ static void vkms_disable_vblank(struct drm_crtc *crtc) hrtimer_cancel(&out->vblank_hrtimer); } -bool vkms_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe, - int *max_error, ktime_t *vblank_time, - bool in_vblank_irq) +static bool vkms_get_vblank_timestamp(struct drm_crtc *crtc, + int *max_error, ktime_t *vblank_time, + bool in_vblank_irq) { + struct drm_device *dev = crtc->dev; + unsigned int pipe = crtc->index; struct vkms_device...
2020 Jan 10
1
[PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position()
...,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, >>> + bool in_vblank_irq) >>> +{ >>> + struct timespec64 ts_etime, ts_vblank_time; >>> + ktime_t stime, etime; >>> + bool vbl_status; >>> + struct drm_crtc *crtc; >>> + const struct...
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 10
0
[PATCH 23/23] drm: Cleanup VBLANK callbacks in struct drm_driver
...k(crtc); - return; - } + } else { + dev->driver->disable_vblank(dev, pipe); } - - dev->driver->disable_vblank(dev, pipe); } /* @@ -791,9 +787,6 @@ drm_get_last_vbltimestamp(struct drm_device *dev, unsigned int pipe, ret = crtc->funcs->get_vblank_timestamp(crtc, &max_error, tvblank, in_vblank_irq); - } else if (dev->driver->get_vblank_timestamp && (max_error > 0)) { - ret = dev->driver->get_vblank_timestamp(dev, pipe, &max_error, - tvblank, in_vblank_irq); } /* GPU high precision timestamp query unsupported or failed. @...
2020 Jan 20
26
[PATCH v3 00/22] 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. Patch
2020 Jan 15
0
[PATCH v2 19/21] drm/vkms: Convert to CRTC VBLANK callbacks
..._crtc.c > +++ b/drivers/gpu/drm/vkms/vkms_crtc.c > @@ -76,10 +76,12 @@ static void vkms_disable_vblank(struct drm_crtc *crtc) > hrtimer_cancel(&out->vblank_hrtimer); > } > > -bool vkms_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe, > - int *max_error, ktime_t *vblank_time, > - bool in_vblank_irq) > +static bool vkms_get_vblank_timestamp(struct drm_crtc *crtc, > + int *max_error, ktime_t *vblank_time, > + bool in_vblank_irq) > { > + struct drm_device *dev = crtc->dev; > + unsigned int pipe = cr...
2020 Jan 10
36
[PATCH 00/23] 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.
2011 Nov 24
1
[PATCH] nouveau: implement precise vblank timestamping
...;& (vline < vbl_end)) { + ret |= DRM_SCANOUTPOS_INVBL; + vline -= vbl_end; + } + + hline = 0; /* don't use hline as it's unreliable */ + } + + *vpos = vline; + *hpos = hline; + + return ret; +} + +int +nouveau_get_vblank_timestamp(struct drm_device *dev, int crtc, + int *max_error, struct timeval *vblank_time, + unsigned flags) +{ + struct drm_crtc *drmcrtc; + + if (crtc < 0 || crtc >= dev->num_crtcs) { + DRM_ERROR("Invalid crtc %d\n", crtc); + return -EINVAL; + } + + list_for_each_entry(drmcrtc, &dev->mode_config.crtc_list, head) { + if(n...