[PATCH 21/28] drm/vmwgfx: Reinstate the legacy display system dirty callback

2015-08-12 Thread Thomas Hellstrom
It somehow got lost in a rewrite. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 06ff7

[PATCH 22/28] drm/vmwgfx: Fix kms preferred mode sorting

2015-08-12 Thread Thomas Hellstrom
The preferred mode typically didn't end up first, since the function drm_mode_connector_list_update() reordered the modes. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/

[PATCH 14/28] drm/vmwgfx: Introduce a pin count to allow for recursive pinning v2

2015-08-12 Thread Thomas Hellstrom
v2: Fix dma buffer validation on resource pinning. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c | 182 ++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 31 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 33

[PATCH 19/28] drm/vmwgfx: Add a kernel interface to create a framebuffer v2

2015-08-12 Thread Thomas Hellstrom
The kernel interface is needed for fbdev, and needs to be free from a file_priv member. To accomplish this, remove the fb surface mutex and list which isn't used anymore, anyway. Finally, make the pin() and unpin() pin the framebuffer for all display system backends, so that fbdev can pin its fram

[PATCH 04/28] vmwgfx: Update device headers for command buffers.

2015-08-12 Thread Thomas Hellstrom
Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/svga3d_reg.h | 2 - drivers/gpu/drm/vmwgfx/svga_reg.h | 187 drivers/gpu/drm/vmwgfx/svga_types.h | 3 + 3 files changed, 190 insertions(+), 2 deletions(-) diff --git a

[Regression v4.2] Re: [PATCH 7/9] drm/radeon: add VCE 1.0 support v4

2015-08-12 Thread Christian König
On 13.08.2015 08:36, Lucas Stach wrote: > Am Donnerstag, den 13.08.2015, 15:18 +0900 schrieb Michel Dänzer: >> On 13.08.2015 15:03, Lucas Stach wrote: >>> Hi Christian, >>> >>> this commit is causing a boot regression with v4.2-rcX on my Richland >>> APU (CHIP_ARUBA) based laptop. I didn't have ti

[PATCH 2/7] drm/vmwgfx: Update device includes for DX device functionality

2015-08-12 Thread Thomas Hellstrom
From: Sinclair Yeh Add DX includes and move all device includes to a separate directory. Co-authored with Thomas Hellstrom, Charmaine Lee and above all, the VMware device team. Signed-off-by: Sinclair Yeh Signed-off-by: Thomas Hellstrom Signed-off-by: Charmaine Lee --- .../gpu/drm/vmwgfx/de

[PATCH 3/7] drm/vmwgfx: Initial DX support

2015-08-12 Thread Thomas Hellstrom
Initial DX support. Co-authored with Sinclair Yeh, Charmaine Lee and Jakob Bornecrantz. Signed-off-by: Thomas Hellstrom Signed-off-by: Sinclair Yeh Signed-off-by: Charmaine Lee --- drivers/gpu/drm/vmwgfx/Makefile |1 + drivers/gpu/drm/vmwgfx/vmwgfx_binding.c | 1294

Intel-kms in Linux-4.2rc causes regression due to dithering always on.

2015-08-12 Thread Mario Kleiner
On 08/07/2015 09:14 AM, Daniel Vetter wrote: > On Fri, Aug 07, 2015 at 12:45:52AM +0200, Mario Kleiner wrote: >> On 08/07/2015 12:12 AM, Daniel Vetter wrote: >>> On Thu, Aug 6, 2015 at 11:56 PM, Mario Kleiner >>> wrote: Hi Daniel and all, since Linux 4.2 (tested with rc4), i think t

[Bug 73530] Asus U38N: Black screen with Radeon driver in Linux

2015-08-12 Thread bugzilla-dae...@freedesktop.org
r the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150812/37884ae9/attachment.html>

[PATCH v2 11/11] drm/exynos: remove struct exynos_drm_encoder layer

2015-08-12 Thread Inki Dae
On 2015년 08월 12일 00:03, Daniel Vetter wrote: > On Tue, Aug 11, 2015 at 09:13:54PM +0900, Inki Dae wrote: >> On 2015년 08월 11일 09:38, Gustavo Padovan wrote: >>> Hi Inki, >>> >>> 2015-08-07 Inki Dae : >>> Hi Gustavo, On 2015년 08월 06일 22:31, Gustavo Padovan wrote: >

[PATCH] Revert "drm/nouveau/fifo/gk104: kick channels when deactivating them"

2015-08-12 Thread Alexandre Courbot
This reverts commit 1addc1264852 This commit seems to cause crashes in gk104_fifo_intr_runlist() by returning 0xbad0da00 when register 0x2a00 is read. Since this commit was intended for GM20B which is not completely supported yet, let's revert it for the time being. Reported-by: Eric Biggers Sig

