[PATCH 4/4] drm/intel: Push get_scanout_position() timestamping into kms driver.

2013-10-26 Thread Mario Kleiner
ery retries. After : Typically 1 usec (98% of all samples), occassionally 2 usecs (2% of all samples), with maximum of 3 usecs (a handful). Signed-off-by: Mario Kleiner --- drivers/gpu/drm/i915/i915_irq.c | 53 +++ 1 file changed, 42 insertions(+), 11 deleti

[PATCH 3/4] drm/radeon: Push get_scanout_position() timestamping into kms driver.

2013-10-26 Thread Mario Kleiner
Move the ktime_get() clock readouts and potential preempt_disable() calls from drm core into kms driver to make it compatible with the api changes in the drm core. This should not introduce any change in functionality or behaviour in radeon-kms, just a reshuffling of code. Signed-off-by: Mario

[PATCH 2/4] drm: Push latency sensitive bits of vblank scanoutpos timestamping into kms drivers.

2013-10-26 Thread Mario Kleiner
sition ... ... no taking of locks allowed here! ... if (etime) *etime = ktime_get(); preempt_enable_rt(); // On PREEMPT_RT kernel, otherwise omit. spin_unlock...(...); Signed-off-by: Mario Kleiner --- drivers/gpu/drm/drm_irq.c | 18 ++ include/drm/drmP.h| 10 +++

[PATCH 1/4] drm: Remove preempt_disable() from vblank timestamping code.

2013-10-26 Thread Mario Kleiner
Preemption handling will get pushed into the kms drivers in followup patches, to make timestamping more robust and PREEMPT_RT friendly. Signed-off-by: Mario Kleiner --- drivers/gpu/drm/drm_irq.c |7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu

Vblank timestamping improvements/fixes for Linux drm.

2013-10-26 Thread Mario Kleiner
Hi all, this patch set for the kernel pushes the latency sensitive bits of vblank scanoutpos timestamping from the drm core into the kms drivers. A change in the locking of the intel-kms driver for Linux 3.11 made the old approach too inaccurate and also incompatible with the PREEMPT_RT realtime

Re: [Intel-gfx] BUG: sleeping function called from invalid context on 3.10.10-rt7

2013-10-12 Thread Mario Kleiner
On 10/11/2013 03:30 PM, Sebastian Andrzej Siewior wrote: On 10/11/2013 02:37 PM, Steven Rostedt wrote: On Fri, 11 Oct 2013 12:18:00 +0200 Sebastian Andrzej Siewior bige...@linutronix.de wrote: * Mario Kleiner | 2013-09-26 18:16:47 [+0200]: Good! I will do that. Thanks for clarifying the irq

Re: [Intel-gfx] BUG: sleeping function called from invalid context on 3.10.10-rt7

2013-09-26 Thread Mario Kleiner
On 25.09.13 16:13, Steven Rostedt wrote: On Wed, 25 Sep 2013 06:32:10 +0200 Mario Kleiner mario.klei...@tuebingen.mpg.de wrote: But given the new situation, your proposal is great! If we push the clock readouts into the get_scanoutpos routine, we can make this robust without causing grief

Re: [Intel-gfx] BUG: sleeping function called from invalid context on 3.10.10-rt7

2013-09-26 Thread Mario Kleiner
On 25.09.13 09:49, Ville Syrjälä wrote: On Wed, Sep 25, 2013 at 06:32:10AM +0200, Mario Kleiner wrote: On 23.09.13 10:38, Ville Syrjälä wrote: On Sat, Sep 21, 2013 at 12:07:36AM +0200, Mario Kleiner wrote: On 09/17/2013 10:55 PM, Daniel Vetter wrote: On Tue, Sep 17, 2013 at 9:50 PM, Peter

Re: [Intel-gfx] BUG: sleeping function called from invalid context on 3.10.10-rt7

