linux-2.6-block.git
8 years agodrm/msm: update generated headers
Rob Clark [Thu, 22 Oct 2015 16:36:57 +0000 (12:36 -0400)]
drm/msm: update generated headers

Signed-off-by: Rob Clark <robdclark@gmail.com>
8 years agoMerge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next
Dave Airlie [Thu, 22 Oct 2015 00:31:43 +0000 (10:31 +1000)]
Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next

rcar-du support for r8a7793/4
* 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev:
  drm: rcar-du: Add support for the R8A7794 DU
  drm: rcar-du: Add support for the R8A7793 DU

8 years agoMerge tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux into drm-next
Dave Airlie [Thu, 22 Oct 2015 00:23:31 +0000 (10:23 +1000)]
Merge tag 'drm-vc4-next-2015-10-21' of github.com/anholt/linux into drm-next

This pull request introduces the vc4 driver, for kernel modesetting on
the Raspberry Pi (bcm2835/bcm2836 architectures).  It currently
supports a display plane and cursor on the HDMI output.  The driver
doesn't do 3D, power management, or overlay planes yet.

[airlied: fixup the enable/disable vblank APIs]

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux:
  drm/vc4: Allow vblank to be disabled
  drm/vc4: Use the fbdev_cma helpers
  drm/vc4: Add KMS support for Raspberry Pi.
  drm/vc4: Add devicetree bindings for VC4.

8 years agodrm/amdgpu: change VM size default to 64GB
Christian König [Thu, 15 Oct 2015 15:34:20 +0000 (17:34 +0200)]
drm/amdgpu: change VM size default to 64GB

That's still small enough to not waste to much memory on PD/PTs.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add Stoney pci ids
Samuel Li [Thu, 8 Oct 2015 20:32:03 +0000 (16:32 -0400)]
drm/amdgpu: add Stoney pci ids

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: update the core VI support for Stoney
Samuel Li [Thu, 8 Oct 2015 20:31:43 +0000 (16:31 -0400)]
drm/amdgpu: update the core VI support for Stoney

Add core VI enablement for Stoney.

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add VCE support for Stoney (v2)
Samuel Li [Thu, 8 Oct 2015 20:27:55 +0000 (16:27 -0400)]
drm/amdgpu: add VCE support for Stoney (v2)

Stoney is VCE 3.x single.

v2: Stoney is single pipe like Fiji

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add UVD support for Stoney
Samuel Li [Thu, 8 Oct 2015 20:27:21 +0000 (16:27 -0400)]
drm/amdgpu: add UVD support for Stoney

Stoney is UVD 6.x.

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add GFX support for Stoney (v2)
Samuel Li [Thu, 8 Oct 2015 20:29:40 +0000 (16:29 -0400)]
drm/amdgpu: add GFX support for Stoney (v2)

Stoney is GFX 8.1.

v2: update to latest golden settings

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add SDMA support for Stoney (v2)
Samuel Li [Thu, 8 Oct 2015 21:17:51 +0000 (17:17 -0400)]
drm/amdgpu: add SDMA support for Stoney (v2)

Stoney is SDMA 3.x.

v2: update to latest golden register settings

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add DCE support for Stoney
Samuel Li [Thu, 8 Oct 2015 20:29:06 +0000 (16:29 -0400)]
drm/amdgpu: add DCE support for Stoney

Stoney is DCE 11.x.

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: Update SMC/DPM for Stoney
Samuel Li [Thu, 8 Oct 2015 20:28:41 +0000 (16:28 -0400)]
drm/amdgpu: Update SMC/DPM for Stoney

Stoney is SMC 8.x.

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add GMC support for Stoney
Samuel Li [Thu, 8 Oct 2015 20:26:41 +0000 (16:26 -0400)]
drm/amdgpu: add GMC support for Stoney

Stoney is GMC 8.x.

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/amdgpu: add Stoney chip family
Samuel Li [Thu, 8 Oct 2015 18:50:27 +0000 (14:50 -0400)]
drm/amdgpu: add Stoney chip family

Stoney is based on Carrizo with some IP upgrades.

Signed-off-by: Samuel Li <samuel.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm: rcar-du: Add support for the R8A7794 DU
Laurent Pinchart [Fri, 17 Jul 2015 07:44:33 +0000 (10:44 +0300)]
drm: rcar-du: Add support for the R8A7794 DU

The R8A7794 DU has a fixed output routing configuration with one RGB
output per CRTC and thus lacks the RGB output routing register field.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
8 years agodrm: rcar-du: Add support for the R8A7793 DU
Laurent Pinchart [Fri, 17 Jul 2015 07:44:33 +0000 (10:44 +0300)]
drm: rcar-du: Add support for the R8A7793 DU

The R8A7793 DU is identical to the R8A7791 and thus only requires a new
DT compatible string.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
8 years agodrm/amdgpu: fix the broken vm->mutex V2
Chunming Zhou [Fri, 16 Oct 2015 06:06:19 +0000 (14:06 +0800)]
drm/amdgpu: fix the broken vm->mutex V2

fix the vm->mutex and ww_mutex confilcts.
vm->mutex is always token first, then ww_mutex.

V2: remove unneccessary checking for pt bo.

Change-Id: Iea56e183752c02831126d06d2f5b7a474a6e4743
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: remove the unnecessary parameter adev for amdgpu_fence_wait_any()
Junwei Zhang [Sun, 6 Sep 2015 05:55:03 +0000 (13:55 +0800)]
drm/amdgpu: remove the unnecessary parameter adev for amdgpu_fence_wait_any()

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: remove the exclusive lock
Christian König [Tue, 1 Sep 2015 13:13:53 +0000 (15:13 +0200)]
drm/amdgpu: remove the exclusive lock

Finally getting rid of it.

Signed-off-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: remove old lockup detection infrastructure
Christian König [Tue, 1 Sep 2015 08:50:26 +0000 (10:50 +0200)]
drm/amdgpu: remove old lockup detection infrastructure

It didn't worked to well anyway.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
8 years agodrm: fix trivial typos
Geliang Tang [Sun, 18 Oct 2015 15:29:48 +0000 (23:29 +0800)]
drm: fix trivial typos

s/regsiter/register/

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/vc4: Allow vblank to be disabled
Derek Foreman [Thu, 2 Jul 2015 16:20:21 +0000 (11:20 -0500)]
drm/vc4: Allow vblank to be disabled

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agodrm/vc4: Use the fbdev_cma helpers
Derek Foreman [Thu, 2 Jul 2015 16:19:54 +0000 (11:19 -0500)]
drm/vc4: Use the fbdev_cma helpers

Keep the fbdev_cma pointer around so we can use it on hotplog and close
to ensure the frame buffer console is in a useful state.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agodrm/vc4: Add KMS support for Raspberry Pi.
Eric Anholt [Mon, 2 Mar 2015 21:01:12 +0000 (13:01 -0800)]
drm/vc4: Add KMS support for Raspberry Pi.

This is enough for fbcon and bringing up X using
xf86-video-modesetting.  It doesn't support the 3D accelerator or
power management yet.

v2: Drop FB_HELPER select thanks to Archit's patches.  Do manual init
    ordering instead of using the .load hook.  Structure registration
    more like tegra's, but still using the typical "component" code.
    Drop no-op hooks for atomic_begin and mode_fixup() now that
    they're optional.  Drop sentinel in Makefile.  Fix minor style
    nits I noticed on another reread.