[PATCH] Revert "drm/nouveau/fifo/gk104: kick channels when deactivating them"

2015-08-12 Thread Alexandre Courbot
On Wed, Aug 12, 2015 at 3:00 PM, Afzal Mohammed wrote: > Hi, > > On Wed, Aug 12, 2015 at 01:17:38PM +0900, Alexandre Courbot wrote: >> This reverts commit 1addc1264852 >> >> This commit seems to cause crashes in gk104_fifo_intr_runlist() by >> returning 0xbad0da00 when register 0x2a00 is read. Si

[PATCH] Revert "drm/nouveau/fifo/gk104: kick channels when deactivating them"

2015-08-12 Thread Alexandre Courbot
2015-08-12 16:37 GMT+09:00 Afzal Mohammed : > Hi, > > On Wed, Aug 12, 2015 at 04:12:15PM +0900, Alexandre Courbot wrote: > >> Could you let me know what your card is? It may be useful to know the >> range of affected cards when trying to fix this. > > grep of nouveau on dmesg as follows, if the fol

[Bug 101391] Lockup after resume (kernel BUG at include/drm/drm_mm.h:145!)

2015-08-12 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=101391 --- Comment #5 from Michael Long --- I managed to proceed with the bisect process but it doesn't lead to another bad commit. After that I restarted the bisection but this time without limiting to a sub-tree. This time e640a280ccb9c448a3d9d522ea

[Bug 101391] Lockup after resume (kernel BUG at include/drm/drm_mm.h:145!)

2015-08-12 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=101391 --- Comment #6 from Michel Dänzer --- "No more bad commits" isn't necessarily a problem. Just keep testing the commits you get from running "git bisect good/bad" according to the test result with the previous commit, until the process is finishe

[PATCH] drm: Use raw monotonic clock

2015-08-12 Thread Daniel Vetter
On Tue, Aug 11, 2015 at 11:46:11AM -0400, Abhilash Jindal wrote: > Wall time obtained from do_gettimeofday is susceptible to sudden jumps due to > user setting the time or due to NTP. > > Raw monotonic time is constantly increasing time and isn't affected by NTP > adjustments better suited for com

[PATCH] drm/i915: Only dither on 6bpc panels

2015-08-12 Thread Daniel Vetter
In commit d328c9d78d64ca11e744fe227096990430a88477 Author: Daniel Vetter Date: Fri Apr 10 16:22:37 2015 +0200 drm/i915: Select starting pipe bpp irrespective or the primary plane we started to select the pipe bpp from sink capabilities and not from the primary framebuffer - that one might

[PATCH v2 1/2] drm/panel: simple: Add bus format for HannStar HSD070PWW1 LVDS panel

2015-08-12 Thread Lucas Stach
From: Philipp Zabel The bus format both specifies the bpc and the way the individual bits get serialized into the 7 LVDS timeslots. While the is only one standard mapping for 6 bpc and so the driver could infer the bit mapping from the bpc alone, there are more options for the 8 bpc case which m

[PATCH v2 2/2] drm/panel: simple: correct minimum hsync length of the HannStar HSD070PWW1 panel

2015-08-12 Thread Lucas Stach
From: Philipp Zabel According to the data sheet, the minimum horizontal blanking interval is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the minimum working horizontal blanking interval to be 60 clocks. Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach --- v2: no chang

[PATCH v2 20/22 EXPERIMENTAL] drm: Use vga_switcheroo active client as proxy when reading DDC/AUX

2015-08-12 Thread Lukas Wunner
The retina MacBook Pro uses an eDP panel and a gmux controller to switch the panel between its two GPUs. Unfortunately it seems that it cannot switch the AUX channel separately from the main link. But we can emulate switching of DDC/AUX in software by using the active client as a proxy to talk to

[PATCH v2 22/22 EXPERIMENTAL] drm/nouveau: Use vga_switcheroo active client as proxy when probing DDC on LVDS

2015-08-12 Thread Lukas Wunner
The pre-retina MacBook Pro uses an LVDS panel and a gmux controller to switch the panel between its two GPUs. While the gmux is able to switch the DDC lines, we can also emulate DDC switching in software by using the active client as a proxy to talk to the panel. This gives us two ways to switch, o

[PATCH v2 01/22] vga_switcheroo: Add support for switching only the DDC

2015-08-12 Thread Lukas Wunner
From: Seth Forshee During graphics driver initialization its useful to be able to mux only the DDC to the inactive client in order to read the EDID. Add a switch_ddc callback to allow capable handlers to provide this functionality, and add vga_switcheroo_switch_ddc() to allow DRM to mux only the

[PATCH v2 02/22] vga_switcheroo: Add helper function to get the active client