2013-09-25 Thread Mario Kleiner
On 23.09.13 10:38, Ville Syrjälä wrote: On Sat, Sep 21, 2013 at 12:07:36AM +0200, Mario Kleiner wrote: On 09/17/2013 10:55 PM, Daniel Vetter wrote: On Tue, Sep 17, 2013 at 9:50 PM, Peter Hurley pe...@hurleysoftware.com wrote: On 09/11/2013 03:31 PM, Peter Hurley wrote: [+cc dri-devel

Re: BUG: sleeping function called from invalid context on 3.10.10-rt7

2013-09-23 Thread Mario Kleiner
? That the vblank timestamp needs to be an accurate measurement of a realtime event. Sleeping/servicing interrupts while reading the registers necessary to compute the timestamp would be bad too. (edit: which hopefully Mario Kleiner clarified in his reply) My point earlier was three-fold: 1. Don't

[PATCH v4 6/9] drm/tegra: Implement page-flipping support

2013-02-28 Thread Mario Kleiner
On 02/25/2013 08:06 AM, Thierry Reding wrote: > On Fri, Feb 22, 2013 at 05:13:47PM +0100, Mario Kleiner wrote: >> On 02/21/2013 03:35 PM, Thierry Reding wrote: >>> All the necessary support bits like .mode_set_base() and VBLANK are now >>> available, so page-flipping

Re: [PATCH v4 6/9] drm/tegra: Implement page-flipping support

2013-02-28 Thread Mario Kleiner
On 02/25/2013 08:06 AM, Thierry Reding wrote: On Fri, Feb 22, 2013 at 05:13:47PM +0100, Mario Kleiner wrote: On 02/21/2013 03:35 PM, Thierry Reding wrote: All the necessary support bits like .mode_set_base() and VBLANK are now available, so page-flipping case easily be implemented on top

[PATCH v4 6/9] drm/tegra: Implement page-flipping support

2013-02-22 Thread Mario Kleiner
On 02/21/2013 03:35 PM, Thierry Reding wrote: > All the necessary support bits like .mode_set_base() and VBLANK are now > available, so page-flipping case easily be implemented on top. > > Signed-off-by: Thierry Reding > --- > Changes in v3: > - use drm_send_vblank_event() > - set crtc->fb field

Re: [PATCH v4 6/9] drm/tegra: Implement page-flipping support

2013-02-22 Thread Mario Kleiner
On 02/21/2013 03:35 PM, Thierry Reding wrote: All the necessary support bits like .mode_set_base() and VBLANK are now available, so page-flipping case easily be implemented on top. Signed-off-by: Thierry Reding thierry.red...@avionic-design.de --- Changes in v3: - use drm_send_vblank_event() -

[PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-02-15 Thread Mario Kleiner
On 02/11/2013 10:13 AM, Thierry Reding wrote: > On Tue, Jan 22, 2013 at 06:37:39PM +0100, Mario Kleiner wrote: >> On 14.01.13 17:05, Thierry Reding wrote: >>> Implement support for the VBLANK IOCTL. Note that Tegra is somewhat >>> special in this case because it doesn't

[PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-02-15 Thread Mario Kleiner
On 02/11/2013 10:00 AM, Thierry Reding wrote: > On Tue, Jan 22, 2013 at 06:27:24PM +0100, Mario Kleiner wrote: >> On 22.01.13 09:31, Terje Bergstr?m wrote: >>> On 14.01.2013 18:06, Thierry Reding wrote: >>>> +static int tegra_dc_page_flip(struct drm_crtc *crtc, st

Re: [PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-02-15 Thread Mario Kleiner
On 02/11/2013 10:00 AM, Thierry Reding wrote: On Tue, Jan 22, 2013 at 06:27:24PM +0100, Mario Kleiner wrote: On 22.01.13 09:31, Terje Bergström wrote: On 14.01.2013 18:06, Thierry Reding wrote: +static int tegra_dc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb

Re: [PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-02-15 Thread Mario Kleiner
On 02/11/2013 10:13 AM, Thierry Reding wrote: On Tue, Jan 22, 2013 at 06:37:39PM +0100, Mario Kleiner wrote: On 14.01.13 17:05, Thierry Reding wrote: Implement support for the VBLANK IOCTL. Note that Tegra is somewhat special in this case because it doesn't use the generic IRQ support provided

[PATCH 4/5] drm/tegra: Implement VBLANK support

2013-01-31 Thread Mario Kleiner
On 30.01.13 13:36, Daniel Vetter wrote: > On Wed, Jan 30, 2013 at 9:34 AM, Thierry Reding > wrote: >> On Tue, Jan 22, 2013 at 10:21:40AM -0800, Jon Mayo wrote: >>> On Mon, Jan 14, 2013 at 7:55 AM, Thierry Reding >>> wrote: Implement support for the VBLANK IOCTL. Note that Tegra is somewhat

Re: [PATCH 4/5] drm/tegra: Implement VBLANK support

2013-01-30 Thread Mario Kleiner
On 30.01.13 13:36, Daniel Vetter wrote: On Wed, Jan 30, 2013 at 9:34 AM, Thierry Reding thierry.red...@avionic-design.de wrote: On Tue, Jan 22, 2013 at 10:21:40AM -0800, Jon Mayo wrote: On Mon, Jan 14, 2013 at 7:55 AM, Thierry Reding thierry.red...@avionic-design.de wrote: Implement support

[PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-01-22 Thread Mario Kleiner
On 22.01.13 20:27, Jon Mayo wrote: > On Tue, Jan 22, 2013 at 11:20 AM, Mario Kleiner > wrote: >> On 22.01.13 19:39, Lucas Stach wrote: >>> >>> Am Dienstag, den 22.01.2013, 18:37 +0100 schrieb Mario Kleiner: >>>> >>>> On 14.01.13 17:0

[PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-01-22 Thread Mario Kleiner
On 22.01.13 19:49, Jon Mayo wrote: > On Tue, Jan 22, 2013 at 10:39 AM, Lucas Stach wrote: >> Am Dienstag, den 22.01.2013, 18:37 +0100 schrieb Mario Kleiner: >>> On 14.01.13 17:05, Thierry Reding wrote: >>>> Implement support for the VBLANK IOCTL. Note that

[PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-01-22 Thread Mario Kleiner
On 22.01.13 19:39, Lucas Stach wrote: > Am Dienstag, den 22.01.2013, 18:37 +0100 schrieb Mario Kleiner: >> On 14.01.13 17:05, Thierry Reding wrote: >>> Implement support for the VBLANK IOCTL. Note that Tegra is somewhat >>> special in this case because it doesn't

[PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-01-22 Thread Mario Kleiner
On 14.01.13 17:05, Thierry Reding wrote: > Implement support for the VBLANK IOCTL. Note that Tegra is somewhat > special in this case because it doesn't use the generic IRQ support > provided by the DRM core (DRIVER_HAVE_IRQ) but rather registers one > interrupt handler for each display

[PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-01-22 Thread Mario Kleiner
On 22.01.13 09:31, Terje Bergstr?m wrote: > On 14.01.2013 18:06, Thierry Reding wrote: >> +static int tegra_dc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer >> *fb, >> + struct drm_pending_vblank_event *event) >> +{ >> +struct tegra_framebuffer *newfb =

Re: [PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-01-22 Thread Mario Kleiner
On 22.01.13 09:31, Terje Bergström wrote: On 14.01.2013 18:06, Thierry Reding wrote: +static int tegra_dc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, + struct drm_pending_vblank_event *event) +{ + struct tegra_framebuffer *newfb =

Re: [PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-01-22 Thread Mario Kleiner
On 22.01.13 19:39, Lucas Stach wrote: Am Dienstag, den 22.01.2013, 18:37 +0100 schrieb Mario Kleiner: On 14.01.13 17:05, Thierry Reding wrote: Implement support for the VBLANK IOCTL. Note that Tegra is somewhat special in this case because it doesn't use the generic IRQ support provided

Re: [PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-01-22 Thread Mario Kleiner
On 22.01.13 20:27, Jon Mayo wrote: On Tue, Jan 22, 2013 at 11:20 AM, Mario Kleiner mario.kleiner...@gmail.com wrote: On 22.01.13 19:39, Lucas Stach wrote: Am Dienstag, den 22.01.2013, 18:37 +0100 schrieb Mario Kleiner: On 14.01.13 17:05, Thierry Reding wrote: Implement support

Re: [PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-01-22 Thread Mario Kleiner
On 14.01.13 17:05, Thierry Reding wrote: Implement support for the VBLANK IOCTL. Note that Tegra is somewhat special in this case because it doesn't use the generic IRQ support provided by the DRM core (DRIVER_HAVE_IRQ) but rather registers one interrupt handler for each display controller.

Re: [PATCH v2 4/5] drm/tegra: Implement VBLANK support

2013-01-22 Thread Mario Kleiner
On 22.01.13 19:49, Jon Mayo wrote: On Tue, Jan 22, 2013 at 10:39 AM, Lucas Stach d...@lynxeye.de wrote: Am Dienstag, den 22.01.2013, 18:37 +0100 schrieb Mario Kleiner: On 14.01.13 17:05, Thierry Reding wrote: Implement support for the VBLANK IOCTL. Note that Tegra is somewhat special

[PATCH] drm: reduce default drm vblank off delay to 50ms

2012-11-12 Thread Mario Kleiner
On 02.11.12 19:37, Jesse Barnes wrote: > On Fri, 02 Nov 2012 06:56:57 +0100 > Mario Kleiner wrote: >> Jesse, thanks for cc'ing me, much appreciated :) >> >> Psychtoolbox should be fine with a 50 msecs vblank off delay. I think i >> tested with values somewhere betw

Re: [PATCH] drm: reduce default drm vblank off delay to 50ms

2012-11-11 Thread Mario Kleiner
On 02.11.12 19:37, Jesse Barnes wrote: On Fri, 02 Nov 2012 06:56:57 +0100 Mario Kleiner mario.klei...@tuebingen.mpg.de wrote: Jesse, thanks for cc'ing me, much appreciated :) Psychtoolbox should be fine with a 50 msecs vblank off delay. I think i tested with values somewhere between 50 - 100

[PATCH] drm: reduce default drm vblank off delay to 50ms

2012-11-02 Thread Mario Kleiner
t and in your inbox, a simple . Subject line "[PATCH 2/3] ddx/dri2: Repair broken pageflip swap scheduling.", sent at 7 October 2012. I'll forward it again to you. Chris Wilson already gave me an off-list review for that patch series after i pinged him. Unfortunately a rather terse one,

Re: [PATCH] drm: reduce default drm vblank off delay to 50ms

2012-11-02 Thread Mario Kleiner
. Chris Wilson already gave me an off-list review for that patch series after i pinged him. Unfortunately a rather terse one, cited here: On Mon, 15 Oct 2012 16:46:52 +0200, Mario Kleiner mario.klei...@tuebingen.mpg.de wrote: Hi Chris, can you please check merge at least the first two patches

[PATCH 1/2] drm: use monotonic time in drm_calc_vbltimestamp_from_scanoutpos

2012-10-25 Thread Mario Kleiner
On 25.10.12 12:28, Imre Deak wrote: > On Thu, 2012-10-25 at 01:05 +0200, Mario Kleiner wrote: >> On 23.10.12 20:53, Imre Deak wrote: >>> For measuring duration we want to avoid that our start/end timestamps >>> jump, so use monotonic instead of real time for that. >&

[PATCH 1/2] drm: use monotonic time in drm_calc_vbltimestamp_from_scanoutpos

2012-10-25 Thread Mario Kleiner
On 23.10.12 20:53, Imre Deak wrote: > For measuring duration we want to avoid that our start/end timestamps > jump, so use monotonic instead of real time for that. > > Signed-off-by: Imre Deak > --- > drivers/gpu/drm/drm_irq.c | 18 -- > 1 file changed, 12 insertions(+), 6

Re: [PATCH 1/2] drm: use monotonic time in drm_calc_vbltimestamp_from_scanoutpos

2012-10-25 Thread Mario Kleiner
On 25.10.12 12:28, Imre Deak wrote: On Thu, 2012-10-25 at 01:05 +0200, Mario Kleiner wrote: On 23.10.12 20:53, Imre Deak wrote: For measuring duration we want to avoid that our start/end timestamps jump, so use monotonic instead of real time for that. Signed-off-by: Imre Deak imre.d

Re: [PATCH 1/2] drm: use monotonic time in drm_calc_vbltimestamp_from_scanoutpos

2012-10-24 Thread Mario Kleiner
On 23.10.12 20:53, Imre Deak wrote: For measuring duration we want to avoid that our start/end timestamps jump, so use monotonic instead of real time for that. Signed-off-by: Imre Deak imre.d...@intel.com --- drivers/gpu/drm/drm_irq.c | 18 -- 1 file changed, 12

[PATCH 01/11] drm: add drm_send_vblank_event() helper

2012-10-13 Thread Mario Kleiner
On 11.10.12 16:19, Laurent Pinchart wrote: > Hi Rob, > > Thanks for the patch. > > On Monday 08 October 2012 14:50:39 Rob Clark wrote: >> From: Rob Clark >> ... > > Do you know why some drivers don't call drm_vblank_count_and_time() ? For > instance nouveau sets the sequence to 0 and uses

[PATCH 10/11] drm/omap: use drm_send_vblank_event() helper

2012-10-13 Thread Mario Kleiner
On 10.10.12 13:03, Rob Clark wrote: > On Tue, Oct 9, 2012 at 10:33 PM, Mario Kleiner > wrote: >> On 08.10.12 21:50, Rob Clark wrote: >>> >>> From: Rob Clark >>> >>> Signed-off-by: Rob Clark >>> --- >>>drivers/staging/omapd

Re: [PATCH 10/11] drm/omap: use drm_send_vblank_event() helper

2012-10-12 Thread Mario Kleiner
On 10.10.12 13:03, Rob Clark wrote: On Tue, Oct 9, 2012 at 10:33 PM, Mario Kleiner mario.klei...@tuebingen.mpg.de wrote: On 08.10.12 21:50, Rob Clark wrote: From: Rob Clark r...@ti.com Signed-off-by: Rob Clark r...@ti.com --- drivers/staging/omapdrm/omap_crtc.c | 31

Re: [PATCH 01/11] drm: add drm_send_vblank_event() helper

2012-10-12 Thread Mario Kleiner
On 11.10.12 16:19, Laurent Pinchart wrote: Hi Rob, Thanks for the patch. On Monday 08 October 2012 14:50:39 Rob Clark wrote: From: Rob Clark r...@ti.com ... Do you know why some drivers don't call drm_vblank_count_and_time() ? For instance nouveau sets the sequence to 0 and uses

[PATCH 10/11] drm/omap: use drm_send_vblank_event() helper

2012-10-10 Thread Mario Kleiner
On 08.10.12 21:50, Rob Clark wrote: > From: Rob Clark > > Signed-off-by: Rob Clark > --- > drivers/staging/omapdrm/omap_crtc.c | 31 ++- > 1 file changed, 6 insertions(+), 25 deletions(-) > > diff --git a/drivers/staging/omapdrm/omap_crtc.c >

[RFC 1/4] time: export getnstime_raw_and_real for DRM

2012-10-09 Thread Mario Kleiner
On 08.10.12 13:35, Imre Deak wrote: > On Sat, 2012-10-06 at 03:41 +0200, Mario Kleiner wrote: >> [...] >> >> But then Psychtoolbox checks each timestamp it gets from somewhere >> "outside" (OML_sync_control / INTEL_swap_events / ALSA audio timestamps, >

Re: [PATCH 10/11] drm/omap: use drm_send_vblank_event() helper

2012-10-09 Thread Mario Kleiner
On 08.10.12 21:50, Rob Clark wrote: From: Rob Clark r...@ti.com Signed-off-by: Rob Clark r...@ti.com --- drivers/staging/omapdrm/omap_crtc.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/drivers/staging/omapdrm/omap_crtc.c

Re: [RFC 1/4] time: export getnstime_raw_and_real for DRM

2012-10-08 Thread Mario Kleiner
On 08.10.12 13:35, Imre Deak wrote: On Sat, 2012-10-06 at 03:41 +0200, Mario Kleiner wrote: [...] But then Psychtoolbox checks each timestamp it gets from somewhere outside (OML_sync_control / INTEL_swap_events / ALSA audio timestamps, network receive timestamps, evdev, x11

[RFC 0/4] drm: add raw monotonic timestamp support (Imre Deak)

2012-10-06 Thread Mario Kleiner
On 05.10.12 15:37, intel-gfx-request at lists.freedesktop.org wrote: > > Today's Topics: > > 1. [RFC 0/4] drm: add raw monotonic timestamp support (Imre Deak) > 2. [RFC 1/4] time: export getnstime_raw_and_real for DRM (Imre Deak) > 3. [RFC 2/4] drm: make memset/calloc for _vblank_time

[RFC 1/4] time: export getnstime_raw_and_real for DRM

2012-10-06 Thread Mario Kleiner
> Subject: Re: [RFC 4/4] drm: add support for raw monotonic vblank > timestamps > Message-ID: <1349446447.17758.73.camel at thor.local> > Content-Type: text/plain; charset="ISO-8859-1" > > On Fre, 2012-10-05 at 16:59 +0300, Imre Deak wrote: >> On Fri, 2012-10-05 at 15:55 +0200, Michel

Re: [RFC 0/4] drm: add raw monotonic timestamp support (Imre Deak)

2012-10-05 Thread Mario Kleiner
On 05.10.12 15:37, intel-gfx-requ...@lists.freedesktop.org wrote: Today's Topics: 1. [RFC 0/4] drm: add raw monotonic timestamp support (Imre Deak) 2. [RFC 1/4] time: export getnstime_raw_and_real for DRM (Imre Deak) 3. [RFC 2/4] drm: make memset/calloc for _vblank_time more

RFC: Change OML_sync_control UST to CLOCK_MONOTONIC

2012-06-14 Thread Mario Kleiner
> > Message: 2 > Date: Thu, 14 Jun 2012 17:19:11 + (UTC) > From: Joakim Plate > Subject: Re: RFC: Change OML_sync_control UST to CLOCK_MONOTONIC > To: dri-devel at lists.freedesktop.org > Message-ID: > Content-Type: text/plain; charset=us-ascii > > >>> >>> From what I can tell, it should

Re: RFC: Change OML_sync_control UST to CLOCK_MONOTONIC

2012-06-14 Thread Mario Kleiner
Message: 2 Date: Thu, 14 Jun 2012 17:19:11 + (UTC) From: Joakim Plate elu...@ecce.se Subject: Re: RFC: Change OML_sync_control UST to CLOCK_MONOTONIC To: dri-devel@lists.freedesktop.org Message-ID: loom.20120614t191057...@post.gmane.org Content-Type: text/plain; charset=us-ascii

Flickering with page-flipping on Acer Iconia W500 (AMD C-50 APU)

2012-02-28 Thread Mario Kleiner
On Feb 27, 2012, at 4:47 PM, Felix Kuehling wrote: > On 12-02-24 11:38 PM, Mario Kleiner wrote: >> On Feb 24, 2012, at 10:20 PM, Felix Kuehling wrote: >> >>> On 12-02-22 11:20 AM, Felix Kuehling wrote: >>>> On 12-02-21 07:49 PM, Mario Kleiner wrote: >&g

Re: Flickering with page-flipping on Acer Iconia W500 (AMD C-50 APU)

2012-02-28 Thread Mario Kleiner
On Feb 27, 2012, at 4:47 PM, Felix Kuehling wrote: On 12-02-24 11:38 PM, Mario Kleiner wrote: On Feb 24, 2012, at 10:20 PM, Felix Kuehling wrote: On 12-02-22 11:20 AM, Felix Kuehling wrote: On 12-02-21 07:49 PM, Mario Kleiner wrote: On 02/21/2012 09:07 PM, Alex Deucher wrote: [snip

Flickering with page-flipping on Acer Iconia W500 (AMD C-50 APU)

2012-02-25 Thread Mario Kleiner
On Feb 24, 2012, at 10:20 PM, Felix Kuehling wrote: > On 12-02-22 11:20 AM, Felix Kuehling wrote: >> On 12-02-21 07:49 PM, Mario Kleiner wrote: >>> On 02/21/2012 09:07 PM, Alex Deucher wrote: >> [snip] >>>> The fix looks ok to me. Mario any thoughts?

Re: Flickering with page-flipping on Acer Iconia W500 (AMD C-50 APU)

2012-02-24 Thread Mario Kleiner
On Feb 24, 2012, at 10:20 PM, Felix Kuehling wrote: On 12-02-22 11:20 AM, Felix Kuehling wrote: On 12-02-21 07:49 PM, Mario Kleiner wrote: On 02/21/2012 09:07 PM, Alex Deucher wrote: [snip] The fix looks ok to me. Mario any thoughts? Reviewed-by: Alex Deucheralexdeuc...@gmail.com Hi

Flickering with page-flipping on Acer Iconia W500 (AMD C-50 APU)

2012-02-22 Thread Mario Kleiner
On 02/21/2012 09:07 PM, Alex Deucher wrote: > On Wed, Feb 1, 2012 at 5:43 PM, Felix Kuehling > wrote: >> Following up on my message from Jan 19, now with a lot more hard data and a >> less intrusive modification. Still a prototype though. CC-ing DRI-devel and >> Ma

Re: Flickering with page-flipping on Acer Iconia W500 (AMD C-50 APU)

2012-02-21 Thread Mario Kleiner
On 02/21/2012 09:07 PM, Alex Deucher wrote: On Wed, Feb 1, 2012 at 5:43 PM, Felix Kuehlingfelix.kuehl...@amd.com wrote: Following up on my message from Jan 19, now with a lot more hard data and a less intrusive modification. Still a prototype though. CC-ing DRI-devel and Mario Kleiner

[PATCH 2/2] nouveau: implement precise vblank timestamping

2012-02-15 Thread Mario Kleiner
geflip timestamps (compliant to OML_sync_control spec) Kudos to Mario for his many helpful comments and testing. Signed-off-by: Lucas Stach Reviewed-by: Mario Kleiner Tested-by: Mario Kleiner --- drivers/gpu/drm/nouveau/nouveau_display.c | 124 + drivers/gpu/drm/n

[PATCH 1/2] drm/nouveau: Use drm_vblank_count_and_time() for pageflip completion events.

2012-02-15 Thread Mario Kleiner
Emit kms pageflip completion events with proper vblank count and timestamp for the vblank interval in which the pageflip completed. This makes the timestamps and counts consistent with what the OML_sync_control spec defines. Signed-off-by: Mario Kleiner --- drivers/gpu/drm/nouveau

[Patches][nouveau/kms]: Precise Vblank and pageflip timestamping

2012-02-15 Thread Mario Kleiner
Hi, these are two patches against the nouveau kms driver. The first patch makes sure that pageflip completion events get their vblank count and timestamp from the drm. The second patch from Lucas Stach, here included with his permission, makes sure that the timestamps of vblanks are calculated

[PATCH 1/2] drm/nouveau: Use drm_vblank_count_and_time() for pageflip completion events.

2012-02-15 Thread Mario Kleiner
Emit kms pageflip completion events with proper vblank count and timestamp for the vblank interval in which the pageflip completed. This makes the timestamps and counts consistent with what the OML_sync_control spec defines. Signed-off-by: Mario Kleiner mario.klei...@tuebingen.mpg.de --- drivers

[PATCH 2/2] nouveau: implement precise vblank timestamping

2012-02-15 Thread Mario Kleiner
timestamps (compliant to OML_sync_control spec) Kudos to Mario for his many helpful comments and testing. Signed-off-by: Lucas Stach d...@lynxeye.de Reviewed-by: Mario Kleiner mario.klei...@tuebingen.mpg.de Tested-by: Mario Kleiner mario.klei...@tuebingen.mpg.de --- drivers/gpu/drm/nouveau

[PATCH 1/3] drm/radeon/kms: add some loop timeouts in pageflip code

2011-11-28 Thread Mario Kleiner
-off-by: Alex Deucher > Cc: stable at kernel.org > Cc: Mario Kleiner > --- > drivers/gpu/drm/radeon/evergreen.c |7 ++- > drivers/gpu/drm/radeon/r100.c |7 ++- > drivers/gpu/drm/radeon/rs600.c |7 ++- > drivers/gpu/drm/radeon/rv770.c |7

Re: [PATCH 1/3] drm/radeon/kms: add some loop timeouts in pageflip code

2011-11-28 Thread Mario Kleiner
alexander.deuc...@amd.com Cc: sta...@kernel.org Cc: Mario Kleiner mario.klei...@tuebingen.mpg.de --- drivers/gpu/drm/radeon/evergreen.c |7 ++- drivers/gpu/drm/radeon/r100.c |7 ++- drivers/gpu/drm/radeon/rs600.c |7 ++- drivers/gpu/drm/radeon/rv770.c |7

[RFC PATCH] drm: Fix off-by-one races on vblank disable

2011-11-17 Thread Mario Kleiner
Jesse, cc'ing you in case you have thoughts about this for the intel side of things? On Nov 17, 2011, at 4:39 PM, Andrew Lutomirski wrote: > 2011/11/17 Michel D?nzer : >> [ Dropping intel-gfx list from CC, as it automatically rejects posts >> from non-subscribers ] >> >> On Mit, 2011-11-16 at

[RFC] Reduce idle vblank wakeups

2011-11-17 Thread Mario Kleiner
On Nov 17, 2011, at 3:19 AM, Matthew Garrett wrote: > On Thu, Nov 17, 2011 at 01:26:37AM +0100, Mario Kleiner wrote: >> On Nov 16, 2011, at 7:48 PM, Matthew Garrett wrote: >>> I'll admit that I'm struggling to understand the issue here. If the >>> vblank counter

[RFC] Reduce idle vblank wakeups

2011-11-17 Thread Mario Kleiner
On Nov 16, 2011, at 7:48 PM, Matthew Garrett wrote: > On Wed, Nov 16, 2011 at 07:27:51PM +0100, Mario Kleiner wrote: > >> It's not broken hardware, but fast ping-ponging it on and off can >> make the vblank counter and vblank timestamps unreliable for apps >> that ne

Re: [RFC] Reduce idle vblank wakeups

2011-11-17 Thread Mario Kleiner
On Nov 17, 2011, at 3:19 AM, Matthew Garrett wrote: On Thu, Nov 17, 2011 at 01:26:37AM +0100, Mario Kleiner wrote: On Nov 16, 2011, at 7:48 PM, Matthew Garrett wrote: I'll admit that I'm struggling to understand the issue here. If the vblank counter is incremented at the time of vblank (which

[RFC] Reduce idle vblank wakeups

2011-11-16 Thread Mario Kleiner
's in the future. @Matthew: I'm appealing here to your ex- Drosophila biologist heritage ;-) thanks, -mario ***** Mario Kleiner Max Planck Institute for Biological Cybernetics Spemannstr. 38 72076 Tuebingen Germany e-mail: mario

Re: [RFC] Reduce idle vblank wakeups

2011-11-16 Thread Mario Kleiner
* Mario Kleiner Max Planck Institute for Biological Cybernetics Spemannstr. 38 72076 Tuebingen Germany e-mail: mario.klei...@tuebingen.mpg.de office: +49 (0)7071/601-1623 fax:+49 (0)7071/601-616 www:http

Re: [RFC] Reduce idle vblank wakeups

2011-11-16 Thread Mario Kleiner
On Nov 16, 2011, at 7:48 PM, Matthew Garrett wrote: On Wed, Nov 16, 2011 at 07:27:51PM +0100, Mario Kleiner wrote: It's not broken hardware, but fast ping-ponging it on and off can make the vblank counter and vblank timestamps unreliable for apps that need high timing precision, especially

[PATCH 3/3] drm: do not sleep on vblank while holding a mutex

2011-10-28 Thread Mario Kleiner
On Oct 28, 2011, at 9:15 PM, Daniel Vetter wrote: > On Fri, Oct 28, 2011 at 08:15:11PM +0200, Mario Kleiner wrote: >> be careful with vblank_refcount. I think it probably should stay >> atomic. The drm_vblank_put() is often used in interrupt handlers of >> the kms drivers

[PATCH 3/3] drm: do not sleep on vblank while holding a mutex

2011-10-28 Thread Mario Kleiner
and held as short as possible. I initially tried to get away only with vbl_lock, but there were uses of vbl_lock that looked as if using it in the interrupt handler as well could cause long delays in irq processing. thanks, -mario *

Re: [PATCH 3/3] drm: do not sleep on vblank while holding a mutex

2011-10-28 Thread Mario Kleiner
* Mario Kleiner Max Planck Institute for Biological Cybernetics Spemannstr. 38 72076 Tuebingen Germany e-mail: mario.klei...@tuebingen.mpg.de office: +49 (0)7071/601-1623 fax:+49 (0)7071/601-616 www:http

Re: [PATCH 3/3] drm: do not sleep on vblank while holding a mutex

2011-10-28 Thread Mario Kleiner
On Oct 28, 2011, at 9:15 PM, Daniel Vetter wrote: On Fri, Oct 28, 2011 at 08:15:11PM +0200, Mario Kleiner wrote: be careful with vblank_refcount. I think it probably should stay atomic. The drm_vblank_put() is often used in interrupt handlers of the kms drivers where you don't want

[PATCH v2 4/5] DRI2: Expose API to set drawable swap limit.

2011-10-06 Thread Mario Kleiner
On Oct 6, 2011, at 5:42 PM, Jesse Barnes wrote: > On Thu, 15 Sep 2011 01:31:00 +0200 > Mario Kleiner wrote: > >> On Sep 15, 2011, at 12:54 AM, Francisco Jerez wrote: >> >>> Mario Kleiner writes: >>> >>>> On Sep 14, 2011, at 6:02 PM, Keith Pac

Re: [PATCH v2 4/5] DRI2: Expose API to set drawable swap limit.

2011-10-06 Thread Mario Kleiner
On Oct 6, 2011, at 5:42 PM, Jesse Barnes wrote: On Thu, 15 Sep 2011 01:31:00 +0200 Mario Kleiner mario.klei...@tuebingen.mpg.de wrote: On Sep 15, 2011, at 12:54 AM, Francisco Jerez wrote: Mario Kleiner mario.klei...@tuebingen.mpg.de writes: On Sep 14, 2011, at 6:02 PM, Keith Packard

[PATCH v2 4/5] DRI2: Expose API to set drawable swap limit.

2011-09-15 Thread Mario Kleiner
On Sep 15, 2011, at 12:54 AM, Francisco Jerez wrote: > Mario Kleiner writes: > >> On Sep 14, 2011, at 6:02 PM, Keith Packard wrote: >> >>> On Wed, 14 Sep 2011 10:05:29 -0500, Jesse Barnes >>> wrote: >>> >>>> Ah thanks Mario, I blame Keith

Re: [PATCH v2 4/5] DRI2: Expose API to set drawable swap limit.

2011-09-14 Thread Mario Kleiner
On Sep 15, 2011, at 12:54 AM, Francisco Jerez wrote: Mario Kleiner mario.klei...@tuebingen.mpg.de writes: On Sep 14, 2011, at 6:02 PM, Keith Packard wrote: On Wed, 14 Sep 2011 10:05:29 -0500, Jesse Barnes jbar...@virtuousgeek.org wrote: Ah thanks Mario, I blame Keith. :p I agree we

[PATCH] drm/radeon: make crtc number check in radeon_get_vblank_timestamp_kmsconsistent with other functions

2011-05-06 Thread Mario Kleiner
t; like it's done in all other functions that handle crtc >> > > Looks good to me. Mario, any reason why we should use the dev version > rather than the rdev version? > No, perfectly fine with me. Reviewed-by: Mario Kleiner > Reviewed-by: Alex Deucher > >> Signed-off-by:

Re: [PATCH] drm/radeon: make crtc number check in radeon_get_vblank_timestamp_kmsconsistent with other functions

2011-05-06 Thread Mario Kleiner
in all other functions that handle crtc Looks good to me. Mario, any reason why we should use the dev version rather than the rdev version? No, perfectly fine with me. Reviewed-by: Mario Kleiner mario.klei...@tuebingen.mpg.de Reviewed-by: Alex Deucher alexdeuc...@gmail.com Signed-off

[RFC] swap event handling fixes

2011-04-30 Thread Mario Kleiner
On Apr 29, 2011, at 11:37 PM, Jesse Barnes wrote: > On Thu, 28 Apr 2011 13:27:18 -0700 > Jesse Barnes wrote: > >> I obviously failed to count the swap event structure size after >> adding >> and removing fields a few times, and didn't even account for >> padding. The >> end result is that

Re: [RFC] swap event handling fixes

2011-04-29 Thread Mario Kleiner
On Apr 29, 2011, at 11:37 PM, Jesse Barnes wrote: On Thu, 28 Apr 2011 13:27:18 -0700 Jesse Barnes jbar...@virtuousgeek.org wrote: I obviously failed to count the swap event structure size after adding and removing fields a few times, and didn't even account for padding. The end result is

[PATCH 2/3] drm: Warn if vblank state has become inconsistent.

2011-04-28 Thread Mario Kleiner
On Apr 28, 2011, at 9:47 AM, Christopher James Halse Rogers wrote: > On Wed, 2011-04-27 at 17:50 +0200, Mario Kleiner wrote: >> On Apr 27, 2011, at 10:58 AM, dri-devel-request at lists.freedesktop.org >> wrote: >>> Message: 5 >>> Date: Wed, 27 Apr 2011 10:38

Re: [PATCH 2/3] drm: Warn if vblank state has become inconsistent.

2011-04-28 Thread Mario Kleiner
On Apr 28, 2011, at 9:47 AM, Christopher James Halse Rogers wrote: On Wed, 2011-04-27 at 17:50 +0200, Mario Kleiner wrote: On Apr 27, 2011, at 10:58 AM, dri-devel-requ...@lists.freedesktop.org wrote: Message: 5 Date: Wed, 27 Apr 2011 10:38:14 +0200 From: Michel D?nzer mic...@daenzer.net

[PATCH 2/3] drm: Warn if vblank state has become inconsistent.

2011-04-27 Thread Mario Kleiner
lock, irqflags); >> } >> EXPORT_SYMBOL(drm_vblank_off); > > Reviewed-by: Michel D?nzer > Any pending kms pageflip will also hold a reference on the vblank of a crtc, so having the refcount non-zero there is not really a sign of inconsistency, so i'm not sure if

Re: [PATCH 2/3] drm: Warn if vblank state has become inconsistent.

2011-04-27 Thread Mario Kleiner
having the refcount non-zero there is not really a sign of inconsistency, so i'm not sure if a warning is appropriate there. -mario * Mario Kleiner Max Planck Institute for Biological Cybernetics Spemannstr. 38 72076 Tuebingen

[PATCH] kernel/drm: vblank wait on crtc > 1

2011-03-19 Thread Mario Kleiner
> > On Fri, 18 Mar 2011, Jesse Barnes wrote: >> >> I like the new param check, but I'd still prefer a new ioctl to >> abusing >> the old one. >> > > It's not "abusing" it but extending the interface in a > backwards-compatible manner. Introducing a new one would result in two > ioctls that

Re: [PATCH] kernel/drm: vblank wait on crtc 1

2011-03-19 Thread Mario Kleiner
On Fri, 18 Mar 2011, Jesse Barnes wrote: I like the new param check, but I'd still prefer a new ioctl to abusing the old one. It's not abusing it but extending the interface in a backwards-compatible manner. Introducing a new one would result in two ioctls that essentially do the same

dri-devel Digest, Vol 12, Issue 16

2011-03-04 Thread Mario Kleiner
On Mar 4, 2011, at 5:24 PM, Michel D?nzer wrote: > On Fre, 2011-03-04 at 17:19 +0100, Mario Kleiner wrote: >> >> Maybe it would be even possible to slip the small kernel patch into >> 2.6.38-rc? It is rather a bugfix than a new feature. > > Not really. The vblank ioctl

dri-devel Digest, Vol 12, Issue 16

2011-03-04 Thread Mario Kleiner
only place (at least for GLX/X/ddx don't know about the other api's like EGL or libkms), that needs fixing for > 2 crtc's and these patches should do it fine. Code also looks correct to me. Maybe a new ddx could check the (bumped) drm abi version number to decide if it should use the ne

Re: dri-devel Digest, Vol 12, Issue 16

2011-03-04 Thread Mario Kleiner
. Maybe a new ddx could check the (bumped) drm abi version number to decide if it should use the new or old method to protect against the new ddx on old kernel case? Add a ... Reviewed-by: Mario Kleiner mario.klei...@tuebingen.mpg.de ...and a big ... Acked-by: Mario Kleiner mario.klei

Re: dri-devel Digest, Vol 12, Issue 16

2011-03-04 Thread Mario Kleiner
On Mar 4, 2011, at 5:24 PM, Michel Dänzer wrote: On Fre, 2011-03-04 at 17:19 +0100, Mario Kleiner wrote: Maybe it would be even possible to slip the small kernel patch into 2.6.38-rc? It is rather a bugfix than a new feature. Not really. The vblank ioctl never pretended to support more than

[PATCH 3/3] drm/vblank: Enable precise vblank timestamps for interlaced and doublescan modes.

2011-02-21 Thread Mario Kleiner
Testing showed the current code can already handle doublescan video modes just fine. A trivial tweak makes it work for interlaced scanout as well. Tested and shown to be precise on Radeon rv530, r600 and Intel 945-GME. Signed-off-by: Mario Kleiner --- drivers/gpu/drm/drm_irq.c | 14

[PATCH 2/3] drm/vblank: Use memory barriers optimized for atomic_t instead of generics.

2011-02-21 Thread Mario Kleiner
Documentation/atomic_ops.txt tells us that there are memory barriers optimized for atomic_inc and other atomic_t ops. Use these instead of smp_wmb(), and also to make the required memory barriers around vblank counter increments more explicit. Signed-off-by: Mario Kleiner --- drivers/gpu/drm

[PATCH 1/3] drm/vblank: Use abs64(diff_ns) for s64 diff_ns instead of abs(diff_ns)

2011-02-21 Thread Mario Kleiner
Use of abs() wrongly wrapped diff_ns to 32 bit, which gives a 1/4000 probability of a missed vblank increment at each vblank irq reenable if the kms driver doesn't support high precision vblank timestamping. Not a big deal in practice, but let's make it nice. Signed-off-by: Mario Kleiner

Vblank timestamping enhancements for drm-next and 2.6.38rc

2011-02-21 Thread Mario Kleiner
Hi, the following three patches are some small improvements and fixes to the drm vblank timestamping. All fully tested on radeon rv530, r600 and on i915 with 945gme chipset. Please consider merging them for 2.6.38-rc as well. Thanks, -mario

[PATCH 1/3] drm/vblank: Use abs64(diff_ns) for s64 diff_ns instead of abs(diff_ns)

2011-02-20 Thread Mario Kleiner
Use of abs() wrongly wrapped diff_ns to 32 bit, which gives a 1/4000 probability of a missed vblank increment at each vblank irq reenable if the kms driver doesn't support high precision vblank timestamping. Not a big deal in practice, but let's make it nice. Signed-off-by: Mario Kleiner

[PATCH 2/3] drm/vblank: Use memory barriers optimized for atomic_t instead of generics.

2011-02-20 Thread Mario Kleiner
Documentation/atomic_ops.txt tells us that there are memory barriers optimized for atomic_inc and other atomic_t ops. Use these instead of smp_wmb(), and also to make the required memory barriers around vblank counter increments more explicit. Signed-off-by: Mario Kleiner mario.klei

[PATCH 3/3] drm/vblank: Enable precise vblank timestamps for interlaced and doublescan modes.

2011-02-20 Thread Mario Kleiner
Testing showed the current code can already handle doublescan video modes just fine. A trivial tweak makes it work for interlaced scanout as well. Tested and shown to be precise on Radeon rv530, r600 and Intel 945-GME. Signed-off-by: Mario Kleiner mario.klei...@tuebingen.mpg.de --- drivers/gpu

<    1   2   3   4   5   6   >