v3: Use the new bcm2835 clk driver to manage pixel/HSM clocks instead
    of having a fixed video mode.  Use exynos-style component driver
    matching instead of devicetree nodes to list the component driver
    instances.  Rename compatibility strings to say bcm2835, and
    distinguish pv0/1/2.  Clean up some h/vsync code, and add in
    interlaced mode setup.  Fix up probe/bind error paths.  Use
    bitops.h macros for vc4_regs.h

v4: Include i2c.h, allow building under COMPILE_TEST, drop msleep now
    that other bugs have been fixed, add timeouts to cpu_relax()
    loops, rename hpd-gpio to hpd-gpios.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/vc4: Add devicetree bindings for VC4.
Eric Anholt [Tue, 11 Aug 2015 20:17:11 +0000 (13:17 -0700)]
drm/vc4: Add devicetree bindings for VC4.

VC4 is the GPU (display and 3D) subsystem present on the 2835 and some
other Broadcom SoCs.

This binding follows the model of msm, imx, sti, and others, where
there is a subsystem node for the whole GPU, with nodes for the
individual HW components within it.

v2: Extend the commit message, fix several nits from Stephen Warren.
v3: Rename the compatibility strings, clean up node names, drop the
    unnecessary lists of components.  Use compatibility strings for
    choosing CRTC HVS channel numbers.  Document the HDMI clock usage.
v4: Whitespace fix, expand acronyms, move to display/ instead of gpu/,
    rename "hpd-gpio" to "hpd-gpios".

Signed-off-by: Eric Anholt <eric@anholt.net>
8 years agodrm: correctly check failed allocation
Insu Yun [Mon, 19 Oct 2015 16:33:30 +0000 (16:33 +0000)]
drm: correctly check failed allocation

drm_property_create_range can be failed in memory pressure
Therefore, check return value and handle an error

Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agovga_switcheroo: Constify vga_switcheroo_handler
Lukas Wunner [Sun, 18 Oct 2015 11:05:40 +0000 (13:05 +0200)]
vga_switcheroo: Constify vga_switcheroo_handler

vga_switcheroo_client_ops has always been declared const since its
introduction with 26ec685ff9d9 ("vga_switcheroo: Introduce struct
vga_switcheroo_client_ops").

Do so for vga_switcheroo_handler as well.

 drivers/gpu/drm/amd/amdgpu/amdgpu.ko:
   6 .rodata       00009888
- 19 .data         00001f00
+ 19 .data         00001ee0
 drivers/gpu/drm/nouveau/nouveau.ko:
   6 .rodata       000460b8
  17 .data         00018fe0
 drivers/gpu/drm/radeon/radeon.ko:
-  7 .rodata       00030944
+  7 .rodata       00030964
- 21 .data         0000d6a0
+ 21 .data         0000d678
 drivers/platform/x86/apple-gmux.ko:
-  7 .rodata       00000140
+  7 .rodata       00000160
- 11 .data         000000e0
+ 11 .data         000000b8

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Christian König <christian.koenig@amd.com>.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/armada: Convert the probe function to the generic drm_of_component_probe()
Liviu Dudau [Tue, 20 Oct 2015 09:23:15 +0000 (10:23 +0100)]
drm/armada: Convert the probe function to the generic drm_of_component_probe()

The armada DRM driver keeps some old platform data compatibility in the
probe function that makes moving to the generic drm_of_component_probe()
a bit more complicated that it should. Refactor the probe function to do
the platform_data processing after the generic probe (and only if that
fails). This way future cleanup can further remove support for it.

Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1445332995-11212-5-git-send-email-Liviu.Dudau@arm.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/rockchip: Convert the probe function to the generic drm_of_component_probe()
Liviu Dudau [Tue, 20 Oct 2015 09:23:14 +0000 (10:23 +0100)]
drm/rockchip: Convert the probe function to the generic drm_of_component_probe()

Use the generic drm_of_component_probe() function to probe for components.

Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1445332995-11212-4-git-send-email-Liviu.Dudau@arm.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/imx: Convert the probe function to the generic drm_of_component_probe()
Liviu Dudau [Tue, 20 Oct 2015 09:23:13 +0000 (10:23 +0100)]
drm/imx: Convert the probe function to the generic drm_of_component_probe()

The generic function is functionally equivalent to the driver's
imx_drm_platform_probe(). Use the generic function and reduce the
overall code size.

Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1445332995-11212-3-git-send-email-Liviu.Dudau@arm.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Introduce generic probe function for component based masters.
Liviu Dudau [Tue, 20 Oct 2015 09:23:12 +0000 (10:23 +0100)]
drm: Introduce generic probe function for component based masters.

A lot of component based DRM drivers use a variant of the same code
as the probe function. They bind the crtc ports in the first iteration
and then scan through the child nodes and bind the encoders attached
to the remote endpoints. Factor the common code into a separate
function called drm_of_component_probe() in order to increase code
reuse.

Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1445332995-11212-2-git-send-email-Liviu.Dudau@arm.com
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/edid: Round to closest when computing the CEA/HDMI alternate clock
Ville Syrjälä [Thu, 8 Oct 2015 08:43:33 +0000 (11:43 +0300)]
drm/edid: Round to closest when computing the CEA/HDMI alternate clock

Rounding to the closest kHz seems like the better option that round
down or up when computing the alternate clock for CEA/HDMI modes.
It'll give us a slightly more accurate clock in some cases.

Not sure why I went for the down+up approach originally. Perhaps
I was thinking we can go back and forth betwen the two frequencies
without introducing errors, but round to closest still maintains
that property.

Cc: Adam Jackson <ajax@redhat.com>
Cc: Clint Taylor <clinton.a.taylor@intel.com>
Cc: Libin Yang <libin.yang@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/edid: Fix up clock for CEA/HDMI modes specified via detailed timings
Ville Syrjälä [Thu, 8 Oct 2015 08:43:32 +0000 (11:43 +0300)]
drm/edid: Fix up clock for CEA/HDMI modes specified via detailed timings

EDID detailed timings have a resolution of 10kHz for the pixel clock, so
they can't represent certain CEA/HDMI modes accurately. If we see a mode
coming in via detailed timings which otherwise matches one of the
CEA/HDMI modes except the clock is just a bit off, let's assume that the
intention was for that mode to be one of the CEA/HDMI modes and go ahead
and fix up the clock to match the CEA/HDMI spec exactly (well, as close
as we can get with the 1 kHz resolution we use).

This should help code that's looking for an exact clock match (eg. i915
audio N/CTS setup).

Cc: Adam Jackson <ajax@redhat.com>
Cc: Clint Taylor <clinton.a.taylor@intel.com>
Cc: Libin Yang <libin.yang@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agoMerge tag 'topic/drm-misc-2015-10-19' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Mon, 19 Oct 2015 23:01:49 +0000 (09:01 +1000)]
Merge tag 'topic/drm-misc-2015-10-19' of git://anongit.freedesktop.org/drm-intel into drm-next

More drm-misc for 4.4.
- fb refcount fix in atomic fbdev
- various locking reworks to reduce drm_global_mutex and dev->struct_mutex
- rename docbook to gpu.tmpl and include vga_switcheroo stuff, plus more
  vga_switcheroo (Lukas Wunner)
