Re: [Intel-gfx] [PATCH v2 2/7] drm/uAPI: Add "active bpc" as feedback channel for "max bpc" drm property

2021-06-14 Thread Mario Kleiner
On Thu, Jun 10, 2021 at 9:55 AM Pekka Paalanen wrote: > > On Tue, 8 Jun 2021 19:43:15 +0200 > Werner Sembach wrote: > > > Add a new general drm property "active bpc" which can be used by graphic > > drivers > > to report the applied bit depth per pixel back to userspace. > > Maybe "bit depth p

Re: [Intel-gfx] [PATCH xf86-video-intel] sna/uxa: Fix colormap handling at screen depth 30. (v2)

2019-01-20 Thread Mario Kleiner
On Mon, Oct 15, 2018 at 6:21 PM Ville Syrjälä wrote: > On Tue, Jun 12, 2018 at 06:20:35PM +0200, Mario Kleiner wrote: > > The various clut handling functions like a setup > > consistent with the x-screen color depth. Otherwise > > we observe improper sampling in the gamma t

Re: [Intel-gfx] [PATCH xf86-video-intel v2 1/2] sna: Refactor property parsing

2019-05-16 Thread Mario Kleiner
On Fri, Apr 26, 2019 at 6:32 PM Ville Syrjala wrote: > > From: Ville Syrjälä > > Generalize the code that parses the plane properties to be useable > for crtc (or any kms object) properties as well. > > v2: plane 'type' prop is enum not range! > > Cc:

Re: [Intel-gfx] [PATCH xf86-video-intel v2 2/2] sna: Support 10bpc gamma via the GAMMA_LUT crtc property

2019-05-16 Thread Mario Kleiner
On Fri, Apr 26, 2019 at 6:32 PM Ville Syrjala wrote: > > From: Ville Syrjälä > > Probe the GAMMA_LUT/GAMMA_LUT_SIZE props and utilize them when > the running with > 8bpc. > > v2: s/sna_crtc_id/__sna_crtc_id/ in DBG since we have a sna_crtc > > Cc: Mario Kleiner

[Intel-gfx] Pageflipping bugs in drm-next on at least Ironlake and Ivybridge.