2015-08-12 Thread Lukas Wunner
From: Seth Forshee Add vga_switcheroo_get_active_client() to allow drivers to get the active video client. This will be used by drivers wishing to temporarily mux only the DDC to the inactive client. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861 Bugzilla: https://bugs.freedesktop.o

[PATCH v2 07/22] Revert "vga_switcheroo: Add helper function to get the active client"

2015-08-12 Thread Lukas Wunner
This reverts commit 26814ce68904c9faf977c90edac798156311981f. The helper function is no longer needed after Dave Airlie's rewrite of vga_switcheroo_switch_ddc(), the commit introducing it was only included because 31f23c3d488e ("drm/edid: Switch DDC when reading the EDID") does not compile without

[PATCH v2 03/22] apple-gmux: Add switch_ddc support

2015-08-12 Thread Lukas Wunner
From: Seth Forshee The gmux allows muxing the DDC independently from the display, so support this functionality. This will allow reading the EDID for the inactive GPU, fixing issues with machines that either don't have a VBT or have invalid mode data in the VBT. Bugzilla: https://bugzilla.kernel

[PATCH v2 09/22] drm/nouveau: Lock/unlock DDC lines on probe

2015-08-12 Thread Lukas Wunner
On dual gpu laptops such as the MacBook Pro, ask vga_switcheroo to switch the DDC lines to the Nvidia gpu before probing them. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115 Tested-by: Paul Hordiienko [MBP 6,2 2010 in

[PATCH v2 04/22] drm/edid: Switch DDC when reading the EDID

2015-08-12 Thread Lukas Wunner
From: Seth Forshee Some dual graphics machines support muxing the DDC separately from the display, so make use of this functionality when reading the EDID on the inactive GPU. Also serialize drm_get_edid() with a mutex to avoid races on the DDC mux state. Bugzilla: https://bugzilla.kernel.org/sh

[PATCH v2 05/22] vga_switcheroo: Lock/unlock DDC lines

2015-08-12 Thread Lukas Wunner
From: Dave Airlie Replace vga_switcheroo_switch_ddc() with vga_switcheroo_lock_ddc() and vga_switcheroo_unlock_ddc(), move mutex from drm_get_edid() to vga_switcheroo.c Motivation for these changes according to Dave Airlie: "I can't figure out why I didn't like this, but I rewrote this way back

[PATCH v2 16/22] drm: Create new fb and replace default 1024x768 fb on hotplug event

2015-08-12 Thread Lukas Wunner
If no connectors with modes are found, drm_fb_helper_single_fb_probe() will allocate a default 1024x768 fb. This becomes a problem if one of the connectors subsequently changes to connected status: We're stuck with the default fb even if the display allows a larger resolution (or doesn't support 10

[PATCH v2 12/22] drm/i915: Preserve SSC earlier

2015-08-12 Thread Lukas Wunner
Commit 92122789b2d6 ("drm/i915: preserve SSC if previously set v3") added code to intel_modeset_gem_init to override the SSC status read from VBT with the SSC status set by BIOS. However, intel_modeset_gem_init is invoked *after* intel_modeset_init, which calls intel_setup_outputs, which *modifies

[PATCH v2 13/22] drm/i915: Reprobe eDP and LVDS connectors on hotplug event

2015-08-12 Thread Lukas Wunner
The i915 driver probes eDP and LVDS connectors once on startup by invoking intel_setup_outputs(). If no DPCD or EDID can be obtained, it will remove the connectors from the device's mode configuration, presuming they're ghost connectors. As a result, subsequent calls to drm_fb_helper_hotplug_event(

[PATCH v2 06/22] vga_switcheroo: Lock/unlock DDC lines harder

2015-08-12 Thread Lukas Wunner
Unlock DDC lines if drm_probe_ddc() fails. If the inactive client registers before the active client then old_ddc_owner cannot be determined with find_active_client() (null pointer dereference). Therefore change semantics of the ->switch_ddc handler callback to return old_ddc_owner on success or a

[PATCH v2 11/22] vga_switcheroo: Generate hotplug event on handler and proxy registration

2015-08-12 Thread Lukas Wunner
On laptops which require the handler to switch DDC lines, already registered clients must reprobe their connectors if the handler registers late. This is the case on pre-retina MacBook Pros, which use a gmux controller as handler. Based (loosely) on a patch by Matthew Garrett who used an addition

[PATCH v2 14/22 RESEND] drm/i915: Fix failure paths around initial fbdev allocation

2015-08-12 Thread Lukas Wunner
From: Tvrtko Ursulin We had two failure modes here: 1. Deadlock in intelfb_alloc failure path where it calls drm_framebuffer_remove, which grabs the struct mutex and intelfb_create (caller of intelfb_alloc) was already holding it. 2. Deadlock in intelfb_create failure path where it calls drm_fr

[PATCH v2 19/22 EXPERIMENTAL] drm: Amend struct drm_dp_aux with connector attribute

2015-08-12 Thread Lukas Wunner
On dual GPU laptops which cannot switch the AUX channel separately from the main link and therefore rely on proxying through the vga_switcheroo active client, we need to restrict this to eDP so that only communication to the internal panel is proxied and not to external DP-connected displays which

[PATCH v2 15/22 RESEND] drm/i915: On fb alloc failure, unref gem object where it gets refed

2015-08-12 Thread Lukas Wunner
Currently when allocating a framebuffer fails, the gem object gets unrefed at the bottom of the call chain in __intel_framebuffer_create, not where it gets refed, which is in intel_framebuffer_create_for_mode (via i915_gem_alloc_object) and in intel_user_framebuffer_create (via drm_gem_object_looku

[PATCH v2 10/22] apple-gmux: Assign apple_gmux_data before registering

2015-08-12 Thread Lukas Wunner
From: Matthew Garrett Registering the handler after both GPUs will trigger a DDC switch for connector reprobing. This will oops if apple_gmux_data hasn't already been assigned. Reorder the code to do that. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861 Bugzilla: https://bugs.freedes

[PATCH v2 17/22] drm/nouveau/timer: Fall back to kernel timer if GPU timer read failed

2015-08-12 Thread Lukas Wunner
Unloading the nouveau module while the GPU is asleep (e.g. on dual GPU laptops) leads to an infinite loop in nvkm_timer_wait_eq() because the timer read out is 0x so the condition of the while loop becomes -1 - (-1) < nsec and stays like that unless the GPU is woken up. Use the ker

[Bug 73530] Asus U38N: Black screen with Radeon driver in Linux

2015-08-12 Thread bugzilla-dae...@freedesktop.org
sect what fixed it (just reverse the good/bad flagging). -- You are receiving this mail because: You are the assignee for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150812/bb4fadfc/attachment.html>

[PATCH 4/4] drm/i915: Use CPU mapping for userspace dma-buf mmap()

2015-08-12 Thread Daniel Vetter
On Tue, Aug 11, 2015 at 11:20:46PM +0100, Chris Wilson wrote: > On Tue, Aug 11, 2015 at 05:59:23PM -0300, Tiago Vignatti wrote: > > Userspace is the one in charge of flush CPU by wrapping mmap with > > begin{,end}_cpu_access. > > > > v2: Remove LLC check cause we have dma-buf sync providers now. A

[Bug 91600] WoW crashes in OpenGL mode with Mesa, but not with NVIDIA blob

2015-08-12 Thread bugzilla-dae...@freedesktop.org
for the bug. -- next part -- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20150812/be11a902/attachment.html>

[Intel-gfx] [PATCH v2 00/22] Enable gpu switching on the MacBook Pro

2015-08-12 Thread Daniel Vetter
On Tue, Aug 11, 2015 at 12:29:17PM +0200, Lukas Wunner wrote: > This is a follow-up to the v1 posted in April: > http://lists.freedesktop.org/archives/dri-devel/2015-April/081515.html > > > Patches 1 - 17 enable GPU switching on the pre-retina MacBook Pro. > These were tested successfully by mult

[PATCH 2/4] dma-buf: Add ioctls to allow userspace to flush

2015-08-12 Thread Sumit Semwal
Hi Tiago, Thanks for the patch! On 12 August 2015 at 02:29, Tiago Vignatti wrote: > From: Daniel Vetter > > FIXME: Update kerneldoc for begin/end to make it clear that those are > for mmap too. I think if we're going to add this patch upstream, atleast the FIXMEs should be fixed. > > Open: Do

[PATCH v2 06/22] vga_switcheroo: Lock/unlock DDC lines harder

2015-08-12 Thread Daniel Vetter
On Fri, Mar 27, 2015 at 12:29:40PM +0100, Lukas Wunner wrote: > Unlock DDC lines if drm_probe_ddc() fails. > > If the inactive client registers before the active client then > old_ddc_owner cannot be determined with find_active_client() > (null pointer dereference). Therefore change semantics of t

[PATCH v2 07/22] Revert "vga_switcheroo: Add helper function to get the active client"

2015-08-12 Thread Daniel Vetter
On Tue, Apr 21, 2015 at 10:39:45AM +0200, Lukas Wunner wrote: > This reverts commit 26814ce68904c9faf977c90edac798156311981f. > > The helper function is no longer needed after Dave Airlie's rewrite > of vga_switcheroo_switch_ddc(), the commit introducing it was only > included because 31f23c3d488e

[PATCH 1/8] vgaarb: Stop complaining about absent devices

2015-08-12 Thread Thierry Reding
From: Thierry Reding Some setups do not register a default VGA device, in which case the VGA arbiter will still complain about the (non-existent) PCI device being a non-VGA device. Fix this by making the error message conditional on a default VGA device having been set up. Note that the easy rou

[PATCH 2/8] vgaarb: Use vgaarb: prefix consistently in messages

2015-08-12 Thread Thierry Reding
From: Thierry Reding Define the pr_fmt() macro to causes all messages emitted by pr_*() functions to be prefixed with "vgaarb: ". Signed-off-by: Thierry Reding --- drivers/gpu/vga/vgaarb.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --g

[PATCH 3/8] vgaarb: Fix a few checkpatch errors and warnings

2015-08-12 Thread Thierry Reding
From: Thierry Reding Wrap overly long lines (offending lines were mostly comments, so trivial to fix up) and a number of other coding style issues pointed out by the checkpatch tool. Signed-off-by: Thierry Reding --- drivers/gpu/vga/vgaarb.c | 102 --

[PATCH 4/8] vga_switcheroo: Use pr_*() instead of printk()

2015-08-12 Thread Thierry Reding
From: Thierry Reding This silences a bunch of checkpatch warnings and makes the code shorter. Signed-off-by: Thierry Reding --- drivers/gpu/vga/vga_switcheroo.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/dri

[PATCH 5/8] vga_switcheroo: Cleanup header comment

2015-08-12 Thread Thierry Reding
From: Thierry Reding The header comment uses a weird combination of formatting styles. Make it consistent. Signed-off-by: Thierry Reding --- drivers/gpu/vga/vga_switcheroo.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c

[PATCH 6/8] vga_switcheroo: Use pr_fmt()

2015-08-12 Thread Thierry Reding
From: Thierry Reding Use pr_fmt() to define the "vga_switcheroo: " prefix that is prepended to all output messages emitted by pr_*() functions. This allows making existing strings much shorter and eliminates a bunch of warnings from checkpatch about lines being overly long. Signed-off-by: Thierr

[PATCH 7/8] vga_switcheroo: Wrap overly long lines

2015-08-12 Thread Thierry Reding
From: Thierry Reding Wrap overly long lines to make checkpatch happy. While at it, also add blank lines after declarations to eliminate additional problems flagged by checkpatch. Signed-off-by: Thierry Reding --- drivers/gpu/vga/vga_switcheroo.c | 33 - 1 file c

[PATCH 8/8] vga_switcheroo: Remove unnecessary checks

2015-08-12 Thread Thierry Reding
From: Thierry Reding debugfs_remove() gracefully ignores NULL parameters, so the explicit checks can be removed. Signed-off-by: Thierry Reding --- drivers/gpu/vga/vga_switcheroo.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c

[PATCH v2 1/3] drm/atomic-helper: Implement drm_atomic_helper_duplicate_state()

2015-08-12 Thread Thierry Reding
From: Thierry Reding This function can be used to duplicate an atomic state object. This is useful for example to implement suspend/resume, where the state before suspend can be saved and restored upon resume. v2: move locking to caller, be more explicit about prerequisites Signed-off-by: Thier

[PATCH v2 2/3] drm/atomic-helper: Implement subsystem-level suspend/resume

2015-08-12 Thread Thierry Reding
From: Thierry Reding Provide subsystem-level suspend and resume helpers that can be used to implement suspend/resume on atomic mode-setting enabled drivers. v2: simplify locking, enhance kerneldoc comments Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_atomic_helper.c | 141 +++

[PATCH v2 3/3] drm/tegra: Implement subsystem-level suspend/resume

2015-08-12 Thread Thierry Reding
From: Thierry Reding Use the drm_atomic_helper_suspend() and drm_atomic_helper_resume() helpers to implement subsystem-level suspend/resume. v2: suspend framebuffer device to avoid concurrency issues Signed-off-by: Thierry Reding --- drivers/gpu/drm/tegra/drm.c | 11 +++ drivers/gpu/d

[PATCH 1/2] drm/plane: Use consistent data types for format count

2015-08-12 Thread Thierry Reding
From: Thierry Reding Rather than a mix of the the sized uint32_t and signed integer, use an unsized unsigned int to specify the format count. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_crtc.c | 4 ++-- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/dr

[PATCH 2/2] drm/plane: Remove redundant extern

2015-08-12 Thread Thierry Reding
From: Thierry Reding Use of the extern keyword for function prototypes is unnecessary, so it can be removed. Signed-off-by: Thierry Reding --- include/drm/drm_plane_helper.h | 45 +- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/include

[PATCH 01/13] drm/gma500: Sanity-check pipe index

2015-08-12 Thread Thierry Reding
From: Thierry Reding If the DSI output isn't connected, then mdfld_dsi_encoder_get_pipe() will return -1. The mdfld_dsi_dp_mode_set() function doesn't properly check for this condition and causes the following compiler warnings: CC drivers/gpu/drm/gma500/mdfld_dsi_dpi.o dr

[PATCH 02/13] drm/irq: Remove negative CRTC index special-case

2015-08-12 Thread Thierry Reding
From: Thierry Reding The drm_send_vblank_event() function treats negative CRTC indices as meaning that a driver doesn't have proper VBLANK handling. This is the only place where DRM needs negative CRTC indices, so in order to enable subsequent cleanup, remove this special case and replace it by t

[PATCH 03/13] drm/bochs: Store correct CRTC index in events

2015-08-12 Thread Thierry Reding
From: Thierry Reding Previously a negative pipe caused a special case to be triggered for drivers that didn't have proper VBLANK support. The trigger for this special case is now independent of the pipe, so the correct CRTC index can now be stored in events. Cc: Gerd Hoffmann Signed-off-by: Thi

[PATCH 04/13] drm/imx: Make pipe number unsigned

2015-08-12 Thread Thierry Reding
From: Thierry Reding There's no reason whatsoever why this should ever be negative. Cc: Philipp Zabel Acked-by: Philipp Zabel Signed-off-by: Thierry Reding --- drivers/gpu/drm/imx/imx-drm-core.c | 4 ++-- drivers/gpu/drm/imx/imx-drm.h | 2 +- 2 files changed, 3 insertions(+), 3 deletion

[PATCH 05/13] drm/imx: Store correct CRTC index in events

2015-08-12 Thread Thierry Reding
From: Thierry Reding A negative pipe causes a special case to be triggered for drivers that don't have proper VBLANK support. i.MX does support VBLANKs, so there is no need for the fallback code. Cc: Philipp Zabel Acked-by: Philipp Zabel Signed-off-by: Thierry Reding --- drivers/gpu/drm/imx/

[PATCH 06/13] drm/rockchip: Store correct CRTC index in events

2015-08-12 Thread Thierry Reding
From: Thierry Reding A negative pipe causes a special case to be triggered for drivers that don't have proper VBLANK support. Rockchip does support VBLANKs, so there is no need for the fallback code. Cc: Mark Yao Signed-off-by: Thierry Reding --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c |

[PATCH 07/13] drm/sti: Store correct CRTC index in events

2015-08-12 Thread Thierry Reding
From: Thierry Reding A negative pipe causes a special case to be triggered for drivers that don't have proper VBLANK support. STi does support VBLANKs, so there is no need for the fallback code. Cc: Benjamin Gaignard Signed-off-by: Thierry Reding --- drivers/gpu/drm/sti/sti_drm_crtc.c | 2 +-

[PATCH 08/13] drm/irq: Check for valid VBLANK before dereference

2015-08-12 Thread Thierry Reding
From: Thierry Reding When accessing the array of per-CRTC VBLANK structures we must always check that the index into the array is valid before dereferencing to avoid crashing. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_irq.c | 10 -- 1 file changed, 8 insertions(+), 2 deleti

[PATCH 09/13] drm/irq: Make pipe unsigned and name consistent

2015-08-12 Thread Thierry Reding
From: Thierry Reding Name all references to the pipe number (CRTC index) consistently to make it easier to distinguish which is a pipe number and which is a pointer to struct drm_crtc. While at it also make all references to the pipe number unsigned because there is no longer any reason why it s

[PATCH 10/13] drm/irq: Add drm_crtc_vblank_count_and_time()

2015-08-12 Thread Thierry Reding
From: Thierry Reding This function is the KMS native variant of drm_vblank_count_and_time(). It takes a struct drm_crtc * instead of a struct drm_device * and an index of the CRTC. Eventually the goal is to access vblank data through the CRTC only so that the per-CRTC data can be moved to struct

[PATCH 11/13] drm/irq: Document return values more consistently

2015-08-12 Thread Thierry Reding
From: Thierry Reding Some of the functions are documented inconsistently. Add Returns: sections where missing and use consistent style to describe the return value. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_irq.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --

[PATCH 12/13] drm/armada: Use drm_crtc_vblank_*() API

2015-08-12 Thread Thierry Reding
From: Thierry Reding Non-legacy drivers should only use this API to allow per-CRTC data to be eventually moved into struct drm_crtc. Cc: Russell King Signed-off-by: Thierry Reding --- drivers/gpu/drm/armada/armada_crtc.c | 17 - drivers/gpu/drm/armada/armada_drv.c | 4 ++--

[PATCH 13/13] drm/atomic: Use KMS VBLANK API

2015-08-12 Thread Thierry Reding
From: Thierry Reding Instead of using the legacy VBLANK API, use the new KMS API. This is part of an effort to convert all existing users so that the KMS API can be changed to properly use per-CRTC data. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file cha

[PATCH v2 1/3] drm/atomic-helper: Implement drm_atomic_helper_duplicate_state()

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 04:37:28PM +0200, Thierry Reding wrote: > From: Thierry Reding > > This function can be used to duplicate an atomic state object. This is > useful for example to implement suspend/resume, where the state before > suspend can be saved and restored upon resume. > > v2: move

[PATCH v2 2/3] drm/atomic-helper: Implement subsystem-level suspend/resume

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 04:37:29PM +0200, Thierry Reding wrote: > From: Thierry Reding > > Provide subsystem-level suspend and resume helpers that can be used to > implement suspend/resume on atomic mode-setting enabled drivers. > > v2: simplify locking, enhance kerneldoc comments > > Signed-of

[RFC 01/13] drm/dp: Read fast training capability from link

2015-08-12 Thread Thierry Reding
From: Thierry Reding While probing the DisplayPort link, query the fast training capability. If supported, drivers can use the fast link training sequence instead of the more involved full link training sequence. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 5 - incl

[RFC 02/13] drm/dp: Set channel coding on link configuration

2015-08-12 Thread Thierry Reding
From: Thierry Reding Make use of ANSI 8B/10B channel coding if the DisplayPort sink supports it. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 16 ++-- include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dri

[RFC 03/13] drm/dp: Read TPS3 capability from sink

2015-08-12 Thread Thierry Reding
From: Thierry Reding The TPS3 capability can be exposed by DP 1.2 and later sinks if they support the alternative training pattern for channel equalization. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 4 include/drm/drm_dp_helper.h | 1 + 2 files changed, 5 ins

[RFC 04/13] drm/dp: Enhanced framing capability is DP 1.1+

2015-08-12 Thread Thierry Reding
From: Thierry Reding The enhanced framing capability was added in DisplayPort 1.1, so any code dealing with it needs to be protected accordingly. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/g

[RFC 05/13] drm/dp: Fast link training is DP 1.1+

2015-08-12 Thread Thierry Reding
From: Thierry Reding The capability to train the link without the AUX CH handshake was introduced in DisplayPort 1.1, so it must be guarded accordingly. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dr

[RFC 06/13] drm/dp: Read eDP version from DPCD

2015-08-12 Thread Thierry Reding
From: Thierry Reding If the sink support eDP, read the eDP revision from it's DPCD. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 30 +- include/drm/drm_dp_helper.h | 1 + 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/driv

[RFC 07/13] drm/dp: Read AUX read interval from DPCD

2015-08-12 Thread Thierry Reding
From: Thierry Reding Store the AUX read interval from DPCD, so that it can be used to wait for the durations given in the specification during link training. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 3 +++ include/drm/drm_dp_helper.h | 1 + 2 files changed, 4 ins

[RFC 08/13] drm/dp: Add helper to get post-cursor adjustments

2015-08-12 Thread Thierry Reding
From: Thierry Reding If the transmitter supports pre-emphasis post cursor2 the sink will request adjustments in a similar way to how it requests adjustments to the voltage swing and pre-emphasis settings. Add a helper to extract these adjustments on a per-lane basis from the DPCD link status. S

[RFC 09/13] drm/dp: Enable alternate scrambler when supported

2015-08-12 Thread Thierry Reding
From: Thierry Reding If the sink is eDP and supports the alternate scrambler reset, enable it. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 9 + include/drm/drm_dp_helper.h | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_helper.c

[RFC 10/13] drm/dp: Add link training helper

2015-08-12 Thread Thierry Reding
From: Thierry Reding Add a helper that will perform link training as described in the DisplayPort specification. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 476 +++- include/drm/drm_dp_helper.h | 49 + 2 files changed, 524 i

[RFC 11/13] drm/dp: Add helper to dump DPCD

2015-08-12 Thread Thierry Reding
From: Thierry Reding The new drm_dp_dpcd_dump() helper dumps the contents of a DPCD to a seq_file and can be used to make the DPCD available via debugfs for example. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 146 include/drm/dr

[RFC 12/13] drm/dp: link: Track capabilities alongside settings

2015-08-12 Thread Thierry Reding
From: Thierry Reding Store capabilities in max_* fields and add separate fields for the currently selected settings. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c| 35 +-- drivers/gpu/drm/msm/edp/edp_ctrl.c | 6 +++--- drivers/gpu/drm/te

[RFC 13/13] drm/dp: Add drm_dp_link_choose() helper

2015-08-12 Thread Thierry Reding
From: Thierry Reding This helper chooses an appropriate configuration, according to the bitrate requirements of the video mode and the capabilities of the DisplayPort sink. Signed-off-by: Thierry Reding --- drivers/gpu/drm/drm_dp_helper.c | 54 + include

[PATCH v2 3/3] drm/tegra: Implement subsystem-level suspend/resume

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 04:37:30PM +0200, Thierry Reding wrote: > From: Thierry Reding > > Use the drm_atomic_helper_suspend() and drm_atomic_helper_resume() > helpers to implement subsystem-level suspend/resume. > > v2: suspend framebuffer device to avoid concurrency issues > > Signed-off-by:

[PATCH 1/2] drm/tegra: dsi: Properly set num_lanes in .transfer()

2015-08-12 Thread Sean Paul
According to TRM, DSI_NUM_DATA_LANES only applies for HS transactions, so set it to the proper number of lanes. Signed-off-by: Sean Paul --- drivers/gpu/drm/tegra/dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c i

[PATCH 2/2] drm: mipi: Add software-calculated ECC & CRC flags

2015-08-12 Thread Sean Paul
Allow ECC and CRC for a packet to be calculated in software. Signed-off-by: Sean Paul --- drivers/gpu/drm/drm_mipi_dsi.c | 56 -- include/drm/drm_mipi_dsi.h | 6 + 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm

[PATCH 1/8] vgaarb: Stop complaining about absent devices

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 04:32:05PM +0200, Thierry Reding wrote: > From: Thierry Reding > > Some setups do not register a default VGA device, in which case the VGA > arbiter will still complain about the (non-existent) PCI device being a > non-VGA device. > > Fix this by making the error message

[PATCH 2/2] drm/plane: Remove redundant extern

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 04:54:29PM +0200, Thierry Reding wrote: > From: Thierry Reding > > Use of the extern keyword for function prototypes is unnecessary, so it > can be removed. > > Signed-off-by: Thierry Reding Applied both patches to drm-misc. -Daniel > --- > include/drm/drm_plane_helpe

[PATCH 04/13] drm/imx: Make pipe number unsigned

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 05:00:26PM +0200, Thierry Reding wrote: > From: Thierry Reding > > There's no reason whatsoever why this should ever be negative. > > Cc: Philipp Zabel > Acked-by: Philipp Zabel > Signed-off-by: Thierry Reding Just kill it and replace with drm_crtc_index. Using that f

[PATCH 07/13] drm/sti: Store correct CRTC index in events

2015-08-12 Thread Benjamin Gaignard
The fix look good however it enter in conflict with the large rework we have done to support atomic. The pull request for this has been send. Would it be ok for you if we include your patch in the your next series of patches ? Benjamin 2015-08-12 17:00 GMT+02:00 Thierry Reding : > From: Thierry R

[PATCH 03/13] drm/bochs: Store correct CRTC index in events

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 05:00:25PM +0200, Thierry Reding wrote: > From: Thierry Reding > > Previously a negative pipe caused a special case to be triggered for > drivers that didn't have proper VBLANK support. The trigger for this > special case is now independent of the pipe, so the correct CRTC

[PATCH 02/13] drm/irq: Remove negative CRTC index special-case

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 05:00:24PM +0200, Thierry Reding wrote: > From: Thierry Reding > > The drm_send_vblank_event() function treats negative CRTC indices as > meaning that a driver doesn't have proper VBLANK handling. This is the > only place where DRM needs negative CRTC indices, so in order

[PATCH 09/13] drm/irq: Make pipe unsigned and name consistent

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 05:00:31PM +0200, Thierry Reding wrote: > From: Thierry Reding > > Name all references to the pipe number (CRTC index) consistently to make > it easier to distinguish which is a pipe number and which is a pointer > to struct drm_crtc. > > While at it also make all referen

[PATCH 10/13] drm/irq: Add drm_crtc_vblank_count_and_time()

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 05:00:32PM +0200, Thierry Reding wrote: > From: Thierry Reding > > This function is the KMS native variant of drm_vblank_count_and_time(). > It takes a struct drm_crtc * instead of a struct drm_device * and an > index of the CRTC. > > Eventually the goal is to access vbla

[PATCH 08/13] drm/irq: Check for valid VBLANK before dereference

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 05:00:30PM +0200, Thierry Reding wrote: > From: Thierry Reding > > When accessing the array of per-CRTC VBLANK structures we must always > check that the index into the array is valid before dereferencing to > avoid crashing. > > Signed-off-by: Thierry Reding This misse

[PATCH 13/13] drm/atomic: Use KMS VBLANK API

2015-08-12 Thread Daniel Vetter
On Wed, Aug 12, 2015 at 05:00:35PM +0200, Thierry Reding wrote: > From: Thierry Reding > > Instead of using the legacy VBLANK API, use the new KMS API. This is > part of an effort to convert all existing users so that the KMS API can > be changed to properly use per-CRTC data. > > Signed-off-by:

  1   2   >