- viewport check fixes for atomic drivers from Ville
- DRM_DEBUG_VBL from Ville
- non-contentious header fixes from Mikko Rapeli
- small things all over

* tag 'topic/drm-misc-2015-10-19' of git://anongit.freedesktop.org/drm-intel: (31 commits)
  drm/fb-helper: Fix fb refcounting in pan_display_atomic
  drm/fb-helper: Set plane rotation directly
  drm: fix mutex leak in drm_dp_get_mst_branch_device
  drm: Check plane src coordinates correctly during page flip for atomic drivers
  drm: Check crtc viewport correctly with rotated primary plane on atomic drivers
  drm: Refactor plane src coordinate checks
  drm: Swap w/h when converting the mode to src coordidates for a rotated primary plane
  drm: Don't leak fb when plane crtc coodinates are bad
  ALSA: hda - Spell vga_switcheroo consistently
  drm/gem: Use kref_get_unless_zero for the weak mmap references
  drm/vgem: Drop vgem_drm_gem_mmap
  drm: Fix return value of drm_framebuffer_init()
  drm/gem: Use container_of in drm_gem_object_free
  drm/gem: Check locking in drm_gem_object_unreference
  drm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj
  drm/i810_drm.h: include drm/drm.h
  r128_drm.h: include drm/drm.h
  savage_drm.h: include <drm/drm.h>
  gpu/doc: Convert to markdown harder
  gpu/doc: Add vga_switcheroo documentation
  ...

8 years agoMerge tag 'drm-intel-next-2015-10-10' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Mon, 19 Oct 2015 23:00:01 +0000 (09:00 +1000)]
Merge tag 'drm-intel-next-2015-10-10' of git://anongit.freedesktop.org/drm-intel into drm-next

- dmc fixes from Animesh (not yet all) for deeper sleep states
- piles of prep patches from Ville to make mmio functions type-safe
- more fbc work from Paulo all over
- w/a shuffling from Arun Siluvery
- first part of atomic watermark updates from Matt and Ville (later parts had to
  be dropped again unfortunately)
- lots of patches to prepare bxt dsi support ( Shashank Sharma)
- userptr fixes from Chris
- audio rate interface between i915/snd_hda plus kerneldoc (Libin Yang)
- shrinker improvements and fixes (Chris Wilson)
- lots and lots of small patches all over

* tag 'drm-intel-next-2015-10-10' of git://anongit.freedesktop.org/drm-intel: (134 commits)
  drm/i915: Update DRIVER_DATE to 20151010
  drm/i915: Partial revert of atomic watermark series
  drm/i915: Early exit from semaphore_waits_for for execlist mode.
  drm/i915: Remove wrong warning from i915_gem_context_clean
  drm/i915: Determine the stolen memory base address on gen2
  drm/i915: fix FBC buffer size checks
  drm/i915: fix CFB size calculation
  drm/i915: remove pre-atomic check from SKL update_primary_plane
  drm/i915: don't allocate fbcon from stolen memory if it's too big
  Revert "drm/i915: Call encoder hotplug for init and resume cases"
  Revert "drm/i915: Add hot_plug hook for hdmi encoder"
  drm/i915: use error path
  drm/i915/irq: Fix misspelled word register in kernel-doc
  drm/i915/irq: Fix kernel-doc warnings
  drm/i915: Hook up ring workaround writes at context creation time on Gen6-7.
  drm/i915: Don't warn if the workaround list is empty.
  drm/i915: Resurrect golden context on gen6/7
  drm/i915/chv: remove pre-production hardware workarounds
  drm/i915/snb: remove pre-production hardware workaround
  drm/i915/bxt: Set time interval unit to 0.833us
  ...

8 years agoMerge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next
Dave Airlie [Mon, 19 Oct 2015 22:58:45 +0000 (08:58 +1000)]
Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next

some rcar fixes.

* 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev:
  drm: rcar-du: Fix plane state free in plane reset handler
  drm: rcar-du: Enable DU0 to DPAD connection on R8A7791
  drm: rcar-du: Add dependency on OF
  drm: rcar-du: Remove obsolete rcar-du-r8a779x platform_device_id entries

8 years agodrm: rcar-du: Fix plane state free in plane reset handler
Laurent Pinchart [Mon, 27 Jul 2015 08:42:54 +0000 (11:42 +0300)]
drm: rcar-du: Fix plane state free in plane reset handler

The plane reset handler frees the plane state and allocates a new
default state, but when doing so attempt to free the plane state using
the base plane state pointer instead of casting it to the
driver-specific state object that has been allocated. Fix it by using
the rcar_du_plane_atomic_destroy_state() function to destroy the plane
state instead of duplicating the code.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
8 years agodrm: rcar-du: Enable DU0 to DPAD connection on R8A7791
Laurent Pinchart [Tue, 28 Apr 2015 12:26:33 +0000 (15:26 +0300)]
drm: rcar-du: Enable DU0 to DPAD connection on R8A7791

The DPAD RGB output can be driven by both DU0 and DU1 on R8A7791. Mark
the DU0 connection as possible.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
8 years agodrm: rcar-du: Add dependency on OF
Laurent Pinchart [Thu, 16 Jul 2015 08:42:37 +0000 (11:42 +0300)]
drm: rcar-du: Add dependency on OF

The driver requires OF support, add a dependency in Kconfig and remove
the platform_device_id table that isn't used anymore.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 years agodrm: rcar-du: Remove obsolete rcar-du-r8a779x platform_device_id entries
Geert Uytterhoeven [Tue, 23 Jun 2015 12:58:52 +0000 (14:58 +0200)]
drm: rcar-du: Remove obsolete rcar-du-r8a779x platform_device_id entries