2016-07-06 Thread Mario Kleiner
Since i pulled the current drm-next tree i see strong flicker and visual corruption during pageflipping, both in my own app, but also in KDE4 and KDE5 Plasma with desktop composition enabled. This happens on both Intel HD Ironake mobile (Apple MBP 2010) and HD-4000 Ivybridge mobile (Apple macMi

[Intel-gfx] Legacy gamma table updates broken in 4.7-rc4

2016-07-06 Thread Mario Kleiner
A strange one. In Linux 4.7-rc4, at least as build by the Ubuntu mainline ppa, gamma table updates via RandR don't work. No errors are reported and the X-Server thinks everything went well, but on Intel Ironlake and Ivybridge the updates don't have any visual effect. The same problem doesn't h

Re: [Intel-gfx] Pageflipping bugs in drm-next on at least Ironlake and Ivybridge.

2016-07-06 Thread Mario Kleiner
On 07/06/2016 03:05 PM, Chris Wilson wrote: On Wed, Jul 06, 2016 at 12:17:55PM +0200, Mario Kleiner wrote: Since i pulled the current drm-next tree i see strong flicker and visual corruption during pageflipping, both in my own app, but also in KDE4 and KDE5 Plasma with desktop composition

[Intel-gfx] [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6

2016-07-12 Thread Mario Kleiner
HD Ironlake to confirm the fix apparently doesn't break anything under X11. Signed-off-by: Mario Kleiner Cc: Maarten Lankhorst Cc: Lionel Landwerlin Cc: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/d

Re: [Intel-gfx] [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6

2016-07-12 Thread Mario Kleiner
, the final rc afaik? thanks, -mario Cheers, - Lionel On 12/07/16 11:33, Mario Kleiner wrote: Updating legacy gamma tables, e.g., via RandR doesn't work at all as of Linux 4.7-rc6. Reason seems to be that the required call to drm_atomic_helper_commit_planes_on_crtc is skipped in intel_ato

Re: [Intel-gfx] [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6

2016-07-12 Thread Mario Kleiner
On 07/12/2016 05:02 PM, Lionel Landwerlin wrote: On 12/07/16 13:11, Mario Kleiner wrote: On 07/12/2016 12:50 PM, Lionel Landwerlin wrote: Hi Mario, Hi Lionel, There was a couple of patch to fix this issue : https://patchwork.freedesktop.org/series/5467/ https://patchwork.freedesktop.org

Re: [Intel-gfx] [PATCH] drm/i915: Fix legacy gamma lut updates in Linux 4.7-rc6

2016-07-14 Thread Mario Kleiner
fixes it nicely. The patch currently applies cleanly to drm-fixes and drm-next and is Reviewed-and-tested-by: Mario Kleiner When we are at it, could somebody please look at that updated series of my Displayport color depth fixes ("EDID/DP fixes for proper bpc detection of displays.&quo

Re: [Intel-gfx] [PATCH 3/3] drm/atomic: Rename crtc_state->pageflip_flags to async_flip

2019-09-05 Thread Mario Kleiner
t; > Cc: Daniel Vetter > > Cc: Nicholas Kazlauskas > > Cc: Leo Li > > Cc: Harry Wentland > > Cc: David Francis > > Cc: Mario Kleiner > > Cc: Bhawanpreet Lakha > > Cc: Ben Skeggs > > Cc: "Christian König" > > Cc: Ilia Mirkin

Re: [Intel-gfx] [PATCH xf86-video-intel v3 2/2] sna: Support 10bpc gamma via the GAMMA_LUT crtc property

2019-07-09 Thread Mario Kleiner
t; 8bpc. > > v2: s/sna_crtc_id/__sna_crtc_id/ in DBG since we have a sna_crtc > v3: Fix the vg "bluered" typo (Mario) > This time I even build tested with vg support > > Cc: Mario Kleiner > Signed-off-by: Ville Syrjälä > Reviewed-and-tested-by:

Re: [Intel-gfx] [PATCH 4/8] drm/i915: Use preempt_disable/enable_rt() where recommended

2022-01-26 Thread Mario Kleiner
On Tue, Dec 14, 2021 at 3:03 PM Sebastian Andrzej Siewior < bige...@linutronix.de> wrote: > From: Mike Galbraith > > Mario Kleiner suggest in commit > ad3543ede630f ("drm/intel: Push get_scanout_position() timestamping into > kms driver.") > > a spots w

Re: [Intel-gfx] [PATCH 4/8] drm/i915: Use preempt_disable/enable_rt() where recommended

2022-02-14 Thread Mario Kleiner
On Fri, Feb 11, 2022 at 9:44 AM Sebastian Andrzej Siewior wrote: > > On 2022-01-27 00:29:37 [+0100], Mario Kleiner wrote: > > Hi, first thank you for implementing these preempt disables according to > Hi Mario, > > > the markers i left long ago. And sorry for the rather l

[Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array.

2020-01-09 Thread Mario Kleiner
full color depth of the panel. With this commit, we can use firmware setting and get the full 10 bpc advertised by the Retina panel. Signed-off-by: Mario Kleiner Cc: Daniel Vetter --- drivers/gpu/drm/i915/display/intel_dp.c | 23 +++ 1 file changed, 23 insertions(+) diff

Re: [Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array.

2020-01-09 Thread Mario Kleiner
On Thu, Jan 9, 2020 at 4:27 PM Ville Syrjälä wrote: > On Thu, Jan 09, 2020 at 04:07:52PM +0100, Mario Kleiner wrote: > > If the current eDP link rate, as read from hw, provides a > > higher bandwidth than the standard link rates, then add the > > current link rate to the

Re: [Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array.

2020-01-09 Thread Mario Kleiner
On Thu, Jan 9, 2020 at 4:38 PM Ville Syrjälä wrote: > On Thu, Jan 09, 2020 at 05:26:57PM +0200, Ville Syrjälä wrote: > > On Thu, Jan 09, 2020 at 04:07:52PM +0100, Mario Kleiner wrote: > > > The panel reports 10 bpc color depth in its EDID, and the UEFI > > > firmwa

Re: [Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array.

2020-01-09 Thread Mario Kleiner
On Thu, Jan 9, 2020 at 4:40 PM Alex Deucher wrote: > On Thu, Jan 9, 2020 at 10:08 AM Mario Kleiner > wrote: > > > > If the current eDP link rate, as read from hw, provides a > > higher bandwidth than the standard link rates, then add the > > current link ra

Re: [Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array.

2020-01-09 Thread Mario Kleiner
On Thu, Jan 9, 2020 at 5:47 PM Ville Syrjälä wrote: > On Thu, Jan 09, 2020 at 05:30:05PM +0100, Mario Kleiner wrote: > > On Thu, Jan 9, 2020 at 4:38 PM Ville Syrjälä < > ville.syrj...@linux.intel.com> > > wrote: > > > > > On Thu, Jan 09, 2020 at 05:26:57PM

Re: [Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array.

2020-01-09 Thread Mario Kleiner
On Thu, Jan 9, 2020 at 7:24 PM Ville Syrjälä wrote: > On Thu, Jan 09, 2020 at 06:57:14PM +0100, Mario Kleiner wrote: > > On Thu, Jan 9, 2020 at 5:47 PM Ville Syrjälä < > ville.syrj...@linux.intel.com> > > wrote: > > > > > On Thu, Jan 09, 2020 at 05:30:05PM

Re: [Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array.

2020-01-09 Thread Mario Kleiner
On Thu, Jan 9, 2020 at 8:49 PM Alex Deucher wrote: > On Thu, Jan 9, 2020 at 11:47 AM Mario Kleiner > wrote: > > > > On Thu, Jan 9, 2020 at 4:40 PM Alex Deucher > wrote: > >> > >> On Thu, Jan 9, 2020 at 10:08 AM Mario Kleiner > >> wrote: > &

Re: [Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array.

2020-01-10 Thread Mario Kleiner
On Fri, Jan 10, 2020 at 2:32 PM Ville Syrjälä wrote: > On Thu, Jan 09, 2020 at 09:19:07PM +0100, Mario Kleiner wrote: > > On Thu, Jan 9, 2020 at 7:24 PM Ville Syrjälä < > ville.syrj...@linux.intel.com> > > wrote: > > > > > On Thu, Jan 09, 2020 at 06:57:14PM

Re: [Intel-gfx] [PATCH] drm/i915/dp: Add current maximum eDP link rate to sink_rate array.

2020-01-10 Thread Mario Kleiner
On Thu, Jan 9, 2020 at 10:26 PM Harry Wentland wrote: > > > On 2020-01-09 4:04 p.m., Mario Kleiner wrote: > > On Thu, Jan 9, 2020 at 8:49 PM Alex Deucher wrote: > >> On Thu, Jan 9, 2020 at 11:47 AM Mario Kleiner >> wrote: >> > >> > On Th

[Intel-gfx] [PATCH] drm/i915/dp: Add dpcd link_rate quirk for Apple 15" MBP 2017 (v3)

2020-03-15 Thread Mario Kleiner
rm-tip, as of 16-March-2020. Adapt to new edid_quirks parameter of drm_dp_has_quirk(). Signed-off-by: Mario Kleiner Tested-by: Mario Kleiner Cc: Jani Nikula --- drivers/gpu/drm/drm_dp_helper.c | 2 ++ drivers/gpu/drm/i915/display/intel_dp.c | 11 +++ include/drm/drm_d

Re: [Intel-gfx] [PATCH 18/18] drm/i915/display13: Enabling dithering after the CC1 pipe

2021-02-18 Thread Mario Kleiner
On Thu, Feb 11, 2021 at 1:29 PM Ville Syrjälä wrote: > On Thu, Jan 28, 2021 at 11:24:13AM -0800, Matt Roper wrote: > > From: Nischal Varide > > > > If the panel is 12bpc then Dithering is not enabled in the Legacy > > dithering block , instead its Enabled after the C1 CC1 pipe post > > color spa

Re: [Intel-gfx] [PATCH 18/18] drm/i915/display13: Enabling dithering after the CC1 pipe

2021-02-18 Thread Mario Kleiner
On Fri, Feb 19, 2021 at 4:22 AM Mario Kleiner wrote: > > > On Thu, Feb 11, 2021 at 1:29 PM Ville Syrjälä < > ville.syrj...@linux.intel.com> wrote: > >> On Thu, Jan 28, 2021 at 11:24:13AM -0800, Matt Roper wrote: >> > From: Nischal Varide >> > >

[Intel-gfx] [PATCH] drm/i915/dp: Add dpcd link_rate quirk for Apple 15" MBP 2017

2020-02-28 Thread Mario Kleiner
link rate during edp setup. Link to previous discussion of a different attempted fix with Ville and Jani: https://patchwork.kernel.org/patch/11325935/ Signed-off-by: Mario Kleiner Cc: Ville Syrjälä Cc: Jani Nikula --- drivers/gpu/drm/drm_dp_helper.c | 2 ++ drivers/gpu/drm/i915/di

[Intel-gfx] [PATCH] drm/i915/dp: Add dpcd link_rate quirk for Apple 15" MBP 2017 (v2)

2020-03-05 Thread Mario Kleiner
link rate during edp setup. Link to previous discussion of a different attempted fix with Ville and Jani: https://patchwork.kernel.org/patch/11325935/ v2: Follow Jani's proposal of defining quirk_rates[] instead of just appending 324000. This for better clarity. Signed-off-by: Mario Klein

Re: [Intel-gfx] [PATCH] drm/i915/dp: Add dpcd link_rate quirk for Apple 15" MBP 2017

2020-03-05 Thread Mario Kleiner
On Wed, Mar 4, 2020 at 4:32 PM Jani Nikula wrote: > > On Sat, 29 Feb 2020, Mario Kleiner wrote: > > This fixes a problem found on the MacBookPro 2017 Retina panel. > > > > The panel reports 10 bpc color depth in its EDID, and the > > firmware chooses link setting

Re: [Intel-gfx] [PATCH v4 2/2] drm/dp: Add function to parse EDID descriptors for adaptive sync limits

2020-03-06 Thread Mario Kleiner
Just as a comment, u8 for max_vfreq in struct drm_adaptive_sync_info might be not very future proof? I just read that ASUS announced a "TUF Gaming VG259QM" monitor which seems to have an adaptive sync range of 48 Hz to 280 Hz, exceeding the max 255 Hz of u8? -mario On Fri, Mar 6, 2020 at 4:02

Re: [Intel-gfx] [PATCH] sna/uxa: Fix colormap handling at screen depth 30.

2018-03-15 Thread Mario Kleiner
u, Mar 01, 2018 at 02:20:48AM +0100, Mario Kleiner wrote: >> > > > The various clut handling functions like a setup >> > > > consistent with the x-screen color depth. Otherwise >> > > > we observe improper sampling in the gamma tables >> >

[Intel-gfx] Depth 30 colormap handling fixes for servers 1.20+ and < 1.20

2018-06-12 Thread Mario Kleiner
Hi, finally here's an updated patch that for depth 30 now works on both Server 1.20 with the full colormap + gamma table handling, and for servers < 1.20 with the RandR gamma tables working fine and the colormap processing skipped. This one successfully tested on sna and uxa with both server 1.20

[Intel-gfx] [PATCH xf86-video-intel] sna/uxa: Fix colormap handling at screen depth 30. (v2)

2018-06-12 Thread Mario Kleiner
handling intact. Tested on 1.19.6 and 1.20.0 to do the right thing. Signed-off-by: Mario Kleiner --- src/sna/sna_driver.c | 9 ++--- src/uxa/intel_driver.c | 6 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 2007e354..

Re: [Intel-gfx] [PATCH 01/19] drm/core: Add drm_accurate_vblank_count, v4.

2016-04-24 Thread Mario Kleiner
t use drm_vblank_count_and_time. Changes since v2: - Don't return time of last vblank. Changes since v3: - Change pipe to unsigned int. (Ville) - Remove unused documentation for tv_ret. (kbuild) Cc: Mario Kleiner Cc: Ville Syrjälä Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä

Re: [Intel-gfx] [PATCH 01/19] drm/core: Add drm_accurate_vblank_count, v5.

2016-04-25 Thread Mario Kleiner
count. Cc: Mario Kleiner Cc: Ville Syrjälä Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä #v4 Acked-by: David Airlie #irc, v4 --- Unfortunately WARN_ON(!dev->disable_vblank_immediate) doesn't work on gen2, which is the reason this function is created. So I used WARN_ON(!ge

Re: [Intel-gfx] [PATCH 01/19] drm/core: Add drm_accurate_vblank_count, v5.

2016-04-27 Thread Mario Kleiner
Anyway, although i would have liked the stricter check and warning docs, the v4 patch is ok with me: Reviewed-by: Mario Kleiner -mario On 04/25/2016 08:32 AM, Maarten Lankhorst wrote: This function is useful for gen2 intel devices which have no frame counter, but need a way to determine the

Re: [Intel-gfx] [PATCH v2 01/21] drm/core: Add drm_accurate_vblank_count, v5.

2016-05-18 Thread Mario Kleiner
I'm fine with it. I assume the function will only be used by kms drivers, whose writers probably know when it is safe to call the function, ie. what kind of potential quirks the kms drivers timestamping implementation has. Reviewed-by: Mario Kleiner On 05/17/2016 03:07 PM, Maarten Lank

Re: [Intel-gfx] [PATCH] drm: use seqlocks for vblank time/count

2016-05-18 Thread Mario Kleiner
On 05/09/2016 08:11 PM, Daniel Vetter wrote: On Mon, May 09, 2016 at 08:16:07PM +0300, Ville Syrjälä wrote: On Mon, May 09, 2016 at 05:08:43PM +0100, Matthew Auld wrote: This patch aims to replace the roll-your-own seqlock implementation with full-blown seqlock'. We also remove the timestamp ri

Re: [Intel-gfx] [PATCH] drm: use seqlocks for vblank time/count

2016-05-24 Thread Mario Kleiner
he local irq disable. I'll give it a test later this week. Reviewed-by: Mario Kleiner Indeed the old inactive @tuebingen.mpg.de is only a forward to the gmail address, probably with some botched mail filter rules, so they can go unnoticed quite

[Intel-gfx] Module parameters to override color management/dithering.

2017-09-15 Thread Mario Kleiner
Hi, so these two patches add i915 module parameters to globally override how the driver handles dithering and gamma/csc conversion. They serve two purposes: First as debug aid and "airbag" for working around potential precision problems in getting pixels from rendering to the display outputs. Thi

[Intel-gfx] [PATCH 1/2] drm/i915: Add module parameter to force en-/disable dithering.

2017-09-15 Thread Mario Kleiner
, to have an override for DE's which may not expose such properties via some standard protocol in a user-controllable way, e.g., afaik all currently existing Wayland compositors. Tested on Ironlake, IvyBridge, Haswell, Skylake. Signed-off-by: Mario Kleiner --- drivers/gpu/drm/i915/i915_par

[Intel-gfx] [PATCH 2/2] drm/i915: Add module parameter to en-/disable hw color correction.

2017-09-15 Thread Mario Kleiner
ll restricts the effective output precision to 8 bit, while an auto-bypassed precision lut doesn't restrict precision. Iow. this patch is needed even with XR30 fb's for actual 10 bit precision output, even though the hw seems to sort of ignore the tested gamma tables for XR30

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Add module parameter to en-/disable hw color correction.

2017-09-28 Thread Mario Kleiner
On 09/26/2017 07:05 AM, Daniel Vetter wrote: On Fri, Sep 15, 2017 at 05:48:25PM +0200, Mario Kleiner wrote: The new module parameter enable_hw_color_correction defaults to true, to retain the current behaviour. If set to false, it will disable all hardware color correction, like gamma/degamma

[Intel-gfx] [PATCH] sna/uxa: Fix colormap handling at screen depth 30.

2018-02-28 Thread Mario Kleiner
aps(). Tested for uxa and sna at depths 8, 16, 24 and 30 on IvyBridge, and tested at depth 24 and 30 that xgamma and gamma table animations work, and with measurement equipment to make sure identity gamma ramps actually are identity mappings at the output. Signed-off-by: Mario Kleiner --- src/

Re: [Intel-gfx] [PATCH 1/3] drm: Defer disabling the vblank IRQ until the next interrupt (for instant-off)

2017-03-22 Thread Mario Kleiner
following the wait completion. However, if the user is simply querying the current vblank counter and timestamp, the interrupt will be disabled after every IRQ and the user will enabled it again on the first query following the IRQ. v2: Mario Kleiner - After testing this, one more thing that would make

Re: [Intel-gfx] [PATCH] drm: Make the decision to keep vblank irq enabled earlier

2017-03-23 Thread Mario Kleiner
Cc: Dave Airlie , Cc: Mario Kleiner --- drivers/gpu/drm/drm_irq.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 5b77057e91ca..1d6bcee3708f 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/

Re: [Intel-gfx] [PATCH 00/14] drm: Some more vblank timestampi changes

2013-11-30 Thread Mario Kleiner
On 29/11/13 14:36, Ville Syrjälä wrote: On Wed, Nov 06, 2013 at 01:46:41PM +1000, Dave Airlie wrote: On Wed, Oct 30, 2013 at 4:06 AM, wrote: So I took another look at the vblank timestamping code, and got a bit excited. The result is this patchset. I'd like to merge this, I was hoping Mario

Re: [Intel-gfx] [PATCH 00/14] drm: Some more vblank timestampi changes

2014-01-12 Thread Mario Kleiner
On 29/10/13 19:06, ville.syrj...@linux.intel.com wrote: > So I took another look at the vblank timestamping code, and got a bit > excited. The result is this patchset. > > Summary of changes: > - kill crtc->hwmode dependency > - eliminate a bunch of 64bit math > - fix timestamps for stereo and int

Re: [Intel-gfx] [PATCH 12/14] drm: Pass 'flags' from the caller to .get_scanout_position()

2014-01-12 Thread Mario Kleiner
On 29/10/13 19:06, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä Preparation for moving the early vblank IRQ logic into radeon_get_crtc_scanoutpos(). Signed-off-by: Ville Syrjälä Tiny compile fix needed for this one. The function prototype for radeon_get_crtc_scanoutpos() is als

Re: [Intel-gfx] [PATCH 13/14] drm/radeon: Move the early vblank IRQ fixup to radeon_get_crtc_scanoutpos()

2014-01-12 Thread Mario Kleiner
On 29/10/13 19:06, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä i915 doesn't need this kludge for most platforms. Although we do appear to need something similar on certain platforms, but we can be more accurate when we apply the adjustment since we know exactly why the scanline cou

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

2013-09-21 Thread Mario Kleiner
What's the real issue here? 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 hi

Re: [Intel-gfx] [PATCH 3/3] drm/i915: Improve the accuracy of get_scanout_pos on CTG+

2013-09-24 Thread Mario Kleiner
start or end of vblank. We can do that by double checking the DSL value against the vblank status bit from ISR. Cc: Mario Kleiner Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/i915_irq.c | 53 + 1 file changed, 53 insertions(+) diff --git a

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

2013-09-24 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 wrote: On 09/11/2013 03:31 PM, Peter Hurley wrote: [+cc dri-devel] On 09/11/2013 11:38 AM

Re: [Intel-gfx] [PATCH v2 1/3] drm/i915: Skip register reads in i915_get_crtc_scanoutpos()

2013-09-24 Thread Mario Kleiner
On 24.09.13 11:11, Daniel Vetter wrote: ... Hooray, this rips out the racy pipe_to_cpu_transcoder deref, so I'm all in favour \o/ Of course I still have that ugly itme on my todo about "fix the locking for kms vblank stuff" ;-) See the other e-mail i sent. Maybe pushing the time read into th

Re: [Intel-gfx] [PATCH v2 1/3] drm/i915: Skip register reads in i915_get_crtc_scanoutpos()

2013-09-24 Thread Mario Kleiner
way we'd ever call ->get_scanout_position(), we can completely ignore UMS in i915_get_crtc_scanoutpos(). Also reorganize intel_irq_init() a bit to clarify the KMS vs. UMS situation. v2: Drop UMS code Cc: Mario Kleiner Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/i915

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Fix scanoutpos calculations

2013-09-24 Thread Mario Kleiner
we should keep our numbers in the pixel count domain while we're adjusting the position to be relative to vbl_end. Then when we do the conversion in the end, both vertical _and_ horizontal components will come out correct. Cc: Mario Kleiner Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/

Re: [Intel-gfx] [PATCH v2 1/3] drm/i915: Skip register reads in i915_get_crtc_scanoutpos()

2013-09-26 Thread Mario Kleiner
On 25.09.13 10:14, Ville Syrjälä wrote: On Wed, Sep 25, 2013 at 04:35:56AM +0200, Mario Kleiner wrote: On 23.09.13 13:48, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä We have all the information we need in the mode structure, so going and reading it from the hardware is pointless

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 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 for the rt people and without the

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] [PATCH 3/3] drm/i915: Improve the accuracy of get_scanout_pos on CTG+

2013-09-26 Thread Mario Kleiner
On 25.09.13 10:11, Ville Syrjälä wrote: On Wed, Sep 25, 2013 at 05:12:54AM +0200, Mario Kleiner wrote: On 23.09.13 12:02, ville.syrj...@linux.intel.com wrote: From: Ville Syrjälä The DSL register increments at the start of horizontal sync, so it manages to miss the entire active portion of

Re: [Intel-gfx] [PATCH] drm/i915: Fix pre-CTG vblank counter

2013-09-26 Thread Mario Kleiner
assignments in intel_irq_init() a bit to avoid confusing people. Cc: Mario Kleiner Signed-off-by: Ville Syrjälä --- Just another small vblank related gem I forgot to polish up and send out until Imre started asking me questions about the vblank counter functions. Hm, I've thought the magic

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

2013-10-11 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 wrote: * Mario Kleiner | 2013-09-26 18:16:47 [+0200]: Good! I will do that. Thanks for clarifying the irq and constraints on

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Fix scanoutpos calculations

2013-10-11 Thread Mario Kleiner
vbl_end. So instead we should keep our numbers in the pixel count domain while we're adjusting the position to be relative to vbl_end. Then when we do the conversion in the end, both vertical _and_ horizontal components will come out correct. Cc: Mario Kleiner Signed-off-by: Vi

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Fix scanoutpos calculations

2013-10-11 Thread Mario Kleiner
Yes. On Oct 12, 2013 1:18 AM, "Daniel Vetter" wrote: > > On Fri, Oct 11, 2013 at 04:31:38PM +0200, Mario Kleiner wrote: > > Daniel, Ville, > > > > i tested Ville's patch series for the scanoutpos improvements on a > > GMA-950, on top of airlied's

[Intel-gfx] 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

[Intel-gfx] [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

[Intel-gfx] [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 +++

[Intel-gfx] [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

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

2013-10-26 Thread Mario Kleiner
ng query 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 d

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

2013-10-29 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...(...); v2: Fix formatting of new multi-line code comments. Signed-off-by: Mario Kleiner Reviewed-by: Ville Syrjälä Reviewed-by: Alex D

[Intel-gfx] Vblank timestamping improvements/fixes for Linux drm. [v2]

2013-10-29 Thread Mario Kleiner
Hi Dave, this is v2 of the patch set for improving/restoring accuracy and robustness of vblank timestamping and for fixing incompatibilities with the PREEMPT_RT patches. Could you please merge this for the next kernel? Would be good to have the old accuracy restored as soon as possible. Thanks.

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

2013-10-29 Thread Mario Kleiner
ng query retries. After : Typically 1 usec (98% of all samples), occassionally 2 usecs (2% of all samples), with maximum of 3 usecs (a handful). v2: Fix formatting of new multi-line code comments. Signed-off-by: Mario Kleiner Reviewed-by: Ville Syrjälä Reviewed-by: Alex Deucher --- drivers

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

2013-10-29 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

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

2013-10-29 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 Reviewed-by: Ville Syrjälä Reviewed-by: Alex Deucher --- drivers/gpu/drm/drm_irq.c |7 --- 1 file changed, 7 deletions

Re: [Intel-gfx] Intel-gfx Digest, Vol 57, Issue 7

2012-10-02 Thread Mario Kleiner
-- Message: 5 Date: Tue, 2 Oct 2012 17:54:35 +0200 From: Daniel Vetter To: Intel Graphics Development Cc: Daniel Vetter , sta...@vger.kernel.org Subject: [Intel-gfx] [PATCH 1/2] drm/i915: call drm_handle_vblank before finish_page_flip Message-ID: <134919327

Re: [Intel-gfx] Intel-gfx Digest, Vol 57, Issue 7

2012-10-02 Thread Mario Kleiner
On 02.10.12 20:08, Daniel Vetter wrote: On Tue, Oct 2, 2012 at 7:45 PM, Mario Kleiner wrote: I'm fine with removing the hack and fixing this properly, especially if you say that it didn't work realiably in some cases. But i hope this means that timestamping sanity tests via flip_

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

2012-10-05 Thread Mario Kleiner
Subject: Re: [RFC 4/4] drm: add support for raw monotonic vblank timestamps Message-ID: <1349446447.17758.73.camel@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 D?nzer wrote: On

Re: [Intel-gfx] [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

[Intel-gfx] Improvements and fixes for Intel ddx swap scheduling/timestamping.

2012-10-06 Thread Mario Kleiner
Hi, a series of three patches to improve the dri2 swap scheduling and timestamping for the current intel ddx. The first one enables proper OML_sync_control timestamping while triple-buffering is enabled and XOrg 1.12+ with DRI2SwapLimit support is in use. So far, timestamping was unuseable with t

[Intel-gfx] [PATCH 1/3] ddx/dri2: Make triple-buffering compatible with timestamping on Xorg 1.12+

2012-10-06 Thread Mario Kleiner
ple-buffering is achieved by sacrificing OML_sync_control compliance, as in the old implementation. Tested against server without swaplimit api and 1.13 with swaplimit api, both with and without triplebuffering enabled. Signed-off-by: Mario Kleiner --- src/intel_dri.c |

[Intel-gfx] [PATCH 2/3] ddx/dri2: Repair broken pageflip swap scheduling.

2012-10-06 Thread Mario Kleiner
specs, except for the trivial case of a glXSwapBuffers call with swap_interval == 1. This small modification allows to keep the optimization in the intended way, while removing the hilarious side effects for timing sensitive applications. Signed-off-by: Mario Kleiner --- src/intel_dri.c | 22

[Intel-gfx] [PATCH 3/3] ddx/dri2: Prevent option 'SwapBuffersWait' from disabling pageflip.

2012-10-06 Thread Mario Kleiner
gets unreliable and tearing is present at the top of the screen due to lack of vsync. Therefore no longer disable pageflipping if SwapBuffersWait is off. Signed-off-by: Mario Kleiner --- src/intel_display.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel_displa

Re: [Intel-gfx] Improvements and fixes for Intel ddx swap scheduling/timestamping.

2012-10-08 Thread Mario Kleiner
On 08.10.12 18:08, Eric Anholt wrote: Daniel Vetter writes: On Sun, Oct 07, 2012 at 08:38:07AM +0200, Mario Kleiner wrote: Hi, a series of three patches to improve the dri2 swap scheduling and timestamping for the current intel ddx. The first one enables proper OML_sync_control

Re: [Intel-gfx] [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, ...) i

Re: [Intel-gfx] [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 --- drivers/gpu/drm/drm_irq.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-)

Re: [Intel-gfx] [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 --- drivers

Re: [Intel-gfx] [PATCH 1/2] drm: add flags argument to crtc page_flip callback

2012-11-02 Thread Mario Kleiner
On 30.10.12 19:33, Jesse Barnes wrote: This lets us pass down flags the drivers might be interested in, e.g. async. Signed-off-by: Jesse Barnes Hi Jesse I like it :) -- Anything that helps to get rid of the troublesome 'SwapBuffersWait' madness in the ddx at some point makes me happy. di

Re: [Intel-gfx] [RFC] Async flips

2012-11-02 Thread Mario Kleiner
On 31.10.12 19:51, Ville Syrjälä wrote: On Wed, Oct 31, 2012 at 10:44:47AM -0700, Eric Anholt wrote: Ville Syrjälä writes: On Tue, Oct 30, 2012 at 01:33:47PM -0500, Jesse Barnes wrote: The hw supports async flips through the render ring, so why not expose it? It gives us one more "tear me

Re: [Intel-gfx] [RFC] Async flips

2012-11-11 Thread Mario Kleiner
On 02.11.12 10:29, Ville Syrjälä wrote: On Fri, Nov 02, 2012 at 05:45:29AM +0100, Mario Kleiner wrote: On 31.10.12 19:51, Ville Syrjälä wrote: On Wed, Oct 31, 2012 at 10:44:47AM -0700, Eric Anholt wrote: Ville Syrjälä writes: On Tue, Oct 30, 2012 at 01:33:47PM -0500, Jesse Barnes wrote

Re: [Intel-gfx] [PATCH 2/3] ddx/dri2: Repair broken pageflip swap scheduling.

2012-12-12 Thread Mario Kleiner
On 11.12.12 00:00, Jesse Barnes wrote: On Mon, 10 Dec 2012 10:48:29 -0800 Jesse Barnes wrote: On 15.10.12 16:52, Chris Wilson wrote: > On Mon, 15 Oct 2012 16:46:52 +0200, Mario Kleiner wrote: >> Hi Chris, >> >> can you please check & merge at least the

Re: [Intel-gfx] [PATCH 2/3] ddx/dri2: Repair broken pageflip swap scheduling.

2012-12-12 Thread Mario Kleiner
On 10.12.12 19:48, Jesse Barnes wrote: On 15.10.12 16:52, Chris Wilson wrote: > On Mon, 15 Oct 2012 16:46:52 +0200, Mario Kleiner wrote: >> Hi Chris, >> >> can you please check & merge at least the first two patches of the >> series into the intel d

Re: [Intel-gfx] [PATCH] drm: Return current vblank value for drmWaitVBlank queries

2015-03-18 Thread Mario Kleiner
On 03/18/2015 10:30 AM, Chris Wilson wrote: On Wed, Mar 18, 2015 at 11:53:16AM +0900, Michel Dänzer wrote: drm_vblank_count_and_time() doesn't return the correct sequence number while the vblank interrupt is disabled, does it? It returns the sequence number from the last time vblank_disable_and_

Re: [Intel-gfx] [PATCH] drm: Return current vblank value for drmWaitVBlank queries

2015-03-19 Thread Mario Kleiner
On 03/19/2015 04:04 PM, Ville Syrjälä wrote: On Thu, Mar 19, 2015 at 03:33:11PM +0100, Daniel Vetter wrote: On Wed, Mar 18, 2015 at 03:52:56PM +0100, Mario Kleiner wrote: On 03/18/2015 10:30 AM, Chris Wilson wrote: On Wed, Mar 18, 2015 at 11:53:16AM +0900, Michel Dänzer wrote

[Intel-gfx] DRI3/Present fixes for XServers 1.16 and 1.17rc - (v2)

2014-12-02 Thread Mario Kleiner
Hi, an updated set of patches to fix the bugs i found in the xserver dri3/present implementation and one bug in intel-ddx uxa/dri3/present implementation. Axel Davys comments made me rethink my original xserver patch and the new solution is simple and better and afaics how this was actually intend

[Intel-gfx] [PATCH 1/2] present: Avoid crashes in DebugPresent(), a bit more info.

2014-12-02 Thread Mario Kleiner
extension, makes debugging quite a bit more easy. Please also cherry-pick this for a 1.16.x stable update. Signed-off-by: Mario Kleiner --- present/present.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/present/present.c b/present/present.c index ac9047e..e5d3fd5 100

[Intel-gfx] [PATCH] uxa/present: Handle sync_flip flag in intel_present_check_flip()

2014-12-02 Thread Mario Kleiner
Make sure we reject async flips if we don't support async flips. Signed-off-by: Mario Kleiner --- src/uxa/intel_present.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/uxa/intel_present.c b/src/uxa/intel_present.c index d20043f..d2aa9ee 100644 --- a/src/uxa/intel_present.c

[Intel-gfx] [PATCH 2/2] present: Fix use of vsynced pageflips and honor PresentOptionAsync. (v3)

2014-12-02 Thread Mario Kleiner
Org 1.17 and XOrg 1.16.2 stable. Applying on top of XOrg 1.16.2 may require cherry-picking commit 2051514652481a83bd7cf22e57cb0fcd40333f33 which trivially fixes lack of support for protocol option PresentOptionCopy - get two bug fixes for the price of one! Signed-off-by: Mario Kleiner ---

Re: [Intel-gfx] [PATCH 2/2] present: Fix use of vsynced pageflips and honor PresentOptionAsync. (v3)

2014-12-05 Thread Mario Kleiner
On 12/05/2014 12:56 AM, Eric Anholt wrote: Mario Kleiner writes: Pageflips for Pixmap presents were not synchronized to vblank on drivers with support for PresentCapabilityAsync, due to some missing init for vblank->sync_flips. The PresentOptionAsync flag was completely ignored

[Intel-gfx] [PATCH] sna: Also fix ZaphodHeads on Linux kernels older than 3.19

2014-12-06 Thread Mario Kleiner
drm_events() function. Fixes fdo bug #84744 on older kernels. Signed-off-by: Mario Kleiner --- src/sna/sna_display.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 163..a7ad6cc 100644 --- a/src/sna/sna_displ

  1   2   >