Since commit a483dcbfa21f919c ("ARM: shmobile: lager: Remove legacy
board support"), R-Car Gen2 SoCs are only supported in generic DT-only
ARM multi-platform builds.  The driver doesn't need to match platform
devices by name anymore, hence remove the corresponding
platform_device_id entry.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
8 years agodrm/amdgpu/dce: simplify suspend/resume
Alex Deucher [Thu, 15 Oct 2015 20:53:27 +0000 (16:53 -0400)]
drm/amdgpu/dce: simplify suspend/resume

We were basically opencoding the same thing in both
hw_init and resume and hw_fini and suspend.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/i915: Use round to closest when computing the CEA 1.001 pixel clocks
Ville Syrjälä [Thu, 8 Oct 2015 08:43:34 +0000 (11:43 +0300)]
drm/i915: Use round to closest when computing the CEA 1.001 pixel clocks

drm_edid.c now computes the alternate CEA clocks using
DIV_ROUND_CLOSEST(), so follow suit in the N/CTS setup to make sure we
pick the right setting for the mode.

Unfortunately we can't actually use DIV_ROUND_CLOSEST() here due to the
({}) construct used, so just stick in raw numbers instead.

Cc: Clint Taylor <clinton.a.taylor@intel.com>
Cc: Libin Yang <libin.yang@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/amdgpu/gfx8: set TC_WB_ACTION_EN in RELEASE_MEM packet
Alex Deucher [Thu, 15 Oct 2015 22:20:45 +0000 (18:20 -0400)]
drm/amdgpu/gfx8: set TC_WB_ACTION_EN in RELEASE_MEM packet

This is the recommended setting from the hw team for newer
versions of the firmware.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
8 years agodrm/fb-helper: Fix fb refcounting in pan_display_atomic
Daniel Vetter [Fri, 16 Oct 2015 17:11:30 +0000 (19:11 +0200)]
drm/fb-helper: Fix fb refcounting in pan_display_atomic

In

commit bbb1e52402b2a288b09ae37e8182599931c7e9df
Author: Rob Clark <robdclark@gmail.com>
Date:   Tue Aug 25 15:35:58 2015 -0400

    drm/fb-helper: atomic restore_fbdev_mode()..

we've forgotten to do the plane->old_fb refcount dance for
pan_display_atomic, which can result in refcount leaks if the current
configuration is not from fbcon. Which apparently can happen when
vt-switching - fbcon does a pan first before a set_par.

OCD-align function parameters while at it.

v2: Actually git add the OCD.

Cc: Rob Clark <robdclark@gmail.com>
Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92483
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1445015490-27682-1-git-send-email-daniel.vetter@ffwll.ch
Tested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/fb-helper: Set plane rotation directly
Daniel Vetter [Fri, 16 Oct 2015 16:23:13 +0000 (18:23 +0200)]
drm/fb-helper: Set plane rotation directly

The point behind standardizing properties into core drm state
structures is also that internal code looks prettiers. Take advantage
of that and set rotation directly in the fbdev atomic code.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1445012594-25988-1-git-send-email-daniel.vetter@ffwll.ch
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: fix mutex leak in drm_dp_get_mst_branch_device
Adam Richter [Fri, 16 Oct 2015 10:33:02 +0000 (03:33 -0700)]
drm: fix mutex leak in drm_dp_get_mst_branch_device

In Linux 4.3-rc5, there is an error case in drm_dp_get_branch_device
that returns without releasing mgr->lock, resulting a spew of kernel
messages about a kernel work function possibly having leaked a mutex
and presumably more serious adverse consequences later.  This patch
changes the error to "goto out" to unlock the mutex before returning.

Signed-off-by: Adam J. Richter <adam_richter2004@yahoo.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Check plane src coordinates correctly during page flip for atomic drivers
Ville Syrjälä [Thu, 15 Oct 2015 17:40:02 +0000 (20:40 +0300)]
drm: Check plane src coordinates correctly during page flip for atomic drivers

Instead of relying on the old crtc-{x,y,mode} gunk, dig out the primary
plane coordinates from the plane state when checking them against the
new framebuffer during page flip.

Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1444930802-8515-5-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Check crtc viewport correctly with rotated primary plane on atomic drivers
Ville Syrjälä [Fri, 16 Oct 2015 15:38:39 +0000 (18:38 +0300)]
drm: Check crtc viewport correctly with rotated primary plane on atomic drivers

On atomic drivers we can dig out the primary plane rotation from the
plane state instead of looking at the legacy crtc->invert_dimensions
flag. The flag is not set by anyone except omapdrm, and it would be
racy to set it the same way in the atomic helpers.

v2: Kill crtc->invert_dimensions totally since omap is state based
    already and no one else ever used it (Matt)

Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1445009919-22746-1-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Refactor plane src coordinate checks
Ville Syrjälä [Thu, 15 Oct 2015 17:40:00 +0000 (20:40 +0300)]
drm: Refactor plane src coordinate checks

Pull the plane src coordinate checks into a separate function so that we
can share them for the legacy and new stuff.

Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1444930802-8515-3-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Swap w/h when converting the mode to src coordidates for a rotated primary plane
Ville Syrjälä [Thu, 15 Oct 2015 17:39:59 +0000 (20:39 +0300)]
drm: Swap w/h when converting the mode to src coordidates for a rotated primary plane

When converting the mode hdisplay/vdisplay to primary plane src
coordinates we need to take into account the current plane
rotation.

Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1444930802-8515-2-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Don't leak fb when plane crtc coodinates are bad
Ville Syrjälä [Thu, 15 Oct 2015 17:39:58 +0000 (20:39 +0300)]
drm: Don't leak fb when plane crtc coodinates are bad

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agoALSA: hda - Spell vga_switcheroo consistently
Lukas Wunner [Fri, 4 Sep 2015 18:49:36 +0000 (20:49 +0200)]
ALSA: hda - Spell vga_switcheroo consistently

Currently everyone and their dog has their own favourite spelling
for vga_switcheroo. This makes it hard to grep dmesg for log entries
relating to vga_switcheroo. It also makes it hard to find related
source files in the tree.

vga_switcheroo.c uses pr_fmt "vga_switcheroo". Use that everywhere.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/9b0175319ce78d831acfcf11e4c6c760f826b0e3.1444663039.git.lukas@wunner.de
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/gem: Use kref_get_unless_zero for the weak mmap references
Daniel Vetter [Thu, 15 Oct 2015 09:33:43 +0000 (11:33 +0200)]
drm/gem: Use kref_get_unless_zero for the weak mmap references

Compared to wrapping the final kref_put with dev->struct_mutex this
allows us to only acquire the offset manager look both in the final
cleanup and in the lookup. Which has the upside that no locks leak out
of the core abstractions. But it means that we need to hold a
temporary reference to the object while checking mmap constraints, to
make sure the object doesn't disappear. Extended the critical region
would have worked too, but would result in more leaky locking.

Also, this is the final bit which required dev->struct_mutex in gem
core, now modern drivers can be completely struct_mutex free!

This needs a new drm_vma_offset_exact_lookup_locked and makes both
drm_vma_offset_exact_lookup and drm_vma_offset_lookup unused.

v2: Don't leak object references in failure paths (David).

v3: Add a comment from Chris explaining how the ordering works, with
the slight adjustment that I dropped any mention of struct_mutex since
with this patch it's now immaterial ot core gem.

Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://mid.gmane.org/1444901623-18918-1-git-send-email-daniel.vetter@ffwll.ch
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
8 years agodrm/vgem: Drop vgem_drm_gem_mmap
Daniel Vetter [Thu, 15 Oct 2015 07:36:23 +0000 (09:36 +0200)]
drm/vgem: Drop vgem_drm_gem_mmap

It's duplicating (without using some of the helpers) drm_gem_mmap with
the addition that it can redirect to drm-buf mmap support. But prime
import/export was dropped in

commit 990ed2720717173bbdea4cfb2bad37cc7aa91495
Author: Rob Clark <robdclark@gmail.com>
Date:   Thu May 21 11:58:30 2015 -0400

    drm/vgem: drop DRIVER_PRIME (v2)

for now, so this is dead code. And since I want to rework the locking
for drm_gem_mmap it seems simpler to de-dupe this code for now and
then start over with the reworked one again, if we want to resurrect
this all indeed.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://mid.gmane.org/1444894601-5200-8-git-send-email-daniel.vetter@ffwll.ch
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Fix return value of drm_framebuffer_init()
Lukas Wunner [Thu, 15 Oct 2015 09:56:56 +0000 (11:56 +0200)]
drm: Fix return value of drm_framebuffer_init()

In its original version, drm_framebuffer_init() returned a negative int
if drm_mode_object_get() failed (f453ba046074, "DRM: add mode setting
support").

This was accidentally disabled by commit 4b096ac10da0 ("drm: revamp
locking around fb creation/destruction"). Thus, drm_framebuffer_init()
pretends success if drm_mode_object_get() failed.

Reinstate the original behaviour. Also fix erroneous kernel-doc of
drm_mode_object_get().

Fixes: 4b096ac10da0 ("drm: revamp locking around fb creation/
    destruction")
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/gem: Use container_of in drm_gem_object_free
Daniel Vetter [Thu, 15 Oct 2015 07:36:26 +0000 (09:36 +0200)]
drm/gem: Use container_of in drm_gem_object_free

Just a random thing I spotted while reading code - better safe than
sorry.

Link: http://mid.gmane.org/1444894601-5200-11-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
8 years agodrm/gem: Check locking in drm_gem_object_unreference
Daniel Vetter [Thu, 15 Oct 2015 07:36:25 +0000 (09:36 +0200)]
drm/gem: Check locking in drm_gem_object_unreference

Pretty soon only some drivers will need dev->struct_mutex in their
gem_free_object callbacks. Hence it's really important to make sure
everything still keeps getting this right.

v2: Don't check for locking before we check for non-NULL obj. Spotted
by Dan Carpenter.

Link: http://mid.gmane.org/1444894601-5200-10-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
8 years agoMerge branch 'virtio-gpu-for-drm-next' of git://git.kraxel.org/linux into drm-next
Dave Airlie [Sun, 18 Oct 2015 21:16:15 +0000 (07:16 +1000)]
Merge branch 'virtio-gpu-for-drm-next' of git://git.kraxel.org/linux into drm-next

Add 3D support to the virtio-gpu.

* 'virtio-gpu-for-drm-next' of git://git.kraxel.org/linux:
  virtio-gpu: add page flip support
  virtio-gpu: mark as a render gpu
  virtio-gpu: add basic prime support
  virtio-gpu: add 3d/virgl support
  virtio-gpu: don't free things on ttm_bo_init failure
  virtio-gpu: wait for cursor updates finish
  virtio-gpu: add & use virtio_gpu_queue_fenced_ctrl_buffer
  virtio-gpu: add virtio_gpu_queue_ctrl_buffer_locked

8 years agodrm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj
Daniel Vetter [Thu, 15 Oct 2015 07:36:24 +0000 (09:36 +0200)]
drm/gem: Drop struct_mutex requirement from drm_gem_mmap_obj

Since

commit 131e663bd6f1055caaff128f9aa5071d227eeb72
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Jul 9 23:32:33 2015 +0200

    drm/gem: rip out drm vma accounting for gem mmaps

there is no need for this any more.

v2: Fixup compile noise spotted by 0-day build.

Link: http://mid.gmane.org/1444894601-5200-9-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
8 years agodrm/i810_drm.h: include drm/drm.h
Mikko Rapeli [Thu, 15 Oct 2015 05:55:51 +0000 (07:55 +0200)]
drm/i810_drm.h: include drm/drm.h

Fixes userspace compilation error:

error: array type has incomplete element type
struct drm_clip_rect boxes[I810_NR_SAREA_CLIPRECTS];

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agor128_drm.h: include drm/drm.h
Mikko Rapeli [Thu, 15 Oct 2015 05:55:46 +0000 (07:55 +0200)]
r128_drm.h: include drm/drm.h

Fixes compile error:

drm/r128_drm.h:156:23: error: array type has incomplete element type
  struct drm_clip_rect boxes[R128_NR_SAREA_CLIPRECTS];

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agosavage_drm.h: include <drm/drm.h>
Mikko Rapeli [Thu, 15 Oct 2015 05:55:49 +0000 (07:55 +0200)]
savage_drm.h: include <drm/drm.h>

Fixes compiler error:

drm/savage_drm.h:50:24: error: array type has incomplete element type
  struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS +

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agogpu/doc: Convert to markdown harder
Lukas Wunner [Mon, 12 Oct 2015 07:10:33 +0000 (09:10 +0200)]
gpu/doc: Convert to markdown harder

This snippet...

    * Lock VMA manager for extended lookups. Only *_locked() VMA function calls
    * are allowed while holding this lock. All other contexts are blocked from VMA
    * until the lock is released via drm_vma_offset_unlock_lookup().

...causes markdown-enabled kernel-doc to barf:

    debian/build/build-doc/Documentation/DocBook/gpu.aux.xml:3247: parser error : Opening and ending tag mismatch: emphasis line 3247 and function
       *<function><emphasis>locked</function> VMA function calls are allowed while
                                             ^
    /root/airlied/debian/build/build-doc/Documentation/DocBook/gpu.aux.xml:3249: parser error : Opening and ending tag mismatch: function line 3249 and emphasis
       released via <function>drm</emphasis>vma_offset_unlock_lookup</function>.
                                            ^
    unable to parse /root/airlied/debian/build/build-doc/Documentation/DocBook/gpu.aux.xml

A quick workaround is to replace *_locked() by X_locked().

Cc: Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
[danvet: Just drop the X_ too, the usual style is _unlocked, except
that _ seems to be what annoys markdown.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agogpu/doc: Add vga_switcheroo documentation
Lukas Wunner [Sun, 11 Oct 2015 09:55:00 +0000 (11:55 +0200)]
gpu/doc: Add vga_switcheroo documentation

Requires Markdown support.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agogpu/doc: Fix up remaining occurrences of old document title
Lukas Wunner [Sun, 11 Oct 2015 09:26:26 +0000 (11:26 +0200)]
gpu/doc: Fix up remaining occurrences of old document title

Following Daniel's renaming of the document.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/doc: Rename docbook to gpu.tmpl
Daniel Vetter [Wed, 7 Oct 2015 07:55:28 +0000 (09:55 +0200)]
drm/doc: Rename docbook to gpu.tmpl

DRM is a lot more than a direct rendering manager nowadays, and there's
also a bunch of things worth documenting for gpu driver developers
outside of drivers/gpu/drm, like vgaarb, vga_switcheroo or the various
hardware buses like host1x and ipu-v3.

To avoid further confusion let's rename the top-level to reflect
reality.

And yes I'm already looking forward to when we need to replace the G
in GPU with a * ;-)

Inspired by a thread with Lukas since he refused to include the
vga_switcheroo docs into the drm docs because it's not drm.

Cc: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
[Lukas: Drop BUG() easter egg in i915_gem_execbuffer.c spotted by Jani
and fix typos in commit message.]
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: misc cleanup
Rob Clark [Tue, 13 Oct 2015 14:13:28 +0000 (10:13 -0400)]
drm: misc cleanup

Drop unused drm_atomic and fix comment for drm_debug.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agovga_switcheroo: Use enum vga_switcheroo_client_id instead of int
Lukas Wunner [Fri, 28 Aug 2015 10:54:07 +0000 (12:54 +0200)]
vga_switcheroo: Use enum vga_switcheroo_client_id instead of int

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agovga_switcheroo: Use VGA_SWITCHEROO_UNKNOWN_ID instead of -1
Lukas Wunner [Fri, 28 Aug 2015 11:30:32 +0000 (13:30 +0200)]
vga_switcheroo: Use VGA_SWITCHEROO_UNKNOWN_ID instead of -1

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agovga_switcheroo: Use enum vga_switcheroo_state instead of int
Lukas Wunner [Fri, 28 Aug 2015 09:56:26 +0000 (11:56 +0200)]
vga_switcheroo: Use enum vga_switcheroo_state instead of int

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Add DRM_DEBUG_VBL()
Ville Syrjälä [Fri, 9 Oct 2015 19:57:37 +0000 (22:57 +0300)]
drm: Add DRM_DEBUG_VBL()

Add a new debug class for _verbose_ debug message from the vblank code.
That is message we spew out potentially for every vblank interrupt.
Thierry already got annoyed at the spew, and now I managed to lock up
my box with these debug prints (seems serial console + a few debug
prints every vblank aren't a good combination).

Or should I maybe call it DRM_DEBUG_IRQ?

Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Don't use '\' for string literal concatenation
Ville Syrjälä [Fri, 9 Oct 2015 19:57:36 +0000 (22:57 +0300)]
drm: Don't use '\' for string literal concatenation

String literals get concatenated just fine on their own,
no need to use '\'.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/<drivers>: Drop DRM_UNLOCKED from modeset drivers
Daniel Vetter [Tue, 8 Sep 2015 11:56:30 +0000 (13:56 +0200)]
drm/<drivers>: Drop DRM_UNLOCKED from modeset drivers

Just one special case (since i915 lost its ums code, yay):
- radeon: Has slots for the old ums ioctls which don't have
  DRM_UNLOCKED, but all filled with drm_invalid_op. So ok to drop it
  everywhere.

Every other kms driver just has DRM_UNLOCKED for all their ioctls, as
they should.

v2: admgpu happened, include that one too. And i915 lost its UMS
support which means we can change all the i915 ioctls too.

v3: Rebased on top of new vmwgfx DX interface extensions.

v4: Rebase on top of render-node support in exynos.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm: Enforce unlocked ioctl operation for kms driver ioctls
Daniel Vetter [Mon, 28 Sep 2015 19:42:40 +0000 (21:42 +0200)]
drm: Enforce unlocked ioctl operation for kms driver ioctls

With the prep patches for i915 all kms drivers either have
DRM_UNLOCKED on all their ioctls. Or the ioctl always directly returns
with an invariant return value when in modeset mode. But that's only
the case for i915 and radeon. The drm core ioctls are unfortunately
too much a mess still to dare this.

Follow-up patches will remove DRM_UNLOCKED from all kms drivers to
prove that this is indeed the case.

Also update the documentation.

v2: Really only do this for driver ioctls, spotted by David Herrmann.
And drop spurious whitespace change.

Cc: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/i915: Mark getparam ioctl as DRM_UNLOCKED
Daniel Vetter [Tue, 8 Sep 2015 11:56:25 +0000 (13:56 +0200)]
drm/i915: Mark getparam ioctl as DRM_UNLOCKED

With kms all the data getparam looks at is actually invariant, and
certainly not protected by the global kms mutex. With ums all the
setup code is already racy as hell, so this won't make things any
worse.

I've done this change so that all ioctl still used by kms drivers
are marked as DRM_UNLOCKED, besides that we obviously don't need
it any more in kms mode.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agovirtio-gpu: add page flip support
Gerd Hoffmann [Wed, 23 Sep 2015 10:19:11 +0000 (12:19 +0200)]
virtio-gpu: add page flip support

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 years agovirtio-gpu: mark as a render gpu
Dave Airlie [Tue, 16 Jun 2015 05:41:56 +0000 (15:41 +1000)]
virtio-gpu: mark as a render gpu

Also add DRM_RENDER_ALLOW to the ioctls.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 years agovirtio-gpu: add basic prime support
Dave Airlie [Fri, 23 Jan 2015 03:04:11 +0000 (13:04 +1000)]
virtio-gpu: add basic prime support

This is enough to enable DRI3.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 years agovirtio-gpu: add 3d/virgl support
Gerd Hoffmann [Tue, 28 Oct 2014 11:48:00 +0000 (12:48 +0100)]
virtio-gpu: add 3d/virgl support

Add the bits needed for opengl rendering support: query
capabilities, new virtio commands, drm ioctls.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 years agovirtio-gpu: don't free things on ttm_bo_init failure
Dave Airlie [Tue, 13 Oct 2015 06:55:48 +0000 (16:55 +1000)]
virtio-gpu: don't free things on ttm_bo_init failure

ttm_bo_init will call the destroy callback which will do all
this, this was causing a double free.

Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agovirtio-gpu: wait for cursor updates finish
Gerd Hoffmann [Tue, 15 Sep 2015 06:20:46 +0000 (08:20 +0200)]
virtio-gpu: wait for cursor updates finish

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 years agovirtio-gpu: add & use virtio_gpu_queue_fenced_ctrl_buffer
Gerd Hoffmann [Wed, 19 Aug 2015 21:44:15 +0000 (23:44 +0200)]
virtio-gpu: add & use virtio_gpu_queue_fenced_ctrl_buffer

Add helper function to handle the submission of fenced control requests.
Make sure we initialize the fence while holding the virtqueue lock, so
requests can't be reordered.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 years agovirtio-gpu: add virtio_gpu_queue_ctrl_buffer_locked
Gerd Hoffmann [Wed, 19 Aug 2015 21:35:57 +0000 (23:35 +0200)]
virtio-gpu: add virtio_gpu_queue_ctrl_buffer_locked

Add virtio_gpu_queue_ctrl_buffer_locked function, which does the same as
virtio_gpu_queue_ctrl_buffer but does not take the virtqueue lock.  The
caller must hold the lock instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 years agovia_drm.h: move struct via_file_private definition to drivers/gpu/drm/via/via_drv.h
Mikko Rapeli [Thu, 15 Oct 2015 05:55:48 +0000 (07:55 +0200)]
via_drm.h: move struct via_file_private definition to drivers/gpu/drm/via/via_drv.h

Fixes userspace compile error since list_head is not exported to userspace
headers.

Suggested by Emil Velikov <emil.l.velikov@gmail.com> at
https://lkml.org/lkml/2015/6/3/792

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoinclude/uapi/drm/sis_drm.h: move sis_file_private to drivers/gpu/drm/sis/sis_drv.h
Mikko Rapeli [Thu, 15 Oct 2015 05:55:50 +0000 (07:55 +0200)]
include/uapi/drm/sis_drm.h: move sis_file_private to drivers/gpu/drm/sis/sis_drv.h

Fixes userspace compile error:

drm/sis_drm.h:68:19: error: field ‘obj_list’ has incomplete type
  struct list_head obj_list;

Suggested by Emil Velikov <emil.l.velikov@gmail.com> at
https://lkml.org/lkml/2015/6/3/792

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoMerge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into...
Dave Airlie [Fri, 16 Oct 2015 00:25:49 +0000 (10:25 +1000)]
Merge branch 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next

This series:
* adds support for interlaced video modes to the ipu-v3 driver
  and dw_hdmi bridge.
* reworks the dw_hdmi connector enable/disable support, to ensure that
  when DRM disables the output, it stays disabled irrespective of the
  hotplug state.
* adds support for connector forcing, so we can force the hotplug state
  for this connector.
* adds the ALSA AHB audio driver to the bridge: Iwai has acked the
  audio driver.
* a few fixes to the ACR calculations to allow more modes to work with
  audio on iMX6.

Fabio has independently tested this series, so all patches here carry
his tested-by tag.

* 'drm-dwhdmi-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  drm: bridge/dw_hdmi: replace CTS calculation for the ACR
  drm: bridge/dw_hdmi: remove ratio support from ACR code
  drm: bridge/dw_hdmi: adjust pixel clock values in N calculation
  drm: bridge/dw_hdmi: avoid being recursive in N calculation
  drm: bridge/dw_hdmi-ahb-audio: allow larger buffer sizes
  drm: bridge/dw_hdmi-ahb-audio: basic support for multi-channel PCM audio
  drm: bridge/dw_hdmi-ahb-audio: parse ELD from HDMI driver
  drm: bridge/dw_hdmi-ahb-audio: add audio driver
  drm: bridge/dw_hdmi: improve HDMI enable/disable handling
  drm: bridge/dw_hdmi: add connector mode forcing
  drm: bridge/dw_hdmi: add support for interlaced video modes
  gpu: imx: fix support for interlaced modes
  gpu: imx: simplify sync polarity setting

8 years agoMerge commit '06d1ee32a4d25356a710b49d5e95dbdd68bdf505' of git://git.kernel.org/pub...
Dave Airlie [Fri, 16 Oct 2015 00:10:32 +0000 (10:10 +1000)]
Merge commit '06d1ee32a4d25356a710b49d5e95dbdd68bdf505' of git://git./linux/kernel/git/torvalds/linux into drm-next

Backmerge the drm-fixes pull from Linus's tree into drm-next.

This is to fix some conflicts and make future pulls cleaner

8 years agoMerge tag 'topic/drm-misc-2015-10-08' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Fri, 16 Oct 2015 00:02:35 +0000 (10:02 +1000)]
Merge tag 'topic/drm-misc-2015-10-08' of git://anongit.freedesktop.org/drm-intel into drm-next

Another round of drm-misc. Unfortunately the DRM_UNLOCKED removal for
DRIVER_MODESET isn't complete yet for lack of review on 1-2 patches.
Otherwise just various stuff all over.

* tag 'topic/drm-misc-2015-10-08' of git://anongit.freedesktop.org/drm-intel:
  drm: Stop using drm_vblank_count() as the hw frame counter
  drm/irq: Use unsigned int pipe in public API
  drm: Use DRM_ROTATE_MASK and DRM_REFLECT_MASK
  drm: Add DRM_ROTATE_MASK and DRM_REFLECT_MASK
  vga_switcheroo: Add missing locking
  vgaarb: use kzalloc in vga_arbiter_add_pci_device()
  drm: Don't zero vblank timestamps from the irq handler
  drm: Hack around CONFIG_AGP=m build failures
  drm/i915: Remove setparam ioctl
  drm: Remove dummy agp ioctl wrappers
  drm/vmwgfx: Stop checking for DRM_UNLOCKED
  drm/drm_ioctl.c: kerneldoc
  drm: Define a drm_invalid_op ioctl implementation
  drm: Remove __OS_HAS_AGP
  drm/doc: Update docs about device instance setup

8 years agoMerge tag 'drm-intel-next-2015-09-28-merged' of git://anongit.freedesktop.org/drm...
Dave Airlie [Thu, 15 Oct 2015 23:59:19 +0000 (09:59 +1000)]
Merge tag 'drm-intel-next-2015-09-28-merged' of git://anongit.freedesktop.org/drm-intel into drm-next

drm-intel-next-2015-09-28:
- fastboot by default for some systems (Maarten Lankhorts)
- piles of workarounds for bxt and skl
- more fbc work from Paulo
- fix hdmi hotplug detection (Sonika)
- first few patches from Ville to parametrize register macros, prep work for
  typesafe mmio functions
- prep work for nv12 rotation (Tvrtko Ursulin)
- various other bugfixes and improvements all over

I have another backmerge here since things became messy and I didn't
realize you resolved some of them already (usually you complain when
there's a conflict ...).

For 4.4 I plan one more feature round after this and then that's it.
* tag 'drm-intel-next-2015-09-28-merged' of git://anongit.freedesktop.org/drm-intel: (80 commits)
  drm/i915: Update DRIVER_DATE to 20150928
  drm/i915: fix task reference leak in i915_debugfs.c
  drm/i915: Defer adding preallocated stolen objects to the VM list
  drm/i915: Remove extraneous request cancel.
  drm/i915: Enable querying offset of UV plane with intel_plane_obj_offset
  drm/i915: Support NV12 in rotated GGTT mapping
  drm/i915: Support appending to the rotated pages mapping
  drm/i915: Support planar formats in tile height calculations
  drm/i915/bxt: Update revision id for BXT C0
  drm/i915: Parametrize CSR_PROGRAM registers
  drm/i915: Parametrize DDI_BUF_TRANS registers
  drm/i915: Parametrize TV luma/chroma filter registers
  drm/i915: Replace raw numbers with the approproate register name in ILK turbo code
  drm/i915: Parametrize ILK turbo registers
  drm/i915: Parametrize FBC_TAG registers
  drm/i915: Parametrize GEN7_GT_SCRATCH and GEN7_LRA_LIMITS
  drm/i915: Parametrize LRC registers
  drm/i915: Don't pass sdvo_reg to intel_sdvo_select_{ddc, i2c}_bus()
  drm/i915: Ignore "digital output" and "not HDMI output" bits for eDP detection
  drm/i915: Make sure we don't detect eDP on g4x
  ...

8 years agoMerge branch 'drm-next-4.4' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Thu, 15 Oct 2015 23:39:14 +0000 (09:39 +1000)]
Merge branch 'drm-next-4.4' of git://people.freedesktop.org/~agd5f/linux into drm-next

This is the first radeon and amdgpu pull for drm-next. Highlights include:
- Efficiency improvements to the CS checker for pre-SI asics
- Cursor fixes ported from radeon to amdgpu
- Enable GPU scheduler by default
- Add a bunch of GPUVM debugging options
- Add support for some new atombios opcodes
- Misc cleanups and fixes

* 'drm-next-4.4' of git://people.freedesktop.org/~agd5f/linux: (42 commits)
  drm/amdgpu: fix lockup when clean pending fences
  drm/amdgpu: add timer to fence to detect scheduler lockup
  drm/amdgpu: add VM CS mapping trace point
  drm/amdgpu: add option to clear VM page tables after every submit
  drm/amdgpu: add option to stop on VM fault
  drm/amdgpu: only print meaningful VM faults
  drm/amdgpu: also trace already allocated VMIDs
  drm/amdgpu: Drop unnecessary #include <linux/vga_switcheroo.h>
  drm/radeon: Drop unnecessary #include <linux/vga_switcheroo.h>
  drm/amdgpu: clean up pageflip interrupt handling
  drm/amdgpu: rework sdma structures
  drm/amdgpu: unpin cursor BOs on suspend and pin them again on resume
  drm/amdgpu/dce8: Fold set_cursor() into show_cursor()
  drm/amdgpu/dce8: Clean up reference counting and pinning of the cursor BOs
  drm/amdgpu/dce8: Move hotspot handling out of set_cursor
  drm/amdgpu/dce8: Re-show the cursor after a modeset (v2)
  drm/amdgpu/dce8: Use cursor_set2 hook for enabling / disabling the HW cursor
  drm/amdgpu/dce11: Fold set_cursor() into show_cursor()
  drm/amdgpu/dce11: Clean up reference counting and pinning of the cursor BOs
  drm/amdgpu/dce11: Move hotspot handling out of set_cursor
  ...

8 years agodrm/i915: Kill the leftover RMW from ivb_sprite_disable()
Ville Syrjälä [Thu, 15 Oct 2015 14:04:04 +0000 (17:04 +0300)]
drm/i915: Kill the leftover RMW from ivb_sprite_disable()

We still had one lingering RMW in ivb_sprite_disable(), all the other
RMWs were killed off from the sprite code some time ago. Kill the
straggler too.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/radeon: Use rdev->gem.mutex to protect hyperz/cmask owners
Daniel Vetter [Thu, 15 Oct 2015 07:36:34 +0000 (09:36 +0200)]
drm/radeon: Use rdev->gem.mutex to protect hyperz/cmask owners

This removes the last depency of radeon for dev->struct_mutex!

Also the locking scheme for hyperz/cmask owners seems a bit unsound,
there's no protection in the preclose handler (and that never did hold
dev->struct_mutex while being called). So grab the same lock there,
too.

There's also all the checks in the cs checker, but since the overall
design seems to never stall for the previous owner I figured it's ok
if I leave this racy. It was racy even before I touched it after all
too.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
8 years agodrm/i915: restore ggtt double-bind avoidance
Daniel Vetter [Thu, 15 Oct 2015 12:23:01 +0000 (14:23 +0200)]
drm/i915: restore ggtt double-bind avoidance

This was accidentally lost in

commit 75d04a3773ecee617847de963ae4195d6aa74c28
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Tue Apr 28 17:56:17 2015 +0300

    drm/i915/gtt: Allocate va range only if vma is not bound

While at it implement an improved version suggested by Chris which
avoids the double-bind irrespective of what type of bind is done
first.

Note that this exact bug was already addressed in

commit d0e30adc42d979e4adc36b6c112b57337423b70c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jul 29 20:02:48 2015 +0100

    drm/i915: Mark PIN_USER binding as GLOBAL_BIND without the aliasing ppgtt

but the problem is still that originally in

commit 0875546c5318c85c13d07014af5350e9000bc9e9
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Apr 20 09:04:05 2015 -0700

    drm/i915: Fix up the vma aliasing ppgtt binding

if forgotten to take into account there case where we have a
GLOBAL_BIND before a LOCAL_BIND. This patch here fixes that.

v2: Pimp commit message and revert the partial fix.

v3: Split into two functions to specialize on aliasing_ppgtt y/n.

v4: WARN_ON for paranoia in the init sequence, since the ggtt probe
and aliasing ppgtt setup are far apart.

v5: Style nits.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://mid.gmane.org/1444911781-32607-1-git-send-email-daniel.vetter@ffwll.ch
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/i915/skl: Enable pipe gamma for sprite planes.
Bob Paauwe [Thu, 27 Aug 2015 20:46:30 +0000 (13:46 -0700)]
drm/i915/skl: Enable pipe gamma for sprite planes.

Since SKL has universal planes, we should configure the sprite planes
and the primary plane the same.  For the primary plane we do enable
the pipe gamma on the plane so do the same for the non-primary planes.

Without this, the pipe CRC values will be different for something
displayed on the primary plane and something displayed on a sprite
plane when the ARGB8888 format is used.

Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agodrm/i915/skl+: Enable pipe CSC on cursor planes. (v2)
Bob Paauwe [Mon, 31 Aug 2015 21:03:30 +0000 (14:03 -0700)]
drm/i915/skl+: Enable pipe CSC on cursor planes. (v2)

Extend this to SKL and BXT as it's needed for these platforms as well.

v2: Change if condition to HAS_DDI() instead of listing each platform
Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
8 years agoMerge branch 'drm-tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into...
Dave Airlie [Thu, 15 Oct 2015 04:17:13 +0000 (14:17 +1000)]
Merge branch 'drm-tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next

* removes the now unused DRM slave encoder support, which all users have
  migrated away from, allowing us to simplify the code.
* ensure all pending interrupts are processed together, rather than
  needing the handler to be re-entered each time.
* use more HDMI helpers to setup the info frames.
* fix EDID read handling by ensuring that we always wait the specified time
  before attempting to read the EDID, no matter where the EDID read request
  came from.

* 'drm-tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  drm/i2c: tda998x: clean up after struct tda998x_priv2 removal
  drm/i2c: tda998x: kill struct tda998x_priv2
  drm/i2c: tda998x: move connector into struct tda998x_priv
  drm/i2c: tda998x: remove encoder pointer
  drm/i2c: tda998x: remove DRM slave encoder support
  drm/i2c: tda998x: use more HDMI helpers
  drm/i2c: tda998x: handle all outstanding interrupts
  drm/i2c: tda998x: convert to u8/u16/u32 types
  drm/i2c: tda998x: re-implement "Fix EDID read timeout on HDMI connect"
  drm/i2c: tda998x: report whether we actually handled the IRQ
  drm/i2c: tda998x: remove useless NULL checks

8 years agoMerge branch 'drm-armada-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into...
Dave Airlie [Thu, 15 Oct 2015 04:02:47 +0000 (14:02 +1000)]
Merge branch 'drm-armada-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next

* remove support for the non-component support from the Armada DRM driver,
  switching it to component-only mode.
* create a "armada plane" to allow the primary and overlay planes to share
  some code.
* increase efficiency by using inherently atomic operations, rather than
  spinlocking to achieve atomicity.  Eg, if we want to exchange a value,
  using xchg().
* increase PM savings by stopping the external pixel clock when we're in
  DPMS mode.

* 'drm-armada-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  drm/armada: move frame wait wakeup into plane work
  drm/armada: convert overlay plane vbl worker to a armada plane worker
  drm/armada: move CRTC flip work to primary plane work
  drm/armada: move frame wait into armada_frame
  drm/armada: move the locking for armada_drm_vbl_event_remove()
  drm/armada: move the update of dplane->ctrl0 out of spinlock
  drm/armada: move write to dma_ctrl0 to armada_drm_crtc_plane_disable()
  drm/armada: provide a common helper to disable a plane
  drm/armada: allocate primary plane ourselves
  drm/armada: add primary plane creation
  drm/armada: introduce generic armada_plane struct
  drm/armada: update armada overlay to use drm_universal_plane_init()
  drm/armada: use xchg() to atomically update dplane->old_fb
  drm/armada: factor out retirement of old fb
  drm/armada: rename overlay identifiers
  drm/armada: redo locking and atomics for armada_drm_crtc_complete_frame_work()
  drm/armada: disable CRTC clock during DPMS
  drm/armada: use drm_plane_force_disable() to disable the overlay plane
  drm/armada: move vbl code into armada_crtc
  drm/armada: remove non-component support

8 years agodrm/amdgpu: fix lockup when clean pending fences
Junwei Zhang [Tue, 13 Oct 2015 03:14:23 +0000 (11:14 +0800)]
drm/amdgpu: fix lockup when clean pending fences

The first lockup fence will lock the fence list of scheduler.
Then cancel the delayed workqueues for all clean pending fences
without waiting the workqueues to finish.

Change-Id: I9bec826de1aa49d587b0662f3fb4a95333979429
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: add timer to fence to detect scheduler lockup
Junwei Zhang [Sat, 10 Oct 2015 00:48:42 +0000 (08:48 +0800)]
drm/amdgpu: add timer to fence to detect scheduler lockup

Change-Id: I67e987db0efdca28faa80b332b75571192130d33
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: David Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
8 years agodrm/amdgpu: add VM CS mapping trace point
Christian König [Mon, 28 Sep 2015 10:00:23 +0000 (12:00 +0200)]
drm/amdgpu: add VM CS mapping trace point

Output all VM mappings a command submission uses.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>